diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml new file mode 100644 index 0000000..fa80f57 --- /dev/null +++ b/.github/workflows/container.yml @@ -0,0 +1,93 @@ +# Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: container build and push + +on: + push: + branches: [ "*" ] + tags: [ '*.*.*' ] + pull_request: + branches: [ "*" ] + +env: + REGISTRY: ghcr.io + EULIX_REGISTRY: ${{ secrets.EULIX_REGISTRY }} + IMAGE_NAME: ${{ github.repository }} + +jobs: + + build: + runs-on: [self-hosted, linux, x64] + permissions: + contents: read + packages: write + id-token: write + + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Setup Docker buildx + uses: docker/setup-buildx-action@v2 + + - name: Inspect builder + run: | + echo "Name: ${{ steps.buildx.outputs.name }}" + echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}" + echo "Status: ${{ steps.buildx.outputs.status }}" + echo "Flags: ${{ steps.buildx.outputs.flags }}" + echo "Platforms: ${{ steps.buildx.outputs.platforms }}" + + - name: Log into registry ${{ env.REGISTRY }} + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Log into registry ${{ env.EULIX_REGISTRY }} + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + registry: ${{ env.EULIX_REGISTRY }} + username: ${{ secrets.EULIX_REGISTRY_USERNAME }} + password: ${{ secrets.EULIX_REGISTRY_PASSWORD }} + + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v2 + with: + images: | + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + ${{ env.EULIX_REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build and push Docker image + id: build-and-push + uses: docker/build-push-action@v2 + with: + context: . + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + builder: ${{ steps.buildx.outputs.name }} + platforms: linux/amd64,linux/arm64 + cache-from: type=gha + cache-to: type=gha,mode=max + file: Dockerfile \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..84e3948 --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +# Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +/src/main/.vscode +fileapi.exe +swag.exe +fileapi + +fileapi +.vscode/launch.json +.vscode/sftp.json +aofs.exe diff --git a/.license.tpl b/.license.tpl new file mode 100644 index 0000000..7a4f56d --- /dev/null +++ b/.license.tpl @@ -0,0 +1,212 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +{{ range .Groups }} +======================================================================== +{{.LicenseID}} licenses +======================================================================== +{{range .Deps}} + {{.Name}} {{.Version}} {{.LicenseID}} +{{- end }} +{{ end }} \ No newline at end of file diff --git a/.licenserc.yaml b/.licenserc.yaml new file mode 100644 index 0000000..7bc6cdc --- /dev/null +++ b/.licenserc.yaml @@ -0,0 +1,59 @@ +# Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +header: + license: + spdx-id: Apache-2.0 + copyright-owner: ISCAS + software-name: aospace-fileapi + content: | + Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + paths: + - '**' + + paths-ignore: + - 'licenses' + - '**/go.mod' + - '**/go.sum' + - '**/*.md' + - '**/*.json' + - 'LICENSE' + - 'NOTICE' + - 'VERSION' + - '.license.tpl' + - 'res/99-serial-usb.rules' + + language: + Dockerfile: + filenames: + - Dockerfile.local + - Dockerfile.goc + comment_style_id: Hashtag + +dependency: + files: + - go.mod \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4affd81 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,31 @@ +# Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM golang:1.18-alpine3.14 as builder + +WORKDIR /opt/ + +COPY . . +RUN go env -w CGO_ENABLED=0 && go env -w GO111MODULE=on && go build -o space-aofs + +FROM alpine:3.14 + +RUN apk --no-cache add ntfs-3g lsblk exfat-utils fuse-exfat usbutils mediainfo eudev +COPY --from=builder /opt/space-aofs /usr/bin +COPY --from=builder /opt/template/ /tmp/ +RUN chmod +x /usr/bin/space-aofs +HEALTHCHECK --interval=30s --timeout=15s \ + CMD wget --output-document=/dev/null http://localhost:2001/space/v1/api/status?userId=1 + +ENTRYPOINT ["/usr/bin/space-aofs"] diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..03ccade --- /dev/null +++ b/LICENSE @@ -0,0 +1,323 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + +======================================================================== +Apache-2.0 licenses +======================================================================== + + github.com/bytedance/sonic v1.9.1 Apache-2.0 + github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 Apache-2.0 + github.com/go-openapi/jsonpointer v0.19.5 Apache-2.0 + github.com/go-openapi/jsonreference v0.19.6 Apache-2.0 + github.com/go-openapi/spec v0.20.4 Apache-2.0 + github.com/go-openapi/swag v0.21.1 Apache-2.0 + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd Apache-2.0 + github.com/modern-go/reflect2 v1.0.2 Apache-2.0 + gopkg.in/yaml.v2 v2.4.0 Apache-2.0 + +======================================================================== +BSD-2-Clause licenses +======================================================================== + + github.com/go-redis/redis v6.15.9+incompatible BSD-2-Clause + +======================================================================== +BSD-3-Clause licenses +======================================================================== + + github.com/DATA-DOG/go-sqlmock v1.5.0 BSD-3-Clause + github.com/PuerkitoBio/purell v1.1.1 BSD-3-Clause + github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 BSD-3-Clause + github.com/google/go-cmp v0.5.9 BSD-3-Clause + github.com/google/uuid v1.3.0 BSD-3-Clause + github.com/gorilla/context v1.1.1 BSD-3-Clause + github.com/gorilla/securecookie v1.1.1 BSD-3-Clause + github.com/gorilla/sessions v1.2.1 BSD-3-Clause + github.com/pmezard/go-difflib v1.0.0 BSD-3-Clause + github.com/twitchyliquid64/golang-asm v0.15.1 BSD-3-Clause + golang.org/x/arch v0.3.0 BSD-3-Clause + golang.org/x/crypto v0.9.0 BSD-3-Clause + golang.org/x/net v0.10.0 BSD-3-Clause + golang.org/x/sys v0.8.0 BSD-3-Clause + golang.org/x/text v0.9.0 BSD-3-Clause + golang.org/x/tools v0.7.0 BSD-3-Clause + google.golang.org/protobuf v1.30.0 BSD-3-Clause + gopkg.in/fsnotify.v1 v1.4.7 BSD-3-Clause + gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 BSD-3-Clause + +======================================================================== +ISC licenses +======================================================================== + + github.com/davecgh/go-spew v1.1.1 ISC + +======================================================================== +MIT licenses +======================================================================== + + github.com/KyleBanks/depth v1.2.1 MIT + github.com/alicebob/miniredis/v2 v2.30.0 MIT + github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 MIT + github.com/gabriel-vasile/mimetype v1.4.2 MIT + github.com/gin-contrib/sessions v0.0.5 MIT + github.com/gin-contrib/sse v0.1.0 MIT + github.com/gin-gonic/gin v1.9.1 MIT + github.com/go-playground/locales v0.14.1 MIT + github.com/go-playground/universal-translator v0.18.1 MIT + github.com/go-playground/validator v9.31.0+incompatible MIT + github.com/go-playground/validator/v10 v10.14.0 MIT + github.com/goccy/go-json v0.10.2 MIT + github.com/hpcloud/tail v1.0.0 MIT + github.com/jackc/chunkreader/v2 v2.0.1 MIT + github.com/jackc/pgconn v1.13.0 MIT + github.com/jackc/pgio v1.0.0 MIT + github.com/jackc/pgpassfile v1.0.0 MIT + github.com/jackc/pgproto3/v2 v2.3.1 MIT + github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b MIT + github.com/jackc/pgtype v1.12.0 MIT + github.com/jackc/pgx/v4 v4.17.2 MIT + github.com/jinzhu/inflection v1.0.0 MIT + github.com/jinzhu/now v1.1.5 MIT + github.com/josharian/intern v1.0.0 MIT + github.com/json-iterator/go v1.1.12 MIT + github.com/klauspost/cpuid/v2 v2.2.4 MIT + github.com/leodido/go-urn v1.2.4 MIT + github.com/lib/pq v1.10.3 MIT + github.com/mailru/easyjson v0.7.6 MIT + github.com/mattn/go-isatty v0.0.19 MIT + github.com/onsi/ginkgo v1.10.3 MIT + github.com/onsi/gomega v1.27.2 MIT + github.com/pelletier/go-toml/v2 v2.0.8 MIT + github.com/rs/zerolog v1.25.0 MIT + github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca MIT + github.com/stretchr/testify v1.8.3 MIT + github.com/swaggo/files v1.0.1 MIT + github.com/swaggo/gin-swagger v1.6.0 MIT + github.com/swaggo/swag v1.16.1 MIT + github.com/ugorji/go/codec v1.2.11 MIT + github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64 MIT + gopkg.in/go-playground/assert.v1 v1.2.1 MIT + gorm.io/datatypes v1.0.7 MIT + gorm.io/driver/mysql v1.3.2 MIT + gorm.io/driver/postgres v1.4.5 MIT + gorm.io/gorm v1.24.6 MIT + +======================================================================== +MIT and Apache-2.0 licenses +======================================================================== + + gopkg.in/yaml.v3 v3.0.1 MIT and Apache-2.0 + +======================================================================== +MPL-2.0 licenses +======================================================================== + + github.com/go-sql-driver/mysql v1.6.0 MPL-2.0 + +======================================================================== +Unlicense licenses +======================================================================== + + github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a Unlicense diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..b75197d --- /dev/null +++ b/NOTICE @@ -0,0 +1,19 @@ +--AOSpace-FileAPI-- +Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +--Third Party Software Notices-- +AOSpace-FileAPI use software provided by third parties, including open source software. The following copyright statements and licenses apply to various components that are distributed with AOSpace-FileAPI. The AOSpace-FileAPI that includes this file does not necessarily use all of the third party software components referred to below. + +Licensee must fully agree and comply with these license terms or must not use these components. The third party license terms apply only to the respective software to which the license pertains, and the third party license terms do not apply to the AOSpace-FileAPI. diff --git a/README.md b/README.md new file mode 100644 index 0000000..03aade5 --- /dev/null +++ b/README.md @@ -0,0 +1,81 @@ +# space-aofs + +English | [简体中文](./README_cn.md) + +space-aofs (AO.space File Service) is an internal module that provides file services for the AO.space server. It works in conjunction with the space-gateway and space-nginx modules to provide file access interfaces, including file listing, file upload, file download, and file management APIs. + +## Build And Run + +### Compilation environment preparation + +Please install the latest version of Docker. + +### Source code download + +Please follow the steps below to download the source code: + +- Create a local directory, run cmd: `mkdir space-aofs` +- Enter the local directory, run cmd: `cd ./space-aofs` +- Run cmd: `git clone git@github.com:ao-space/space-aofs.git .` + +### Container image building + +Run cmd: `docker build -t hub.eulix.xyz/ao-space/space-aofs:{tag} .` , Where the `tag` parameter can be modified according to the actual situation.。 + +### Deploy + +Please refer to [server deploy](https://github.com/ao-space/ao.space/blob/dev/docs/build-and-deploy.md#server-deploy). + +## Local running + +### Development language + +- Golang 1.18+ + +### Dependent services + +1. Redis 5.0 + +2. PostgreSQL 11.0 + + +### Environment variables + +- SQL_HOST: PostgreSQL server host +- SQL_PORT:PostgreSQL server port +- SQL_USER: PostgreSQL access account +- SQL_PASSWORD:PostgreSQL access password +- SQL_DATABASE:PostgreSQL database name +- DATA_PATH: path for data saving +- REDIS_URL:redis server url +- REDIS_PASS:redis server password +- STREAM_MQ_MAX_LEN:length for message queue,default: 1000 +- REDIS_STREAM_NAME:message queue, default: fileChangelogs +- GIN_MODE:debug/release + +### Swag document generation + +- Install swag : `go install github.com/swaggo/swag/cmd/swag@latest`` +- Run cmd: `swag init --parseDependency --parseInternal --o ./routers/api/docs` + +### Run + +- Install golang +- Start Redis +- Start PostgreSQL +- Set up the environment variables +- Run cmd: `go run .` + +## Contribution Guidelines + +Contributions to this project are very welcome. Here are some guidelines and suggestions to help you get involved in the project. + +[Contribution Guidelines](https://github.com/ao-space/ao.space/blob/dev/docs/en/contribution-guidelines.md) + +## Contact us + +- Email: +- [Official Website](https://ao.space) +- [Discussion group](https://slack.ao.space) + +## Thanks for your contribution + +Finally, thank you for your contribution to this project. We welcome contributions in all forms, including but not limited to code contributions, issue reports, feature requests, documentation writing, etc. We believe that with your help, this project will become more perfect and stronger. diff --git a/README_cn.md b/README_cn.md new file mode 100644 index 0000000..6f5dbff --- /dev/null +++ b/README_cn.md @@ -0,0 +1,82 @@ +# space-aofs + +[English](./README.md) | 简体中文 + +AOFS 为傲空间服务器端提供傲空间文件服务的内部模块,通过 space-gateway 和 space-nginx 模块提供文件访问接口,包括文件列表、文件上传、文件下载及文件管理等接口。 + +## 编译构建 + +### 环境准备 + +准备好 docker环境. + +### 源码下载 + +请按下面步骤下载源码: + +- 创建本地模块目录,执行命令: `mkdir space-aofs` +- 进入模块目录: `cd ./space-aofs` +- 下载源码: `git clone git@github.com:ao-space/space-aofs.git .` + +### 容器镜像构建 + +进入模块根目录,执行命令 `docker build -t hub.eulix.xyz/ao-space/space-aofs:{tag} .` , 其中 `tag` 参数可以根据实际情况修改,和服务器整体运行的 docker-compose.yml 保持一致即可。 + +### 部署 + +请参考 [服务器部署](https://github.com/ao-space/ao.space/blob/dev/docs/build-and-deploy_CN.md#%E6%9C%8D%E5%8A%A1%E7%AB%AF%E9%83%A8%E7%BD%B2)。 + +## 本地运行 + +### 开发语言 + +- Golang 1.18+ + +### 依赖服务 + +1. Redis 5.0 + +2. PostgreSQL 11.0 + + +### 服务运行所需环境变量 + +- SQL_HOST: 数据库的访问地址,不含端口 +- SQL_PORT:数据库的访问端口 +- SQL_USER: 数据库的访问账号 +- SQL_PASSWORD:数据库的访问账号密码 +- SQL_DATABASE:访问的数据库 +- DATA_PATH: 数据存放目录 +- REDIS_URL:redis的连接url +- REDIS_PASS:redis的密码 +- REDIS_DB:redis的库,默认为0 +- STREAM_MQ_MAX_LEN:队列长度,默认1000 +- REDIS_STREAM_NAME:fileChangelogs,队列名 +- GIN_MODE:debug/release(影响日志输出策略,以及是否启用swagger) + +### swag 文档生成 + +- 安装 swag 生成工具: `go install github.com/swaggo/swag/cmd/swag@latest`` +- 进入模块目录,执行命令: `swag init --parseDependency --parseInternal --o ./routers/api/docs` + +### 运行 + +- 安装 golang +- 启动 Redis +- 启动 PostgreSQL +- 设置环境变量 +- 本地运行服务 - 进入项目代码根目录,执行命令 `go run .` + +## 贡献指南 + +我们非常欢迎对本项目进行贡献。以下是一些指导原则和建议,希望能够帮助您参与到项目中来。 + +[贡献指南](https://github.com/ao-space/ao.space/blob/dev/docs/cn/contribution-guidelines.md) + +## 联系我们 + +- 邮箱: +- [官方网站](https://ao.space) +- [讨论组](https://slack.ao.space) + +## 感谢您的贡献 + +最后,感谢您对本项目的贡献。我们欢迎各种形式的贡献,包括但不限于代码贡献、问题报告、功能请求、文档编写等。我们相信在您的帮助下,本项目会变得更加完善和强大。 diff --git a/exit.go b/exit.go new file mode 100644 index 0000000..7c9d03e --- /dev/null +++ b/exit.go @@ -0,0 +1,31 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "os" + "os/signal" + "syscall" +) + +//优雅退出 +func Wait() { + term := make(chan os.Signal) + signal.Notify(term, os.Interrupt, syscall.SIGTERM) + select { + case <-term: + + } +} diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..78d57df --- /dev/null +++ b/go.mod @@ -0,0 +1,90 @@ +module aofs + +go 1.18 + +require ( + github.com/DATA-DOG/go-sqlmock v1.5.0 + github.com/alicebob/miniredis/v2 v2.30.0 + //github.com/buger/jsonparser v1.1.1 + github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 + github.com/gin-contrib/sessions v0.0.5 + github.com/gin-gonic/gin v1.9.1 + github.com/go-playground/validator v9.31.0+incompatible + github.com/go-redis/redis v6.15.9+incompatible + github.com/google/uuid v1.3.0 + github.com/lib/pq v1.10.3 + github.com/rs/zerolog v1.25.0 + github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca + github.com/stretchr/testify v1.8.3 + github.com/swaggo/files v1.0.1 + github.com/swaggo/gin-swagger v1.6.0 + github.com/swaggo/swag v1.16.1 + github.com/swaggo/swag/example/celler v0.0.0-20230720012930-27b27bd7e0c5 + gorm.io/datatypes v1.0.7 + gorm.io/driver/postgres v1.4.5 + gorm.io/gorm v1.24.6 +) + +require ( + github.com/KyleBanks/depth v1.2.1 // indirect + github.com/PuerkitoBio/purell v1.1.1 // indirect + github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect + github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a // indirect + github.com/bytedance/sonic v1.9.1 // indirect + github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/gabriel-vasile/mimetype v1.4.2 // indirect + github.com/gin-contrib/sse v0.1.0 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.19.6 // indirect + github.com/go-openapi/spec v0.20.4 // indirect + github.com/go-openapi/swag v0.21.1 // indirect + github.com/go-playground/locales v0.14.1 // indirect + github.com/go-playground/universal-translator v0.18.1 // indirect + github.com/go-playground/validator/v10 v10.14.0 // indirect + github.com/go-sql-driver/mysql v1.6.0 // indirect + github.com/goccy/go-json v0.10.2 // indirect + github.com/google/go-cmp v0.5.9 // indirect + github.com/gorilla/context v1.1.1 // indirect + github.com/gorilla/securecookie v1.1.1 // indirect + github.com/gorilla/sessions v1.2.1 // indirect + github.com/hpcloud/tail v1.0.0 // indirect + github.com/jackc/chunkreader/v2 v2.0.1 // indirect + github.com/jackc/pgconn v1.13.0 // indirect + github.com/jackc/pgio v1.0.0 // indirect + github.com/jackc/pgpassfile v1.0.0 // indirect + github.com/jackc/pgproto3/v2 v2.3.1 // indirect + github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect + github.com/jackc/pgtype v1.12.0 // indirect + github.com/jackc/pgx/v4 v4.17.2 // indirect + github.com/jinzhu/inflection v1.0.0 // indirect + github.com/jinzhu/now v1.1.5 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/cpuid/v2 v2.2.4 // indirect + github.com/leodido/go-urn v1.2.4 // indirect + github.com/mailru/easyjson v0.7.6 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/onsi/ginkgo v1.10.3 // indirect + github.com/onsi/gomega v1.27.2 // indirect + github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/twitchyliquid64/golang-asm v0.15.1 // indirect + github.com/ugorji/go/codec v1.2.11 // indirect + github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64 // indirect + golang.org/x/arch v0.3.0 // indirect + golang.org/x/crypto v0.9.0 // indirect + golang.org/x/net v0.10.0 // indirect + golang.org/x/sys v0.8.0 // indirect + golang.org/x/text v0.9.0 // indirect + golang.org/x/tools v0.7.0 // indirect + google.golang.org/protobuf v1.30.0 // indirect + gopkg.in/fsnotify.v1 v1.4.7 // indirect + gopkg.in/go-playground/assert.v1 v1.2.1 // indirect + gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + gorm.io/driver/mysql v1.3.2 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..fb2fa9e --- /dev/null +++ b/go.sum @@ -0,0 +1,420 @@ +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= +github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= +github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= +github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= +github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a h1:HbKu58rmZpUGpz5+4FfNmIU+FmZg2P3Xaj2v2bfNWmk= +github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= +github.com/alicebob/miniredis/v2 v2.30.0 h1:uA3uhDbCxfO9+DI/DuGeAMr9qI+noVWwGPNTFuKID5M= +github.com/alicebob/miniredis/v2 v2.30.0/go.mod h1:84TWKZlxYkfgMucPBf5SOQBYJceZeQRFIaQgNMiCX6Q= +github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= +github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= +github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= +github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= +github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI= +github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/denisenkom/go-mssqldb v0.12.0 h1:VtrkII767ttSPNRfFekePK3sctr+joXgO58stqQbtUA= +github.com/denisenkom/go-mssqldb v0.12.0/go.mod h1:iiK0YP1ZeepvmBQk/QpLEhhTNJgfzrpArPY/aFvc9yU= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= +github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= +github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= +github.com/gin-contrib/gzip v0.0.6 h1:NjcunTcGAj5CO1gn4N8jHOSIeRFHIbn51z6K+xaN4d4= +github.com/gin-contrib/sessions v0.0.5 h1:CATtfHmLMQrMNpJRgzjWXD7worTh7g7ritsQfmF+0jE= +github.com/gin-contrib/sessions v0.0.5/go.mod h1:vYAuaUPqie3WUSsft6HUlCjlwwoJQs97miaG2+7neKY= +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= +github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs= +github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= +github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M= +github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU= +github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= +github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= +github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= +github.com/go-playground/validator v9.31.0+incompatible h1:UA72EPEogEnq76ehGdEDp4Mit+3FDh548oRqwVgNsHA= +github.com/go-playground/validator v9.31.0+incompatible/go.mod h1:yrEkQXlcI+PugkyDjY2bRrL/UBU4f3rvrgkN3V8JEig= +github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= +github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg= +github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= +github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= +github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA= +github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188 h1:+eHOFJl1BaXrQxKX+T06f78590z4qA2ZzBTqahsKSE4= +github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188/go.mod h1:vXjM/+wXQnTPR4KqTKDgJukSZ6amVRtWMPEjE6sQoK8= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ= +github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= +github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7FsgI= +github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= +github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= +github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= +github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= +github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA= +github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE= +github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s= +github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= +github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= +github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= +github.com/jackc/pgconn v1.11.0/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= +github.com/jackc/pgconn v1.13.0 h1:3L1XMNV2Zvca/8BYhzcRFS70Lr0WlDg16Di6SFGAbys= +github.com/jackc/pgconn v1.13.0/go.mod h1:AnowpAqO4CMIIJNZl2VJp+KrkAZciAkhEl0W0JIobpI= +github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= +github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= +github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= +github.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c= +github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 h1:DadwsjnMwFjfWc9y5Wi/+Zz7xoE5ALHsRQlOctkOiHc= +github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak= +github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= +github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= +github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78= +github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA= +github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg= +github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= +github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= +github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgproto3/v2 v2.2.0/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgproto3/v2 v2.3.1 h1:nwj7qwf0S+Q7ISFfBndqeLwSwxs+4DPsbRFjECT1Y4Y= +github.com/jackc/pgproto3/v2 v2.3.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= +github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= +github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= +github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= +github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= +github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= +github.com/jackc/pgtype v1.10.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= +github.com/jackc/pgtype v1.12.0 h1:Dlq8Qvcch7kiehm8wPGIW0W3KsCCHJnRacKW0UM8n5w= +github.com/jackc/pgtype v1.12.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= +github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= +github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= +github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= +github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= +github.com/jackc/pgx/v4 v4.15.0/go.mod h1:D/zyOyXiaM1TmVWnOM18p0xdDtdakRBa0RsVGI3U3bw= +github.com/jackc/pgx/v4 v4.17.2 h1:0Ut0rpeKwvIVbMQ1KbMBU4h6wxehBI535LK6Flheh8E= +github.com/jackc/pgx/v4 v4.17.2/go.mod h1:lcxIZN44yMIrWI78a5CpucdD14hX0SBDbNRvjDBItsw= +github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v1.2.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= +github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= +github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= +github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= +github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.3 h1:v9QZf2Sn6AmjXtQeFpdoq/eaNtYP6IN+7lcrygsIAtg= +github.com/lib/pq v1.10.3/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/mattn/go-sqlite3 v1.14.12/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/onsi/ginkgo v1.10.3 h1:OoxbjfXVZyod1fmWYhI7SEyaD8B00ynP3T+D5GiyHOY= +github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.27.2 h1:SKU0CXeKE/WVgIV1T61kSa3+IRE8Ekrv9rdXDwwTqnY= +github.com/onsi/gomega v1.27.2/go.mod h1:5mR3phAHpkAVIDkHEUBY6HGVsU+cpcEscrGPB4oPlZI= +github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= +github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= +github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= +github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= +github.com/rs/zerolog v1.25.0 h1:Rj7XygbUHKUlDPcVdoLyR91fJBsduXj5fRxyqIQj/II= +github.com/rs/zerolog v1.25.0/go.mod h1:7KHcEGe0QZPOm2IE4Kpb5rTh6n1h2hIgS5OOnu1rUaI= +github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca h1:NugYot0LIVPxTvN8n+Kvkn6TrbMyxQiuvKdEwFdR9vI= +github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca/go.mod h1:uugorj2VCxiV1x+LzaIdVa9b4S4qGAcH6cbhh4qVxOU= +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= +github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= +github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/swaggo/files v1.0.1 h1:J1bVJ4XHZNq0I46UU90611i9/YzdrF7x92oX1ig5IdE= +github.com/swaggo/files v1.0.1/go.mod h1:0qXmMNH6sXNf+73t65aKeB+ApmgxdnkQzVTAj2uaMUg= +github.com/swaggo/gin-swagger v1.6.0 h1:y8sxvQ3E20/RCyrXeFfg60r6H0Z+SwpTjMYsMm+zy8M= +github.com/swaggo/gin-swagger v1.6.0/go.mod h1:BG00cCEy294xtVpyIAHG6+e2Qzj/xKlRdOqDkvq0uzo= +github.com/swaggo/swag v1.16.1 h1:fTNRhKstPKxcnoKsytm4sahr8FaYzUcT7i1/3nd/fBg= +github.com/swaggo/swag v1.16.1/go.mod h1:9/LMvHycG3NFHfR6LwvikHv5iFvmPADQ359cKikGxto= +github.com/swaggo/swag/example/celler v0.0.0-20230720012930-27b27bd7e0c5 h1:3dyAKX27fM17/6hwI7Rfo1ZbObcMvOGjWp8Dkzehobo= +github.com/swaggo/swag/example/celler v0.0.0-20230720012930-27b27bd7e0c5/go.mod h1:Vnyr76amKNklQBIkx3ct/RKBkjyUMESjgkmq81gnY88= +github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= +github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= +github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64 h1:5mLPGnFdSsevFRFc9q3yYbBkB6tsm4aCwwQV/j1JQAQ= +github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= +github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= +golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= +golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= +golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXadIrXTM= +gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= +gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gorm.io/datatypes v1.0.7 h1:8NhJN4+annFjwV1WufDhFiPjdUvV1lSGUdg1UCjQIWY= +gorm.io/datatypes v1.0.7/go.mod h1:l9qkCuy0CdzDEop9HKUdcnC9gHC2sRlaFtHkTzsZRqg= +gorm.io/driver/mysql v1.3.2 h1:QJryWiqQ91EvZ0jZL48NOpdlPdMjdip1hQ8bTgo4H7I= +gorm.io/driver/mysql v1.3.2/go.mod h1:ChK6AHbHgDCFZyJp0F+BmVGb06PSIoh9uVYKAlRbb2U= +gorm.io/driver/postgres v1.3.4/go.mod h1:y0vEuInFKJtijuSGu9e5bs5hzzSzPK+LancpKpvbRBw= +gorm.io/driver/postgres v1.4.5 h1:mTeXTTtHAgnS9PgmhN2YeUbazYpLhUI1doLnw42XUZc= +gorm.io/driver/postgres v1.4.5/go.mod h1:GKNQYSJ14qvWkvPwXljMGehpKrhlDNsqYRr5HnYGncg= +gorm.io/driver/sqlite v1.3.1 h1:bwfE+zTEWklBYoEodIOIBwuWHpnx52Z9zJFW5F33WLk= +gorm.io/driver/sqlite v1.3.1/go.mod h1:wJx0hJspfycZ6myN38x1O/AqLtNS6c5o9TndewFbELg= +gorm.io/driver/sqlserver v1.3.1 h1:F5t6ScMzOgy1zukRTIZgLZwKahgt3q1woAILVolKpOI= +gorm.io/driver/sqlserver v1.3.1/go.mod h1:w25Vrx2BG+CJNUu/xKbFhaKlGxT/nzRkhWCCoptX8tQ= +gorm.io/gorm v1.23.1/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk= +gorm.io/gorm v1.23.6/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk= +gorm.io/gorm v1.24.1-0.20221019064659-5dd2bb482755/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA= +gorm.io/gorm v1.24.6 h1:wy98aq9oFEetsc4CAbKD2SoBCdMzsbSIvSUUFJuHi5s= +gorm.io/gorm v1.24.6/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/init_test.go b/init_test.go new file mode 100644 index 0000000..89141ba --- /dev/null +++ b/init_test.go @@ -0,0 +1,59 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "aofs/internal/log4bp" + "aofs/repository/dbutils" + "database/sql" + "log" + + "github.com/rs/zerolog" + + "github.com/DATA-DOG/go-sqlmock" + "gorm.io/driver/postgres" + "gorm.io/gorm" +) + +var mock sqlmock.Sqlmock + +//初始化 +func init() { + //calcFile(`C:\Users\michael\Downloads\IMG_5585.MOV`) + //testMultipartRandFun(6*1024*1024, nil) + //mock 数据库 + //创建sqlmock + var err error + var dbmock *sql.DB + dbmock, mock, err = sqlmock.New() + if nil != err { + log.Fatalf("Init sqlmock failed, err %v", err) + } + //结合gorm、sqlmock + db, err := gorm.Open(postgres.New(postgres.Config{Conn: dbmock}), &gorm.Config{}) + + if nil != err { + log.Fatalf("Init DB with sqlmock failed, err %v", err) + } + + //暂时不启用mock + if false { + dbutils.SetMockDb(db) + } + + //初始化系统数据库 + //Init() + log4bp.Logger.Level(zerolog.DebugLevel) +} diff --git a/internal/bpctx/context.go b/internal/bpctx/context.go new file mode 100644 index 0000000..09dd81b --- /dev/null +++ b/internal/bpctx/context.go @@ -0,0 +1,186 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bpctx + +import ( + "aofs/internal/log4bp" + "aofs/internal/proto" + "io" + "io/ioutil" + "net/http" + "strconv" + "time" + + "github.com/rs/zerolog" + + "github.com/google/uuid" + + "github.com/gin-gonic/gin" +) + +type Context struct { + //zerolog.Logger + s time.Time //开始时间 + c *gin.Context + tid string + userId proto.UserIdType `validate:"gte=1"` + rsp proto.Rsp + m map[string]interface{} +} + +func (ctx *Context) GetContext() *gin.Context { + return ctx.c +} + +func (ctx *Context) GetRawLogger() *zerolog.Logger { + return &log4bp.Logger +} + +func (ctx *Context) Append(key string, value interface{}) { + ctx.m[key] = value +} + +func NewCtx(c *gin.Context) *Context { + ctx := &Context{c: c, s: time.Now(), m: make(map[string]interface{})} + if c != nil { + ctx.getUserId() + ctx.getTid() + } + + return ctx +} + +func NewCtxForTest(userId proto.UserIdType) *Context { + ctx := &Context{c: &gin.Context{}} + ctx.userId = userId + + ctx.getTid() + + return ctx +} + +func (ctx *Context) LogI(title string, req interface{}) { + var l *zerolog.Event + if ctx.rsp.Code == proto.CodeOk { + l = log4bp.Logger.Info() + } else { + l = log4bp.Logger.Warn() + } + l = l.Timestamp().Caller(1).Str("requestId", ctx.tid).Int("userId", int(ctx.userId)).Str("title", title).Interface("req", req).Interface("rsp", ctx.rsp.GetBody()).Int64("cost", int64(time.Now().Sub(ctx.s)/1e6)).Interface("code", ctx.rsp.Code) + for k, v := range ctx.m { + l = l.Interface(k, v) + } + l.Msg(ctx.rsp.Message) +} + +func (ctx *Context) LogD() *zerolog.Event { + return log4bp.Logger.Debug().Timestamp().Caller(1).Str("tid", ctx.tid).Int("userId", int(ctx.userId)) +} +func (ctx *Context) LogW() *zerolog.Event { + return log4bp.Logger.Warn().Timestamp().Caller(1).Str("tid", ctx.tid).Int("userId", int(ctx.userId)) +} +func (ctx *Context) LogE() *zerolog.Event { + return log4bp.Logger.Error().Timestamp().Caller(1).Str("tid", ctx.tid).Int("userId", int(ctx.userId)) +} + +//获取 userId +func (ctx *Context) GetUserId() proto.UserIdType { + return ctx.userId +} + +func (ctx *Context) getUserId() { + userId := ctx.c.Query("userId") + u64, err := strconv.ParseUint(userId, 10, 8) + if err != nil || u64 == 0 { + //校验参数错误 + ctx.SendErr(proto.CodeParamErr, err) + panic(any(u64)) + } else { + ctx.userId = proto.UserIdType(u64) + } +} + +func (ctx *Context) getTid() string { + if ctx.tid == "" { + ctx.tid = ctx.c.Query("requestId") + if ctx.tid == "" { + ctx.tid = uuid.New().String()[:13] + } + } + return ctx.tid +} + +//发送错误响应的回应消息 +// code: 回应的错误码 +// err: 回应的错误信息扩展描述 +func (ctx *Context) SendErr(code proto.CodeType, err error) { + if ctx.c.Request.Body != nil { + io.Copy(ioutil.Discard, ctx.c.Request.Body) + } + + ctx.rsp.Code = code + ctx.rsp.Message = proto.GetMessageByCode(code) + if err != nil { + ctx.rsp.Message += "[ext: " + err.Error() + " ]" + } + ctx.rsp.Body = nil + + //此处c必须为有效对象,就不再做判断,利用系统panic + if ctx.c != nil { + ctx.c.JSON(http.StatusOK, ctx.rsp) + } + +} + +//发送正常响应OK的回应消息 +// body:回应的消息包体(消息头在函数里面自动完成) +func (ctx *Context) SendOk(body interface{}) { + if ctx.c.Request.Body != nil { + io.Copy(ioutil.Discard, ctx.c.Request.Body) + } + + ctx.rsp.Code = proto.CodeOk + ctx.rsp.Message = proto.GetMessageByCode(proto.CodeOk) + ctx.rsp.Body = body + + //此处c必须为有效对象,就不再做判断,利用系统panic + ctx.c.JSON(http.StatusOK, ctx.rsp) +} + +func (ctx *Context) SendRsp(body interface{}, bperr *proto.BpErr) { + if ctx.c.Request.Body != nil { + io.Copy(ioutil.Discard, ctx.c.Request.Body) + } + + ctx.rsp.Code = bperr.Code + ctx.rsp.Message = proto.GetMessageByCode(bperr.Code) + ctx.rsp.Body = body + + //此处c必须为有效对象,就不再做判断,利用系统panic + ctx.c.JSON(http.StatusOK, ctx.rsp) +} + +func (ctx *Context) Send(httpCode proto.CodeType, body interface{}) { + if ctx.c.Request.Body != nil { + io.Copy(ioutil.Discard, ctx.c.Request.Body) + } + + ctx.rsp.Code = httpCode + ctx.rsp.Message = proto.GetMessageByCode(httpCode) + ctx.rsp.Body = body + + //此处c必须为有效对象,就不再做判断,利用系统panic + ctx.c.JSON(int(httpCode), ctx.rsp) +} diff --git a/internal/bpctx/context_test.go b/internal/bpctx/context_test.go new file mode 100644 index 0000000..72a3541 --- /dev/null +++ b/internal/bpctx/context_test.go @@ -0,0 +1,31 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bpctx + +import ( + "testing" + + "github.com/rs/zerolog" +) + +func TestLog(t *testing.T) { + // c := &gin.Context{} + ctx := NewCtx(nil) + ctx.GetRawLogger().Level(zerolog.DebugLevel) + defer ctx.LogI("title", "req test") + ctx.LogD().Str("debugD", "test logD").Msg("logD") + ctx.GetRawLogger().Debug().Str("debubk", "test debug").Msg("xx") + //ctx.SendErr(proto.CodeFailedToConnect, fmt.Errorf("test error log")) +} diff --git a/internal/config/config.go b/internal/config/config.go new file mode 100644 index 0000000..7c714fd --- /dev/null +++ b/internal/config/config.go @@ -0,0 +1,55 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package config + +import ( + "os" + "strconv" +) + +//环境变量不区分大小写 +func ReadString(key string, def string) string { + if v, ok := os.LookupEnv(key); ok { + return v + } else { + return def + } +} + +func ReadBool(key string, def bool) bool { + if v, ok := os.LookupEnv(key); ok { + return v == "1" + } else { + return def + } +} + +func ReadInt(key string, def int) int { + if v, ok := os.LookupEnv(key); ok { + if intV, err := strconv.Atoi(v); err == nil { + return intV + } + } + return def +} + +func ReadInt64(key string, def int64) int64 { + if v, ok := os.LookupEnv(key); ok { + if intV, err := strconv.ParseInt(v, 10, 64); err == nil { + return intV + } + } + return def +} diff --git a/internal/config/config_test.go b/internal/config/config_test.go new file mode 100644 index 0000000..4a5b9af --- /dev/null +++ b/internal/config/config_test.go @@ -0,0 +1,116 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package config + +import ( + "os" + "testing" +) + +func TestReadString(t *testing.T) { + type args struct { + key string + def string + } + tests := []struct { + name string + args args + want string + }{ + {"conf_a", args{"conf_a", "a"}, "a"}, + {"conf_a", args{"conf_a", ""}, ""}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := ReadString(tt.args.key, tt.args.def); got != tt.want { + t.Errorf("ReadString, actual = %v, want %v", got, tt.want) + } + }) + } + + os.Setenv("conf_a", "aenv") + os.Setenv("CONF_B", "benv") + os.Setenv("CONF_c", "cenv") + os.Setenv("CONF_d", "") + + tests2 := []struct { + name string + args args + want string + }{ + {"conf_a", args{"conf_a", "a"}, "aenv"}, + {"conf_b", args{"conf_b", "b"}, "benv"}, + {"conf_c", args{"conf_c", "c"}, "cenv"}, + {"conf_d", args{"conf_d", "d"}, ""}, + } + for _, tt := range tests2 { + { + t.Run(tt.name, func(t *testing.T) { + if got := ReadString(tt.args.key, tt.args.def); got != tt.want { + t.Errorf("ReadString actual = %v, want %v", got, tt.want) + } + }) + } + } + +} + +func TestReadInt(t *testing.T) { + type args struct { + key string + def int + } + tests := []struct { + name string + args args + want int + }{ + {"conf_a", args{"conf_a", 11}, 11}, + {"conf_b", args{"conf_b", 0}, 0}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := ReadInt(tt.args.key, tt.args.def); got != tt.want { + t.Errorf("ReadString actual = %v, want %v", got, tt.want) + } + }) + } + + os.Setenv("conf_a", "aenv") + os.Setenv("CONF_B", "benv") + os.Setenv("CONF_c", "cenv") + os.Setenv("CONF_d", "") + + tests2 := []struct { + name string + args args + want int + }{ + {"conf_a", args{"conf_a", 1}, 1}, + {"conf_b", args{"conf_b", 2}, 2}, + {"conf_c", args{"conf_c", -3}, -3}, + {"conf_d", args{"conf_d", 4}, 4}, + } + for _, tt := range tests2 { + { + t.Run(tt.name, func(t *testing.T) { + if got := ReadInt(tt.args.key, tt.args.def); got != tt.want { + t.Errorf("ReadString: actual = %v, want %v", got, tt.want) + } + }) + } + } + +} diff --git a/internal/env/env.go b/internal/env/env.go new file mode 100644 index 0000000..a228999 --- /dev/null +++ b/internal/env/env.go @@ -0,0 +1,71 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package env + +import "aofs/internal/config" + +var ( + SQL_HOST string // eulixspace-postgresql + SQL_PORT int // 5432 + SQL_USER string // postgres + SQL_PASSWORD string // mysecretpassword + SQL_DATABASE string // file + + + + DATA_PATH string //数据目录,桶为此路径下的子目录 + SHARED_PATH string //共享目录,包括磁盘信息文件 + HEAD_IMAGE_PATH string //头像目录 + + NORMAL_BUCKET string // "eulixspace-files" + DERIVE_BUCKET string // "eulixspace-files-processed" + + //APP_BOX_PASSCODE string //安全密码 + GIN_MODE string //debug or release + RESERVED_SPACE int64 // reserved space + MULTIPART_TASK_LRU_SECOND int //分片上传任务最近未使用淘汰时间,单位秒 + REDIS_URL string + REDIS_PASS string + REDIS_DB int + REDIS_STREAM_NAME string + BACKUP_RESERVED_SPACE int64 + ASYNC_TASK_THRESHOLD int + APP_BOX_DEPLOY_METHOD string +) + +func init() { + SQL_HOST = config.ReadString("SQL_HOST", "eulixspace-postgresql") + SQL_PORT = config.ReadInt("SQL_PORT", 5432) + SQL_USER = config.ReadString("SQL_USER", "postgres") + SQL_PASSWORD = config.ReadString("SQL_PASSWORD", "mysecretpassword") + SQL_DATABASE = config.ReadString("SQL_DATABASE", "file") + REDIS_URL = config.ReadString("REDIS_URL", "eulixspace-redis:6379") + REDIS_PASS = config.ReadString("REDIS_PASS", "WWQ1YZT5a4KsUI9B") + REDIS_DB = config.ReadInt("REDIS_DB", 0) + REDIS_STREAM_NAME = config.ReadString("REDIS_STREAM_NAME", "fileChangelogs") + + DATA_PATH = config.ReadString("DATA_PATH", "/data/") + SHARED_PATH = config.ReadString("SHARED_PATH", "/shared/") + HEAD_IMAGE_PATH = config.ReadString("HEAD_IMAGE_PATH", "/opt/eulixspace/image/") + NORMAL_BUCKET = config.ReadString("MINIO_NORMAL_BUCKET", "eulixspace-files") + DERIVE_BUCKET = config.ReadString("MINIO_DERIVE_BUCKET", "eulixspace-files-processed") + + GIN_MODE = config.ReadString("GIN_MODE", "debug") + RESERVED_SPACE = config.ReadInt64("RESERVED_SPACE", 4831838208) + BACKUP_RESERVED_SPACE = config.ReadInt64("BACKUP_RESERVED_SPACE", 104857600) + MULTIPART_TASK_LRU_SECOND = config.ReadInt("MULTIPART_TASK_LIFECYCLE", 30*86400) + ASYNC_TASK_THRESHOLD = config.ReadInt("ASYNC_TASK_THRESHOLD", 1000) + APP_BOX_DEPLOY_METHOD = config.ReadString("APP_BOX_DEPLOY_METHOD", "box") +} diff --git a/internal/log4bp/logger.go b/internal/log4bp/logger.go new file mode 100644 index 0000000..d108240 --- /dev/null +++ b/internal/log4bp/logger.go @@ -0,0 +1,114 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package log4bp + +import ( + "encoding/json" + "fmt" + "os" + "path/filepath" + + "github.com/google/uuid" + "github.com/rs/zerolog" +) + +//var logger = New("", gin.Mode()) + +type BpLogger struct { + *zerolog.Logger + tid string +} + +// type rspInterface interface { +// GetCode() uint32 +// GetMsg() string +// GetBody() interface{} +// } + +type SharedBoxInfo struct { + BoxUuid string `json:"boxUuid"` // 盒子端唯一id. + Btid string `json:"btid"` +} + +func GetBoxUuid(filename string) (sharedBoxInfo SharedBoxInfo, err error) { + if _, err := os.Stat(filename); err != nil { + return sharedBoxInfo, err + } + + if f, err := os.Open(filename); err == nil { + defer f.Close() + //r := io.Reader(f) + + if err = json.NewDecoder(f).Decode(&sharedBoxInfo); err != nil { + return sharedBoxInfo, fmt.Errorf("GetBoxUuid Failed:%v", err) + } + return sharedBoxInfo, nil + } else { + return sharedBoxInfo, err + } + +} + +func (l *BpLogger) LogI() *zerolog.Event { + return l.Logger.Info().Timestamp().Caller(1).Str("tid", l.tid) +} +func (l *BpLogger) LogD() *zerolog.Event { + return l.Logger.Debug().Timestamp().Caller(1).Str("tid", l.tid) +} +func (l *BpLogger) LogW() *zerolog.Event { + return l.Logger.Warn().Timestamp().Caller(1).Str("tid", l.tid) +} +func (l *BpLogger) LogE() *zerolog.Event { + return l.Logger.Error().Timestamp().Caller(1).Str("tid", l.tid) +} +func (l *BpLogger) LogF() *zerolog.Event { + return l.Logger.Fatal().Timestamp().Caller(1).Str("tid", l.tid) +} +func (l *BpLogger) LogP() *zerolog.Event { + return l.Logger.Panic().Timestamp().Caller(1).Str("tid", l.tid) +} + +func (l *BpLogger) SetTid(tid string) { + l.tid = tid +} + +var Logger zerolog.Logger + +func init() { + zerolog.CallerMarshalFunc = func(file string, n int) string { + _, file = filepath.Split(file) + return fmt.Sprintf("%s:%d", file, n) + } + zerolog.CallerFieldName = "file" + zerolog.LevelFieldName = "level" + zerolog.MessageFieldName = "message" + zerolog.TimestampFieldName = "time" + + Logger = zerolog.New(os.Stdout) +} + +func New(tid string, mode string) *BpLogger { + + if len(tid) == 0 { + tid = uuid.New().String()[:13] + } + if mode == "debug" { + zerolog.SetGlobalLevel(zerolog.DebugLevel) + } else { + zerolog.SetGlobalLevel(zerolog.InfoLevel) + } + + return &BpLogger{&Logger, tid} +} diff --git a/internal/log4bp/logger_test.go b/internal/log4bp/logger_test.go new file mode 100644 index 0000000..1b8e05d --- /dev/null +++ b/internal/log4bp/logger_test.go @@ -0,0 +1,46 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package log4bp + +import ( + "testing" +) + +type Req struct { + X string `json:"x" default:"xxx"` + Y int `json:"y" default:"123"` +} + +func TestLog(t *testing.T) { + + loger := New("tid123", "debug") + req := Req{} + loger.Debug().Interface("req", &req).Msg("test") + //loger.LogI("req") + +} +func TestLog2(t *testing.T) { + + loger := New("", "debug") + req := Req{} + loger.Debug().Interface("req", &req).Msg("test") + //loger.LogI("test2", req, 1) + +} + +func TestLog3(t *testing.T) { + loger := New("", "debug") + loger.LogE().Timestamp().Msg("error message") +} diff --git a/internal/proto/async_task.go b/internal/proto/async_task.go new file mode 100644 index 0000000..0e33865 --- /dev/null +++ b/internal/proto/async_task.go @@ -0,0 +1,19 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package proto + +type AsyncStaskInfoReq struct { + TaskId string `json:"taskId" form:"taskId"` +} diff --git a/internal/proto/betag_info.go b/internal/proto/betag_info.go new file mode 100644 index 0000000..9d70515 --- /dev/null +++ b/internal/proto/betag_info.go @@ -0,0 +1,26 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package proto + +type BETagInfo struct { + BETag string `gorm:"column:betag;PRIMARY_KEY;index" json:"betag" form:"betag" ` + VolId uint16 `gorm:"column:vol_id" json:"volId" form:"volId" ` + CreateTime int64 `gorm:"column:created_time" json:"createdAt" form:"createdAt"` + ModifyTime int64 `gorm:"column:modify_time" json:"modifyAt" form:"modifyAt"` +} + +func (BETagInfo) TableName() string { + return "aofs_betag_infos" +} diff --git a/internal/proto/common.go b/internal/proto/common.go new file mode 100644 index 0000000..f48d04b --- /dev/null +++ b/internal/proto/common.go @@ -0,0 +1,167 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package proto + +import ( + "encoding/json" + "time" + + "gorm.io/datatypes" +) + +// FileInfo --- 文件信息结果定义 +/* +{ + "id": "6665db67-8c77-4944-af81-f5d90a01c52f", # 文件、目录 的 id + "type": "file", # 文件类型: file, directory + "name": "greeting.txt", # 文件名称 + "path": "/Documents/phone", # 文件路径,根路径为 '/' + "user_id": "用户id,区分空间所属" + "trashed": false, # 是否为已回收文件或目录 + "md5sum": "5d41402abc4b2a76b9719d911017c592", # 文件内容 md5 摘要 + "created_at": "2021-06-10T01:00:00Z", # 文件的创建时间 + "updated_at": "2021-06-10T01:00:00Z", # 文件的最后修改时间 + "tags": ["greet"], # 文件的 tag (保留属性) + "size": 200, # 文件的大小 + "executable": false, # 是否为可执行文件 + "Category": "document", # 文件分类,document, picture, audio, video + "mime": "text/plain", # 文件的类型,mime 格式 + "version": 1 # 文件的当前版本,每次修改都需要提升该版本号 +} +*/ + +type Fid struct { + Uuid string `json:"uuid" form:"uuid"` // uuid +} +type Fids struct { + Uuids []string `json:"uuids" form:"uuids"` // uuids +} + +type UserIdType uint + +type FileInfoPub struct { + Id string `gorm:"column:uuid;PRIMARY_KEY;index" json:"uuid" form:"uuid"` + ParentUuid string `gorm:"column:parent_uuid" json:"parentUuid" form:"parentUuid" ` + IsDir bool `gorm:"column:is_dir" json:"isDir" form:"isDir" ` + Name string `gorm:"column:name;uniqueIndex:totalPath" json:"name" form:"name"` + Path string `gorm:"column:path;uniqueIndex:totalPath" json:"path" form:"path"` + BETag string `gorm:"column:betag" json:"betag" form:"betag"` + CreateTime int64 `gorm:"column:created_time" json:"createdAt" form:"createdAt"` + ModifyTime int64 `gorm:"column:modify_time" json:"modifyAt" form:"modifyAt"` + OperationTime int64 `gorm:"column:operation_time" json:"operationAt" form:"operationAt"` + Size int64 `gorm:"column:size" json:"size" form:"size"` + Category string `gorm:"column:category" json:"category" form:"category"` + Mime string `gorm:"column:mime" json:"mime" form:"mime"` + Trashed uint32 `gorm:"column:trashed;uniqueIndex:totalPath" json:"trashed" form:"trashed"` //0-normal; 1-Logical delete, put into the recycle bin; 2-Has been cleared from the recycle bin and is to be physically deleted + FileCount uint32 `gorm:"column:file_count" json:"fileCount" form:"fileCount"` +} + +type FileInfoPubLst []FileInfoPub + +type FileInfo struct { + FileInfoPub + + UserId UserIdType `gorm:"column:user_id;uniqueIndex:totalPath" json:"userId" form:"userId"` + Tags string `gorm:"column:tags" json:"tags" form:"tags"` + Executable bool `gorm:"column:executable" json:"executable" form:"executable"` + Version uint32 `gorm:"column:version" json:"version" form:"version"` + BucketName string `gorm:"column:bucketname" json:"bucketName" form:"bucketName"` + TransactionId int64 `gorm:"column:transaction_id;default:0" json:"transactionId" form:"transactionId"` + FileInfoExt datatypes.JSON `gorm:"column:ext" json:"ext" form:"ext"` +} + +type FileInfoExt struct { + Charset string `json:"charset" form:"charset"` +} + +type FileInfoLst []FileInfo + +func (lst FileInfoLst) ToPubLst() FileInfoPubLst { + var lstPub FileInfoPubLst + for _, fi := range lst { + lstPub = append(lstPub, fi.FileInfoPub) + } + return lstPub +} + +func (FileInfo) TableName() string { + return "aofs_file_infos" +} + +func (fi *FileInfo) FixTime() { + microSeconds := time.Now().UnixNano() / 1e6 + + if fi.CreateTime == 0 { + fi.CreateTime = microSeconds + } + if fi.ModifyTime == 0 { + fi.ModifyTime = microSeconds + } + if fi.OperationTime == 0 { + fi.OperationTime = microSeconds + } +} + +func (fi *FileInfo) AbsPath() string { + if fi.IsDir { + if len(fi.Path) == 0 { + return fi.Name + } else { + return fi.Path + fi.Name + "/" + } + } else { + return fi.Path + fi.Name + } +} + +func (fi *FileInfo) EncodeByteFileInfo() ([]byte, error) { + + if byteFileInfo, err := json.Marshal(fi); err != nil { + return nil, err + } else { + return byteFileInfo, nil + } + +} + +func DecodeFileInfo(data []byte) (fileInfos []FileInfo, err error) { + + if err = json.Unmarshal(data, &fileInfos); err != nil { + return nil, err + } + return fileInfos, nil +} + + + +type SyncInfo struct { + DeviceId string `gorm:"column:device_id;uniqueIndex:user_device" json:"deviceId" form:"deviceId"` + DeviceName string `gorm:"column:device_name" json:"deviceName" form:"deviceName"` + FolderId string `gorm:"column:folder_id" json:"folderId" form:"folderId"` + UserId UserIdType `gorm:"column:user_id;uniqueIndex:user_device" json:"userId" form:"userId"` +} + +func (SyncInfo) TableName() string { + return "aofs_sync_infos" +} + +const ( + TrashStatusNormal uint32 = iota //正常文件状态 + TrashStatusLogicDeleted //逻辑删除放入回收站 + TrashStatusPhyDeleted //从回收站删除/清空回收站, 待物理清除 + TrashStatusPhyDelException //从回收站删除/清空回收站, 物理清除异常 + TrashStatusSubFilesLogicDeleted //逻辑删除的文件夹下的子文件或文件夹 +) + diff --git a/internal/proto/errors.go b/internal/proto/errors.go new file mode 100644 index 0000000..d4cf9e1 --- /dev/null +++ b/internal/proto/errors.go @@ -0,0 +1,118 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package proto + +import ( + "fmt" +) + +/* +此文件定义回应码和描述信息 +*/ + +//错误码在此部分定义 +type CodeType uint32 + +func (ct CodeType) String() string { + return fmt.Sprintf("CODE_%d", ct) +} + +const ( + CodeOk CodeType = 200 + CodeCreateAsyncTaskSuccess CodeType = 201 + + CodeParamErr CodeType = 1001 //参数错误 + CodeReqParamErr CodeType = 1002 //请求参数错误(推荐) + CodeFileNotExist CodeType = 1003 //文件不存在 + CodeFailedToOpenFile CodeType = 1004 //打开文件失败 + CodeFolderNotExist CodeType = 1005 //文件夹不存在 + CodeFailedToConnect CodeType = 1006 //建立连接失败 + CodeFailedToConnectDB CodeType = 1007 //连接DB失败 + CodeFailedToOptMinio CodeType = 1008 //失败去写文件 + CodeFailedToCreateBucket CodeType = 1009 //失败去创建桶 + CodeFailedToSaveFile CodeType = 1010 //失败去保存数据 + CodeFailedToOperateDB CodeType = 1011 //失败去操作数据库 + CodeFailedToCreateFolder CodeType = 1012 //失败去创建文件夹 + CodeFileExist CodeType = 1013 //文件已存在 + CodeFolderExist CodeType = 1014 //文件夹已存在 + CodeFolderDepthTooLong CodeType = 1015 //文件夹层数超过5层 + CodeUserIdError CodeType = 1016 //用户Id的错误 + CodeFailedToInitUser CodeType = 1017 //失败去初始化用户 + CodeFailedToDeleteUser CodeType = 1018 //删除用户失败 + CodeFailedToGetUsedStorage CodeType = 1021 //获取用户空间使用量失败 + CodeCopyIdError CodeType = 1022 //文件夹不能拷贝到自己 + + CodeFailedToCreateMultipartTask CodeType = 1027 // 失败去创建任务 + CodeMultipartTaskNotFound CodeType = 1028 //未找到任务 + CodeMultipartTaskOverlap CodeType = 1029 //任务重叠 + CodeMultipartTaskRangeErr CodeType = 1030 //上传范围错误 + CodeMultipartTaskHashErr CodeType = 1031 //文件hash校验错误 + CodeMultipartTaskCompleteErr CodeType = 1032 //合并错误 + CodeNotEnoughSpace CodeType = 1036 //空间不够,不上传 + CodeMultipartRangeUploaded CodeType = 1037 //分片范围已上传 + CodeMultipartUploadingConflit CodeType = 1038 //分片范围上传冲突 + + CodeWriteRedisFailed CodeType = 1046 //写入redis 失败 + + CodeZipFileFailed CodeType = 1050 //压缩文件失败 + + CodeFailedToCreateSymlink CodeType = 1061 //失败去创建符号链接 + CodeGetAsyncTaskInfoFailed CodeType = 1062 // 获取异步任务状态失败 +) + +//错误码对应描述在此部分定义 +var codeMessageMap map[CodeType]string + +func init() { + codeMessageMap = map[CodeType]string{} + + //开始定义 + codeMessageMap[CodeOk] = "OK" + codeMessageMap[CodeFileNotExist] = "File is not exist" + codeMessageMap[CodeFolderNotExist] = "Folder is not exist" + codeMessageMap[CodeFailedToOperateDB] = "failed to operate db" + codeMessageMap[CodeFailedToSaveFile] = "failed to save file" + codeMessageMap[CodeFileExist] = "File already exists" + codeMessageMap[CodeFolderExist] = "Folder already exists " + codeMessageMap[CodeFolderDepthTooLong] = "Folder Depth Is Too Long! Failed to Create Folder" + codeMessageMap[CodeUserIdError] = "User Id Error!Should Be Greater than or equal 1" + codeMessageMap[CodeCopyIdError] = "File Operation: DestPath could not be itself" + codeMessageMap[CodeNotEnoughSpace] = "Normal Upload: not enough space" +} + +// GetMessageByCode 根据错误码获取描述 +func GetMessageByCode(code CodeType) string { + if message, ok := codeMessageMap[code]; ok { + return message + } else { + return "" + } +} + +type ErrMess struct { + Code CodeType `json:"code"` + Message string `json:"message"` +} + +type BpErr struct { + Code CodeType + Err error +} + +const ( + FileNotFound string = "FileNotFound" + S3OperationError string = "S3OperationError" + ArgsErrors string = "ArgsErrors" +) diff --git a/internal/proto/file.go b/internal/proto/file.go new file mode 100644 index 0000000..e3fa2c6 --- /dev/null +++ b/internal/proto/file.go @@ -0,0 +1,140 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package proto + +/* +此文件定义文件类消息协议 +*/ + +// + +/* +--- MoveFileReq 移动文件协议 + +{ + "id": "91c8c5c3-ad46-4721-9687-09df8f2e88c2", # 文件的id + "dest-path": "/picture" +} +*/ + +type MoveFileReq struct { + Id []string `json:"uuids" form:"uuids" validate:"required,unique"` // uuid + DestPath string `json:"destPath" form:"destPath" ` // dest path +} + +// type MoveFileRspBody = FileInfo + +type GetListReq struct { + PageInfo + Uuid string `json:"uuid" form:"uuid"` + IsDir bool `json:"isDir" form:"isDir"` + OrderBy string `json:"orderBy" form:"orderBy"` + Category string `json:"category" form:"category"` +} + +type GetListRspData struct { + List []FileInfoPub `json:"fileList" form:"fileList"` + PageInfo PageInfoExt `json:"pageInfo" form:"pageInfo"` +} + +// DeleteFileReq 删除文件请求参数 文件uuid +type DeleteFileReq struct { + DeleteIds []string `json:"uuids" form:"uuids" validate:"unique"` // uuids +} + +// CopyFileReq 复制文件 +type CopyFileReq struct { + Ids []string `json:"uuids" form:"uuids" validate:"unique,gt=0"` // uuids + DestId string `json:"dstPath" form:"dstPath"` // dest path +} + +// ModifyFileReq 修改文件名 +type ModifyFileReq struct { + Id string `json:"uuid" form:"uuid" validate:"uuid"` // file/folder uuid + NewFileName string `json:"fileName" form:"fileName"` // new name +} + +// DbAffect 数据库操作受影响的行数 +type DbAffect struct { + AffectRows uint32 `json:"affectRows" form:"affectRows"` +} + +type CopyRsp struct { + AffectRows uint32 `json:"affectRows" form:"affectRows"` + Data []NewAndOldUuid +} + +// NewAndOldUuid 复制操作会产生新的记录,新的uuid +type NewAndOldUuid struct { + OldId string `gorm:"column:uuid" json:"oldId" form:"oldId"` + NewId string `gorm:"column:uuid" json:"newId" form:"newId"` +} + +// PathName --查询返回值 +type PathName struct { + Path string `json:"path" form:"path"` + Name string `json:"name" form:"name"` +} + +// Uuids --查询返回值,复制文件夹时候用到 +type Uuids struct { + CopyUuid string `gorm:"column:uuid" json:"copyUuid" form:"copyUuid"` +} + +type SearchReq struct { + PageInfo + Uuid string `json:"uuid" form:"uuid"` //当前文件夹的uuid + ObjectName string `json:"name" form:"name"` //搜索的对象名 + Category string `json:"category" form:"category"` //分类 + OrderBy string `json:"orderBy" form:"orderBy"` //排序 +} + +//获取单个文件信息 +type FileMetaReq = PathName +type FileInfoReq struct { + Fid + PathName +} +type FileInfoRsp = FileInfoPub +type FileMetaRsp = FileInfo +type FileInfoForInnerReq = Fid +type FileInfoForTrendsReq = Fids +type FileInfoForInnerRsp struct { + FileInfoForTrends + RelativePath string `json:"relativePath" form:"relativePath"` +} + +type FileInfoForTrendsRsp struct { + FileInfos []FileInfoForTrends `json:"fileInfos" form:"fileInfos"` +} + +// ModifyFileReq 修改文件名 +type VodSymlinkReq struct { + Id string `json:"uuid" form:"uuid" validate:"uuid"` // file's uuid +} + +type VodSymlinkRsp struct { + Linkname string `json:"linkName" form:"linkName"` +} + +type FileInfoForTrends struct { + FileInfo + Duration int64 `json:"duration" form:"duration"` +} + +type FileChangePushMsg struct { + OperatorType string `json:"operator_type,omitempty"` + Uuids []string `json:"uuids,omitempty"` +} diff --git a/internal/proto/folder.go b/internal/proto/folder.go new file mode 100644 index 0000000..2f0c069 --- /dev/null +++ b/internal/proto/folder.go @@ -0,0 +1,60 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package proto + +// src/lib/proto/folder.go +// GetListRspBody 获取文件列表返回值 +/* +此文件定义文件夹类消息协议 +*/ + +//CreateFolderReq --- 创建文件夹请求参数 +type CreateFolderReq struct { + FolderName string `json:"folderName" form:"folderName"` // folder name + CurrentDirUuid string `json:"currentDirUuid" form:"currentDirUuid"` // current folder's uuid +} + +//DeleteFolderReq --- 删除文件夹请求参数 +type DeleteFolderReq struct { + DeleteId []string `json:"uuid" form:"uuid"` // uuid +} + +// RenameFolderReq --- 重命名文件夹请求参数 +type RenameFolderReq struct { + NewName string `json:"folderName" form:"folderName"` // 新文件夹名 + FolderUuid string `json:"uuid" form:"uuid"` // 选择的文件夹的UUID +} + +// MoveFolderReq --- 移动文件夹请求参数 +type MoveFolderReq struct { + DestPath string `json:"destPath" form:"destPath"` // 移动的目标路径 + FolderUuid []string `json:"uuid" form:"uuid"` // 选择的文件夹的UUID列表 +} + +type CopyFolderReq struct { + DestPath string `json:"destPath" form:"destPath"` // 复制的目标路径 + FolderUuid []string `json:"uuid" form:"uuid"` // 选择的文件夹的UUID列表 +} + +type FolderInfo struct { + FolderName string `gorm:"column:name" json:"name" form:"name"` + Path string `gorm:"column:path" json:"path" form:"path"` + FolderSize int64 `gorm:"column:size" json:"size" form:"size"` + UpdateTime int64 `gorm:"column:operation_time" json:"operationAt" form:"operationAt"` +} + +type FolderInfoReq struct { + FolderUuid string `json:"uuid" form:"uuid"` +} diff --git a/internal/proto/head.go b/internal/proto/head.go new file mode 100644 index 0000000..591fd26 --- /dev/null +++ b/internal/proto/head.go @@ -0,0 +1,73 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package proto + +import ( + "net/http" + + "github.com/gin-gonic/gin" +) + +type ReqHead2 struct { + RequestId string `json:"requestId" form:"requestId"` +} + +type Rsp struct { + c *gin.Context + Code CodeType `json:"code" form:"code"` //msg code + Message string `json:"message" form:"message"` //msg info + RequestId string `json:"requestId" form:"requestId"` //trans id + Body interface{} `json:"results" form:"results"` //response body +} //@name Rsp + +func (rsp *Rsp) GetCode() CodeType { + return rsp.Code +} +func (rsp *Rsp) GetMsg() string { + return rsp.Message +} +func (rsp *Rsp) GetBody() interface{} { + return rsp.Body +} + +func (rsp *Rsp) SetContext(c *gin.Context) { + rsp.c = c +} + +//发送正常响应OK的回应消息 +// body:回应的消息包体(消息头在函数里面自动完成) +func (rsp *Rsp) SendOk(body interface{}) { + rsp.Code = CodeOk + rsp.Message = GetMessageByCode(CodeOk) + rsp.Body = body + + //此处c必须为有效对象,就不再做判断,利用系统panic + rsp.c.JSON(http.StatusOK, rsp) +} + +//发送错误响应的回应消息 +// code: 回应的错误码 +// err: 回应的错误信息扩展描述 +func (rsp *Rsp) SendErr(code CodeType, err error) { + rsp.Code = code + rsp.Message = GetMessageByCode(CodeType(code)) + if err != nil { + rsp.Message += "[ext: " + err.Error() + " ]" + } + rsp.Body = nil + + //此处c必须为有效对象,就不再做判断,利用系统panic + rsp.c.JSON(http.StatusOK, rsp) +} diff --git a/internal/proto/multipart.go b/internal/proto/multipart.go new file mode 100644 index 0000000..bf7ccc3 --- /dev/null +++ b/internal/proto/multipart.go @@ -0,0 +1,97 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package proto + +//此文件定义分片上传 + +//创建分片任务 +type CreateMultipartTaskParam struct { + FileName string `json:"fileName" form:"fileName" validate:"required,gt=0"` + Size int64 `json:"size" form:"size" validate:"required,gt=0"` + FolderId string `json:"folderId" form:"folderId" ` + FolderPath string `json:"folderPath" form:"folderPath" ` + BETag string `json:"betag" form:"betag" validate:"required,gte=32,lte=34"` + Mime string `json:"mime" form:"mime"` + CreateTime int64 `json:"createTime" form:"modifyTime"` + ModifyTime int64 `json:"modifyTime" form:"modifyTime"` + BusinessId int `json:"businessId" form:"businessId"` + AlbumId int `json:"albumId" form:"albumId"` +} + +type CreateMultipartTaskReq = CreateMultipartTaskParam + +type CreateMultipartTaskSuccRsp struct { + UploadId string `json:"uploadId" form:"uploadId"` + PartSize int64 `json:"partSize"` +} + +type CreateMultipartTaskConflictRsp struct { + CreateMultipartTaskParam + ListMultipartRsp + UploadId string `json:"uploadId" form:"uploadId"` +} + +type MultipartTaskStatusInfo = CreateMultipartTaskConflictRsp + +const ( + CREATE_MULTIPART_TASK_SUCC int = 0 + CREATE_MULTIPART_TASK_COMPLETE int = 1 + CREATE_MULTIPART_TASK_CONFLICT int = 2 +) + +type CreateMultipartTaskRsp struct { + RspType int `json:"rspType" form:"rspType"` //rsp type + SuccInfo *CreateMultipartTaskSuccRsp `json:"succInfo" form:"succInfo"` //task info + CompleteInfo *FileInfo `json:"completeInfo" form:"completeInfo"` //task completed + ConflictInfo *CreateMultipartTaskConflictRsp `json:"conflictInfo" form:"conflictInfo"` //task exists +} + +type MultipartTaskId struct { + UploadId string `json:"uploadId" form:"uploadId" validate:"required,len=34"` +} + +//删除分片任务 +type DeleteMultipartTaskReq = MultipartTaskId + +//无响应体 + +//查询已上传分片信息 +type ListMultipartReq = MultipartTaskId +type Part struct { + Start int64 `json:"start" form:"start" validate:"gte=0"` + End int64 `json:"end" form:"end" validate:"required,gt=0"` +} + +func (part *Part) Len() int64 { + return part.End - part.Start + 1 +} + +type ListMultipartRsp struct { + UploadedParts []Part `json:"uploadedParts" form:"uploadedParts"` + UploadingParts []Part `json:"uploadingParts" form:"uploadingParts"` +} + +//上传分片 +type UploadPartReq struct { + MultipartTaskId + Part + Md5sum string `json:"md5sum" form:"md5sum" validate:"required,len=32"` +} + +//回应无包体 + +//上传完成合并分片 +type CompleteMultipartTaskReq = MultipartTaskId +type CompleteMultipartTaskRsp = FileInfo diff --git a/internal/proto/page.go b/internal/proto/page.go new file mode 100644 index 0000000..9f88c0b --- /dev/null +++ b/internal/proto/page.go @@ -0,0 +1,27 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package proto + +//--- 分页消息结构定义 +type PageInfo struct { + Page uint32 `json:"page" form:"page"` + PageSize uint32 `json:"pageSize" form:"pageSize"` +} + +type PageInfoExt struct { + PageInfo + FileCount int64 `json:"count" form:"count"` + TotalPage uint32 `json:"total" form:"total"` +} diff --git a/internal/proto/recycled.go b/internal/proto/recycled.go new file mode 100644 index 0000000..ee51a90 --- /dev/null +++ b/internal/proto/recycled.go @@ -0,0 +1,30 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package proto + +type RestoreRecycledReq struct { + RecycledUuids []string `json:"uuids" form:"uuids" validate:"required,dive,uuid"` +} + +type UuidLst struct { + Uuids []string `json:"uuids" form:"uuids"` +} + +//-------- 清理回收站的文件或文件夹 + +//请求消息 +type RecycledPhyDeleteReq = UuidLst //移除文件或文件夹的请求 + +//回应消息(无包体,只有包头) diff --git a/internal/proto/setting.go b/internal/proto/setting.go new file mode 100644 index 0000000..4fde418 --- /dev/null +++ b/internal/proto/setting.go @@ -0,0 +1,30 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package proto + +type Setting struct { + Name string `gorm:"column:setting_name;PRIMARY_KEY;index" ` + Value string `gorm:"column:setting_value" ` + CreateTime int64 `gorm:"column:created_time" ` +} + +func (Setting) TableName() string { + return "aofs_setting" +} + +const ( + HIS_TASK_STATUS_OK = "OK" + HIS_TASK_BETAG = "his_betag" +) diff --git a/internal/proto/status.go b/internal/proto/status.go new file mode 100644 index 0000000..8229e8f --- /dev/null +++ b/internal/proto/status.go @@ -0,0 +1,19 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package proto + +type StatusRsp struct { + Status string `json:"status" form:"status"` +} diff --git a/internal/proto/sync.go b/internal/proto/sync.go new file mode 100644 index 0000000..b6503c6 --- /dev/null +++ b/internal/proto/sync.go @@ -0,0 +1,33 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package proto + +type SyncDeviceReq struct { + DeviceId string `json:"deviceId" form:"deviceId" validate:"required"` + DeviceName string `json:"deviceName" form:"deviceName" validate:"required"` +} + +type SyncFolderRsp struct { + FolderId string `gorm:"column:uuid" json:"uuid" form:"uuid"` + FolderName string `gorm:"column:name" json:"name" form:"name"` + FolderPath string `gorm:"column:path" json:"path" form:"path"` + UserId uint8 `gorm:"column:user_id" json:"userId" form:"userId"` +} + +type SyncedFilesReq struct { + Timestamp uint64 `json:"timestamp" form:"timestamp" validate:"required,gte=0"` + DeviceId string `json:"deviceId" form:"deviceId"` + Path string `json:"path" form:"path"` +} diff --git a/internal/proto/user.go b/internal/proto/user.go new file mode 100644 index 0000000..60db722 --- /dev/null +++ b/internal/proto/user.go @@ -0,0 +1,23 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package proto + +type User struct { + User UserIdType `json:"userId" form:"userId"` +} + +type Storage struct { + UserStorage int64 `json:"userStorage" form:"userStorage"` +} diff --git a/internal/utils/file_json.go b/internal/utils/file_json.go new file mode 100644 index 0000000..82bd140 --- /dev/null +++ b/internal/utils/file_json.go @@ -0,0 +1,58 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package utils + +import ( + "encoding/json" + "fmt" + "os" + "path/filepath" +) + +func WriteJsonToFile(file string, obj interface{}) error { + + data, err := json.Marshal(obj) + if err != nil { + return err + } + + dir, _ := filepath.Split(file) + os.MkdirAll(dir, os.ModePerm) + + if f, err := os.OpenFile(file, os.O_CREATE|os.O_WRONLY, os.ModePerm); err != nil { + return err + } else { + if n, err := f.Write(data); err != nil { + return err + } else if n != len(data) { + return fmt.Errorf("The length of data written is insufficient.") + } + f.Sync() + f.Close() + return nil + } +} + +func ReadJsonFromFile(file string, obj interface{}) error { + if data, err := os.ReadFile(file); err != nil { + return err + } else { + if err := json.Unmarshal(data, obj); err != nil { + return err + } else { + return nil + } + } +} diff --git a/internal/utils/mime_type.go b/internal/utils/mime_type.go new file mode 100644 index 0000000..0a87f20 --- /dev/null +++ b/internal/utils/mime_type.go @@ -0,0 +1,56 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package utils + +import ( + "path/filepath" + "strings" + + gomime "github.com/cubewise-code/go-mime" +) + +func GetMimeTypeByFilename(filename string) string { + ext := filepath.Ext(filename) + mimeType := gomime.TypeByExtension(ext) + if len(mimeType) == 0 { + mimeType = "application/octet-stream" + } + return mimeType +} +func ParseCategoryByFilename(filename string) string { + + ext := filepath.Ext(filename) + mimeType := gomime.TypeByExtension(ext) + if len(mimeType) == 0 { + mimeType = "application/octet-stream" + } + + types := strings.Split(mimeType, "/") + if len(types) > 0 { + switch types[0] { + case "video": + return "video" + case "image": + return "picture" + } + } + + switch ext { + case ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".caj", ".kdh", ".nh", ".txt": + return "document" + } + + return "other" +} diff --git a/internal/utils/mime_type_test.go b/internal/utils/mime_type_test.go new file mode 100644 index 0000000..5059bbc --- /dev/null +++ b/internal/utils/mime_type_test.go @@ -0,0 +1,67 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package utils + +import ( + "testing" +) + +func TestGetMimeTypeByFilename(t *testing.T) { + type args struct { + filename string + } + tests := []struct { + name string + args args + want string + }{ + // TODO: Add test cases. + {"null", args{""}, "application/octet-stream"}, + {"jpeg", args{"x.jpg"}, "image/jpeg"}, + {"unknown", args{"x.jpgxxxxxx"}, "application/octet-stream"}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := GetMimeTypeByFilename(tt.args.filename); got != tt.want { + t.Errorf("GetMimeTypeByFilename() = %v, want %v", got, tt.want) + } + }) + } +} + +func TestParseCategoryByFilename(t *testing.T) { + type args struct { + filename string + } + tests := []struct { + name string + args args + want string + }{ + // TODO: Add test cases. + {"null", args{""}, "other"}, + {"jpeg", args{"x.jpg"}, "picture"}, + {"jpeg", args{"x.avi"}, "video"}, + {"jpeg", args{"x.pptx"}, "document"}, + {"unknown", args{"x.jpgxxxxxx"}, "other"}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := ParseCategoryByFilename(tt.args.filename); got != tt.want { + t.Errorf("ParseCategoryByFilename() = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/internal/utils/random.go b/internal/utils/random.go new file mode 100644 index 0000000..5870f03 --- /dev/null +++ b/internal/utils/random.go @@ -0,0 +1,39 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package utils + +import ( + "github.com/google/uuid" + "math/rand" + "strings" + "time" +) + +// RandString 生成随机字符串 +func RandString(lenNum int) string { + var chars = []string{"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0"} + str := strings.Builder{} + length := len(chars) + rand.Seed(time.Now().UnixNano()) //重新播种,否则值不会变 + for i := 0; i < lenNum; i++ { + str.WriteString(chars[rand.Intn(length)]) + + } + return str.String() +} + +func RandomID() string { + return uuid.New().String() +} diff --git a/licenses/license-cloud.google.com-go-bigquery.txt b/licenses/license-cloud.google.com-go-bigquery.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/licenses/license-cloud.google.com-go-bigquery.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-cloud.google.com-go-datastore.txt b/licenses/license-cloud.google.com-go-datastore.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/licenses/license-cloud.google.com-go-datastore.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-cloud.google.com-go-pubsub.txt b/licenses/license-cloud.google.com-go-pubsub.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/licenses/license-cloud.google.com-go-pubsub.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-cloud.google.com-go-storage.txt b/licenses/license-cloud.google.com-go-storage.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/licenses/license-cloud.google.com-go-storage.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-cloud.google.com-go.txt b/licenses/license-cloud.google.com-go.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/licenses/license-cloud.google.com-go.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-dmitri.shuralyov.com-gpu-mtl.txt b/licenses/license-dmitri.shuralyov.com-gpu-mtl.txt new file mode 100644 index 0000000..49ea0f9 --- /dev/null +++ b/licenses/license-dmitri.shuralyov.com-gpu-mtl.txt @@ -0,0 +1,27 @@ +Copyright (c) 2018 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-Azure-azure-sdk-for-go-sdk-azcore.txt b/licenses/license-github.com-Azure-azure-sdk-for-go-sdk-azcore.txt new file mode 100644 index 0000000..ccb63b1 --- /dev/null +++ b/licenses/license-github.com-Azure-azure-sdk-for-go-sdk-azcore.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2021 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/licenses/license-github.com-Azure-azure-sdk-for-go-sdk-azidentity.txt b/licenses/license-github.com-Azure-azure-sdk-for-go-sdk-azidentity.txt new file mode 100644 index 0000000..ccb63b1 --- /dev/null +++ b/licenses/license-github.com-Azure-azure-sdk-for-go-sdk-azidentity.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2021 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/licenses/license-github.com-BurntSushi-toml.txt b/licenses/license-github.com-BurntSushi-toml.txt new file mode 100644 index 0000000..01b5743 --- /dev/null +++ b/licenses/license-github.com-BurntSushi-toml.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 TOML authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-github.com-BurntSushi-xgb.txt b/licenses/license-github.com-BurntSushi-xgb.txt new file mode 100644 index 0000000..d99cd90 --- /dev/null +++ b/licenses/license-github.com-BurntSushi-xgb.txt @@ -0,0 +1,42 @@ +// Copyright (c) 2009 The XGB Authors. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Subject to the terms and conditions of this License, Google hereby +// grants to You a perpetual, worldwide, non-exclusive, no-charge, +// royalty-free, irrevocable (except as stated in this section) patent +// license to make, have made, use, offer to sell, sell, import, and +// otherwise transfer this implementation of XGB, where such license +// applies only to those patent claims licensable by Google that are +// necessarily infringed by use of this implementation of XGB. If You +// institute patent litigation against any entity (including a +// cross-claim or counterclaim in a lawsuit) alleging that this +// implementation of XGB or a Contribution incorporated within this +// implementation of XGB constitutes direct or contributory patent +// infringement, then any patent licenses granted to You under this +// License for this implementation of XGB shall terminate as of the date +// such litigation is filed. diff --git a/licenses/license-github.com-CloudyKit-fastprinter.txt b/licenses/license-github.com-CloudyKit-fastprinter.txt new file mode 100644 index 0000000..95d674b --- /dev/null +++ b/licenses/license-github.com-CloudyKit-fastprinter.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 CloudyKit + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/licenses/license-github.com-CloudyKit-jet-v3.txt b/licenses/license-github.com-CloudyKit-jet-v3.txt new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/licenses/license-github.com-CloudyKit-jet-v3.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-DATA-DOG-go-sqlmock.txt b/licenses/license-github.com-DATA-DOG-go-sqlmock.txt new file mode 100644 index 0000000..6ee063c --- /dev/null +++ b/licenses/license-github.com-DATA-DOG-go-sqlmock.txt @@ -0,0 +1,28 @@ +The three clause BSD license (http://en.wikipedia.org/wiki/BSD_licenses) + +Copyright (c) 2013-2019, DATA-DOG team +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* The name DataDog.lt may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-Joker-hpp.txt b/licenses/license-github.com-Joker-hpp.txt new file mode 100644 index 0000000..d079534 --- /dev/null +++ b/licenses/license-github.com-Joker-hpp.txt @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2018, +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-KyleBanks-depth.txt b/licenses/license-github.com-KyleBanks-depth.txt new file mode 100644 index 0000000..070b426 --- /dev/null +++ b/licenses/license-github.com-KyleBanks-depth.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Kyle Banks + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-Masterminds-semver-v3.txt b/licenses/license-github.com-Masterminds-semver-v3.txt new file mode 100644 index 0000000..9ff7da9 --- /dev/null +++ b/licenses/license-github.com-Masterminds-semver-v3.txt @@ -0,0 +1,19 @@ +Copyright (C) 2014-2019, Matt Butcher and Matt Farina + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-github.com-PuerkitoBio-purell.txt b/licenses/license-github.com-PuerkitoBio-purell.txt new file mode 100644 index 0000000..4b9986d --- /dev/null +++ b/licenses/license-github.com-PuerkitoBio-purell.txt @@ -0,0 +1,12 @@ +Copyright (c) 2012, Martin Angers +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +* Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-PuerkitoBio-urlesc.txt b/licenses/license-github.com-PuerkitoBio-urlesc.txt new file mode 100644 index 0000000..7448756 --- /dev/null +++ b/licenses/license-github.com-PuerkitoBio-urlesc.txt @@ -0,0 +1,27 @@ +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-Shopify-goreferrer.txt b/licenses/license-github.com-Shopify-goreferrer.txt new file mode 100644 index 0000000..d688cb7 --- /dev/null +++ b/licenses/license-github.com-Shopify-goreferrer.txt @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 Steven Normore + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-ajg-form.txt b/licenses/license-github.com-ajg-form.txt new file mode 100644 index 0000000..9190b16 --- /dev/null +++ b/licenses/license-github.com-ajg-form.txt @@ -0,0 +1,27 @@ +Copyright (c) 2014 Alvaro J. Genial. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-alecthomas-template.txt b/licenses/license-github.com-alecthomas-template.txt new file mode 100644 index 0000000..7448756 --- /dev/null +++ b/licenses/license-github.com-alecthomas-template.txt @@ -0,0 +1,27 @@ +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-alicebob-gopher-json.txt b/licenses/license-github.com-alicebob-gopher-json.txt new file mode 100644 index 0000000..68a49da --- /dev/null +++ b/licenses/license-github.com-alicebob-gopher-json.txt @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/licenses/license-github.com-alicebob-miniredis-v2.txt b/licenses/license-github.com-alicebob-miniredis-v2.txt new file mode 100644 index 0000000..bb02657 --- /dev/null +++ b/licenses/license-github.com-alicebob-miniredis-v2.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Harmen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-antonlindstrom-pgstore.txt b/licenses/license-github.com-antonlindstrom-pgstore.txt new file mode 100644 index 0000000..0585e1d --- /dev/null +++ b/licenses/license-github.com-antonlindstrom-pgstore.txt @@ -0,0 +1,19 @@ +Copyright 2017 Anton Lindström + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-armon-consul-api.txt b/licenses/license-github.com-armon-consul-api.txt new file mode 100644 index 0000000..f0e5c79 --- /dev/null +++ b/licenses/license-github.com-armon-consul-api.txt @@ -0,0 +1,362 @@ +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. "Contributor" + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. "Contributor Version" + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the terms of + a Secondary License. + +1.6. "Executable Form" + + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + + means a work that combines Covered Software with other material, in a + separate file or files, that is not Covered Software. + +1.8. "License" + + means this document. + +1.9. "Licensable" + + means having the right to grant, to the maximum extent possible, whether + at the time of the initial grant or subsequently, any and all of the + rights conveyed by this License. + +1.10. "Modifications" + + means any of the following: + + a. any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. "Patent Claims" of a Contributor + + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the License, + by the making, using, selling, offering for sale, having made, import, + or transfer of either its Contributions or its Contributor Version. + +1.12. "Secondary License" + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + +1.13. "Source Code Form" + + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, "control" means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + +2. License Grants and Conditions + +2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution + become effective for each Contribution on the date the Contributor first + distributes such Contribution. + +2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under + this License. No additional rights or licenses will be implied from the + distribution or licensing of Covered Software under this License. + Notwithstanding Section 2.1(b) above, no patent license is granted by a + Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of + its Contributions. + + This License does not grant any rights in the trademarks, service marks, + or logos of any Contributor (except as may be necessary to comply with + the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this + License (see Section 10.2) or under the terms of a Secondary License (if + permitted under the terms of Section 3.3). + +2.5. Representation + + Each Contributor represents that the Contributor believes its + Contributions are its original creation(s) or it has sufficient rights to + grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + + This License is not intended to limit any rights You have under + applicable copyright doctrines of fair use, fair dealing, or other + equivalents. + +2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities + +3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under + the terms of this License. You must inform recipients that the Source + Code Form of the Covered Software is governed by the terms of this + License, and how they can obtain a copy of this License. You may not + attempt to alter or restrict the recipients' rights in the Source Code + Form. + +3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter the + recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for + the Covered Software. If the Larger Work is a combination of Covered + Software with a work governed by one or more Secondary Licenses, and the + Covered Software is not Incompatible With Secondary Licenses, this + License permits You to additionally distribute such Covered Software + under the terms of such Secondary License(s), so that the recipient of + the Larger Work may, at their option, further distribute the Covered + Software under the terms of either this License or such Secondary + License(s). + +3.4. Notices + + You may not remove or alter the substance of any license notices + (including copyright notices, patent notices, disclaimers of warranty, or + limitations of liability) contained within the Source Code Form of the + Covered Software, except that You may alter any license notices to the + extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on + behalf of any Contributor. You must make it absolutely clear that any + such warranty, support, indemnity, or liability obligation is offered by + You alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, + judicial order, or regulation then You must: (a) comply with the terms of + this License to the maximum extent possible; and (b) describe the + limitations and the code they affect. Such description must be placed in a + text file included with all distributions of the Covered Software under + this License. Except to the extent prohibited by statute or regulation, + such description must be sufficiently detailed for a recipient of ordinary + skill to be able to understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing + basis, if such Contributor fails to notify You of the non-compliance by + some reasonable means prior to 60 days after You have come back into + compliance. Moreover, Your grants from a particular Contributor are + reinstated on an ongoing basis if such Contributor notifies You of the + non-compliance by some reasonable means, this is the first time You have + received notice of non-compliance with this License from such + Contributor, and You become compliant prior to 30 days after Your receipt + of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, + counter-claims, and cross-claims) alleging that a Contributor Version + directly or indirectly infringes any patent, then the rights granted to + You by any and all Contributors for the Covered Software under Section + 2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + +6. Disclaimer of Warranty + + Covered Software is provided under this License on an "as is" basis, + without warranty of any kind, either expressed, implied, or statutory, + including, without limitation, warranties that the Covered Software is free + of defects, merchantable, fit for a particular purpose or non-infringing. + The entire risk as to the quality and performance of the Covered Software + is with You. Should any Covered Software prove defective in any respect, + You (not any Contributor) assume the cost of any necessary servicing, + repair, or correction. This disclaimer of warranty constitutes an essential + part of this License. No use of any Covered Software is authorized under + this License except under this disclaimer. + +7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from + such party's negligence to the extent applicable law prohibits such + limitation. Some jurisdictions do not allow the exclusion or limitation of + incidental or consequential damages, so this exclusion and limitation may + not apply to You. + +8. Litigation + + Any litigation relating to this License may be brought only in the courts + of a jurisdiction where the defendant maintains its principal place of + business and such litigation shall be governed by laws of that + jurisdiction, without reference to its conflict-of-law provisions. Nothing + in this Section shall prevent a party's ability to bring cross-claims or + counter-claims. + +9. Miscellaneous + + This License represents the complete agreement concerning the subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. Any law or regulation which provides that + the language of a contract shall be construed against the drafter shall not + be used to construe this License against a Contributor. + + +10. Versions of the License + +10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + +10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version + of the License under which You originally received the Covered Software, + or under the terms of any subsequent version published by the license + steward. + +10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a + modified version of this License if you rename the license and remove + any references to the name of the license steward (except to note that + such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary + Licenses If You choose to distribute Source Code Form that is + Incompatible With Secondary Licenses under the terms of this version of + the License, the notice described in Exhibit B of this License must be + attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, +then You may include the notice in a location (such as a LICENSE file in a +relevant directory) where a recipient would be likely to look for such a +notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice + + This Source Code Form is "Incompatible + With Secondary Licenses", as defined by + the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/licenses/license-github.com-avast-retry-go.txt b/licenses/license-github.com-avast-retry-go.txt new file mode 100644 index 0000000..f63fca8 --- /dev/null +++ b/licenses/license-github.com-avast-retry-go.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Avast + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-aymerick-raymond.txt b/licenses/license-github.com-aymerick-raymond.txt new file mode 100644 index 0000000..6ce87cd --- /dev/null +++ b/licenses/license-github.com-aymerick-raymond.txt @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Aymerick JEHANNE + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/licenses/license-github.com-bitly-go-simplejson.txt b/licenses/license-github.com-bitly-go-simplejson.txt new file mode 100644 index 0000000..89de354 --- /dev/null +++ b/licenses/license-github.com-bitly-go-simplejson.txt @@ -0,0 +1,17 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-github.com-boj-redistore.txt b/licenses/license-github.com-boj-redistore.txt new file mode 100644 index 0000000..fabd7b9 --- /dev/null +++ b/licenses/license-github.com-boj-redistore.txt @@ -0,0 +1,19 @@ +Copyright (c) 2013 Brian Jones + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-github.com-bos-hieu-mongostore.txt b/licenses/license-github.com-bos-hieu-mongostore.txt new file mode 100644 index 0000000..a517c02 --- /dev/null +++ b/licenses/license-github.com-bos-hieu-mongostore.txt @@ -0,0 +1,27 @@ +Copyright (c) 2014, kidstuff +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + +* Neither the name of the {organization} nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-bradfitz-gomemcache.txt b/licenses/license-github.com-bradfitz-gomemcache.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/licenses/license-github.com-bradfitz-gomemcache.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-bradleypeabody-gorilla-sessions-memcache.txt b/licenses/license-github.com-bradleypeabody-gorilla-sessions-memcache.txt new file mode 100644 index 0000000..ad410e1 --- /dev/null +++ b/licenses/license-github.com-bradleypeabody-gorilla-sessions-memcache.txt @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/licenses/license-github.com-buger-jsonparser.txt b/licenses/license-github.com-buger-jsonparser.txt new file mode 100644 index 0000000..ac25aeb --- /dev/null +++ b/licenses/license-github.com-buger-jsonparser.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Leonid Bugaev + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-bytedance-sonic.txt b/licenses/license-github.com-bytedance-sonic.txt new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/licenses/license-github.com-bytedance-sonic.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-census-instrumentation-opencensus-proto.txt b/licenses/license-github.com-census-instrumentation-opencensus-proto.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/licenses/license-github.com-census-instrumentation-opencensus-proto.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-chenzhuoyu-base64x.txt b/licenses/license-github.com-chenzhuoyu-base64x.txt new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/licenses/license-github.com-chenzhuoyu-base64x.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-chzyer-readline.txt b/licenses/license-github.com-chzyer-readline.txt new file mode 100644 index 0000000..c9afab3 --- /dev/null +++ b/licenses/license-github.com-chzyer-readline.txt @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Chzyer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/licenses/license-github.com-chzyer-test.txt b/licenses/license-github.com-chzyer-test.txt new file mode 100644 index 0000000..96c44aa --- /dev/null +++ b/licenses/license-github.com-chzyer-test.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 chzyer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-client9-misspell.txt b/licenses/license-github.com-client9-misspell.txt new file mode 100644 index 0000000..423e1f9 --- /dev/null +++ b/licenses/license-github.com-client9-misspell.txt @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017 Nick Galbreath + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/licenses/license-github.com-cockroachdb-apd.txt b/licenses/license-github.com-cockroachdb-apd.txt new file mode 100644 index 0000000..829ea33 --- /dev/null +++ b/licenses/license-github.com-cockroachdb-apd.txt @@ -0,0 +1,202 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/licenses/license-github.com-codegangsta-inject.txt b/licenses/license-github.com-codegangsta-inject.txt new file mode 100644 index 0000000..eb68a0e --- /dev/null +++ b/licenses/license-github.com-codegangsta-inject.txt @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 Jeremy Saenz + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-coreos-etcd.txt b/licenses/license-github.com-coreos-etcd.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/licenses/license-github.com-coreos-etcd.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-coreos-go-etcd.txt b/licenses/license-github.com-coreos-go-etcd.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/licenses/license-github.com-coreos-go-etcd.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-coreos-go-semver.txt b/licenses/license-github.com-coreos-go-semver.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/licenses/license-github.com-coreos-go-semver.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-coreos-go-systemd-v22.txt b/licenses/license-github.com-coreos-go-systemd-v22.txt new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/licenses/license-github.com-coreos-go-systemd-v22.txt @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-coreos-go-systemd.txt b/licenses/license-github.com-coreos-go-systemd.txt new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/licenses/license-github.com-coreos-go-systemd.txt @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-cpuguy83-go-md2man-v2.txt b/licenses/license-github.com-cpuguy83-go-md2man-v2.txt new file mode 100644 index 0000000..1cade6c --- /dev/null +++ b/licenses/license-github.com-cpuguy83-go-md2man-v2.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Brian Goff + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-cpuguy83-go-md2man.txt b/licenses/license-github.com-cpuguy83-go-md2man.txt new file mode 100644 index 0000000..1cade6c --- /dev/null +++ b/licenses/license-github.com-cpuguy83-go-md2man.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Brian Goff + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-creack-pty.txt b/licenses/license-github.com-creack-pty.txt new file mode 100644 index 0000000..6b7558b --- /dev/null +++ b/licenses/license-github.com-creack-pty.txt @@ -0,0 +1,23 @@ +Copyright (c) 2011 Keith Rarick + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall +be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-cubewise-code-go-mime.txt b/licenses/license-github.com-cubewise-code-go-mime.txt new file mode 100644 index 0000000..fde8226 --- /dev/null +++ b/licenses/license-github.com-cubewise-code-go-mime.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Cubewise CODE + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-davecgh-go-spew.txt b/licenses/license-github.com-davecgh-go-spew.txt new file mode 100644 index 0000000..bc52e96 --- /dev/null +++ b/licenses/license-github.com-davecgh-go-spew.txt @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2012-2016 Dave Collins + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/licenses/license-github.com-denisenkom-go-mssqldb.txt b/licenses/license-github.com-denisenkom-go-mssqldb.txt new file mode 100644 index 0000000..7448756 --- /dev/null +++ b/licenses/license-github.com-denisenkom-go-mssqldb.txt @@ -0,0 +1,27 @@ +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-dgraph-io-badger.txt b/licenses/license-github.com-dgraph-io-badger.txt new file mode 100644 index 0000000..d9a10c0 --- /dev/null +++ b/licenses/license-github.com-dgraph-io-badger.txt @@ -0,0 +1,176 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/licenses/license-github.com-dgryski-go-farm.txt b/licenses/license-github.com-dgryski-go-farm.txt new file mode 100644 index 0000000..3d07f66 --- /dev/null +++ b/licenses/license-github.com-dgryski-go-farm.txt @@ -0,0 +1,23 @@ +As this is a highly derivative work, I have placed it under the same license as the original implementation: + +Copyright (c) 2014-2017 Damian Gryski +Copyright (c) 2016-2017 Nicola Asuni - Tecnick.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/licenses/license-github.com-dnaeon-go-vcr.txt b/licenses/license-github.com-dnaeon-go-vcr.txt new file mode 100644 index 0000000..9a46132 --- /dev/null +++ b/licenses/license-github.com-dnaeon-go-vcr.txt @@ -0,0 +1,24 @@ +Copyright (c) 2015-2016 Marin Atanasov Nikolov +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer + in this position and unchanged. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-dsoprea-go-exif-v2.txt b/licenses/license-github.com-dsoprea-go-exif-v2.txt new file mode 100644 index 0000000..0b9358a --- /dev/null +++ b/licenses/license-github.com-dsoprea-go-exif-v2.txt @@ -0,0 +1,9 @@ +MIT LICENSE + +Copyright 2019 Dustin Oprea + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-dsoprea-go-exif-v3.txt b/licenses/license-github.com-dsoprea-go-exif-v3.txt new file mode 100644 index 0000000..0b9358a --- /dev/null +++ b/licenses/license-github.com-dsoprea-go-exif-v3.txt @@ -0,0 +1,9 @@ +MIT LICENSE + +Copyright 2019 Dustin Oprea + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-dsoprea-go-exif.txt b/licenses/license-github.com-dsoprea-go-exif.txt new file mode 100644 index 0000000..0b9358a --- /dev/null +++ b/licenses/license-github.com-dsoprea-go-exif.txt @@ -0,0 +1,9 @@ +MIT LICENSE + +Copyright 2019 Dustin Oprea + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-dsoprea-go-heic-exif-extractor.txt b/licenses/license-github.com-dsoprea-go-heic-exif-extractor.txt new file mode 100644 index 0000000..163291e --- /dev/null +++ b/licenses/license-github.com-dsoprea-go-heic-exif-extractor.txt @@ -0,0 +1,9 @@ +MIT LICENSE + +Copyright 2020 Dustin Oprea + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-dsoprea-go-logging.txt b/licenses/license-github.com-dsoprea-go-logging.txt new file mode 100644 index 0000000..163291e --- /dev/null +++ b/licenses/license-github.com-dsoprea-go-logging.txt @@ -0,0 +1,9 @@ +MIT LICENSE + +Copyright 2020 Dustin Oprea + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-dsoprea-go-png-image-structure-v2.txt b/licenses/license-github.com-dsoprea-go-png-image-structure-v2.txt new file mode 100644 index 0000000..163291e --- /dev/null +++ b/licenses/license-github.com-dsoprea-go-png-image-structure-v2.txt @@ -0,0 +1,9 @@ +MIT LICENSE + +Copyright 2020 Dustin Oprea + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-dsoprea-go-utility-v2.txt b/licenses/license-github.com-dsoprea-go-utility-v2.txt new file mode 100644 index 0000000..8941063 --- /dev/null +++ b/licenses/license-github.com-dsoprea-go-utility-v2.txt @@ -0,0 +1,7 @@ +Copyright 2019 Random Ingenuity InformationWorks + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-dsoprea-go-utility.txt b/licenses/license-github.com-dsoprea-go-utility.txt new file mode 100644 index 0000000..8941063 --- /dev/null +++ b/licenses/license-github.com-dsoprea-go-utility.txt @@ -0,0 +1,7 @@ +Copyright 2019 Random Ingenuity InformationWorks + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-dustin-go-humanize.txt b/licenses/license-github.com-dustin-go-humanize.txt new file mode 100644 index 0000000..8d9a94a --- /dev/null +++ b/licenses/license-github.com-dustin-go-humanize.txt @@ -0,0 +1,21 @@ +Copyright (c) 2005-2008 Dustin Sallings + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + diff --git a/licenses/license-github.com-eknkc-amber.txt b/licenses/license-github.com-eknkc-amber.txt new file mode 100644 index 0000000..77dfb91 --- /dev/null +++ b/licenses/license-github.com-eknkc-amber.txt @@ -0,0 +1,9 @@ +(The MIT License) + +Copyright (c) 2012 Ekin Koc ekin@eknkc.com + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-envoyproxy-go-control-plane.txt b/licenses/license-github.com-envoyproxy-go-control-plane.txt new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/licenses/license-github.com-envoyproxy-go-control-plane.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-envoyproxy-protoc-gen-validate.txt b/licenses/license-github.com-envoyproxy-protoc-gen-validate.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/licenses/license-github.com-envoyproxy-protoc-gen-validate.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-etcd-io-bbolt.txt b/licenses/license-github.com-etcd-io-bbolt.txt new file mode 100644 index 0000000..004e77f --- /dev/null +++ b/licenses/license-github.com-etcd-io-bbolt.txt @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 Ben Johnson + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-fatih-structs.txt b/licenses/license-github.com-fatih-structs.txt new file mode 100644 index 0000000..34504e4 --- /dev/null +++ b/licenses/license-github.com-fatih-structs.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Fatih Arslan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/licenses/license-github.com-fsnotify-fsnotify.txt b/licenses/license-github.com-fsnotify-fsnotify.txt new file mode 100644 index 0000000..f21e540 --- /dev/null +++ b/licenses/license-github.com-fsnotify-fsnotify.txt @@ -0,0 +1,28 @@ +Copyright (c) 2012 The Go Authors. All rights reserved. +Copyright (c) 2012 fsnotify Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-gabriel-vasile-mimetype.txt b/licenses/license-github.com-gabriel-vasile-mimetype.txt new file mode 100644 index 0000000..6aac070 --- /dev/null +++ b/licenses/license-github.com-gabriel-vasile-mimetype.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018-2020 Gabriel Vasile + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-gavv-httpexpect.txt b/licenses/license-github.com-gavv-httpexpect.txt new file mode 100644 index 0000000..4a224c1 --- /dev/null +++ b/licenses/license-github.com-gavv-httpexpect.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Victor Gaydov + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-getsentry-sentry-go.txt b/licenses/license-github.com-getsentry-sentry-go.txt new file mode 100644 index 0000000..3e66f28 --- /dev/null +++ b/licenses/license-github.com-getsentry-sentry-go.txt @@ -0,0 +1,9 @@ +Copyright (c) 2019 Sentry (https://sentry.io) and individual contributors. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-ghodss-yaml.txt b/licenses/license-github.com-ghodss-yaml.txt new file mode 100644 index 0000000..7805d36 --- /dev/null +++ b/licenses/license-github.com-ghodss-yaml.txt @@ -0,0 +1,50 @@ +The MIT License (MIT) + +Copyright (c) 2014 Sam Ghods + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-gin-contrib-gzip.txt b/licenses/license-github.com-gin-contrib-gzip.txt new file mode 100644 index 0000000..a863f57 --- /dev/null +++ b/licenses/license-github.com-gin-contrib-gzip.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Gin-Gonic + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-gin-contrib-sessions.txt b/licenses/license-github.com-gin-contrib-sessions.txt new file mode 100644 index 0000000..4e2cfb0 --- /dev/null +++ b/licenses/license-github.com-gin-contrib-sessions.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Gin-Gonic + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-gin-contrib-sse.txt b/licenses/license-github.com-gin-contrib-sse.txt new file mode 100644 index 0000000..1ff7f37 --- /dev/null +++ b/licenses/license-github.com-gin-contrib-sse.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Manuel Martínez-Almeida + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-github.com-gin-gonic-gin.txt b/licenses/license-github.com-gin-gonic-gin.txt new file mode 100644 index 0000000..1ff7f37 --- /dev/null +++ b/licenses/license-github.com-gin-gonic-gin.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Manuel Martínez-Almeida + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-github.com-globalsign-mgo.txt b/licenses/license-github.com-globalsign-mgo.txt new file mode 100644 index 0000000..770c767 --- /dev/null +++ b/licenses/license-github.com-globalsign-mgo.txt @@ -0,0 +1,25 @@ +mgo - MongoDB driver for Go + +Copyright (c) 2010-2013 - Gustavo Niemeyer + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-go-check-check.txt b/licenses/license-github.com-go-check-check.txt new file mode 100644 index 0000000..545cf2d --- /dev/null +++ b/licenses/license-github.com-go-check-check.txt @@ -0,0 +1,25 @@ +Gocheck - A rich testing framework for Go + +Copyright (c) 2010-2013 Gustavo Niemeyer + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-go-errors-errors.txt b/licenses/license-github.com-go-errors-errors.txt new file mode 100644 index 0000000..c9a5b2e --- /dev/null +++ b/licenses/license-github.com-go-errors-errors.txt @@ -0,0 +1,7 @@ +Copyright (c) 2015 Conrad Irwin + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-go-gl-glfw-v3.3-glfw.txt b/licenses/license-github.com-go-gl-glfw-v3.3-glfw.txt new file mode 100644 index 0000000..d3afbe2 --- /dev/null +++ b/licenses/license-github.com-go-gl-glfw-v3.3-glfw.txt @@ -0,0 +1,27 @@ +Copyright (c) 2012 The glfw3-go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-go-gl-glfw.txt b/licenses/license-github.com-go-gl-glfw.txt new file mode 100644 index 0000000..d3afbe2 --- /dev/null +++ b/licenses/license-github.com-go-gl-glfw.txt @@ -0,0 +1,27 @@ +Copyright (c) 2012 The glfw3-go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-go-kit-log.txt b/licenses/license-github.com-go-kit-log.txt new file mode 100644 index 0000000..bb5bdb9 --- /dev/null +++ b/licenses/license-github.com-go-kit-log.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Go kit + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-go-logfmt-logfmt.txt b/licenses/license-github.com-go-logfmt-logfmt.txt new file mode 100644 index 0000000..c026508 --- /dev/null +++ b/licenses/license-github.com-go-logfmt-logfmt.txt @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 go-logfmt + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/licenses/license-github.com-go-logr-logr.txt b/licenses/license-github.com-go-logr-logr.txt new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/licenses/license-github.com-go-logr-logr.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-go-martini-martini.txt b/licenses/license-github.com-go-martini-martini.txt new file mode 100644 index 0000000..d3fefb8 --- /dev/null +++ b/licenses/license-github.com-go-martini-martini.txt @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jeremy Saenz + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-go-openapi-jsonpointer.txt b/licenses/license-github.com-go-openapi-jsonpointer.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/licenses/license-github.com-go-openapi-jsonpointer.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-go-openapi-jsonreference.txt b/licenses/license-github.com-go-openapi-jsonreference.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/licenses/license-github.com-go-openapi-jsonreference.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-go-openapi-spec.txt b/licenses/license-github.com-go-openapi-spec.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/licenses/license-github.com-go-openapi-spec.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-go-openapi-swag.txt b/licenses/license-github.com-go-openapi-swag.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/licenses/license-github.com-go-openapi-swag.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-go-playground-assert-v2.txt b/licenses/license-github.com-go-playground-assert-v2.txt new file mode 100644 index 0000000..6a2ae9a --- /dev/null +++ b/licenses/license-github.com-go-playground-assert-v2.txt @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Dean Karn + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/licenses/license-github.com-go-playground-locales.txt b/licenses/license-github.com-go-playground-locales.txt new file mode 100644 index 0000000..75854ac --- /dev/null +++ b/licenses/license-github.com-go-playground-locales.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Go Playground + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/licenses/license-github.com-go-playground-universal-translator.txt b/licenses/license-github.com-go-playground-universal-translator.txt new file mode 100644 index 0000000..8d8aba1 --- /dev/null +++ b/licenses/license-github.com-go-playground-universal-translator.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Go Playground + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-go-playground-validator-v10.txt b/licenses/license-github.com-go-playground-validator-v10.txt new file mode 100644 index 0000000..6a2ae9a --- /dev/null +++ b/licenses/license-github.com-go-playground-validator-v10.txt @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Dean Karn + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/licenses/license-github.com-go-playground-validator.txt b/licenses/license-github.com-go-playground-validator.txt new file mode 100644 index 0000000..6a2ae9a --- /dev/null +++ b/licenses/license-github.com-go-playground-validator.txt @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Dean Karn + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/licenses/license-github.com-go-redis-redis.txt b/licenses/license-github.com-go-redis-redis.txt new file mode 100644 index 0000000..298bed9 --- /dev/null +++ b/licenses/license-github.com-go-redis-redis.txt @@ -0,0 +1,25 @@ +Copyright (c) 2013 The github.com/go-redis/redis Authors. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-go-sql-driver-mysql.txt b/licenses/license-github.com-go-sql-driver-mysql.txt new file mode 100644 index 0000000..14e2f77 --- /dev/null +++ b/licenses/license-github.com-go-sql-driver-mysql.txt @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/licenses/license-github.com-go-stack-stack.txt b/licenses/license-github.com-go-stack-stack.txt new file mode 100644 index 0000000..2abf98e --- /dev/null +++ b/licenses/license-github.com-go-stack-stack.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Chris Hines + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-go-task-slim-sprig.txt b/licenses/license-github.com-go-task-slim-sprig.txt new file mode 100644 index 0000000..f311b1e --- /dev/null +++ b/licenses/license-github.com-go-task-slim-sprig.txt @@ -0,0 +1,19 @@ +Copyright (C) 2013-2020 Masterminds + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-github.com-gobwas-httphead.txt b/licenses/license-github.com-gobwas-httphead.txt new file mode 100644 index 0000000..2744317 --- /dev/null +++ b/licenses/license-github.com-gobwas-httphead.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Sergey Kamardin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-gobwas-ws.txt b/licenses/license-github.com-gobwas-ws.txt new file mode 100644 index 0000000..d2611fd --- /dev/null +++ b/licenses/license-github.com-gobwas-ws.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017-2018 Sergey Kamardin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-goccy-go-json.txt b/licenses/license-github.com-goccy-go-json.txt new file mode 100644 index 0000000..6449c8b --- /dev/null +++ b/licenses/license-github.com-goccy-go-json.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Masaaki Goshima + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-godbus-dbus-v5.txt b/licenses/license-github.com-godbus-dbus-v5.txt new file mode 100644 index 0000000..670d88f --- /dev/null +++ b/licenses/license-github.com-godbus-dbus-v5.txt @@ -0,0 +1,25 @@ +Copyright (c) 2013, Georg Reinke (), Google +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-gofrs-uuid.txt b/licenses/license-github.com-gofrs-uuid.txt new file mode 100644 index 0000000..926d549 --- /dev/null +++ b/licenses/license-github.com-gofrs-uuid.txt @@ -0,0 +1,20 @@ +Copyright (C) 2013-2018 by Maxim Bublis + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-golang-geo.txt b/licenses/license-github.com-golang-geo.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/licenses/license-github.com-golang-geo.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-golang-glog.txt b/licenses/license-github.com-golang-glog.txt new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/licenses/license-github.com-golang-glog.txt @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-golang-groupcache.txt b/licenses/license-github.com-golang-groupcache.txt new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/licenses/license-github.com-golang-groupcache.txt @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-golang-jwt-jwt.txt b/licenses/license-github.com-golang-jwt-jwt.txt new file mode 100644 index 0000000..35dbc25 --- /dev/null +++ b/licenses/license-github.com-golang-jwt-jwt.txt @@ -0,0 +1,9 @@ +Copyright (c) 2012 Dave Grijalva +Copyright (c) 2021 golang-jwt maintainers + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/licenses/license-github.com-golang-mock.txt b/licenses/license-github.com-golang-mock.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/licenses/license-github.com-golang-mock.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-golang-protobuf.txt b/licenses/license-github.com-golang-protobuf.txt new file mode 100644 index 0000000..0f64693 --- /dev/null +++ b/licenses/license-github.com-golang-protobuf.txt @@ -0,0 +1,28 @@ +Copyright 2010 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/licenses/license-github.com-golang-snappy.txt b/licenses/license-github.com-golang-snappy.txt new file mode 100644 index 0000000..6050c10 --- /dev/null +++ b/licenses/license-github.com-golang-snappy.txt @@ -0,0 +1,27 @@ +Copyright (c) 2011 The Snappy-Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-golang-sql-civil.txt b/licenses/license-github.com-golang-sql-civil.txt new file mode 100644 index 0000000..7a4a3ea --- /dev/null +++ b/licenses/license-github.com-golang-sql-civil.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/licenses/license-github.com-golang-sql-sqlexp.txt b/licenses/license-github.com-golang-sql-sqlexp.txt new file mode 100644 index 0000000..32017f8 --- /dev/null +++ b/licenses/license-github.com-golang-sql-sqlexp.txt @@ -0,0 +1,27 @@ +Copyright (c) 2017 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-gomodule-redigo.txt b/licenses/license-github.com-gomodule-redigo.txt new file mode 100644 index 0000000..67db858 --- /dev/null +++ b/licenses/license-github.com-gomodule-redigo.txt @@ -0,0 +1,175 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/licenses/license-github.com-google-btree.txt b/licenses/license-github.com-google-btree.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/licenses/license-github.com-google-btree.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-google-go-cmp.txt b/licenses/license-github.com-google-go-cmp.txt new file mode 100644 index 0000000..32017f8 --- /dev/null +++ b/licenses/license-github.com-google-go-cmp.txt @@ -0,0 +1,27 @@ +Copyright (c) 2017 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-google-go-querystring.txt b/licenses/license-github.com-google-go-querystring.txt new file mode 100644 index 0000000..ae121a1 --- /dev/null +++ b/licenses/license-github.com-google-go-querystring.txt @@ -0,0 +1,27 @@ +Copyright (c) 2013 Google. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-google-gofuzz.txt b/licenses/license-github.com-google-gofuzz.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/licenses/license-github.com-google-gofuzz.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-google-martian.txt b/licenses/license-github.com-google-martian.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/licenses/license-github.com-google-martian.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-google-pprof.txt b/licenses/license-github.com-google-pprof.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/licenses/license-github.com-google-pprof.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-google-renameio.txt b/licenses/license-github.com-google-renameio.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/licenses/license-github.com-google-renameio.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-google-uuid.txt b/licenses/license-github.com-google-uuid.txt new file mode 100644 index 0000000..5dc6826 --- /dev/null +++ b/licenses/license-github.com-google-uuid.txt @@ -0,0 +1,27 @@ +Copyright (c) 2009,2014 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-googleapis-gax-go-v2.txt b/licenses/license-github.com-googleapis-gax-go-v2.txt new file mode 100644 index 0000000..6d16b65 --- /dev/null +++ b/licenses/license-github.com-googleapis-gax-go-v2.txt @@ -0,0 +1,27 @@ +Copyright 2016, Google Inc. +All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-gopherjs-gopherjs.txt b/licenses/license-github.com-gopherjs-gopherjs.txt new file mode 100644 index 0000000..d496fef --- /dev/null +++ b/licenses/license-github.com-gopherjs-gopherjs.txt @@ -0,0 +1,24 @@ +Copyright (c) 2013 Richard Musiol. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-gorilla-context.txt b/licenses/license-github.com-gorilla-context.txt new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/licenses/license-github.com-gorilla-context.txt @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-gorilla-securecookie.txt b/licenses/license-github.com-gorilla-securecookie.txt new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/licenses/license-github.com-gorilla-securecookie.txt @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-gorilla-sessions.txt b/licenses/license-github.com-gorilla-sessions.txt new file mode 100644 index 0000000..6903df6 --- /dev/null +++ b/licenses/license-github.com-gorilla-sessions.txt @@ -0,0 +1,27 @@ +Copyright (c) 2012-2018 The Gorilla Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-gorilla-websocket.txt b/licenses/license-github.com-gorilla-websocket.txt new file mode 100644 index 0000000..9171c97 --- /dev/null +++ b/licenses/license-github.com-gorilla-websocket.txt @@ -0,0 +1,22 @@ +Copyright (c) 2013 The Gorilla WebSocket Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-hashicorp-go-version.txt b/licenses/license-github.com-hashicorp-go-version.txt new file mode 100644 index 0000000..c33dcc7 --- /dev/null +++ b/licenses/license-github.com-hashicorp-go-version.txt @@ -0,0 +1,354 @@ +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. “Contributor” + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. “Contributor Version” + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor’s Contribution. + +1.3. “Contribution” + + means Covered Software of a particular Contributor. + +1.4. “Covered Software” + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. “Incompatible With Secondary Licenses” + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of version + 1.1 or earlier of the License, but not also under the terms of a + Secondary License. + +1.6. “Executable Form” + + means any form of the work other than Source Code Form. + +1.7. “Larger Work” + + means a work that combines Covered Software with other material, in a separate + file or files, that is not Covered Software. + +1.8. “License” + + means this document. + +1.9. “Licensable” + + means having the right to grant, to the maximum extent possible, whether at the + time of the initial grant or subsequently, any and all of the rights conveyed by + this License. + +1.10. “Modifications” + + means any of the following: + + a. any file in Source Code Form that results from an addition to, deletion + from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. “Patent Claims” of a Contributor + + means any patent claim(s), including without limitation, method, process, + and apparatus claims, in any patent Licensable by such Contributor that + would be infringed, but for the grant of the License, by the making, + using, selling, offering for sale, having made, import, or transfer of + either its Contributions or its Contributor Version. + +1.12. “Secondary License” + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + +1.13. “Source Code Form” + + means the form of the work preferred for making modifications. + +1.14. “You” (or “Your”) + + means an individual or a legal entity exercising rights under this + License. For legal entities, “You” includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, “control” means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + +2. License Grants and Conditions + +2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or as + part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its Contributions + or its Contributor Version. + +2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution become + effective for each Contribution on the date the Contributor first distributes + such Contribution. + +2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under this + License. No additional rights or licenses will be implied from the distribution + or licensing of Covered Software under this License. Notwithstanding Section + 2.1(b) above, no patent license is granted by a Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party’s + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of its + Contributions. + + This License does not grant any rights in the trademarks, service marks, or + logos of any Contributor (except as may be necessary to comply with the + notice requirements in Section 3.4). + +2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this License + (see Section 10.2) or under the terms of a Secondary License (if permitted + under the terms of Section 3.3). + +2.5. Representation + + Each Contributor represents that the Contributor believes its Contributions + are its original creation(s) or it has sufficient rights to grant the + rights to its Contributions conveyed by this License. + +2.6. Fair Use + + This License is not intended to limit any rights You have under applicable + copyright doctrines of fair use, fair dealing, or other equivalents. + +2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities + +3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under the + terms of this License. You must inform recipients that the Source Code Form + of the Covered Software is governed by the terms of this License, and how + they can obtain a copy of this License. You may not attempt to alter or + restrict the recipients’ rights in the Source Code Form. + +3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this License, + or sublicense it under different terms, provided that the license for + the Executable Form does not attempt to limit or alter the recipients’ + rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for the + Covered Software. If the Larger Work is a combination of Covered Software + with a work governed by one or more Secondary Licenses, and the Covered + Software is not Incompatible With Secondary Licenses, this License permits + You to additionally distribute such Covered Software under the terms of + such Secondary License(s), so that the recipient of the Larger Work may, at + their option, further distribute the Covered Software under the terms of + either this License or such Secondary License(s). + +3.4. Notices + + You may not remove or alter the substance of any license notices (including + copyright notices, patent notices, disclaimers of warranty, or limitations + of liability) contained within the Source Code Form of the Covered + Software, except that You may alter any license notices to the extent + required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on behalf + of any Contributor. You must make it absolutely clear that any such + warranty, support, indemnity, or liability obligation is offered by You + alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, judicial + order, or regulation then You must: (a) comply with the terms of this License + to the maximum extent possible; and (b) describe the limitations and the code + they affect. Such description must be placed in a text file included with all + distributions of the Covered Software under this License. Except to the + extent prohibited by statute or regulation, such description must be + sufficiently detailed for a recipient of ordinary skill to be able to + understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing basis, + if such Contributor fails to notify You of the non-compliance by some + reasonable means prior to 60 days after You have come back into compliance. + Moreover, Your grants from a particular Contributor are reinstated on an + ongoing basis if such Contributor notifies You of the non-compliance by + some reasonable means, this is the first time You have received notice of + non-compliance with this License from such Contributor, and You become + compliant prior to 30 days after Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, counter-claims, + and cross-claims) alleging that a Contributor Version directly or + indirectly infringes any patent, then the rights granted to You by any and + all Contributors for the Covered Software under Section 2.1 of this License + shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + +6. Disclaimer of Warranty + + Covered Software is provided under this License on an “as is” basis, without + warranty of any kind, either expressed, implied, or statutory, including, + without limitation, warranties that the Covered Software is free of defects, + merchantable, fit for a particular purpose or non-infringing. The entire + risk as to the quality and performance of the Covered Software is with You. + Should any Covered Software prove defective in any respect, You (not any + Contributor) assume the cost of any necessary servicing, repair, or + correction. This disclaimer of warranty constitutes an essential part of this + License. No use of any Covered Software is authorized under this License + except under this disclaimer. + +7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from such + party’s negligence to the extent applicable law prohibits such limitation. + Some jurisdictions do not allow the exclusion or limitation of incidental or + consequential damages, so this exclusion and limitation may not apply to You. + +8. Litigation + + Any litigation relating to this License may be brought only in the courts of + a jurisdiction where the defendant maintains its principal place of business + and such litigation shall be governed by laws of that jurisdiction, without + reference to its conflict-of-law provisions. Nothing in this Section shall + prevent a party’s ability to bring cross-claims or counter-claims. + +9. Miscellaneous + + This License represents the complete agreement concerning the subject matter + hereof. If any provision of this License is held to be unenforceable, such + provision shall be reformed only to the extent necessary to make it + enforceable. Any law or regulation which provides that the language of a + contract shall be construed against the drafter shall not be used to construe + this License against a Contributor. + + +10. Versions of the License + +10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + +10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version of + the License under which You originally received the Covered Software, or + under the terms of any subsequent version published by the license + steward. + +10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a modified + version of this License if you rename the license and remove any + references to the name of the license steward (except to note that such + modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses + If You choose to distribute Source Code Form that is Incompatible With + Secondary Licenses under the terms of this version of the License, the + notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, then +You may include the notice in a location (such as a LICENSE file in a relevant +directory) where a recipient would be likely to look for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - “Incompatible With Secondary Licenses” Notice + + This Source Code Form is “Incompatible + With Secondary Licenses”, as defined by + the Mozilla Public License, v. 2.0. + diff --git a/licenses/license-github.com-hashicorp-golang-lru.txt b/licenses/license-github.com-hashicorp-golang-lru.txt new file mode 100644 index 0000000..be2cc4d --- /dev/null +++ b/licenses/license-github.com-hashicorp-golang-lru.txt @@ -0,0 +1,362 @@ +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. "Contributor" + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. "Contributor Version" + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the terms of + a Secondary License. + +1.6. "Executable Form" + + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + + means a work that combines Covered Software with other material, in a + separate file or files, that is not Covered Software. + +1.8. "License" + + means this document. + +1.9. "Licensable" + + means having the right to grant, to the maximum extent possible, whether + at the time of the initial grant or subsequently, any and all of the + rights conveyed by this License. + +1.10. "Modifications" + + means any of the following: + + a. any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. "Patent Claims" of a Contributor + + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the License, + by the making, using, selling, offering for sale, having made, import, + or transfer of either its Contributions or its Contributor Version. + +1.12. "Secondary License" + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + +1.13. "Source Code Form" + + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, "control" means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + +2. License Grants and Conditions + +2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution + become effective for each Contribution on the date the Contributor first + distributes such Contribution. + +2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under + this License. No additional rights or licenses will be implied from the + distribution or licensing of Covered Software under this License. + Notwithstanding Section 2.1(b) above, no patent license is granted by a + Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of + its Contributions. + + This License does not grant any rights in the trademarks, service marks, + or logos of any Contributor (except as may be necessary to comply with + the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this + License (see Section 10.2) or under the terms of a Secondary License (if + permitted under the terms of Section 3.3). + +2.5. Representation + + Each Contributor represents that the Contributor believes its + Contributions are its original creation(s) or it has sufficient rights to + grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + + This License is not intended to limit any rights You have under + applicable copyright doctrines of fair use, fair dealing, or other + equivalents. + +2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities + +3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under + the terms of this License. You must inform recipients that the Source + Code Form of the Covered Software is governed by the terms of this + License, and how they can obtain a copy of this License. You may not + attempt to alter or restrict the recipients' rights in the Source Code + Form. + +3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter the + recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for + the Covered Software. If the Larger Work is a combination of Covered + Software with a work governed by one or more Secondary Licenses, and the + Covered Software is not Incompatible With Secondary Licenses, this + License permits You to additionally distribute such Covered Software + under the terms of such Secondary License(s), so that the recipient of + the Larger Work may, at their option, further distribute the Covered + Software under the terms of either this License or such Secondary + License(s). + +3.4. Notices + + You may not remove or alter the substance of any license notices + (including copyright notices, patent notices, disclaimers of warranty, or + limitations of liability) contained within the Source Code Form of the + Covered Software, except that You may alter any license notices to the + extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on + behalf of any Contributor. You must make it absolutely clear that any + such warranty, support, indemnity, or liability obligation is offered by + You alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, + judicial order, or regulation then You must: (a) comply with the terms of + this License to the maximum extent possible; and (b) describe the + limitations and the code they affect. Such description must be placed in a + text file included with all distributions of the Covered Software under + this License. Except to the extent prohibited by statute or regulation, + such description must be sufficiently detailed for a recipient of ordinary + skill to be able to understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing + basis, if such Contributor fails to notify You of the non-compliance by + some reasonable means prior to 60 days after You have come back into + compliance. Moreover, Your grants from a particular Contributor are + reinstated on an ongoing basis if such Contributor notifies You of the + non-compliance by some reasonable means, this is the first time You have + received notice of non-compliance with this License from such + Contributor, and You become compliant prior to 30 days after Your receipt + of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, + counter-claims, and cross-claims) alleging that a Contributor Version + directly or indirectly infringes any patent, then the rights granted to + You by any and all Contributors for the Covered Software under Section + 2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + +6. Disclaimer of Warranty + + Covered Software is provided under this License on an "as is" basis, + without warranty of any kind, either expressed, implied, or statutory, + including, without limitation, warranties that the Covered Software is free + of defects, merchantable, fit for a particular purpose or non-infringing. + The entire risk as to the quality and performance of the Covered Software + is with You. Should any Covered Software prove defective in any respect, + You (not any Contributor) assume the cost of any necessary servicing, + repair, or correction. This disclaimer of warranty constitutes an essential + part of this License. No use of any Covered Software is authorized under + this License except under this disclaimer. + +7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from + such party's negligence to the extent applicable law prohibits such + limitation. Some jurisdictions do not allow the exclusion or limitation of + incidental or consequential damages, so this exclusion and limitation may + not apply to You. + +8. Litigation + + Any litigation relating to this License may be brought only in the courts + of a jurisdiction where the defendant maintains its principal place of + business and such litigation shall be governed by laws of that + jurisdiction, without reference to its conflict-of-law provisions. Nothing + in this Section shall prevent a party's ability to bring cross-claims or + counter-claims. + +9. Miscellaneous + + This License represents the complete agreement concerning the subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. Any law or regulation which provides that + the language of a contract shall be construed against the drafter shall not + be used to construe this License against a Contributor. + + +10. Versions of the License + +10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + +10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version + of the License under which You originally received the Covered Software, + or under the terms of any subsequent version published by the license + steward. + +10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a + modified version of this License if you rename the license and remove + any references to the name of the license steward (except to note that + such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary + Licenses If You choose to distribute Source Code Form that is + Incompatible With Secondary Licenses under the terms of this version of + the License, the notice described in Exhibit B of this License must be + attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, +then You may include the notice in a location (such as a LICENSE file in a +relevant directory) where a recipient would be likely to look for such a +notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice + + This Source Code Form is "Incompatible + With Secondary Licenses", as defined by + the Mozilla Public License, v. 2.0. diff --git a/licenses/license-github.com-hashicorp-hcl.txt b/licenses/license-github.com-hashicorp-hcl.txt new file mode 100644 index 0000000..c33dcc7 --- /dev/null +++ b/licenses/license-github.com-hashicorp-hcl.txt @@ -0,0 +1,354 @@ +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. “Contributor” + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. “Contributor Version” + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor’s Contribution. + +1.3. “Contribution” + + means Covered Software of a particular Contributor. + +1.4. “Covered Software” + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. “Incompatible With Secondary Licenses” + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of version + 1.1 or earlier of the License, but not also under the terms of a + Secondary License. + +1.6. “Executable Form” + + means any form of the work other than Source Code Form. + +1.7. “Larger Work” + + means a work that combines Covered Software with other material, in a separate + file or files, that is not Covered Software. + +1.8. “License” + + means this document. + +1.9. “Licensable” + + means having the right to grant, to the maximum extent possible, whether at the + time of the initial grant or subsequently, any and all of the rights conveyed by + this License. + +1.10. “Modifications” + + means any of the following: + + a. any file in Source Code Form that results from an addition to, deletion + from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. “Patent Claims” of a Contributor + + means any patent claim(s), including without limitation, method, process, + and apparatus claims, in any patent Licensable by such Contributor that + would be infringed, but for the grant of the License, by the making, + using, selling, offering for sale, having made, import, or transfer of + either its Contributions or its Contributor Version. + +1.12. “Secondary License” + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + +1.13. “Source Code Form” + + means the form of the work preferred for making modifications. + +1.14. “You” (or “Your”) + + means an individual or a legal entity exercising rights under this + License. For legal entities, “You” includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, “control” means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + +2. License Grants and Conditions + +2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or as + part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its Contributions + or its Contributor Version. + +2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution become + effective for each Contribution on the date the Contributor first distributes + such Contribution. + +2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under this + License. No additional rights or licenses will be implied from the distribution + or licensing of Covered Software under this License. Notwithstanding Section + 2.1(b) above, no patent license is granted by a Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party’s + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of its + Contributions. + + This License does not grant any rights in the trademarks, service marks, or + logos of any Contributor (except as may be necessary to comply with the + notice requirements in Section 3.4). + +2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this License + (see Section 10.2) or under the terms of a Secondary License (if permitted + under the terms of Section 3.3). + +2.5. Representation + + Each Contributor represents that the Contributor believes its Contributions + are its original creation(s) or it has sufficient rights to grant the + rights to its Contributions conveyed by this License. + +2.6. Fair Use + + This License is not intended to limit any rights You have under applicable + copyright doctrines of fair use, fair dealing, or other equivalents. + +2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities + +3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under the + terms of this License. You must inform recipients that the Source Code Form + of the Covered Software is governed by the terms of this License, and how + they can obtain a copy of this License. You may not attempt to alter or + restrict the recipients’ rights in the Source Code Form. + +3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this License, + or sublicense it under different terms, provided that the license for + the Executable Form does not attempt to limit or alter the recipients’ + rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for the + Covered Software. If the Larger Work is a combination of Covered Software + with a work governed by one or more Secondary Licenses, and the Covered + Software is not Incompatible With Secondary Licenses, this License permits + You to additionally distribute such Covered Software under the terms of + such Secondary License(s), so that the recipient of the Larger Work may, at + their option, further distribute the Covered Software under the terms of + either this License or such Secondary License(s). + +3.4. Notices + + You may not remove or alter the substance of any license notices (including + copyright notices, patent notices, disclaimers of warranty, or limitations + of liability) contained within the Source Code Form of the Covered + Software, except that You may alter any license notices to the extent + required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on behalf + of any Contributor. You must make it absolutely clear that any such + warranty, support, indemnity, or liability obligation is offered by You + alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, judicial + order, or regulation then You must: (a) comply with the terms of this License + to the maximum extent possible; and (b) describe the limitations and the code + they affect. Such description must be placed in a text file included with all + distributions of the Covered Software under this License. Except to the + extent prohibited by statute or regulation, such description must be + sufficiently detailed for a recipient of ordinary skill to be able to + understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing basis, + if such Contributor fails to notify You of the non-compliance by some + reasonable means prior to 60 days after You have come back into compliance. + Moreover, Your grants from a particular Contributor are reinstated on an + ongoing basis if such Contributor notifies You of the non-compliance by + some reasonable means, this is the first time You have received notice of + non-compliance with this License from such Contributor, and You become + compliant prior to 30 days after Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, counter-claims, + and cross-claims) alleging that a Contributor Version directly or + indirectly infringes any patent, then the rights granted to You by any and + all Contributors for the Covered Software under Section 2.1 of this License + shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + +6. Disclaimer of Warranty + + Covered Software is provided under this License on an “as is” basis, without + warranty of any kind, either expressed, implied, or statutory, including, + without limitation, warranties that the Covered Software is free of defects, + merchantable, fit for a particular purpose or non-infringing. The entire + risk as to the quality and performance of the Covered Software is with You. + Should any Covered Software prove defective in any respect, You (not any + Contributor) assume the cost of any necessary servicing, repair, or + correction. This disclaimer of warranty constitutes an essential part of this + License. No use of any Covered Software is authorized under this License + except under this disclaimer. + +7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from such + party’s negligence to the extent applicable law prohibits such limitation. + Some jurisdictions do not allow the exclusion or limitation of incidental or + consequential damages, so this exclusion and limitation may not apply to You. + +8. Litigation + + Any litigation relating to this License may be brought only in the courts of + a jurisdiction where the defendant maintains its principal place of business + and such litigation shall be governed by laws of that jurisdiction, without + reference to its conflict-of-law provisions. Nothing in this Section shall + prevent a party’s ability to bring cross-claims or counter-claims. + +9. Miscellaneous + + This License represents the complete agreement concerning the subject matter + hereof. If any provision of this License is held to be unenforceable, such + provision shall be reformed only to the extent necessary to make it + enforceable. Any law or regulation which provides that the language of a + contract shall be construed against the drafter shall not be used to construe + this License against a Contributor. + + +10. Versions of the License + +10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + +10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version of + the License under which You originally received the Covered Software, or + under the terms of any subsequent version published by the license + steward. + +10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a modified + version of this License if you rename the license and remove any + references to the name of the license steward (except to note that such + modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses + If You choose to distribute Source Code Form that is Incompatible With + Secondary Licenses under the terms of this version of the License, the + notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, then +You may include the notice in a location (such as a LICENSE file in a relevant +directory) where a recipient would be likely to look for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - “Incompatible With Secondary Licenses” Notice + + This Source Code Form is “Incompatible + With Secondary Licenses”, as defined by + the Mozilla Public License, v. 2.0. + diff --git a/licenses/license-github.com-hpcloud-tail.txt b/licenses/license-github.com-hpcloud-tail.txt new file mode 100644 index 0000000..818d802 --- /dev/null +++ b/licenses/license-github.com-hpcloud-tail.txt @@ -0,0 +1,21 @@ +# The MIT License (MIT) + +# © Copyright 2015 Hewlett Packard Enterprise Development LP +Copyright (c) 2014 ActiveState + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-ianlancetaylor-demangle.txt b/licenses/license-github.com-ianlancetaylor-demangle.txt new file mode 100644 index 0000000..d29b372 --- /dev/null +++ b/licenses/license-github.com-ianlancetaylor-demangle.txt @@ -0,0 +1,27 @@ +Copyright (c) 2015 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-imkira-go-interpol.txt b/licenses/license-github.com-imkira-go-interpol.txt new file mode 100644 index 0000000..84d73e7 --- /dev/null +++ b/licenses/license-github.com-imkira-go-interpol.txt @@ -0,0 +1,20 @@ +Copyright (c) 2016 Mario Freitas (imkira@gmail.com) + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-inconshreveable-mousetrap.txt b/licenses/license-github.com-inconshreveable-mousetrap.txt new file mode 100644 index 0000000..5f0d1fb --- /dev/null +++ b/licenses/license-github.com-inconshreveable-mousetrap.txt @@ -0,0 +1,13 @@ +Copyright 2014 Alan Shreve + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/licenses/license-github.com-iris-contrib-blackfriday.txt b/licenses/license-github.com-iris-contrib-blackfriday.txt new file mode 100644 index 0000000..2885af3 --- /dev/null +++ b/licenses/license-github.com-iris-contrib-blackfriday.txt @@ -0,0 +1,29 @@ +Blackfriday is distributed under the Simplified BSD License: + +> Copyright © 2011 Russ Ross +> All rights reserved. +> +> Redistribution and use in source and binary forms, with or without +> modification, are permitted provided that the following conditions +> are met: +> +> 1. Redistributions of source code must retain the above copyright +> notice, this list of conditions and the following disclaimer. +> +> 2. Redistributions in binary form must reproduce the above +> copyright notice, this list of conditions and the following +> disclaimer in the documentation and/or other materials provided with +> the distribution. +> +> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +> "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +> LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +> FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +> COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +> INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +> BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +> LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +> LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +> ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +> POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-iris-contrib-go.uuid.txt b/licenses/license-github.com-iris-contrib-go.uuid.txt new file mode 100644 index 0000000..926d549 --- /dev/null +++ b/licenses/license-github.com-iris-contrib-go.uuid.txt @@ -0,0 +1,20 @@ +Copyright (C) 2013-2018 by Maxim Bublis + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-iris-contrib-jade.txt b/licenses/license-github.com-iris-contrib-jade.txt new file mode 100644 index 0000000..a53d88f --- /dev/null +++ b/licenses/license-github.com-iris-contrib-jade.txt @@ -0,0 +1,28 @@ +Copyright (c) 2015, Joker +Copyright (c) 2020, Gerasimos Maropoulos +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of jade nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-iris-contrib-pongo2.txt b/licenses/license-github.com-iris-contrib-pongo2.txt new file mode 100644 index 0000000..f89c8fa --- /dev/null +++ b/licenses/license-github.com-iris-contrib-pongo2.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013-2014 Florian Schlachter +Copyright (c) 2019 Iris Authors + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-jackc-chunkreader-v2.txt b/licenses/license-github.com-jackc-chunkreader-v2.txt new file mode 100644 index 0000000..c1c4f50 --- /dev/null +++ b/licenses/license-github.com-jackc-chunkreader-v2.txt @@ -0,0 +1,22 @@ +Copyright (c) 2019 Jack Christensen + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-jackc-chunkreader.txt b/licenses/license-github.com-jackc-chunkreader.txt new file mode 100644 index 0000000..c1c4f50 --- /dev/null +++ b/licenses/license-github.com-jackc-chunkreader.txt @@ -0,0 +1,22 @@ +Copyright (c) 2019 Jack Christensen + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-jackc-pgconn.txt b/licenses/license-github.com-jackc-pgconn.txt new file mode 100644 index 0000000..aebadd6 --- /dev/null +++ b/licenses/license-github.com-jackc-pgconn.txt @@ -0,0 +1,22 @@ +Copyright (c) 2019-2021 Jack Christensen + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-jackc-pgio.txt b/licenses/license-github.com-jackc-pgio.txt new file mode 100644 index 0000000..c1c4f50 --- /dev/null +++ b/licenses/license-github.com-jackc-pgio.txt @@ -0,0 +1,22 @@ +Copyright (c) 2019 Jack Christensen + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-jackc-pgmock.txt b/licenses/license-github.com-jackc-pgmock.txt new file mode 100644 index 0000000..9233651 --- /dev/null +++ b/licenses/license-github.com-jackc-pgmock.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright © 2017 Jack Christensen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-github.com-jackc-pgpassfile.txt b/licenses/license-github.com-jackc-pgpassfile.txt new file mode 100644 index 0000000..c1c4f50 --- /dev/null +++ b/licenses/license-github.com-jackc-pgpassfile.txt @@ -0,0 +1,22 @@ +Copyright (c) 2019 Jack Christensen + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-jackc-pgproto3-v2.txt b/licenses/license-github.com-jackc-pgproto3-v2.txt new file mode 100644 index 0000000..c1c4f50 --- /dev/null +++ b/licenses/license-github.com-jackc-pgproto3-v2.txt @@ -0,0 +1,22 @@ +Copyright (c) 2019 Jack Christensen + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-jackc-pgproto3.txt b/licenses/license-github.com-jackc-pgproto3.txt new file mode 100644 index 0000000..c1c4f50 --- /dev/null +++ b/licenses/license-github.com-jackc-pgproto3.txt @@ -0,0 +1,22 @@ +Copyright (c) 2019 Jack Christensen + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-jackc-pgservicefile.txt b/licenses/license-github.com-jackc-pgservicefile.txt new file mode 100644 index 0000000..f1b4c28 --- /dev/null +++ b/licenses/license-github.com-jackc-pgservicefile.txt @@ -0,0 +1,22 @@ +Copyright (c) 2020 Jack Christensen + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-jackc-pgtype.txt b/licenses/license-github.com-jackc-pgtype.txt new file mode 100644 index 0000000..5c486c3 --- /dev/null +++ b/licenses/license-github.com-jackc-pgtype.txt @@ -0,0 +1,22 @@ +Copyright (c) 2013-2021 Jack Christensen + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-jackc-pgx-v4.txt b/licenses/license-github.com-jackc-pgx-v4.txt new file mode 100644 index 0000000..5c486c3 --- /dev/null +++ b/licenses/license-github.com-jackc-pgx-v4.txt @@ -0,0 +1,22 @@ +Copyright (c) 2013-2021 Jack Christensen + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-jackc-puddle.txt b/licenses/license-github.com-jackc-puddle.txt new file mode 100644 index 0000000..bcc286c --- /dev/null +++ b/licenses/license-github.com-jackc-puddle.txt @@ -0,0 +1,22 @@ +Copyright (c) 2018 Jack Christensen + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-jessevdk-go-flags.txt b/licenses/license-github.com-jessevdk-go-flags.txt new file mode 100644 index 0000000..bcca0d5 --- /dev/null +++ b/licenses/license-github.com-jessevdk-go-flags.txt @@ -0,0 +1,26 @@ +Copyright (c) 2012 Jesse van den Kieboom. All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-jinzhu-inflection.txt b/licenses/license-github.com-jinzhu-inflection.txt new file mode 100644 index 0000000..a1ca9a0 --- /dev/null +++ b/licenses/license-github.com-jinzhu-inflection.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 - Jinzhu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-jinzhu-now.txt b/licenses/license-github.com-jinzhu-now.txt new file mode 100644 index 0000000..037e165 --- /dev/null +++ b/licenses/license-github.com-jinzhu-now.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013-NOW Jinzhu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-github.com-josharian-intern.txt b/licenses/license-github.com-josharian-intern.txt new file mode 100644 index 0000000..353d305 --- /dev/null +++ b/licenses/license-github.com-josharian-intern.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Josh Bleecher Snyder + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-json-iterator-go.txt b/licenses/license-github.com-json-iterator-go.txt new file mode 100644 index 0000000..2cf4f5a --- /dev/null +++ b/licenses/license-github.com-json-iterator-go.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 json-iterator + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-jstemmer-go-junit-report.txt b/licenses/license-github.com-jstemmer-go-junit-report.txt new file mode 100644 index 0000000..f346564 --- /dev/null +++ b/licenses/license-github.com-jstemmer-go-junit-report.txt @@ -0,0 +1,20 @@ +Copyright (c) 2012 Joel Stemmer + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-jtolds-gls.txt b/licenses/license-github.com-jtolds-gls.txt new file mode 100644 index 0000000..9b4a822 --- /dev/null +++ b/licenses/license-github.com-jtolds-gls.txt @@ -0,0 +1,18 @@ +Copyright (c) 2013, Space Monkey, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-k0kubun-colorstring.txt b/licenses/license-github.com-k0kubun-colorstring.txt new file mode 100644 index 0000000..2298515 --- /dev/null +++ b/licenses/license-github.com-k0kubun-colorstring.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Mitchell Hashimoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-github.com-kataras-golog.txt b/licenses/license-github.com-kataras-golog.txt new file mode 100644 index 0000000..aa14cfc --- /dev/null +++ b/licenses/license-github.com-kataras-golog.txt @@ -0,0 +1,28 @@ +Copyright (c) 2017 Gerasimos Maropoulos. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of golog nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/licenses/license-github.com-kataras-iris-v12.txt b/licenses/license-github.com-kataras-iris-v12.txt new file mode 100644 index 0000000..beab389 --- /dev/null +++ b/licenses/license-github.com-kataras-iris-v12.txt @@ -0,0 +1,27 @@ +Copyright (c) 2017-2020 The Iris Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Iris nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/licenses/license-github.com-kataras-neffos.txt b/licenses/license-github.com-kataras-neffos.txt new file mode 100644 index 0000000..db70978 --- /dev/null +++ b/licenses/license-github.com-kataras-neffos.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019-2020 Gerasimos Maropoulos + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/licenses/license-github.com-kataras-pio.txt b/licenses/license-github.com-kataras-pio.txt new file mode 100644 index 0000000..f0a4922 --- /dev/null +++ b/licenses/license-github.com-kataras-pio.txt @@ -0,0 +1,28 @@ +Copyright (c) 2017-2019 Gerasimos Maropoulos. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of PIO nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/licenses/license-github.com-kataras-sitemap.txt b/licenses/license-github.com-kataras-sitemap.txt new file mode 100644 index 0000000..f63f83a --- /dev/null +++ b/licenses/license-github.com-kataras-sitemap.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 Gerasimos Maropoulos + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/licenses/license-github.com-kidstuff-mongostore.txt b/licenses/license-github.com-kidstuff-mongostore.txt new file mode 100644 index 0000000..a517c02 --- /dev/null +++ b/licenses/license-github.com-kidstuff-mongostore.txt @@ -0,0 +1,27 @@ +Copyright (c) 2014, kidstuff +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + +* Neither the name of the {organization} nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-kisielk-gotool.txt b/licenses/license-github.com-kisielk-gotool.txt new file mode 100644 index 0000000..1cbf651 --- /dev/null +++ b/licenses/license-github.com-kisielk-gotool.txt @@ -0,0 +1,20 @@ +Copyright (c) 2013 Kamil Kisiel + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-klauspost-compress.txt b/licenses/license-github.com-klauspost-compress.txt new file mode 100644 index 0000000..87d5574 --- /dev/null +++ b/licenses/license-github.com-klauspost-compress.txt @@ -0,0 +1,304 @@ +Copyright (c) 2012 The Go Authors. All rights reserved. +Copyright (c) 2019 Klaus Post. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------ + +Files: gzhttp/* + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2016-2017 The New York Times Company + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +------------------ + +Files: s2/cmd/internal/readahead/* + +The MIT License (MIT) + +Copyright (c) 2015 Klaus Post + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--------------------- +Files: snappy/* +Files: internal/snapref/* + +Copyright (c) 2011 The Snappy-Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +----------------- + +Files: s2/cmd/internal/filepathx/* + +Copyright 2016 The filepathx Authors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-klauspost-cpuid-v2.txt b/licenses/license-github.com-klauspost-cpuid-v2.txt new file mode 100644 index 0000000..5cec7ee --- /dev/null +++ b/licenses/license-github.com-klauspost-cpuid-v2.txt @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Klaus Post + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/licenses/license-github.com-klauspost-cpuid.txt b/licenses/license-github.com-klauspost-cpuid.txt new file mode 100644 index 0000000..5cec7ee --- /dev/null +++ b/licenses/license-github.com-klauspost-cpuid.txt @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Klaus Post + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/licenses/license-github.com-konsorten-go-windows-terminal-sequences.txt b/licenses/license-github.com-konsorten-go-windows-terminal-sequences.txt new file mode 100644 index 0000000..14127cd --- /dev/null +++ b/licenses/license-github.com-konsorten-go-windows-terminal-sequences.txt @@ -0,0 +1,9 @@ +(The MIT License) + +Copyright (c) 2017 marvin + konsorten GmbH (open-source@konsorten.de) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-kr-pretty.txt b/licenses/license-github.com-kr-pretty.txt new file mode 100644 index 0000000..480a328 --- /dev/null +++ b/licenses/license-github.com-kr-pretty.txt @@ -0,0 +1,19 @@ +Copyright 2012 Keith Rarick + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-github.com-kr-pty.txt b/licenses/license-github.com-kr-pty.txt new file mode 100644 index 0000000..db5a1ed --- /dev/null +++ b/licenses/license-github.com-kr-pty.txt @@ -0,0 +1,23 @@ +Copyright (c) 2019 Keith Rarick + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall +be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-kr-text.txt b/licenses/license-github.com-kr-text.txt new file mode 100644 index 0000000..480a328 --- /dev/null +++ b/licenses/license-github.com-kr-text.txt @@ -0,0 +1,19 @@ +Copyright 2012 Keith Rarick + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-github.com-labstack-echo-v4.txt b/licenses/license-github.com-labstack-echo-v4.txt new file mode 100644 index 0000000..c46d010 --- /dev/null +++ b/licenses/license-github.com-labstack-echo-v4.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2021 LabStack + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-labstack-gommon.txt b/licenses/license-github.com-labstack-gommon.txt new file mode 100644 index 0000000..fc718fa --- /dev/null +++ b/licenses/license-github.com-labstack-gommon.txt @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2018 labstack + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/licenses/license-github.com-leodido-go-urn.txt b/licenses/license-github.com-leodido-go-urn.txt new file mode 100644 index 0000000..8c3504a --- /dev/null +++ b/licenses/license-github.com-leodido-go-urn.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Leonardo Di Donato + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-lib-pq.txt b/licenses/license-github.com-lib-pq.txt new file mode 100644 index 0000000..5773904 --- /dev/null +++ b/licenses/license-github.com-lib-pq.txt @@ -0,0 +1,8 @@ +Copyright (c) 2011-2013, 'pq' Contributors +Portions Copyright (C) 2011 Blake Mizerany + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-magiconair-properties.txt b/licenses/license-github.com-magiconair-properties.txt new file mode 100644 index 0000000..b387087 --- /dev/null +++ b/licenses/license-github.com-magiconair-properties.txt @@ -0,0 +1,25 @@ +goproperties - properties file decoder for Go + +Copyright (c) 2013-2018 - Frank Schroeder + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-mailru-easyjson.txt b/licenses/license-github.com-mailru-easyjson.txt new file mode 100644 index 0000000..fbff658 --- /dev/null +++ b/licenses/license-github.com-mailru-easyjson.txt @@ -0,0 +1,7 @@ +Copyright (c) 2016 Mail.Ru Group + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-mattn-go-colorable.txt b/licenses/license-github.com-mattn-go-colorable.txt new file mode 100644 index 0000000..91b5cef --- /dev/null +++ b/licenses/license-github.com-mattn-go-colorable.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Yasuhiro Matsumoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-mattn-go-isatty.txt b/licenses/license-github.com-mattn-go-isatty.txt new file mode 100644 index 0000000..65dc692 --- /dev/null +++ b/licenses/license-github.com-mattn-go-isatty.txt @@ -0,0 +1,9 @@ +Copyright (c) Yasuhiro MATSUMOTO + +MIT License (Expat) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-mattn-go-sqlite3.txt b/licenses/license-github.com-mattn-go-sqlite3.txt new file mode 100644 index 0000000..ca458bb --- /dev/null +++ b/licenses/license-github.com-mattn-go-sqlite3.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Yasuhiro Matsumoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-mediocregopher-radix-v3.txt b/licenses/license-github.com-mediocregopher-radix-v3.txt new file mode 100644 index 0000000..7f0ea49 --- /dev/null +++ b/licenses/license-github.com-mediocregopher-radix-v3.txt @@ -0,0 +1,19 @@ +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/licenses/license-github.com-memcachier-mc.txt b/licenses/license-github.com-memcachier-mc.txt new file mode 100644 index 0000000..20d64ac --- /dev/null +++ b/licenses/license-github.com-memcachier-mc.txt @@ -0,0 +1,21 @@ +Copyright (C) 2015 by David Terei +Copyright (C) 2011 by Blake Mizerany + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/licenses/license-github.com-microcosm-cc-bluemonday.txt b/licenses/license-github.com-microcosm-cc-bluemonday.txt new file mode 100644 index 0000000..f822458 --- /dev/null +++ b/licenses/license-github.com-microcosm-cc-bluemonday.txt @@ -0,0 +1,28 @@ +Copyright (c) 2014, David Kitchen + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the organisation (Microcosm) nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-mitchellh-go-homedir.txt b/licenses/license-github.com-mitchellh-go-homedir.txt new file mode 100644 index 0000000..f9c841a --- /dev/null +++ b/licenses/license-github.com-mitchellh-go-homedir.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Mitchell Hashimoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-github.com-mitchellh-mapstructure.txt b/licenses/license-github.com-mitchellh-mapstructure.txt new file mode 100644 index 0000000..f9c841a --- /dev/null +++ b/licenses/license-github.com-mitchellh-mapstructure.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Mitchell Hashimoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-github.com-modern-go-concurrent.txt b/licenses/license-github.com-modern-go-concurrent.txt new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/licenses/license-github.com-modern-go-concurrent.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-modern-go-reflect2.txt b/licenses/license-github.com-modern-go-reflect2.txt new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/licenses/license-github.com-modern-go-reflect2.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-modocache-gover.txt b/licenses/license-github.com-modocache-gover.txt new file mode 100644 index 0000000..05485be --- /dev/null +++ b/licenses/license-github.com-modocache-gover.txt @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2017, Gover Team + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-moul-http2curl.txt b/licenses/license-github.com-moul-http2curl.txt new file mode 100644 index 0000000..492e2c6 --- /dev/null +++ b/licenses/license-github.com-moul-http2curl.txt @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Manfred Touron + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/licenses/license-github.com-nats-io-jwt.txt b/licenses/license-github.com-nats-io-jwt.txt new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/licenses/license-github.com-nats-io-jwt.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-nats-io-nats.go.txt b/licenses/license-github.com-nats-io-nats.go.txt new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/licenses/license-github.com-nats-io-nats.go.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-nats-io-nkeys.txt b/licenses/license-github.com-nats-io-nkeys.txt new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/licenses/license-github.com-nats-io-nkeys.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-nats-io-nuid.txt b/licenses/license-github.com-nats-io-nuid.txt new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/licenses/license-github.com-nats-io-nuid.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-niemeyer-pretty.txt b/licenses/license-github.com-niemeyer-pretty.txt new file mode 100644 index 0000000..480a328 --- /dev/null +++ b/licenses/license-github.com-niemeyer-pretty.txt @@ -0,0 +1,19 @@ +Copyright 2012 Keith Rarick + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-github.com-onsi-ginkgo-v2.txt b/licenses/license-github.com-onsi-ginkgo-v2.txt new file mode 100644 index 0000000..9415ee7 --- /dev/null +++ b/licenses/license-github.com-onsi-ginkgo-v2.txt @@ -0,0 +1,20 @@ +Copyright (c) 2013-2014 Onsi Fakhouri + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-onsi-ginkgo.txt b/licenses/license-github.com-onsi-ginkgo.txt new file mode 100644 index 0000000..9415ee7 --- /dev/null +++ b/licenses/license-github.com-onsi-ginkgo.txt @@ -0,0 +1,20 @@ +Copyright (c) 2013-2014 Onsi Fakhouri + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-onsi-gomega.txt b/licenses/license-github.com-onsi-gomega.txt new file mode 100644 index 0000000..9415ee7 --- /dev/null +++ b/licenses/license-github.com-onsi-gomega.txt @@ -0,0 +1,20 @@ +Copyright (c) 2013-2014 Onsi Fakhouri + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-pelletier-go-toml-v2.txt b/licenses/license-github.com-pelletier-go-toml-v2.txt new file mode 100644 index 0000000..6839d51 --- /dev/null +++ b/licenses/license-github.com-pelletier-go-toml-v2.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 - 2022 Thomas Pelletier, Eric Anderton + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-pelletier-go-toml.txt b/licenses/license-github.com-pelletier-go-toml.txt new file mode 100644 index 0000000..583bdae --- /dev/null +++ b/licenses/license-github.com-pelletier-go-toml.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 - 2017 Thomas Pelletier, Eric Anderton + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-pingcap-errors.txt b/licenses/license-github.com-pingcap-errors.txt new file mode 100644 index 0000000..835ba3e --- /dev/null +++ b/licenses/license-github.com-pingcap-errors.txt @@ -0,0 +1,23 @@ +Copyright (c) 2015, Dave Cheney +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-pkg-browser.txt b/licenses/license-github.com-pkg-browser.txt new file mode 100644 index 0000000..65f78fb --- /dev/null +++ b/licenses/license-github.com-pkg-browser.txt @@ -0,0 +1,23 @@ +Copyright (c) 2014, Dave Cheney +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-pkg-errors.txt b/licenses/license-github.com-pkg-errors.txt new file mode 100644 index 0000000..835ba3e --- /dev/null +++ b/licenses/license-github.com-pkg-errors.txt @@ -0,0 +1,23 @@ +Copyright (c) 2015, Dave Cheney +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-pmezard-go-difflib.txt b/licenses/license-github.com-pmezard-go-difflib.txt new file mode 100644 index 0000000..c67dad6 --- /dev/null +++ b/licenses/license-github.com-pmezard-go-difflib.txt @@ -0,0 +1,27 @@ +Copyright (c) 2013, Patrick Mezard +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + The names of its contributors may not be used to endorse or promote +products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-prometheus-client-model.txt b/licenses/license-github.com-prometheus-client-model.txt new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/licenses/license-github.com-prometheus-client-model.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-quasoft-memstore.txt b/licenses/license-github.com-quasoft-memstore.txt new file mode 100644 index 0000000..ee52787 --- /dev/null +++ b/licenses/license-github.com-quasoft-memstore.txt @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2018, QuaSoft +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-robfig-cron-v3.txt b/licenses/license-github.com-robfig-cron-v3.txt new file mode 100644 index 0000000..3a0f627 --- /dev/null +++ b/licenses/license-github.com-robfig-cron-v3.txt @@ -0,0 +1,21 @@ +Copyright (C) 2012 Rob Figueiredo +All Rights Reserved. + +MIT LICENSE + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-rogpeppe-go-internal.txt b/licenses/license-github.com-rogpeppe-go-internal.txt new file mode 100644 index 0000000..49ea0f9 --- /dev/null +++ b/licenses/license-github.com-rogpeppe-go-internal.txt @@ -0,0 +1,27 @@ +Copyright (c) 2018 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-rs-xid.txt b/licenses/license-github.com-rs-xid.txt new file mode 100644 index 0000000..47c5e9d --- /dev/null +++ b/licenses/license-github.com-rs-xid.txt @@ -0,0 +1,19 @@ +Copyright (c) 2015 Olivier Poitrey + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-github.com-rs-zerolog.txt b/licenses/license-github.com-rs-zerolog.txt new file mode 100644 index 0000000..677e07f --- /dev/null +++ b/licenses/license-github.com-rs-zerolog.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Olivier Poitrey + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-russross-blackfriday-v2.txt b/licenses/license-github.com-russross-blackfriday-v2.txt new file mode 100644 index 0000000..2885af3 --- /dev/null +++ b/licenses/license-github.com-russross-blackfriday-v2.txt @@ -0,0 +1,29 @@ +Blackfriday is distributed under the Simplified BSD License: + +> Copyright © 2011 Russ Ross +> All rights reserved. +> +> Redistribution and use in source and binary forms, with or without +> modification, are permitted provided that the following conditions +> are met: +> +> 1. Redistributions of source code must retain the above copyright +> notice, this list of conditions and the following disclaimer. +> +> 2. Redistributions in binary form must reproduce the above +> copyright notice, this list of conditions and the following +> disclaimer in the documentation and/or other materials provided with +> the distribution. +> +> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +> "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +> LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +> FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +> COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +> INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +> BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +> LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +> LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +> ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +> POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-russross-blackfriday.txt b/licenses/license-github.com-russross-blackfriday.txt new file mode 100644 index 0000000..2885af3 --- /dev/null +++ b/licenses/license-github.com-russross-blackfriday.txt @@ -0,0 +1,29 @@ +Blackfriday is distributed under the Simplified BSD License: + +> Copyright © 2011 Russ Ross +> All rights reserved. +> +> Redistribution and use in source and binary forms, with or without +> modification, are permitted provided that the following conditions +> are met: +> +> 1. Redistributions of source code must retain the above copyright +> notice, this list of conditions and the following disclaimer. +> +> 2. Redistributions in binary form must reproduce the above +> copyright notice, this list of conditions and the following +> disclaimer in the documentation and/or other materials provided with +> the distribution. +> +> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +> "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +> LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +> FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +> COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +> INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +> BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +> LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +> LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +> ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +> POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-rwcarlsen-goexif.txt b/licenses/license-github.com-rwcarlsen-goexif.txt new file mode 100644 index 0000000..aa62504 --- /dev/null +++ b/licenses/license-github.com-rwcarlsen-goexif.txt @@ -0,0 +1,24 @@ + +Copyright (c) 2012, Robert Carlsen & Contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-ryanuber-columnize.txt b/licenses/license-github.com-ryanuber-columnize.txt new file mode 100644 index 0000000..86f4501 --- /dev/null +++ b/licenses/license-github.com-ryanuber-columnize.txt @@ -0,0 +1,20 @@ +MIT LICENSE + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-saintfish-chardet.txt b/licenses/license-github.com-saintfish-chardet.txt new file mode 100644 index 0000000..35ee796 --- /dev/null +++ b/licenses/license-github.com-saintfish-chardet.txt @@ -0,0 +1,22 @@ +Copyright (c) 2012 chardet Authors + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +Partial of the Software is derived from ICU project. See icu-license.html for +license of the derivative portions. diff --git a/licenses/license-github.com-satori-go.uuid.txt b/licenses/license-github.com-satori-go.uuid.txt new file mode 100644 index 0000000..926d549 --- /dev/null +++ b/licenses/license-github.com-satori-go.uuid.txt @@ -0,0 +1,20 @@ +Copyright (C) 2013-2018 by Maxim Bublis + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-schollz-closestmatch.txt b/licenses/license-github.com-schollz-closestmatch.txt new file mode 100644 index 0000000..0ca9765 --- /dev/null +++ b/licenses/license-github.com-schollz-closestmatch.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Zack + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-sergi-go-diff.txt b/licenses/license-github.com-sergi-go-diff.txt new file mode 100644 index 0000000..937942c --- /dev/null +++ b/licenses/license-github.com-sergi-go-diff.txt @@ -0,0 +1,20 @@ +Copyright (c) 2012-2016 The go-diff Authors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + diff --git a/licenses/license-github.com-shopspring-decimal.txt b/licenses/license-github.com-shopspring-decimal.txt new file mode 100644 index 0000000..ad2148a --- /dev/null +++ b/licenses/license-github.com-shopspring-decimal.txt @@ -0,0 +1,45 @@ +The MIT License (MIT) + +Copyright (c) 2015 Spring, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +- Based on https://github.com/oguzbilgic/fpd, which has the following license: +""" +The MIT License (MIT) + +Copyright (c) 2013 Oguz Bilgic + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +""" diff --git a/licenses/license-github.com-shurcooL-sanitized-anchor-name.txt b/licenses/license-github.com-shurcooL-sanitized-anchor-name.txt new file mode 100644 index 0000000..c35c17a --- /dev/null +++ b/licenses/license-github.com-shurcooL-sanitized-anchor-name.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2015 Dmitri Shuralyov + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-sirupsen-logrus.txt b/licenses/license-github.com-sirupsen-logrus.txt new file mode 100644 index 0000000..f090cb4 --- /dev/null +++ b/licenses/license-github.com-sirupsen-logrus.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Simon Eskildsen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-github.com-smartystreets-assertions.txt b/licenses/license-github.com-smartystreets-assertions.txt new file mode 100644 index 0000000..8ea6f94 --- /dev/null +++ b/licenses/license-github.com-smartystreets-assertions.txt @@ -0,0 +1,23 @@ +Copyright (c) 2016 SmartyStreets, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +NOTE: Various optional and subordinate components carry their own licensing +requirements and restrictions. Use of those components is subject to the terms +and conditions outlined the respective license of each component. diff --git a/licenses/license-github.com-smartystreets-goconvey.txt b/licenses/license-github.com-smartystreets-goconvey.txt new file mode 100644 index 0000000..3f87a40 --- /dev/null +++ b/licenses/license-github.com-smartystreets-goconvey.txt @@ -0,0 +1,23 @@ +Copyright (c) 2016 SmartyStreets, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +NOTE: Various optional and subordinate components carry their own licensing +requirements and restrictions. Use of those components is subject to the terms +and conditions outlined the respective license of each component. diff --git a/licenses/license-github.com-spf13-afero.txt b/licenses/license-github.com-spf13-afero.txt new file mode 100644 index 0000000..298f0e2 --- /dev/null +++ b/licenses/license-github.com-spf13-afero.txt @@ -0,0 +1,174 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/licenses/license-github.com-spf13-cast.txt b/licenses/license-github.com-spf13-cast.txt new file mode 100644 index 0000000..4527efb --- /dev/null +++ b/licenses/license-github.com-spf13-cast.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Steve Francia + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/licenses/license-github.com-spf13-cobra.txt b/licenses/license-github.com-spf13-cobra.txt new file mode 100644 index 0000000..298f0e2 --- /dev/null +++ b/licenses/license-github.com-spf13-cobra.txt @@ -0,0 +1,174 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/licenses/license-github.com-spf13-jwalterweatherman.txt b/licenses/license-github.com-spf13-jwalterweatherman.txt new file mode 100644 index 0000000..4527efb --- /dev/null +++ b/licenses/license-github.com-spf13-jwalterweatherman.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Steve Francia + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/licenses/license-github.com-spf13-pflag.txt b/licenses/license-github.com-spf13-pflag.txt new file mode 100644 index 0000000..63ed1cf --- /dev/null +++ b/licenses/license-github.com-spf13-pflag.txt @@ -0,0 +1,28 @@ +Copyright (c) 2012 Alex Ogier. All rights reserved. +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-spf13-viper.txt b/licenses/license-github.com-spf13-viper.txt new file mode 100644 index 0000000..4527efb --- /dev/null +++ b/licenses/license-github.com-spf13-viper.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Steve Francia + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/licenses/license-github.com-stretchr-objx.txt b/licenses/license-github.com-stretchr-objx.txt new file mode 100644 index 0000000..44d4d9d --- /dev/null +++ b/licenses/license-github.com-stretchr-objx.txt @@ -0,0 +1,22 @@ +The MIT License + +Copyright (c) 2014 Stretchr, Inc. +Copyright (c) 2017-2018 objx contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-stretchr-testify.txt b/licenses/license-github.com-stretchr-testify.txt new file mode 100644 index 0000000..4b0421c --- /dev/null +++ b/licenses/license-github.com-stretchr-testify.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2012-2020 Mat Ryer, Tyler Bunnell and contributors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-swaggo-files.txt b/licenses/license-github.com-swaggo-files.txt new file mode 100644 index 0000000..1667ee9 --- /dev/null +++ b/licenses/license-github.com-swaggo-files.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Swaggo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-swaggo-gin-swagger.txt b/licenses/license-github.com-swaggo-gin-swagger.txt new file mode 100644 index 0000000..fad1876 --- /dev/null +++ b/licenses/license-github.com-swaggo-gin-swagger.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Swaggo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-swaggo-swag.txt b/licenses/license-github.com-swaggo-swag.txt new file mode 100644 index 0000000..a97865b --- /dev/null +++ b/licenses/license-github.com-swaggo-swag.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Eason Lin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-twitchyliquid64-golang-asm.txt b/licenses/license-github.com-twitchyliquid64-golang-asm.txt new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/licenses/license-github.com-twitchyliquid64-golang-asm.txt @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-ugorji-go-codec.txt b/licenses/license-github.com-ugorji-go-codec.txt new file mode 100644 index 0000000..36a8bcf --- /dev/null +++ b/licenses/license-github.com-ugorji-go-codec.txt @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2012-2020 Ugorji Nwoke. +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-ugorji-go.txt b/licenses/license-github.com-ugorji-go.txt new file mode 100644 index 0000000..36a8bcf --- /dev/null +++ b/licenses/license-github.com-ugorji-go.txt @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2012-2020 Ugorji Nwoke. +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-urfave-cli-v2.txt b/licenses/license-github.com-urfave-cli-v2.txt new file mode 100644 index 0000000..42a597e --- /dev/null +++ b/licenses/license-github.com-urfave-cli-v2.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Jeremy Saenz & Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-urfave-cli.txt b/licenses/license-github.com-urfave-cli.txt new file mode 100644 index 0000000..42a597e --- /dev/null +++ b/licenses/license-github.com-urfave-cli.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Jeremy Saenz & Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-urfave-negroni.txt b/licenses/license-github.com-urfave-negroni.txt new file mode 100644 index 0000000..08b5e20 --- /dev/null +++ b/licenses/license-github.com-urfave-negroni.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Jeremy Saenz + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-valyala-bytebufferpool.txt b/licenses/license-github.com-valyala-bytebufferpool.txt new file mode 100644 index 0000000..f7c935c --- /dev/null +++ b/licenses/license-github.com-valyala-bytebufferpool.txt @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2016 Aliaksandr Valialkin, VertaMedia + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/licenses/license-github.com-valyala-fasthttp.txt b/licenses/license-github.com-valyala-fasthttp.txt new file mode 100644 index 0000000..b098914 --- /dev/null +++ b/licenses/license-github.com-valyala-fasthttp.txt @@ -0,0 +1,25 @@ +The MIT License (MIT) + +Copyright (c) 2015-present Aliaksandr Valialkin, VertaMedia +Copyright (c) 2018-present Kirill Danshin +Copyright (c) 2018-present Erik Dubbelboer +Copyright (c) 2018-present FastHTTP Authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/licenses/license-github.com-valyala-fasttemplate.txt b/licenses/license-github.com-valyala-fasttemplate.txt new file mode 100644 index 0000000..7125a63 --- /dev/null +++ b/licenses/license-github.com-valyala-fasttemplate.txt @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Aliaksandr Valialkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/licenses/license-github.com-valyala-tcplisten.txt b/licenses/license-github.com-valyala-tcplisten.txt new file mode 100644 index 0000000..6f66e8a --- /dev/null +++ b/licenses/license-github.com-valyala-tcplisten.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Aliaksandr Valialkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-wader-gormstore-v2.txt b/licenses/license-github.com-wader-gormstore-v2.txt new file mode 100644 index 0000000..f2794b4 --- /dev/null +++ b/licenses/license-github.com-wader-gormstore-v2.txt @@ -0,0 +1,19 @@ +Copyright (c) 2016 Mattias Wadman + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-xdg-go-pbkdf2.txt b/licenses/license-github.com-xdg-go-pbkdf2.txt new file mode 100644 index 0000000..67db858 --- /dev/null +++ b/licenses/license-github.com-xdg-go-pbkdf2.txt @@ -0,0 +1,175 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/licenses/license-github.com-xdg-go-scram.txt b/licenses/license-github.com-xdg-go-scram.txt new file mode 100644 index 0000000..67db858 --- /dev/null +++ b/licenses/license-github.com-xdg-go-scram.txt @@ -0,0 +1,175 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/licenses/license-github.com-xdg-go-stringprep.txt b/licenses/license-github.com-xdg-go-stringprep.txt new file mode 100644 index 0000000..67db858 --- /dev/null +++ b/licenses/license-github.com-xdg-go-stringprep.txt @@ -0,0 +1,175 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/licenses/license-github.com-xeipuuv-gojsonpointer.txt b/licenses/license-github.com-xeipuuv-gojsonpointer.txt new file mode 100644 index 0000000..55ede8a --- /dev/null +++ b/licenses/license-github.com-xeipuuv-gojsonpointer.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2015 xeipuuv + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-xeipuuv-gojsonreference.txt b/licenses/license-github.com-xeipuuv-gojsonreference.txt new file mode 100644 index 0000000..55ede8a --- /dev/null +++ b/licenses/license-github.com-xeipuuv-gojsonreference.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2015 xeipuuv + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-xeipuuv-gojsonschema.txt b/licenses/license-github.com-xeipuuv-gojsonschema.txt new file mode 100644 index 0000000..55ede8a --- /dev/null +++ b/licenses/license-github.com-xeipuuv-gojsonschema.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2015 xeipuuv + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-github.com-xordataexchange-crypt.txt b/licenses/license-github.com-xordataexchange-crypt.txt new file mode 100644 index 0000000..4384631 --- /dev/null +++ b/licenses/license-github.com-xordataexchange-crypt.txt @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) 2014 XOR Data Exchange, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-yalp-jsonpath.txt b/licenses/license-github.com-yalp-jsonpath.txt new file mode 100644 index 0000000..190a34f --- /dev/null +++ b/licenses/license-github.com-yalp-jsonpath.txt @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2015, Marc Capdevielle +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-github.com-youmark-pkcs8.txt b/licenses/license-github.com-youmark-pkcs8.txt new file mode 100644 index 0000000..c939f44 --- /dev/null +++ b/licenses/license-github.com-youmark-pkcs8.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 youmark + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/licenses/license-github.com-yudai-gojsondiff.txt b/licenses/license-github.com-yudai-gojsondiff.txt new file mode 100644 index 0000000..b778ed8 --- /dev/null +++ b/licenses/license-github.com-yudai-gojsondiff.txt @@ -0,0 +1,145 @@ +The MIT License (MIT) + +Copyright (c) 2015 Iwasaki Yudai + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +============================================================================ + +This repository is build with following third party libraries. Thank you! + +## go-diff - https://github.com/sergi/go-diff + +Copyright (c) 2012 Sergi Mansilla + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + + +## golcs - https://github.com/yudai/golcs + +The MIT License (MIT) + +Copyright (c) 2015 Iwasaki Yudai + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +## cli.go - https://github.com/codegangsta/cli + +Copyright (C) 2013 Jeremy Saenz +All Rights Reserved. + +MIT LICENSE + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +## ginkgo - https://github.com/onsi/ginkgo + +Copyright (c) 2013-2014 Onsi Fakhouri + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +# gomega - https://github.com/onsi/gomega + +Copyright (c) 2013-2014 Onsi Fakhouri + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-github.com-yudai-golcs.txt b/licenses/license-github.com-yudai-golcs.txt new file mode 100644 index 0000000..ab7d2e0 --- /dev/null +++ b/licenses/license-github.com-yudai-golcs.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Iwasaki Yudai + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-github.com-yuin-goldmark.txt b/licenses/license-github.com-yuin-goldmark.txt new file mode 100644 index 0000000..dc5b2a6 --- /dev/null +++ b/licenses/license-github.com-yuin-goldmark.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Yusuke Inuzuka + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-yuin-gopher-lua.txt b/licenses/license-github.com-yuin-gopher-lua.txt new file mode 100644 index 0000000..4daf480 --- /dev/null +++ b/licenses/license-github.com-yuin-gopher-lua.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Yusuke Inuzuka + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/license-github.com-zenazn-goji.txt b/licenses/license-github.com-zenazn-goji.txt new file mode 100644 index 0000000..128f3fc --- /dev/null +++ b/licenses/license-github.com-zenazn-goji.txt @@ -0,0 +1,20 @@ +Copyright (c) 2014, 2015 Carl Jackson (carl@avtok.com) + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-go.mongodb.org-mongo-driver.txt b/licenses/license-go.mongodb.org-mongo-driver.txt new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/licenses/license-go.mongodb.org-mongo-driver.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-go.opencensus.io.txt b/licenses/license-go.opencensus.io.txt new file mode 100644 index 0000000..7a4a3ea --- /dev/null +++ b/licenses/license-go.opencensus.io.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/licenses/license-go.uber.org-atomic.txt b/licenses/license-go.uber.org-atomic.txt new file mode 100644 index 0000000..8765c9f --- /dev/null +++ b/licenses/license-go.uber.org-atomic.txt @@ -0,0 +1,19 @@ +Copyright (c) 2016 Uber Technologies, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-go.uber.org-multierr.txt b/licenses/license-go.uber.org-multierr.txt new file mode 100644 index 0000000..858e024 --- /dev/null +++ b/licenses/license-go.uber.org-multierr.txt @@ -0,0 +1,19 @@ +Copyright (c) 2017 Uber Technologies, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-go.uber.org-tools.txt b/licenses/license-go.uber.org-tools.txt new file mode 100644 index 0000000..858e024 --- /dev/null +++ b/licenses/license-go.uber.org-tools.txt @@ -0,0 +1,19 @@ +Copyright (c) 2017 Uber Technologies, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-go.uber.org-zap.txt b/licenses/license-go.uber.org-zap.txt new file mode 100644 index 0000000..6652bed --- /dev/null +++ b/licenses/license-go.uber.org-zap.txt @@ -0,0 +1,19 @@ +Copyright (c) 2016-2017 Uber Technologies, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-go4.org.txt b/licenses/license-go4.org.txt new file mode 100644 index 0000000..8f71f43 --- /dev/null +++ b/licenses/license-go4.org.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/licenses/license-golang.org-x-arch.txt b/licenses/license-golang.org-x-arch.txt new file mode 100644 index 0000000..d29b372 --- /dev/null +++ b/licenses/license-golang.org-x-arch.txt @@ -0,0 +1,27 @@ +Copyright (c) 2015 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-golang.org-x-crypto.txt b/licenses/license-golang.org-x-crypto.txt new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/licenses/license-golang.org-x-crypto.txt @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-golang.org-x-exp.txt b/licenses/license-golang.org-x-exp.txt new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/licenses/license-golang.org-x-exp.txt @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-golang.org-x-image.txt b/licenses/license-golang.org-x-image.txt new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/licenses/license-golang.org-x-image.txt @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-golang.org-x-lint.txt b/licenses/license-golang.org-x-lint.txt new file mode 100644 index 0000000..65d761b --- /dev/null +++ b/licenses/license-golang.org-x-lint.txt @@ -0,0 +1,27 @@ +Copyright (c) 2013 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-golang.org-x-mobile.txt b/licenses/license-golang.org-x-mobile.txt new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/licenses/license-golang.org-x-mobile.txt @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-golang.org-x-mod.txt b/licenses/license-golang.org-x-mod.txt new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/licenses/license-golang.org-x-mod.txt @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-golang.org-x-net.txt b/licenses/license-golang.org-x-net.txt new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/licenses/license-golang.org-x-net.txt @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-golang.org-x-oauth2.txt b/licenses/license-golang.org-x-oauth2.txt new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/licenses/license-golang.org-x-oauth2.txt @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-golang.org-x-sync.txt b/licenses/license-golang.org-x-sync.txt new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/licenses/license-golang.org-x-sync.txt @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-golang.org-x-sys.txt b/licenses/license-golang.org-x-sys.txt new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/licenses/license-golang.org-x-sys.txt @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-golang.org-x-term.txt b/licenses/license-golang.org-x-term.txt new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/licenses/license-golang.org-x-term.txt @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-golang.org-x-text.txt b/licenses/license-golang.org-x-text.txt new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/licenses/license-golang.org-x-text.txt @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-golang.org-x-time.txt b/licenses/license-golang.org-x-time.txt new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/licenses/license-golang.org-x-time.txt @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-golang.org-x-tools.txt b/licenses/license-golang.org-x-tools.txt new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/licenses/license-golang.org-x-tools.txt @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-golang.org-x-xerrors.txt b/licenses/license-golang.org-x-xerrors.txt new file mode 100644 index 0000000..e4a47e1 --- /dev/null +++ b/licenses/license-golang.org-x-xerrors.txt @@ -0,0 +1,27 @@ +Copyright (c) 2019 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-google.golang.org-api.txt b/licenses/license-google.golang.org-api.txt new file mode 100644 index 0000000..263aa7a --- /dev/null +++ b/licenses/license-google.golang.org-api.txt @@ -0,0 +1,27 @@ +Copyright (c) 2011 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-google.golang.org-appengine.txt b/licenses/license-google.golang.org-appengine.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/licenses/license-google.golang.org-appengine.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-google.golang.org-genproto.txt b/licenses/license-google.golang.org-genproto.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/licenses/license-google.golang.org-genproto.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-google.golang.org-grpc.txt b/licenses/license-google.golang.org-grpc.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/licenses/license-google.golang.org-grpc.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-google.golang.org-protobuf.txt b/licenses/license-google.golang.org-protobuf.txt new file mode 100644 index 0000000..49ea0f9 --- /dev/null +++ b/licenses/license-google.golang.org-protobuf.txt @@ -0,0 +1,27 @@ +Copyright (c) 2018 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-gopkg.in-check.v1.txt b/licenses/license-gopkg.in-check.v1.txt new file mode 100644 index 0000000..545cf2d --- /dev/null +++ b/licenses/license-gopkg.in-check.v1.txt @@ -0,0 +1,25 @@ +Gocheck - A rich testing framework for Go + +Copyright (c) 2010-2013 Gustavo Niemeyer + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-gopkg.in-errgo.v2.txt b/licenses/license-gopkg.in-errgo.v2.txt new file mode 100644 index 0000000..e44c4cc --- /dev/null +++ b/licenses/license-gopkg.in-errgo.v2.txt @@ -0,0 +1,26 @@ +Copyright © 2013, Roger Peppe +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of this project nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-gopkg.in-fsnotify.v1.txt b/licenses/license-gopkg.in-fsnotify.v1.txt new file mode 100644 index 0000000..f21e540 --- /dev/null +++ b/licenses/license-gopkg.in-fsnotify.v1.txt @@ -0,0 +1,28 @@ +Copyright (c) 2012 The Go Authors. All rights reserved. +Copyright (c) 2012 fsnotify Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-gopkg.in-go-playground-assert.v1.txt b/licenses/license-gopkg.in-go-playground-assert.v1.txt new file mode 100644 index 0000000..6a2ae9a --- /dev/null +++ b/licenses/license-gopkg.in-go-playground-assert.v1.txt @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Dean Karn + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/licenses/license-gopkg.in-go-playground-validator.v8.txt b/licenses/license-gopkg.in-go-playground-validator.v8.txt new file mode 100644 index 0000000..6a2ae9a --- /dev/null +++ b/licenses/license-gopkg.in-go-playground-validator.v8.txt @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Dean Karn + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/licenses/license-gopkg.in-inconshreveable-log15.v2.txt b/licenses/license-gopkg.in-inconshreveable-log15.v2.txt new file mode 100644 index 0000000..5f0d1fb --- /dev/null +++ b/licenses/license-gopkg.in-inconshreveable-log15.v2.txt @@ -0,0 +1,13 @@ +Copyright 2014 Alan Shreve + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/licenses/license-gopkg.in-ini.v1.txt b/licenses/license-gopkg.in-ini.v1.txt new file mode 100644 index 0000000..d361bbc --- /dev/null +++ b/licenses/license-gopkg.in-ini.v1.txt @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright 2014 Unknwon + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-gopkg.in-mgo.v2.txt b/licenses/license-gopkg.in-mgo.v2.txt new file mode 100644 index 0000000..770c767 --- /dev/null +++ b/licenses/license-gopkg.in-mgo.v2.txt @@ -0,0 +1,25 @@ +mgo - MongoDB driver for Go + +Copyright (c) 2010-2013 - Gustavo Niemeyer + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-gopkg.in-tomb.v1.txt b/licenses/license-gopkg.in-tomb.v1.txt new file mode 100644 index 0000000..a4249bb --- /dev/null +++ b/licenses/license-gopkg.in-tomb.v1.txt @@ -0,0 +1,29 @@ +tomb - support for clean goroutine termination in Go. + +Copyright (c) 2010-2011 - Gustavo Niemeyer + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-gopkg.in-yaml.v2.txt b/licenses/license-gopkg.in-yaml.v2.txt new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/licenses/license-gopkg.in-yaml.v2.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/license-gopkg.in-yaml.v3.txt b/licenses/license-gopkg.in-yaml.v3.txt new file mode 100644 index 0000000..2683e4b --- /dev/null +++ b/licenses/license-gopkg.in-yaml.v3.txt @@ -0,0 +1,50 @@ + +This project is covered by two different licenses: MIT and Apache. + +#### MIT License #### + +The following files were ported to Go from C files of libyaml, and thus +are still covered by their original MIT license, with the additional +copyright staring in 2011 when the project was ported over: + + apic.go emitterc.go parserc.go readerc.go scannerc.go + writerc.go yamlh.go yamlprivateh.go + +Copyright (c) 2006-2010 Kirill Simonov +Copyright (c) 2006-2011 Kirill Simonov + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +### Apache License ### + +All the remaining project files are covered by the Apache license: + +Copyright (c) 2011-2019 Canonical Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/licenses/license-gorm.io-datatypes.txt b/licenses/license-gorm.io-datatypes.txt new file mode 100644 index 0000000..037e165 --- /dev/null +++ b/licenses/license-gorm.io-datatypes.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013-NOW Jinzhu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-gorm.io-driver-mysql.txt b/licenses/license-gorm.io-driver-mysql.txt new file mode 100644 index 0000000..037e165 --- /dev/null +++ b/licenses/license-gorm.io-driver-mysql.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013-NOW Jinzhu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-gorm.io-driver-postgres.txt b/licenses/license-gorm.io-driver-postgres.txt new file mode 100644 index 0000000..037e165 --- /dev/null +++ b/licenses/license-gorm.io-driver-postgres.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013-NOW Jinzhu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-gorm.io-driver-sqlite.txt b/licenses/license-gorm.io-driver-sqlite.txt new file mode 100644 index 0000000..037e165 --- /dev/null +++ b/licenses/license-gorm.io-driver-sqlite.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013-NOW Jinzhu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-gorm.io-driver-sqlserver.txt b/licenses/license-gorm.io-driver-sqlserver.txt new file mode 100644 index 0000000..037e165 --- /dev/null +++ b/licenses/license-gorm.io-driver-sqlserver.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013-NOW Jinzhu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-gorm.io-gorm.txt b/licenses/license-gorm.io-gorm.txt new file mode 100644 index 0000000..037e165 --- /dev/null +++ b/licenses/license-gorm.io-gorm.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013-NOW Jinzhu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/license-honnef.co-go-tools.txt b/licenses/license-honnef.co-go-tools.txt new file mode 100644 index 0000000..dfd0314 --- /dev/null +++ b/licenses/license-honnef.co-go-tools.txt @@ -0,0 +1,20 @@ +Copyright (c) 2016 Dominik Honnef + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/license-rsc.io-binaryregexp.txt b/licenses/license-rsc.io-binaryregexp.txt new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/licenses/license-rsc.io-binaryregexp.txt @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-rsc.io-pdf.txt b/licenses/license-rsc.io-pdf.txt new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/licenses/license-rsc.io-pdf.txt @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-rsc.io-quote-v3.txt b/licenses/license-rsc.io-quote-v3.txt new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/licenses/license-rsc.io-quote-v3.txt @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/license-rsc.io-sampler.txt b/licenses/license-rsc.io-sampler.txt new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/licenses/license-rsc.io-sampler.txt @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/main.go b/main.go new file mode 100644 index 0000000..f3e4ac2 --- /dev/null +++ b/main.go @@ -0,0 +1,110 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +// @title aofs apis +// @version 1.0 +// @description This is AO.space aofs OpenAPI reference document. +// @termsOfService http://swagger.io/terms/ + +// @contact.name AO.space +// @contact.url https://ao.space/ +// @contact.email service@ao.space + +// @license.name Apache 2.0 +// @license.url http://www.apache.org/licenses/LICENSE-2.0.html + +// @BasePath / + +import ( + "aofs/internal/env" + "aofs/internal/log4bp" + "aofs/repository/dbutils" + "aofs/repository/storage" + "aofs/routers/api" + _ "aofs/routers/api/docs" + "aofs/routers/routers" + "aofs/services/multipart" + "aofs/services/recycled" + "fmt" + + "os" + "os/signal" + "syscall" + + "github.com/gin-gonic/gin" + "github.com/go-redis/redis" + "gorm.io/gorm" +) + +type FileAPI struct { + Route *gin.Engine + Logger *log4bp.BpLogger + RedisCli *redis.Client + Stor storage.MultiDiskStorager + DB *gorm.DB +} + +var fileapi *FileAPI + +func NewFileAPI() *FileAPI { + //stor := storage.GetStor() + return &FileAPI{ + Route: routers.InitRoute(), + Logger: log4bp.New("", gin.Mode()), + RedisCli: storage.InitClient(env.REDIS_URL, env.REDIS_PASS, env.REDIS_DB), + Stor: storage.GetStor(), + DB: dbutils.GetFileDB(), + } +} + +func Init() { + dbutils.Init() + + if err := storage.Init(dbutils.NewBETagIndexer()); err != nil { + fileapi.Logger.LogE().Err(err).Msg("failed to storage.Init") + os.Exit(2) + } + + + api.Init() + recycled.Init() //回收站初始化 + multipart.Init() +} + +func main() { + fileapi = NewFileAPI() + fileapi.Route.Use(gin.Recovery()) + fileapi.Route.MaxMultipartMemory = 100 * 1024 * 1024 + Init() + + go func() { + err := fileapi.Route.Run(":2001") + if err != nil { + fmt.Println("run err:", err) + } + }() + + //等待中断信号,以优雅地关闭服务器 + quit := make(chan os.Signal, 1) + // 可以捕捉除了kill-9的所有中断信号 + signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, os.Interrupt) + <-quit + + + fileapi.Logger.LogI().Msg("receive exit signal ,exit....") + + +} diff --git a/monitor.go b/monitor.go new file mode 100644 index 0000000..bcf504a --- /dev/null +++ b/monitor.go @@ -0,0 +1,29 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +type Monitor struct { + Alloc uint64 `json:"堆内存"` // 堆内存字节分配数 + TotalAlloc uint64 `json:"最大堆内存"` // 堆中分配最大字节数 + Sys uint64 `json:"系统内存"` // 从系统中获得的总内存 + Mallocs uint64 `json:"分配对象"` // 分配对象数 + Frees uint64 `json:"释放对象"` // 释放对象数 + LiveObjects uint64 `json:"存活对象"` // 存活对象数 + PauseTotalNs uint64 `json:"GC时间"` // 总GC暂停时间 + LastGC uint64 `json:"最后一次GC时间戳"` + + NumGC uint32 `json:"GC次数"` + NumGoroutine int `json:"协程数"` // goroutine数量 +} \ No newline at end of file diff --git a/repository/bpredis/bpredis.go b/repository/bpredis/bpredis.go new file mode 100644 index 0000000..b28e11d --- /dev/null +++ b/repository/bpredis/bpredis.go @@ -0,0 +1,86 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bpredis + +import ( + "aofs/internal/env" + "aofs/internal/log4bp" + "fmt" + "time" + + "github.com/gin-gonic/gin" + "github.com/go-redis/redis" +) + +var g *bpRedis + +func init() { + Init() +} + +type BpRediser interface { + Set(key string, value interface{}, expiration time.Duration) error + Get(key string) (int, error) + GetInt64(key string) (int64, error) + Incr(key string) error + PushNotificationMsg(msg map[string]interface{}) + GetValue(key string) ([]byte, error) + Close() +} + +func GetRedis() BpRediser { + return g +} + +type bpRedis struct { + Client *redis.Client + Logger *log4bp.BpLogger + ChanMsg chan map[string]interface{} +} + +func (br *bpRedis) Close() { + br.Client.Close() +} + +func Init() error { + var err error + client := redis.NewClient(&redis.Options{ + Addr: env.REDIS_URL, // redis地址 + Password: env.REDIS_PASS, // redis密码,没有则留空 + DB: env.REDIS_DB, // 默认数据库,默认是0 + }) + for i := 0; i < 10; i++ { + if _, err = client.Ping().Result(); err != nil { + //logger.LogW().Msg(fmt.Sprintf("failed to connect to redis,err: %v", err)) + fmt.Println("failed to connect to redis", err) + + time.Sleep(time.Second) + } else { + //br.Logger.LogI().Msg(fmt.Sprintf("Connected to redis:%v", env.REDIS_DB)) + fmt.Println(fmt.Sprintf("Connected to redis:%v", env.REDIS_DB)) + break + } + } + + if err != nil { + panic(err) + } + + g = &bpRedis{Client: client, + Logger: log4bp.New("", gin.Mode()), + ChanMsg: make(chan map[string]interface{}, 1024)} + + return nil +} diff --git a/repository/bpredis/kv.go b/repository/bpredis/kv.go new file mode 100644 index 0000000..27eee4d --- /dev/null +++ b/repository/bpredis/kv.go @@ -0,0 +1,66 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bpredis + +import ( + "time" +) + +const UsedSpace = "UsedSpace-" + +func (br *bpRedis) Set(key string, value interface{}, expiration time.Duration) error { + err := br.Client.Set(key, value, expiration).Err() + if err != nil { + return err + } + return nil +} + +func (br *bpRedis) Get(key string) (int, error) { + uv, err := br.Client.Get(key).Int() + if err != nil { + return 0, err + } + return uv, nil +} + +func (br *bpRedis) GetInt64(key string) (int64, error) { + uv, err := br.Client.Get(key).Int64() + if err != nil { + return 0, err + } + return uv, nil +} + +func (br *bpRedis) GetValue(key string) ([]byte, error) { + value := br.Client.Get(key) + if value.Err() != nil { + return nil, value.Err() + } + rspByte, err := value.Bytes() + if err != nil { + return nil, err + } + + return rspByte, nil +} + +func (br *bpRedis) Incr(key string) error { + err := br.Client.Incr(key).Err() + if err != nil { + return err + } + return nil +} diff --git a/repository/bpredis/stream.go b/repository/bpredis/stream.go new file mode 100644 index 0000000..28a4922 --- /dev/null +++ b/repository/bpredis/stream.go @@ -0,0 +1,101 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bpredis + +import ( + "encoding/json" + "fmt" + "time" + + "github.com/go-redis/redis" +) + +func init() { + if g != nil { + go g.SendMessage() + } +} + +const ( + PreviewQueue = "fileChangelogs" + NotificationQueue = "push_notification" +) + +func (br *bpRedis) InsertChan(msg map[string]interface{}, eventName string) { + if msg != nil && len(br.ChanMsg) < cap(br.ChanMsg)*3/4 { + msg["eventName"] = eventName + br.ChanMsg <- msg + } +} + +func (br *bpRedis) SendMessage() { + br.Logger.LogI().Msg("start wait message ...") + for { + msg, ok := <-br.ChanMsg + if ok { + if br.Client != nil { + if data, err := json.Marshal(msg); err == nil { + for i := 0; i < 60; i++ { + pubErr := br.Client.XAdd(&redis.XAddArgs{Stream: PreviewQueue, + MaxLen: 20000, + ID: "*", + Values: msg}).Err() + if pubErr == nil { + br.Logger.LogI().Msg(fmt.Sprintf("successfully add msg: %v", string(data))) + break + } else { + br.Logger.LogW().Msg(fmt.Sprintf("failed to publish message,err: %v", pubErr)) + } + if i == 59 && len(br.ChanMsg) < cap(br.ChanMsg)/2 { + select { + case br.ChanMsg <- msg: + br.Logger.LogD().Interface("msg", msg).Msg("push chan again") + default: + break + } + break + } + time.Sleep(time.Second) + } + } + } + + } else { + break + } + } + +} + + +func (br *bpRedis) PushNotificationMsg(msg map[string]interface{}) { + //dataBytes,_ := json.Marshal(msg["data"]) + //if infoBytes, err := base64.StdEncoding.DecodeString(string(dataBytes));err == nil { + // json.Unmarshal(infoBytes,proto.) + //} + if br.Client != nil { + pubErr := br.Client.XAdd(&redis.XAddArgs{Stream: NotificationQueue, + MaxLen: 20000, + ID: "*", + Values: msg}).Err() + if pubErr == nil { + br.Logger.LogI().Msg(fmt.Sprintf("xadd message successfully %s", msg)) + return + } else { + br.Logger.LogW().Msg(fmt.Sprintf("failed to publish message,err: %v", pubErr)) + } + //time.Sleep(time.Second) + } +} diff --git a/repository/dbutils/base.go b/repository/dbutils/base.go new file mode 100644 index 0000000..0a0ea1f --- /dev/null +++ b/repository/dbutils/base.go @@ -0,0 +1,49 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package dbutils + +import ( + "aofs/internal/proto" + "gorm.io/gorm" +) + + +func ScopeTrashed() *gorm.DB { + return db.Where("trashed = ?", proto.TrashStatusLogicDeleted) +} + +func ScopeNormalFile() *gorm.DB { + return db.Where("trashed = ?", proto.TrashStatusNormal) +} + +func ScopeUser(userId proto.UserIdType) *gorm.DB { + return db.Where("user_id = ?", userId) +} + +func ScopeUuid(uuid string) *gorm.DB { + return db.Where("uuid = ?", uuid) +} + +func ScopeUuids(uuids []string) *gorm.DB { + return db.Where("uuid IN (?)", uuids) +} + +func ScopeFolder() *gorm.DB { + return db.Where("is_dir = true") +} + +func ScopeParentUuid(parentUuid string) *gorm.DB { + return db.Where("parent_uuid = ?", parentUuid) +} diff --git a/repository/dbutils/betag.go b/repository/dbutils/betag.go new file mode 100644 index 0000000..4056153 --- /dev/null +++ b/repository/dbutils/betag.go @@ -0,0 +1,59 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package dbutils + +import "aofs/internal/proto" + +type betagIndex struct { +} + +func (*betagIndex) Get(betag string) (int, error) { + var bi proto.BETagInfo + result := db.Model(proto.BETagInfo{}).Where("betag=?", betag).First(&bi) + if result.Error != nil { + return 0, result.Error + } else { + return int(bi.VolId), nil + } +} +func (*betagIndex) Delete(betag string) (int, error) { + trans, err := newTrans() + if err != nil { + return 0, err + } + + defer trans.Commit() + + bi, err := trans.getBETagInfo(betag) + if err != nil { + return 0, err + } + + err = trans.deleteBETagInfo(betag) + return int(bi.VolId), err +} +func (*betagIndex) Add(betag string, volId int) error { + trans, err := newTrans() + if err != nil { + return err + } + + defer trans.Commit() + return trans.addBETagInfo(betag, volId) +} + +func NewBETagIndexer() *betagIndex { + return &betagIndex{} +} diff --git a/repository/dbutils/betag_test.go b/repository/dbutils/betag_test.go new file mode 100644 index 0000000..6a3d03b --- /dev/null +++ b/repository/dbutils/betag_test.go @@ -0,0 +1,141 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package dbutils + +import ( + "aofs/internal/env" + "fmt" + "testing" + "time" + + "gorm.io/gorm" +) + +func init() { + fileConnConfig := &DBConfig{ + Host: env.SQL_HOST, + Port: env.SQL_PORT, + User: env.SQL_USER, + Password: env.SQL_PASSWORD, + DBName: env.SQL_DATABASE, + Config: &gorm.Config{Logger: *GormLogger(), PrepareStmt: true}, + } + + accountConnConfig := &DBConfig{ + Host: env.SQL_HOST, + Port: env.SQL_PORT, + User: env.SQL_USER, + Password: env.SQL_PASSWORD, + DBName: "account", + Config: &gorm.Config{Logger: *GormLogger(), PrepareStmt: true}, + } + + db = FileSchemaConn(fileConnConfig) + db2 = AccountSchemaConn(accountConnConfig) + + randBetag = fmt.Sprint(time.Now().Unix()) +} + +var randBetag string + +var bi betagIndex + +func testBETagIndexGet(t *testing.T) { + type args struct { + betag string + } + tests := []struct { + name string + b *betagIndex + args args + want int + wantErr bool + }{ + {name: "get-add1", b: &bi, args: args{betag: randBetag}, want: 1, wantErr: false}, + {name: "get-add1", b: &bi, args: args{betag: "not-exist"}, want: 0, wantErr: true}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := tt.b.Get(tt.args.betag) + if (err != nil) != tt.wantErr { + t.Errorf("betagIndex.Get() error = %v, wantErr %v", err, tt.wantErr) + return + } + if got != tt.want { + t.Errorf("betagIndex.Get() = %v, want %v", got, tt.want) + } + }) + } +} + +func testBETagIndexAdd(t *testing.T) { + type args struct { + betag string + volId int + } + var bi betagIndex + tests := []struct { + name string + b *betagIndex + args args + wantErr bool + }{ + {name: "add1", b: &bi, args: args{betag: randBetag, volId: 1}, wantErr: false}, + {name: "add1-again", b: &bi, args: args{betag: randBetag, volId: 1}, wantErr: true}, + {name: "add2", b: &bi, args: args{betag: randBetag + "-2", volId: 1}, wantErr: false}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if err := tt.b.Add(tt.args.betag, tt.args.volId); (err != nil) != tt.wantErr { + t.Errorf("betagIndex.Add() error = %v, wantErr %v", err, tt.wantErr) + } + }) + } +} + +func testBETagIndexDelete(t *testing.T) { + type args struct { + betag string + } + var bi betagIndex + tests := []struct { + name string + b *betagIndex + args args + want int + wantErr bool + }{ + {name: "delete add1", b: &bi, args: args{betag: randBetag}, want: 1, wantErr: false}, + {name: "delete add1-again", b: &bi, args: args{betag: randBetag}, want: 0, wantErr: true}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := tt.b.Delete(tt.args.betag) + if (err != nil) != tt.wantErr { + t.Errorf("betagIndex.Delete() error = %v, wantErr %v", err, tt.wantErr) + return + } + if got != tt.want { + t.Errorf("betagIndex.Delete() = %v, want %v", got, tt.want) + } + }) + } +} + +func TestBETagIndex(t *testing.T) { + testBETagIndexAdd(t) + testBETagIndexGet(t) + testBETagIndexDelete(t) +} diff --git a/repository/dbutils/calculate.go b/repository/dbutils/calculate.go new file mode 100644 index 0000000..37f4448 --- /dev/null +++ b/repository/dbutils/calculate.go @@ -0,0 +1,80 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package dbutils + +import ( + "aofs/internal/proto" + "fmt" + "path/filepath" + "strings" +) + +func CalculateFolderSize(path string, name string) (size int64, err error) { + // 更新目录的size,可在每次上传完成后执行 + pathWithoutSlash := strings.TrimRight(path, "/") + parentFolder, folderName := filepath.Split(pathWithoutSlash) + // 当前目录的计算 + sql := fmt.Sprintf("UPDATE \"aofs_file_infos\" SET size=(SELECT sum(size) FROM \"aofs_file_infos\" WHERE path LIKE '%s'||'/%%' AND trashed IN (0,1)) WHERE path='%s' AND name='%s' AND trashed=0", pathWithoutSlash, parentFolder, folderName) + res := db.Exec(sql) + affect := int(res.RowsAffected) + if affect == 1 { + var subQuery proto.FileInfo + db.Model(&subQuery).Where("path = ? AND name = ? AND trashed = 0", parentFolder, folderName).First(&subQuery) + size = subQuery.Size + return size, nil + } else { + return 0, err + } +} + +func CalculateFolderSizeWithUuid(userId proto.UserIdType, folderUuid string) (size int64, err error) { + pathRecord, nameRecord := GetPathByUuid(folderUuid) + sql := fmt.Sprintf("UPDATE \"aofs_file_infos\" SET size=(SELECT sum(size) FROM \"aofs_file_infos\" WHERE path LIKE '%s/%%' AND trashed = 0) WHERE path='%s' AND name='%s' AND trashed=0 AND user_id='%d' ", pathRecord+nameRecord, pathRecord, nameRecord, userId) + res := db.Exec(sql) + affect := int(res.RowsAffected) + if affect == 1 { + var subQuery proto.FileInfo + err = db.Model(&subQuery).Where("path = ? AND name = ? AND trashed = 0 AND user_id = ?", pathRecord, nameRecord, userId).First(&subQuery).Error + size = subQuery.Size + return size, nil + } else { + return 0, err + } + +} + +// CalculateFileCount 计算文件夹内的文件数 +func CalculateFileCount(userId proto.UserIdType, path string, name string) (int64, error) { + var fileCount int64 + //db.Model(&proto.FileInfo{}).Where("path = ?", path).Where("trashed = ?", 0).Count(&fileCount) + db.Model(&proto.FileInfo{}).Where("path = ? AND trashed = ? AND user_id = ?", path, 0, userId).Count(&fileCount) + pathWithoutSlash := strings.TrimRight(path, "/") + parentFolder, folderName := filepath.Split(pathWithoutSlash) + //res := db.Model(&proto.FileInfo{}).Where("path = ?", parentFolder).Where("name = ?", folderName).Where("trashed = ?", 0).Update("file_count", fileCount) + res := db.Model(&proto.FileInfo{}).Where("path = ? AND name = ? AND trashed = ? AND user_id = ?", parentFolder, folderName, 0, userId).Update("file_count", fileCount) + err := res.Error + if err != nil { + return 0, err + } + return fileCount, nil +} + +func CountFileInFolder(uuid string) (fileCount int64) { + //var fileInfo []proto.FileInfo + //db.Model(&proto.FileInfo{}).Where("parent_uuid = ? AND trashed = ?", uuid, 0).Scan(&fileInfo) + db.Model(&proto.FileInfo{}).Where("parent_uuid = ? AND trashed = ?", uuid, 0).Count(&fileCount) + return fileCount +} + diff --git a/repository/dbutils/create.go b/repository/dbutils/create.go new file mode 100644 index 0000000..7d0e1cf --- /dev/null +++ b/repository/dbutils/create.go @@ -0,0 +1,324 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package dbutils + +import ( + "errors" + "aofs/internal/proto" + "aofs/internal/utils" + "fmt" + "strings" + "time" + + "gorm.io/gorm" +) + +// AddFile 上传文件 +func AddFile(info proto.FileInfo) (err error) { + res := db.Model(&proto.FileInfo{}).Create(&info) + err = res.Error + if err != nil { + + return err + } + return nil +} + +// AddFileV2 上传文件,path 传入参数为当前目录的uuid +func AddFileV2(info proto.FileInfo, uuid string) (err error) { + fi, err := GetInfoByUuid(uuid) + if err != nil { + return err + } + + info.Path = fi.AbsPath() + return AddFile(info) +} + + +// CopyFile 复制文件 +func CopyFile(userId proto.UserIdType, req proto.CopyFileReq) (affect int, uuids []proto.NewAndOldUuid, err error) { + + var subQuery proto.FileInfo + var destPath string + + for _, fileId := range req.Ids { + //idCount := len(req.Id) + + var fileOrDir proto.FileInfo + exist := db.Model(&fileOrDir).Where("user_id = ? AND uuid = ? AND trashed = 0", userId, fileId).First(&fileOrDir) + err := exist.Error + if errors.Is(err, gorm.ErrRecordNotFound) { + return 0, uuids, err + } else { + // 复制文件 + if !fileOrDir.IsDir { + // 获取目的路径path + // 判断是否根目录 + if req.DestId != "" { + db.Model(&proto.FileInfo{}).Where("user_id = ? AND uuid = ? AND trashed = 0", userId, req.DestId).First(&subQuery) + destPath = subQuery.Path + subQuery.Name + "/" + } else { + destPath = "/" + } + + var srcInfo proto.FileInfo + db.Model(&proto.FileInfo{}).Where("user_id = ? AND uuid = ? AND trashed = 0", userId, fileId).Scan(&srcInfo) + + copyInfo := srcInfo + copyInfo.Id = utils.RandomID() + copyInfo.Path = destPath + copyInfo.OperationTime = time.Now().UnixNano() / 1e6 + res := db.Model(&proto.FileInfo{}).Create(©Info) + //db.Model(&proto.FileInfo{}).Where("uuid = ?", copyInfo.Id).Update("path", destPath) + affect += int(res.RowsAffected) + err = res.Error + + uid := proto.NewAndOldUuid{ + OldId: fileId, + NewId: copyInfo.Id} + + uuids = append(uuids, uid) + + } else { + // 获取目的路径path + // 判断是否根目录 + if req.DestId != "" { + db.Model(&proto.FileInfo{}).Where("user_id = ? AND uuid = ? AND trashed = 0", userId, req.DestId).First(&subQuery) + destPath = subQuery.Path + subQuery.Name + "/" + } else { + destPath = "/" + } + + destPathLen := len(strings.Split(destPath, "/")) + + ownChildFolderMaxLen, _ := GetSubDirMaxLayer(userId, fileId) + + if destPathLen+ownChildFolderMaxLen >= 20 { + return 0, nil, errors.New("beyond 20 layers") + } + + var srcInfo proto.FileInfo + // 当前目录的path修改 + db.Model(&proto.FileInfo{}).Where("user_id = ? AND uuid = ? AND trashed = 0", userId, fileId).First(&srcInfo) + copyInfo := srcInfo + copyInfo.Id = utils.RandomID() + copyInfo.Path = destPath + copyInfo.OperationTime = time.Now().UnixNano() / 1e6 + //copyInfo.ParentId = req.DestPath + if res := db.Model(&proto.FileInfo{}).Create(©Info); res.RowsAffected == 0 { + return 0, nil, res.Error + } + //affect = 1 + // 子目录和文件复制 + originPath := srcInfo.Path + srcInfo.Name + "/" + var copyId []string + //var fileList + db.Model(&proto.FileInfo{}).Select("uuid").Where("user_id = ? AND path LIKE ?", userId, originPath+"%").Find(©Id) + fileReq := proto.CopyFileReq{Ids: copyId, DestId: copyInfo.Id} + affect, _, _ = CopyFile(userId, fileReq) + uid := proto.NewAndOldUuid{ + OldId: fileId, + NewId: copyInfo.Id} + + uuids = append(uuids, uid) + + } + } + affect = affect + 1 + + } + if err != nil { + return 0, nil, err + } else { + return affect, uuids, nil + } + +} + +func RecursiveCreateFolder(userId proto.UserIdType, path string) (*proto.FileInfo, error) { + if len(path) == 0 || path[0] != '/' || path[len(path)-1] != '/' { + return nil, fmt.Errorf("path %s is invalid", path) + } + + lst := strings.Split(path, "/") + + parentInfo, err := GetInfoByPath(userId, "", "/", proto.TrashStatusNormal) + if err != nil { + return nil, err + } + + for _, name := range lst { + name = strings.TrimSpace(name) + if len(name) == 0 { + continue + } + + var pi proto.FileInfo + tx := db.Model(&pi).Where("user_id = ? AND path = ? and name = ? and trashed = ?", userId, parentInfo.AbsPath(), name, 0).Scan(&pi) + if tx.Error != nil { + return nil, tx.Error + } else if tx.RowsAffected == 0 { + //目录不存在,创建之 + if fi, err := CreateFolderByPath(userId, parentInfo.Id, name); err != nil { + return nil, err + } else { + parentInfo = fi + } + + } else if pi.IsDir { + parentInfo = &pi + } else { + return nil, fmt.Errorf("%s/%s is not dir", pi.Path, pi.Name) + } + } + return parentInfo, nil +} + +func CreateFolderByPath(userId proto.UserIdType, uuidParent string, name string) (*proto.FileInfo, error) { + fi := &proto.FileInfo{} + tx := db.Model(fi).Where("user_id = ? AND uuid = ?", userId, uuidParent).First(fi) + if tx.Error != nil { + return nil, tx.Error + } else if tx.RowsAffected == 0 { + return nil, fmt.Errorf("uuid(%s) is not exist", uuidParent) + } else if !fi.IsDir { + return nil, fmt.Errorf("uuid(%s) is not dir.", uuidParent) + } + + currentPath := fi.Path + fi.Name + if fi.Name != "/" { + currentPath += "/" + } + + fi = &proto.FileInfo{ + FileInfoPub: proto.FileInfoPub{ + Id: utils.RandomID(), + ParentUuid: uuidParent, + IsDir: true, + Name: name, + Path: currentPath, + BETag: "", + CreateTime: time.Now().UnixNano() / 1e6, + ModifyTime: time.Now().UnixNano() / 1e6, + OperationTime: time.Now().UnixNano() / 1e6, + Size: 0, + Category: "", + Mime: "", + }, + UserId: userId, + Tags: "", + Executable: false, + Version: 1, + BucketName: "eulixspace-files", + } + tx = db.Model(&proto.FileInfo{}).Create(fi) + if tx.Error != nil { + return nil, tx.Error + } else if tx.RowsAffected > 0 { + return fi, nil + } else { + return nil, fmt.Errorf("unknown error") + } + +} + +// CreateFolder 创建文件夹 +func CreateFolder(userId proto.UserIdType, req proto.CreateFolderReq) (newFolderInfo proto.FileInfo, returnCode uint8, err error) { + var subQuery proto.FileInfo + var currentPath string + var affect int64 + var rootInfo *proto.FileInfo + if req.CurrentDirUuid == "" { + currentPath = "/" + rootInfo, _ = GetInfoByPath(userId, "", "/", 0) + req.CurrentDirUuid = rootInfo.Id + } else { + db.Model(subQuery).Where("uuid = ?", req.CurrentDirUuid).First(&subQuery) + currentPath = subQuery.AbsPath() // subQuery.Path + subQuery.Name + "/" + } + + pathArr := strings.Split(currentPath, "/") + if len(pathArr) <= 20 { + err = db.Model(proto.FileInfo{}).Where("user_id = ? AND name = ? AND path = ? AND trashed = 0", userId, req.FolderName, currentPath).First(&proto.FileInfo{}).Error + if err != nil { + newFolderInfo = proto.FileInfo{ + FileInfoPub: proto.FileInfoPub{ + Id: utils.RandomID(), + ParentUuid: req.CurrentDirUuid, + IsDir: true, + Name: req.FolderName, + Path: currentPath, + BETag: "", + CreateTime: time.Now().UnixNano() / 1e6, + ModifyTime: time.Now().UnixNano() / 1e6, + OperationTime: time.Now().UnixNano() / 1e6, + Size: 0, + Category: "", + Mime: "", + }, + UserId: userId, + Tags: "", + Executable: false, + Version: 1, + BucketName: "eulixspace-files", + TransactionId: 0, + } + affect = db.Model(&proto.FileInfo{}).Create(&newFolderInfo).RowsAffected + } else { + return newFolderInfo, 1, err + } + + } else { + return newFolderInfo, 2, errors.New("greater than 20 layers") + } + + if affect == 1 { + return newFolderInfo, 3, nil + } + return +} + +// CopyFolder 复制文件夹 +func CopyFolder(req proto.CopyFolderReq) (affect int64, err error) { + var srcInfo proto.FileInfo + var subQuery proto.FileInfo + // 获取目的路径path + db.Model(&proto.FileInfo{}).Where("uuid = ?", req.DestPath).First(&subQuery) + destPath := subQuery.Path + subQuery.Name + "/" + pathArr := strings.Split(destPath, "/") + if len(pathArr) <= 5 { + // 循环修改元数据的path字段 + for _, folderId := range req.FolderUuid { + db.Model(&proto.FileInfo{}).Where("uuid = ?", folderId).First(&srcInfo) + copyInfo := srcInfo + copyInfo.Id = utils.RandomID() + copyInfo.Path = destPath + res := db.Model(&proto.FileInfo{}).Create(©Info) + affect = res.RowsAffected + err = res.Error + } + } else { + return + } + + if err != nil { + return 0, err + } + return affect, nil +} + + + diff --git a/repository/dbutils/delete.go b/repository/dbutils/delete.go new file mode 100644 index 0000000..2ae7bd7 --- /dev/null +++ b/repository/dbutils/delete.go @@ -0,0 +1,300 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package dbutils + +import ( + "aofs/internal/env" + "aofs/internal/proto" + "aofs/services/async" + "fmt" + "time" + + "path" + + "gorm.io/gorm" + "gorm.io/gorm/clause" +) + +//const AsyncTaskThreshold = 1000 + +func ProcessSameFileInTrash(tx *gorm.DB, userId proto.UserIdType, deleteIds []string) error { + for _, deleteId := range deleteIds { + subQuery, err := GetInfoByUuid(deleteId) + if err != nil { + continue + } + if _, err = GetInfoByPath(userId, subQuery.Path, subQuery.Name, proto.TrashStatusLogicDeleted); err == nil { + newFileName := subQuery.Name[:len(subQuery.Name)-len(path.Ext(subQuery.Name))] + time.Now().Format("2006-01-02 15:04:05") + path.Ext(subQuery.Name) + if err := tx.Model(&proto.FileInfo{}).Where("user_id = ? AND path = ? AND name = ? AND trashed = ?", userId, subQuery.Path, subQuery.Name, 1).Update("name", newFileName).Error; err != nil { + return err + } + newPath := subQuery.Path + subQuery.Name + time.Now().Format("2006-01-02 15:04:05") + "/" + if err := tx.Model(&proto.FileInfo{}).Where("user_id = ? AND path LIKE ? AND trashed = ?", userId, subQuery.Path+subQuery.Name+"/%", 4).Update("path", newPath).Error; err != nil { + return err + } + } + } + return nil +} + +func MoveFileToTrashV2(userId proto.UserIdType, deleteIds []string, subDeleteIds []string, count int, task *async.AsyncTask) (proto.CodeType, error) { + tx := db.Begin() + + transactionId := time.Now().Unix() + + // 回收站有同名文件处理 + if err := ProcessSameFileInTrash(tx, userId, deleteIds); err != nil { + return 0, err + } + // 先把传入的文件uuid 删除 + err := tx.Model(&proto.FileInfo{}). + Where(ScopeUser(userId), ScopeUuids(deleteIds)). + Updates(map[string]interface{}{"trashed": proto.TrashStatusLogicDeleted, "transaction_id": transactionId, "operation_time": time.Now().UnixNano() / 1e6}).Error + + logdb.LogD().Msg(fmt.Sprintf("process delete %d files", count)) + if count > env.ASYNC_TASK_THRESHOLD && len(subDeleteIds) > 20 { + + batchSize := len(subDeleteIds) / 20 + batches := (len(subDeleteIds) + batchSize - 1) / batchSize + // 处理文件夹下的子文件 + go func() { + + task.UpdateStatus(async.AsyncTaskStatusProcessing) + for i := 1; i <= batches; i++ { + start := (i - 1) * batchSize + end := i * batchSize + + if end > len(subDeleteIds) { + end = len(subDeleteIds) + } + + logdb.LogD().Int("start", start).Int("end", end).Msg("async processing delete") + + err = DeleteSubFilesBackend(tx, userId, subDeleteIds[start:end], transactionId) + if err != nil { + task.UpdateStatus(async.AsyncTaskStatusFailed) + //fmt.Println(err) + logdb.LogD().Err(err).Msg("DeleteSubFilesBackend error") + tx.Rollback() + return + } + + task.Processed = end + + } + + tx.Commit() + task.UpdateStatus(async.AsyncTaskStatusSuccess) + + }() + + return proto.CodeCreateAsyncTaskSuccess, nil + } else { + err = DeleteSubFilesBackend(tx, userId, subDeleteIds, transactionId) + if err != nil { + //fmt.Println(err) + logdb.LogD().Err(err).Msg("DeleteSubFilesBackend error") + tx.Rollback() + return 0, err + } + + return proto.CodeOk, tx.Commit().Error + } +} + +func DeleteSubFilesBackend(tx *gorm.DB, userId proto.UserIdType, deleteIds []string, transactionId int64) error { + //defer tx.Rollback() + //var subQuery proto.FileInfo + if len(deleteIds) == 0 { + return nil + } + + if err := tx.Model(&proto.FileInfo{}).Where(ScopeUuids(deleteIds), ScopeUser(userId)). + Updates(map[string]interface{}{"trashed": proto.TrashStatusSubFilesLogicDeleted, "transaction_id": transactionId, "operation_time": time.Now().UnixNano() / 1e6}).Error; err != nil { + return err + } + + return nil +} + +// MoveFileToTrash 移动文件到回收站 +func MoveFileToTrash(userId proto.UserIdType, deleteId string) (affect int, err error) { + tx := db.Begin() + //fmt.Println(id) + // 如果回收站中已存在同名文件则对该文件改名 + var subQuery proto.FileInfo + var subUuids []string + var res *gorm.DB + tx.Model(&proto.FileInfo{}).Where("user_id = ? AND uuid = ?", userId, deleteId).First(&subQuery) + + if _, err := GetInfoByPath(userId, subQuery.Path, subQuery.Name, 1); err == nil { + // 回收站同名文件改名 + tx.Model(&proto.FileInfo{}).Where("user_id = ? AND path = ? AND name = ? AND trashed = ?", userId, subQuery.Path, subQuery.Name, 1).Update("name", subQuery.Name+time.Now().Format("2006-01-02 15:04:05")) + tx.Model(&proto.FileInfo{}).Where("user_id = ? AND path LIKE ? AND trashed = ?", userId, subQuery.Path+subQuery.Name+"/%", 4).Update("path", subQuery.Path+subQuery.Name+time.Now().Format("2006-01-02 15:04:05")+"/") + // 再删除 + if subQuery.IsDir { + var deleteFolder proto.FileInfo + err = tx.Debug().Model(&proto.FileInfo{}).Where("user_id = ? AND uuid =?", userId, deleteId).Updates(map[string]interface{}{"trashed": proto.TrashStatusLogicDeleted, "transaction_id": time.Now().Unix(), "operation_time": time.Now().UnixNano() / 1e6}).Error + if err != nil { + return 0, err + } + tx.Debug().Model(&proto.FileInfo{}).Where("user_id = ? AND uuid =?", userId, deleteId).First(&deleteFolder) + res = tx.Debug().Model(&proto.FileInfo{}).Where("user_id = ? AND path LIKE ? AND trashed = 0", userId, subQuery.Path+subQuery.Name+"/%").Updates(map[string]interface{}{"trashed": proto.TrashStatusSubFilesLogicDeleted, "transaction_id": deleteFolder.TransactionId, "operation_time": time.Now().UnixNano() / 1e6}) + tx.Model(&proto.FileInfo{}).Select("uuid").Where("user_id = ? AND path LIKE ? AND category IN (?,?) AND trashed = 4", userId, subQuery.Path+subQuery.Name+"/%", "video", "picture").Find(&subUuids) + + affect = int(res.RowsAffected + 1) + } else { + + res = tx.Model(&proto.FileInfo{}).Where("user_id = ? AND uuid = ?", userId, deleteId).Updates(map[string]interface{}{"trashed": 1, "transaction_id": time.Now().Unix(), "operation_time": time.Now().UnixNano() / 1e6}) + affect = 1 + } + + err = res.Error + + } else { + if subQuery.IsDir { + var deleteFolder proto.FileInfo + err := tx.Debug().Model(&proto.FileInfo{}).Where("user_id = ? AND uuid =?", userId, deleteId).Updates(map[string]interface{}{"trashed": proto.TrashStatusLogicDeleted, "transaction_id": time.Now().Unix(), "operation_time": time.Now().UnixNano() / 1e6}).Error + if err != nil { + return 0, err + } + tx.Debug().Model(&proto.FileInfo{}).Where("user_id = ? AND uuid =?", userId, deleteId).First(&deleteFolder) + res = tx.Debug().Model(&proto.FileInfo{}).Where("path LIKE ? AND user_id = ? AND trashed = 0", subQuery.Path+subQuery.Name+"/%", userId).Updates(map[string]interface{}{"trashed": proto.TrashStatusSubFilesLogicDeleted, "transaction_id": deleteFolder.TransactionId, "operation_time": time.Now().UnixNano() / 1e6}) + tx.Model(&proto.FileInfo{}).Select("uuid").Where("user_id = ? AND path LIKE ? AND category IN (?,?) AND trashed = 4", userId, subQuery.Path+subQuery.Name+"/%", "video", "picture").Find(&subUuids) + + affect = int(res.RowsAffected + 1) + } else { + + res = tx.Model(&proto.FileInfo{}).Where("user_id = ? AND uuid =?", userId, deleteId).Updates(map[string]interface{}{"trashed": 1, "transaction_id": time.Now().Unix(), "operation_time": time.Now().UnixNano() / 1e6}) + affect = 1 + } + } + + if err != nil { + tx.Rollback() + return 0, err + } else { + tx.Commit() + return affect, nil + } + +} + +// 删除回收站文件或目录, 1-》2 & 4->2 +func RecycledFromLogicToPhy(userId proto.UserIdType, uuids []string) (affect int, err error) { + + affect = 0 + err = nil + if len(uuids) == 0 { + //清空回收站 + var files []string + //var duplicates []string + // totalPath 唯一性约束冲突,更新trashed字段为3 + db.Debug().Model(&proto.FileInfo{}).Where("trashed = ? AND is_dir = ?", proto.TrashStatusLogicDeleted, false). + Select("betag").Scan(&files) + + for _, file := range files { + db.Debug().Model(&proto.FileInfo{}).Where("trashed = ? AND is_dir = ? AND betag = ?", proto.TrashStatusSubFilesLogicDeleted, false, file). + Update("trashed", proto.TrashStatusPhyDelException) + } + res := db.Debug().Model(&proto.FileInfo{}). + Where("trashed in (?) ", []uint32{proto.TrashStatusLogicDeleted, proto.TrashStatusSubFilesLogicDeleted}). + Clauses(clause.OnConflict{OnConstraint: "totalPath", + DoUpdates: clause.Assignments(map[string]interface{}{"trashed": 3})}). + Update("trashed", proto.TrashStatusPhyDeleted) + + affect += int(res.RowsAffected) + err = res.Error + } else { + var fi *proto.FileInfo + for _, uuid := range uuids { + if fi, err = GetFileInfoWithUid(userId, uuid); err != nil { + break + } else { + logdb.LogI().Msg(fmt.Sprintf("recycled fileinfo: %v", fi)) + //log.Println("recycled fi:", fi) + //状态不对,或没有 transid + if (fi.Trashed != proto.TrashStatusLogicDeleted && fi.Trashed != proto.TrashStatusSubFilesLogicDeleted) || fi.TransactionId <= 0 { + logdb.LogE().Msg("param invalid") + err = fmt.Errorf("param invalid") + break + } + var res *gorm.DB + //根据操作事务id清理之 + if fi.IsDir == false { + res = db.Debug().Model(&proto.FileInfo{}).Where("transaction_id = ? AND uuid = ?", fi.TransactionId, fi.Id).Update("trashed", proto.TrashStatusPhyDeleted) + + } else { + path := fi.AbsPath() + db.Model(&proto.FileInfo{}).Where("transaction_id = ? AND uuid = ?", fi.TransactionId, fi.Id).Update("trashed", proto.TrashStatusPhyDeleted) + res = db.Model(&proto.FileInfo{}).Where("transaction_id = ? AND path LIKE ?", fi.TransactionId, path+"%").Update("trashed", proto.TrashStatusPhyDeleted) + } + + affect += int(res.RowsAffected) + err = res.Error + if err != nil { + break + } + + } + } + } + + return affect, nil +} + +func RecycledFromPhyToException(uuid string) (affect int, err error) { + + //将记录标记为清理异常 + res := db.Model(&proto.FileInfo{}).Where("uuid = ?", uuid).Update("trashed", proto.TrashStatusPhyDelException) + affect = int(res.RowsAffected) + err = res.Error + + return +} + +func DeleteByUuid(uuid string) (affect int64, err error) { + + tx := db.Delete(&proto.FileInfo{}, "uuid = ?", uuid) + affect = tx.RowsAffected + err = tx.Error + return +} + +func DeleteUser(userId proto.UserIdType) error { + //var userFiles []proto.FileInfo + + tx := db.Begin() + + err := tx.Model(&proto.FileInfo{}).Where("user_id = ? AND trashed IN (?,?,?) ", userId, + proto.TrashStatusNormal, proto.TrashStatusLogicDeleted, proto.TrashStatusSubFilesLogicDeleted). + Updates(map[string]interface{}{"trashed": proto.TrashStatusPhyDeleted, "transaction_id": time.Now().Unix()}).Error + if err != nil { + tx.Rollback() + return err + } + + tx.Commit() + return nil +} + +func PhyDeleteByUuid(userId uint8, uuid string) error { + err := db.Model(&proto.FileInfo{}).Where("user_id = ? AND uuid = ? ", userId, uuid). + Updates(map[string]interface{}{"trashed": proto.TrashStatusPhyDeleted, "transaction_id": time.Now().Unix()}).Error + if err != nil { + return err + } + return nil +} diff --git a/repository/dbutils/get.go b/repository/dbutils/get.go new file mode 100644 index 0000000..a29e387 --- /dev/null +++ b/repository/dbutils/get.go @@ -0,0 +1,115 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package dbutils + +import ( + "aofs/internal/proto" +) + +func GetFileInfoWithUid(userId proto.UserIdType, uuid string) (*proto.FileInfo, error) { + var file proto.FileInfo + value := db.First(&file, "user_id=? AND uuid = ?", userId, uuid) + if value.Error != nil { + return nil, value.Error + } + return &file, nil +} + +func GetFileInfoForTrends(userId proto.UserIdType, uuid string) (*proto.FileInfoForTrends, error) { + var file proto.FileInfoForTrends + value := db.First(&file, "user_id= ? AND uuid = ?", userId, uuid) + db.Debug().Model(&proto.FileInfo{}). + Select("\"aofs_file_infos\".*, e.duration"). + Joins("left join t_photo_exif e on \"aofs_file_infos\".uuid = e.uuid "). + Where("\"aofs_file_infos\".user_id = ? AND \"aofs_file_infos\".uuid = ?", userId, uuid). + Scan(&file) + + if value.Error != nil { + return nil, value.Error + } + return &file, nil +} + +func GetFileInfosForTrends(userId proto.UserIdType, uuids []string) ([]proto.FileInfoForTrends, error) { + var file []proto.FileInfoForTrends + //value := db.First(&file, "user_id= ? AND uuid = ?", userId, uuid) + res := db.Model(&proto.FileInfo{}). + Select("\"aofs_file_infos\".*, e.duration"). + Joins("left join t_photo_exif e on \"aofs_file_infos\".uuid = e.uuid "). + Where("\"aofs_file_infos\".user_id = ? AND \"aofs_file_infos\".uuid IN (?)", userId, uuids). + Scan(&file) + + if res.Error != nil { + return nil, res.Error + } + return file, nil +} + +func GetAbsPath(userId proto.UserIdType, folderId string) (string, error) { + var folderInfo proto.FileInfo + if len(folderId) != 0 { + fi := db.Model(&proto.FileInfo{}).Where("user_id = ? AND uuid = ? AND trashed = ?", userId, folderId, 0).First(&folderInfo) + if fi.Error != nil { + return "", fi.Error + } + } else { + return "/", nil + } + return folderInfo.AbsPath(), nil +} + + +func GetFilesInUuids(userId proto.UserIdType, uuids []string) (files []string, err error) { + condition := map[string]interface{}{} + condition["uuid"] = uuids + condition["is_dir"] = false + condition["user_id"] = userId + err = db.Model(&proto.FileInfo{}).Where(condition).Select("uuid").Scan(&files).Error + if err != nil { + return nil, err + } + return files, nil +} + +func GetSubFilesInUuids(userId proto.UserIdType, uuids []string, trashed []uint32) (allSubFiles []string, err error) { + var dirs []string + var subFiles []string + condition := map[string]interface{}{} + condition["uuid"] = uuids + condition["is_dir"] = true + condition["user_id"] = userId + // 找到 dir 的 uuids + err = db.Model(&proto.FileInfo{}).Where(condition).Select("uuid").Scan(&dirs).Error + if err != nil { + return nil, err + } + if len(dirs) == 0 { + return nil, nil + } + // 根据dir uuid 找到所有目录下 文件的uuid + for _, dir := range dirs { + fi, err := GetInfoByUuid(dir) + if err == nil { + path := fi.AbsPath() + err = db.Debug().Model(&proto.FileInfo{}).Where("user_id = ? AND path LIKE ? AND trashed IN (?)", userId, path+"%", trashed).Select("uuid").Scan(&subFiles).Error + if err != nil { + return nil, err + } + allSubFiles = append(allSubFiles, subFiles...) + } + } + logdb.LogD().Interface("subUuids", allSubFiles).Msg("print sub uuids") + return allSubFiles, nil +} diff --git a/repository/dbutils/init.go b/repository/dbutils/init.go new file mode 100644 index 0000000..8a517cc --- /dev/null +++ b/repository/dbutils/init.go @@ -0,0 +1,255 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package dbutils + +import ( + "aofs/internal/env" + "aofs/internal/log4bp" + "aofs/internal/proto" + "database/sql" + "fmt" + "log" + "os" + "time" + + "github.com/gin-gonic/gin" + "github.com/google/uuid" + _ "github.com/lib/pq" + "gorm.io/driver/postgres" + "gorm.io/gorm" + "gorm.io/gorm/logger" +) + +var db *gorm.DB +var db2 *gorm.DB +var geodb *sql.DB +var logdb = log4bp.New("", gin.Mode()) + +func SetMockDb(mockdb *gorm.DB) { + db = mockdb +} + +type DBConfig struct { + Host string + Port int + User string + Password string + DBName string + Config *gorm.Config +} + +func GormLogger() *logger.Interface { + newLogger := logger.New( + log.New(os.Stdout, "\r\n", log.LstdFlags), // io writer(日志输出的目标,前缀和日志包含的内容) + logger.Config{ + SlowThreshold: time.Millisecond * 200, // 慢 SQL 阈值 + LogLevel: logger.Error, // 日志级别 + IgnoreRecordNotFoundError: true, // 忽略ErrRecordNotFound(记录未找到)错误 + Colorful: false, // 禁用彩色打印 + }, + ) + return &newLogger +} + +func FileSchemaConn(conf *DBConfig) *gorm.DB { + connArgs := fmt.Sprintf("host=%s port=%d user=%s "+ + "password=%s dbname=%s sslmode=disable", conf.Host, conf.Port, conf.User, conf.Password, conf.DBName) + db, err := gorm.Open(postgres.Open(connArgs), conf.Config) + if err != nil { + return nil + } + sqlDB, _ := db.DB() + sqlDB.SetMaxIdleConns(5) + sqlDB.SetMaxOpenConns(50) + sqlDB.SetConnMaxIdleTime(time.Hour) + return db +} + +func AccountSchemaConn(conf *DBConfig) *gorm.DB { + connArgs := fmt.Sprintf("host=%s port=%d user=%s "+ + "password=%s dbname=%s sslmode=disable", conf.Host, conf.Port, conf.User, conf.Password, conf.DBName) + db2, err := gorm.Open(postgres.Open(connArgs), conf.Config) + if err != nil { + return nil + } + return db2 +} + + +func CreateTable(table interface{}) { + err := db.AutoMigrate(table) + if err != nil { + logdb.LogF().Err(err).Msg("failed to create table") + panic(any(err)) + } +} + +func Init() { + createTables() +} + +func InitUser(userId proto.UserIdType) { + + folderRoot := proto.FileInfo{ + FileInfoPub: proto.FileInfoPub{ + Id: uuid.NewString(), + IsDir: true, + Name: "/", + Path: "", + BETag: "", + CreateTime: time.Now().UnixNano() / 1e6, + ModifyTime: time.Now().UnixNano() / 1e6, + OperationTime: time.Now().UnixNano() / 1e6, + Size: 0, + FileCount: 1, + Category: "", + Mime: "", + }, + + UserId: userId, + + Tags: "", + + Executable: false, + Version: 1, + BucketName: "eulixspace-files", + TransactionId: 0, + } + folderDocuments := proto.FileInfo{ + FileInfoPub: proto.FileInfoPub{ + Id: uuid.NewString(), + IsDir: true, + Name: "文档", + Path: "/", + BETag: "", + CreateTime: time.Now().UnixNano() / 1e6, + ModifyTime: time.Now().UnixNano() / 1e6, + OperationTime: time.Now().UnixNano() / 1e6, + Size: 0, + Category: "", + Mime: "", + }, + + UserId: userId, + Tags: "", + + Executable: false, + + Version: 1, + BucketName: "eulixspace-files", + TransactionId: 0, + } + folderVideos := proto.FileInfo{ + FileInfoPub: proto.FileInfoPub{ + Id: uuid.NewString(), + IsDir: true, + Name: "视频", + Path: "/", + BETag: "", + CreateTime: time.Now().UnixNano() / 1e6, + ModifyTime: time.Now().UnixNano() / 1e6, + OperationTime: time.Now().UnixNano() / 1e6, + Size: 0, + Category: "", + Mime: "", + }, + + UserId: userId, + Tags: "", + Executable: false, + Version: 1, + BucketName: "eulixspace-files", + TransactionId: 0, + } + folderPhotos := proto.FileInfo{ + FileInfoPub: proto.FileInfoPub{ + Id: uuid.NewString(), + IsDir: true, + Name: "图片", + Path: "/", + BETag: "", + CreateTime: time.Now().UnixNano() / 1e6, + ModifyTime: time.Now().UnixNano() / 1e6, + OperationTime: time.Now().UnixNano() / 1e6, + Size: 0, + Category: "", + Mime: "", + }, + + UserId: userId, + + Tags: "", + + Executable: false, + + Version: 1, + BucketName: "eulixspace-files", + TransactionId: 0, + } + + VerifyInit(userId, folderRoot.Name, folderRoot.Path, folderRoot) + VerifyInit(userId, folderDocuments.Name, folderDocuments.Path, folderDocuments) + VerifyInit(userId, folderVideos.Name, folderVideos.Path, folderVideos) + VerifyInit(userId, folderPhotos.Name, folderPhotos.Path, folderPhotos) + +} + +func VerifyInit(uid proto.UserIdType, name string, path string, info proto.FileInfo) { + + rows := db.Where("name = ? AND path = ? AND user_id = ?", name, path, uid).First(&proto.FileInfo{}) + if rows.RowsAffected != 1 { + db.Create(&info) + } +} + + +func GetFileDB() *gorm.DB { + return db +} + +func GetAccountDB() *gorm.DB { + return db2 +} +func createTables() { + fileConnConfig := &DBConfig{ + Host: env.SQL_HOST, + Port: env.SQL_PORT, + User: env.SQL_USER, + Password: env.SQL_PASSWORD, + DBName: env.SQL_DATABASE, + Config: &gorm.Config{Logger: *GormLogger(), PrepareStmt: true}, + } + + accountConnConfig := &DBConfig{ + Host: env.SQL_HOST, + Port: env.SQL_PORT, + User: env.SQL_USER, + Password: env.SQL_PASSWORD, + DBName: "account", + Config: &gorm.Config{Logger: *GormLogger(), PrepareStmt: true}, + } + + db = FileSchemaConn(fileConnConfig) + db2 = AccountSchemaConn(accountConnConfig) + geodb, _ = db.DB() + + // 建表 + logdb.LogI().Msg(fmt.Sprintf("Connected Database:%v:%d/%v", env.SQL_HOST, env.SQL_PORT, env.SQL_DATABASE)) + CreateTable(proto.Setting{}) + CreateTable(proto.BETagInfo{}) + CreateTable(proto.FileInfo{}) + CreateTable(proto.SyncInfo{}) + +} diff --git a/repository/dbutils/modify.go b/repository/dbutils/modify.go new file mode 100644 index 0000000..ad969c9 --- /dev/null +++ b/repository/dbutils/modify.go @@ -0,0 +1,84 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package dbutils + +import ( + "aofs/internal/proto" + "fmt" + "time" +) + +// RenameFiles 修改文件 ,文件夹名,合并 +func RenameFiles(userId proto.UserIdType, uuid string, name string) (affect int64, err error) { + + tx := db.Begin() + var FileOrDir proto.FileInfo + tx.Model(&FileOrDir).Where("user_id = ? AND uuid = ? AND trashed = ?", userId, uuid, 0).First(&FileOrDir) + if !FileOrDir.IsDir { + res := tx.Model(&proto.FileInfo{}).Where("user_id = ? AND uuid = ? AND trashed = ?", userId, uuid, 0).Updates(map[string]interface{}{"name": name, "operation_time": time.Now().UnixNano() / 1e6}) + affect = res.RowsAffected + err = res.Error + } else { + // 获取原始路径path + var parentPath proto.FileInfo + tx.Model(&proto.FileInfo{}).Where("user_id = ? AND uuid = ? AND trashed = ?", userId, uuid, 0).First(&parentPath) + originPath := parentPath.Path + parentPath.Name + "/" + if len(originPath) != 0 { + // 更新文件夹名name + res := tx.Model(&proto.FileInfo{}).Where("user_id = ? AND uuid = ? AND trashed = ?", userId, uuid, 0).Updates(map[string]interface{}{"name": name, "operation_time": time.Now().UnixNano() / 1e6}) + if res.Error != nil { + return 0, err + } else { + affect += 1 + } + } + // 拼接sql + sql := fmt.Sprintf("UPDATE \"aofs_file_infos\" SET path = replace(path,'%s','%s') where user_id=%d AND trashed = 0 AND path like '%s'", originPath, parentPath.Path+name+"/", userId, originPath+"%") + fmt.Println(sql) + //更新该文件夹下所有文件的path + isSubFileExist := tx.Model(&proto.FileInfo{}).Where("user_id = ? AND path = ? AND trashed = ?", userId, originPath, 0).First(&proto.FileInfo{}) + + + if isSubFileExist.RowsAffected != 0 { + res := tx.Exec(sql) + affect = res.RowsAffected + 1 + err = res.Error + } + } + + if err != nil { + tx.Rollback() + return 0, err + } else { + tx.Commit() + return affect, nil + } + +} + + +func UpdateOperationTime(uuid string) error { + err := db.Model(&proto.FileInfo{}).Where("uuid = ?", uuid).Update("operation_time", time.Now().UnixNano()/1e6).Error + return err +} + + +func UpdateFileInfoExt(charset []byte, uuid string) error { + err := db.Model(&proto.FileInfo{}).Where("uuid = ? ", uuid).Update("ext", charset).Error + if err != nil { + return err + } + return nil +} diff --git a/repository/dbutils/move.go b/repository/dbutils/move.go new file mode 100644 index 0000000..400ff76 --- /dev/null +++ b/repository/dbutils/move.go @@ -0,0 +1,114 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package dbutils + +import ( + "aofs/internal/proto" + "errors" + "fmt" + "strings" + "time" +) + +// MoveFiles 移动文件(夹) +func MoveFiles(userId proto.UserIdType, moveId string, destPathId string) (affect int, err error) { + tx := db.Begin() + var fileOrDir proto.FileInfo + //var dstPath proto.FileInfo + var oriPath proto.FileInfo + var destPath string + var subUuids []string + tx.Model(&fileOrDir).Where("user_id = ? AND uuid = ? AND trashed = ?", userId, moveId, 0).First(&fileOrDir) + if !fileOrDir.IsDir { + + // 获取目的路径path + destPath, err = GetAbsPath(userId, destPathId) + if err != nil { + return 0, err + } + res := tx.Model(&proto.FileInfo{}).Where("user_id = ? AND uuid =? AND trashed = ?", userId, moveId, 0).Updates(map[string]interface{}{"parent_uuid": destPathId, "path": destPath, "operation_time": time.Now().UnixNano() / 1e6}) + + affect = int(res.RowsAffected) + err = res.Error + } else { + // 获取目的路径path + destPath, err = GetAbsPath(userId, destPathId) + if err != nil { + return 0, err + } + + destPathLen := len(strings.Split(destPath, "/")) + + ownChildFolderMaxLen, _ := GetSubDirMaxLayer(userId, moveId) + + if destPathLen+ownChildFolderMaxLen >= 20 { + return 0, errors.New("beyond 20 layers") + } + + // 获取原始路径path + tx.Model(&proto.FileInfo{}).Where("user_id = ? AND uuid = ? AND trashed = ?", userId, moveId, 0).First(&oriPath) + originPath := oriPath.Path + oriPath.Name + "/" + + err = tx.Model(&proto.FileInfo{}).Where("uuid = ? AND trashed = ?", moveId, 0).Updates(map[string]interface{}{"parent_uuid": destPathId, "path": destPath, "operation_time": time.Now().UnixNano() / 1e6}).Error + if err != nil { + return 0, err + } + // 拼接sql + sql := fmt.Sprintf("UPDATE \"aofs_file_infos\" SET path = replace(path,'%s','%s') where user_id = '%d' AND path like '%s'", originPath, destPath+oriPath.Name+"/", userId, originPath+"%") + tx.Model(&proto.FileInfo{}).Select("uuid").Where("user_id = ? AND path LIKE ? AND category IN (?,?)", userId, oriPath.Path+oriPath.Name+"/%", "picture", "video").Find(&subUuids) + + // 更新该目录下所有文件的path字段 + res := tx.Exec(sql) + + affect = int(res.RowsAffected + 1) + err = res.Error + } + + if err != nil { + tx.Rollback() + return 0, err + } else { + tx.Commit() + return affect, nil + } + +} + +// GetChildFolderMaxLayer 获取子文件夹层数 +func GetSubDirMaxLayer(userId proto.UserIdType, uuid string) (int, error) { + fi, err := GetInfoByUuid(uuid) + if err != nil { + return 0, err + } + if !fi.IsDir { + return 0, err + } + var subDirs []string + db.Model(&proto.FileInfo{}).Where("path LIKE ? AND is_idr = ?", fi.AbsPath()+"%", true).Select("uuid"). + Find(&subDirs) + maxLayer := 0 + for _, subDir := range subDirs { + subFi, err := GetInfoByUuid(subDir) + if err != nil { + continue + } + absPath := subFi.AbsPath() + layer := len(strings.Split(absPath, "/")) + if layer > maxLayer { + maxLayer = layer + } + } + return maxLayer, nil +} diff --git a/repository/dbutils/restore.go b/repository/dbutils/restore.go new file mode 100644 index 0000000..3cada3d --- /dev/null +++ b/repository/dbutils/restore.go @@ -0,0 +1,146 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package dbutils + +import ( + "aofs/internal/env" + "aofs/internal/proto" + "aofs/services/async" + "fmt" + "time" + + "gorm.io/gorm" +) + +func ProcessSameFile(tx *gorm.DB, userId proto.UserIdType, restoreIds []string) error { + + for _, restoreId := range restoreIds { + fi, _ := GetFileInfoWithUid(userId, restoreId) + if fi, _ := GetInfoByPath(userId, fi.Path, fi.Name, proto.TrashStatusNormal); fi != nil { + newName, err := GenIncNameByPath(userId, fi.Path, fi.Name, proto.TrashStatusNormal) + if err != nil { + return err + } + err = tx.Debug().Model(&proto.FileInfo{}).Where(ScopeUuid(restoreId), ScopeUser(userId)). + Update("name", newName).Error + + sql := fmt.Sprintf("UPDATE \"aofs_file_infos\" SET path = replace(path,'%s','%s') where user_id = '%d' AND path like '%s' AND trashed = '%d'", + fi.Name, newName, userId, fi.Path+fi.Name+"%", proto.TrashStatusSubFilesLogicDeleted) + err = tx.Debug().Exec(sql).Error + if err != nil { + tx.Rollback() + return err + } + } + } + + return nil +} + +func RestoreSubFiles(tx *gorm.DB, userId proto.UserIdType, subRestoreIds []string) error { + if err := tx.Model(&proto.FileInfo{}).Where(ScopeUuids(subRestoreIds), ScopeUser(userId)). + Updates(map[string]interface{}{"trashed": proto.TrashStatusNormal, + "transaction_id": 0, + "operation_time": time.Now().UnixNano() / 1e6}).Error; err != nil { + return err + } + + return nil +} + +// RestoreFilesFromTrashV2 重构V2版本的从回收站恢复,支持异步 +func RestoreFilesFromTrashV2(userId proto.UserIdType, restoreIds []string, subRestoreIds []string, count int, task *async.AsyncTask) (proto.CodeType, error) { + tx := db.Begin() + + // 恢复时遇到同名文件的处理 + if err := ProcessSameFile(tx, userId, restoreIds); err != nil { + logdb.LogE().Err(err).Msg("ProcessSameFile error") + return 0, err + } + // 先把传入的文件uuid恢复 + err := tx.Model(&proto.FileInfo{}).Where(ScopeUser(userId), ScopeUuids(restoreIds)). + Updates(map[string]interface{}{"trashed": proto.TrashStatusNormal, + "transaction_id": 0, + "operation_time": time.Now().UnixNano() / 1e6}).Error + + + for _, restoreId := range restoreIds { + // 恢复时父目录被删除的特殊场景,重建父目录 + fi, _ := GetFileInfoWithUid(userId, restoreId) + if row := db.Model(&proto.FileInfo{}).Where(ScopeUuid(fi.ParentUuid), ScopeNormalFile()).Find(&proto.FileInfo{}).RowsAffected; row == 0 { + pathInfo, err := RecursiveCreateFolder(userId, fi.Path) + if err != nil { + tx.Rollback() + logdb.LogE().Err(err).Msg("RecursiveCreateFolder error") + break + } + err = tx.Model(&proto.FileInfo{}).Where(ScopeUser(userId), ScopeUuid(restoreId)). + Update("parent_uuid", pathInfo.Id).Error + if err != nil { + tx.Rollback() + break + } + } + } + + if err != nil { + tx.Rollback() + return 0, err + } + if count > env.ASYNC_TASK_THRESHOLD && len(subRestoreIds) > 20 { + batchSize := len(subRestoreIds) / 20 + batches := (len(subRestoreIds) + batchSize - 1) / batchSize + // 处理文件夹下的子文件 + go func() { + task.UpdateStatus(async.AsyncTaskStatusProcessing) + for i := 1; i <= batches; i++ { + start := (i - 1) * batchSize + end := i * batchSize + //fmt.Println(start,end) + if end > len(subRestoreIds) { + end = len(subRestoreIds) + } + logdb.LogD().Int("start", start).Int("end", end).Msg("async processing restore") + logdb.LogD().Msg(fmt.Sprintf("print sub uuids :%v", subRestoreIds[start:end])) + err = RestoreSubFiles(tx, userId, subRestoreIds[start:end]) + if err != nil { + task.UpdateStatus(async.AsyncTaskStatusFailed) + //fmt.Println(err) + logdb.LogD().Err(err).Msg("RestoreSubFiles error") + tx.Rollback() + return + } + + task.Processed = end + //fmt.Println(task) + } + + tx.Commit() + task.UpdateStatus(async.AsyncTaskStatusSuccess) + + }() + return proto.CodeCreateAsyncTaskSuccess, nil + } else { + err = RestoreSubFiles(tx, userId, subRestoreIds) + if err != nil { + logdb.LogD().Err(err).Msg("RestoreSubFiles error") + tx.Rollback() + return 0, err + } + + tx.Commit() + return proto.CodeOk, nil + } +} diff --git a/repository/dbutils/search.go b/repository/dbutils/search.go new file mode 100644 index 0000000..03e3db2 --- /dev/null +++ b/repository/dbutils/search.go @@ -0,0 +1,480 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package dbutils + +import ( + "aofs/internal/proto" + "errors" + "fmt" + "path/filepath" + "strings" + + "gorm.io/gorm" +) + +// GetFileList 获取文件列表 +func GetFileList(userId proto.UserIdType, isDir bool, uuid string, page uint32, order string, category string, pageSize int) (fileinfo proto.FileInfoLst, err error) { + var subQuery []proto.FileInfo + //获取拼接完整目录路径 + if isDir == false { + if category == "" { + db.Model(&fileinfo).Where("uuid = ?", uuid).Scan(&subQuery) + //fmt.Printf("%#v\\n",path) + // 获取所有文件列 + + fileList := db.Model(&fileinfo).Limit(pageSize).Offset((int(page)-1)*pageSize). + Where("path = ? AND trashed = ? AND user_id = ?", subQuery[0].Path+subQuery[0].Name+"/", 0, userId).Order(order).Scan(&fileinfo) + err = fileList.Error + } else { + fileList := db.Model(&fileinfo).Limit(pageSize).Offset((int(page)-1)*pageSize). + Where("category = ? AND trashed = ? AND user_id = ?", category, 0, userId).Order(order).Scan(&fileinfo) + err = fileList.Error + } + } else { + if category == "" { + db.Model(&fileinfo).Where("uuid = ?", uuid).Scan(&subQuery) + //fmt.Printf("%#v\\n",path) + // 获取所有文件列 + + fileList := db.Model(&fileinfo).Limit(pageSize).Offset((int(page)-1)*pageSize). + Where("path = ? AND trashed = ? AND is_dir = true AND user_id = ?", subQuery[0].Path+subQuery[0].Name+"/", 0, userId).Order(order).Scan(&fileinfo) + err = fileList.Error + } else { + fileList := db.Model(&fileinfo).Limit(pageSize).Offset((int(page)-1)*pageSize). + Where("category = ? AND trashed = ? AND is_dir = true AND user_id = ?", category, 0, userId).Order(order).Scan(&fileinfo) + err = fileList.Error + } + } + + // println(res) + if err != nil { + return nil, err + } + return +} + +// GetRootList 不提供任何参数时,返回全部文件 +func GetRootList(userId proto.UserIdType, isDir bool, page uint32, order string, pageSize uint32) (fileinfo proto.FileInfoLst, err error) { + //pageSize := 10 + // 获取根目录下所有文件列表 + var fileList *gorm.DB + if isDir == false { + fileList = db.Model(&fileinfo).Limit(int(pageSize)).Offset((int(page)-1)*int(pageSize)).Where("path = ? AND trashed = ? AND user_id = ?", "/", 0, userId).Order(order).Scan(&fileinfo) + } else { + fileList = db.Model(&fileinfo).Limit(int(pageSize)).Offset((int(page)-1)*int(pageSize)).Where("path = ? AND trashed = ? AND is_dir = true AND user_id = ?", "/", 0, userId).Order(order).Scan(&fileinfo) + } + + err = fileList.Error + if err != nil { + return nil, err + } + return +} + +// SearchFileByName 根据文件名搜索文件 +func SearchFileByName(userId proto.UserIdType, currentDir string, name string, category string, order string, page uint32, pageSize uint32) (fileInfo proto.FileInfoLst, err error) { + var fileList *gorm.DB + var categories []string + if category != "" && strings.Contains(category, ",") { + categories = strings.Split(category, ",") + } + if currentDir == "" && category == "" { + //fileList = db.Model(&fileInfo).Limit(int(pageSize)).Offset((int(page)-1)*int(pageSize)).Where("name LIKE ? AND trashed = ? ", "%"+name+"%", 0).Order(order).Scan(&fileInfo) + sql := fmt.Sprintf("SELECT * FROM \"aofs_file_infos\" WHERE name ILIKE '%s' AND trashed = 0 AND user_id = '%d' ORDER BY (CASE\nWHEN name='%s' THEN 1\nWHEN name ILIKE '%s' THEN 2\nWHEN is_dir=true THEN 3\nWHEN name ILIKE '%s' THEN 4\nWHEN name ILIKE '%s' THEN 5\nWHEN name ILIKE '%s' THEN 6\nELSE 7\nEND) limit %d offset (%d-1)*%d ", "%"+"\\"+name+"%", userId, name, name+".%", name+"%", "%"+name+"%", "%"+name, pageSize, page, pageSize) + //fmt.Println(sql) + fileList = db.Raw(sql).Scan(&fileInfo) + } else if category == "" { + parentPath, folderName := GetPathByUuid(currentDir) + currentPath := parentPath + folderName + "/" + //fileList = db.Model(&fileInfo).Limit(int(pageSize)).Offset((int(page)-1)*int(pageSize)).Where("path = ? AND name LIKE ? trashed = ? ", currentPath, "%"+name+"%", 0).Order(order).Scan(&fileInfo) + sql := fmt.Sprintf("SELECT * FROM \"aofs_file_infos\" WHERE path='%s' AND name ILIKE '%s' AND trashed = 0 AND user_id = '%d' ORDER BY (CASE\nWHEN name='%s' THEN 1\nWHEN name ILIKE '%s' THEN 2\nWHEN is_dir=true THEN 3\nWHEN name ILIKE '%s' THEN 4\nWHEN name ILIKE '%s' THEN 5\nWHEN name ILIKE '%s' THEN 6\nELSE 7\nEND) limit %d offset (%d-1)*%d", currentPath, "%"+"\\"+name+"%", userId, name, name+".%", name+"%", "%"+name+"%", "%"+name, pageSize, page, pageSize) + fileList = db.Raw(sql).Scan(&fileInfo) + } else { + if len(categories) > 1 { + //fileList = db.Model(&fileInfo).Limit(int(pageSize)).Offset((int(page)-1)*int(pageSize)).Where("name LIKE ? AND trashed = ? AND category = ? ", "%"+name+"%", 0, category).Order(order).Scan(&fileInfo) + sql := fmt.Sprintf("SELECT * FROM \"aofs_file_infos\" WHERE category IN ('%s','%s') AND name ILIKE '%s' AND trashed = 0 AND user_id = '%d' ORDER BY (CASE\nWHEN name='%s' THEN 1\nWHEN name ILIKE '%s' THEN 2\nWHEN is_dir=true THEN 3\nWHEN name ILIKE '%s' THEN 4\nWHEN name ILIKE '%s' THEN 5\nWHEN name ILIKE '%s' THEN 6\nELSE 7\nEND) limit %d offset (%d-1)*%d", categories[0], categories[1], "%"+"\\"+name+"%", userId, name, name+".%", name+"%", "%"+name+"%", "%"+name, pageSize, page, pageSize) + fileList = db.Raw(sql).Scan(&fileInfo) + } else { + sql := fmt.Sprintf("SELECT * FROM \"aofs_file_infos\" WHERE category = '%s' AND name ILIKE '%s' AND trashed = 0 AND user_id = '%d' ORDER BY (CASE\nWHEN name='%s' THEN 1\nWHEN name ILIKE '%s' THEN 2\nWHEN is_dir=true THEN 3\nWHEN name ILIKE '%s' THEN 4\nWHEN name ILIKE '%s' THEN 5\nWHEN name ILIKE '%s' THEN 6\nELSE 7\nEND) limit %d offset (%d-1)*%d", category, "%"+"\\"+name+"%", userId, name, name+".%", name+"%", "%"+name+"%", "%"+name, pageSize, page, pageSize) + fileList = db.Raw(sql).Scan(&fileInfo) + } + + } + if fileList.Error != nil { + return nil, fileList.Error + } else { + return fileInfo, nil + } +} + +// FileIsExist 判断文件(夹)是否存在 +func FileIsExist(userId proto.UserIdType, uuid string, path string, name string) (affect int, err error) { + var subQuery proto.FileInfo + if uuid == "" { + if path != "" || name != "" { + res := db.Model(subQuery).Where("name = ? AND path = ? AND user_id = ? AND trashed = 0", name, path, userId).First(&subQuery) + if res.Error != nil { + return 0, err + } else { + return int(res.RowsAffected), nil + } + } else { + res := db.Model(subQuery).Where("name = ? AND path = ? AND user_id = ? AND trashed = 0", "/", "", userId).First(&subQuery) + if res.Error != nil { + return 0, err + } else { + return int(res.RowsAffected), nil + } + } + } else { + res := db.Model(subQuery).Where("uuid = ?", uuid).First(&subQuery) + if res.Error != nil { + return 0, res.Error + } else { + return int(res.RowsAffected), nil + } + } +} + +// FileIsExistByUuid 根据uuid判断文件是否存在 +func FileIsExistByUuid(uuid string) bool { + var fileInfo proto.FileInfo + err := db.Model(fileInfo).Where("uuid = ? AND trashed = ?", uuid, 0).First(&fileInfo).Error + if err != nil { + return false + } else { + return true + } +} + +// IsExistByPath 根据路径判断文件是否存在 +func IsExistByPath(userId proto.UserIdType, path string, name string) (bool, error) { + var subQuery proto.FileInfo + db := db.Model(subQuery).Where("user_id=? AND name = ? AND path = ? AND trashed IN (0,1)", userId, name, path).Scan(&subQuery) + if db.Error != nil { + return false, db.Error + } else { + return db.RowsAffected > 0, nil + } +} + +// GetInfoByPath 根据路径获取文件信息 +func GetInfoByPath(userId proto.UserIdType, path string, name string, trashed uint32) (*proto.FileInfo, error) { + var fileInfo proto.FileInfo + tx := db.Model(fileInfo).Where("user_id = ? AND name = ? AND path = ? AND trashed = ?", userId, name, path, trashed).First(&fileInfo) + if tx.Error == nil { + return &fileInfo, nil + } else { //if errors.Is(tx.Error, gorm.ErrRecordNotFound) { + return nil, tx.Error + } +} + +//GenIncNameByPath 根据规则获取新的递增文件名称 +func GenIncNameByPath(userId proto.UserIdType, path string, name string, trashed uint32) (string, error) { + + _, err := GetInfoByPath(userId, path, name, trashed) + if err == nil { + //按规则处理 + ext := filepath.Ext(name) + preName := name[:len(name)-len(ext)] + for i := 1; ; i++ { + newName := preName + fmt.Sprintf("(%d)", i) + ext + _, err = GetInfoByPath(userId, path, newName, trashed) + if err == nil { + continue + } else if errors.Is(err, gorm.ErrRecordNotFound) { + return newName, nil + } else { + return "", err + } + } + + } else { + if errors.Is(err, gorm.ErrRecordNotFound) { + return name, nil + } else { + return "", nil + } + } + +} + +func GetInfoByUuid(uuid string) (*proto.FileInfo, error) { + var fileInfo proto.FileInfo + db := db.Model(fileInfo).Where("uuid = ?", uuid).First(&fileInfo) + if db.Error != nil { + return nil, db.Error + } else if db.RowsAffected == 0 { + return nil, fmt.Errorf("record not exist") + } else { + return &fileInfo, nil + } +} + +func GetPathByUuid(uuid string) (string, string) { + var pathName proto.PathName + var fileList proto.FileInfo + if uuid == "" { + return "/", "" + } else { + db.Model(fileList).Select("path,name").Where("uuid = ?", uuid).First(&pathName) + } + //fmt.Printf("%v%v", pathName.Path, pathName.Name) + return pathName.Path, pathName.Name +} + +func GetRecycledList(userId proto.UserIdType, page uint32, order string, pageSize uint32) (fileList proto.FileInfoLst, err error) { + recycledList := db.Model(&fileList).Limit(int(pageSize)).Offset((int(page)-1)*int(pageSize)).Where("trashed = ? AND user_id = ?", 1, userId).Order("transaction_id DESC").Scan(&fileList) + err = recycledList.Error + if err != nil { + return nil, err + } + return +} + +func GetRecycledPhyDeletedList(page uint32, pageSize uint32) (fileList []proto.FileInfo, err error) { + recycledList := db.Model(&fileList).Limit(int(pageSize)).Offset((int(page)-1)*int(pageSize)).Where("trashed IN (?) ", []uint32{proto.TrashStatusPhyDeleted, proto.TrashStatusPhyDelException}).Scan(&fileList) + err = recycledList.Error + if err != nil { + return nil, err + } + return +} + +func GetSharedCntByBEtag(betag string) (affect int64, err error) { + var fi []proto.FileInfo + tx := db.Model(&fi).Where("betag = ?", betag).Scan(&fi) + return tx.RowsAffected, tx.Error +} + +func GetShareBEtagUuids(betag string) (uuids []string, err error) { + var fi []proto.FileInfo + err = db.Model(&fi).Select("uuid").Where("betag = ?", betag).Scan(&uuids).Error + if err != nil { + return nil, err + } + return uuids, nil +} + +func GetFolderInfoByUuid(uuid string) (folderInfo proto.FolderInfo, err error) { + res := db.Model(proto.FileInfo{}).Select("name,path,size,operation_time").Where("uuid = ?", uuid).First(&folderInfo) + err = res.Error + if err != nil { + return folderInfo, err + } else { + return folderInfo, nil + } + +} + +func GetAllFileInFolder(userId proto.UserIdType, uuid string) (uuids []string, err error) { + if folderInfo, err := GetFolderInfoByUuid(uuid); err != nil { + return nil, err + } else { + absPath := folderInfo.Path + folderInfo.FolderName + "/" + db.Model(&proto.FileInfo{}).Where("trashed = 0 AND user_id = ? AND path LIKE ?", userId, absPath+"%").Select("uuid").Scan(&uuids) + if len(uuids) > 0 { + return uuids, nil + } + return nil, err + } + +} + +func PageTotal(userId proto.UserIdType, uuid string, category string, pageSize uint32, trash bool) (uint32, int64, error) { + var total int64 + var pageNum uint32 + if uuid != "" { + var subQuery proto.FileInfo + db.Model(&subQuery).Where("uuid = ?", uuid).First(&subQuery) + parentPath := subQuery.Path + subQuery.Name + "/" + db.Model(&proto.FileInfo{}).Where("path = ? AND trashed = ? AND user_id = ?", parentPath, 0, userId).Count(&total) + } else if category != "" && strings.Contains(category, ",") { + categories := strings.Split(category, ",") + err := db.Model(&proto.FileInfo{}).Where("category IN (?,?) AND user_id = ? AND trashed = ?", categories[0], categories[1], userId, 0).Count(&total).Error + if err != nil { + return 0, 0, err + } + } else if category != "" { + err := db.Model(&proto.FileInfo{}).Where("category = ? AND user_id = ? AND trashed = ?", category, userId, 0).Count(&total).Error + if err != nil { + return 0, 0, err + } + } else if trash { + err := db.Model(&proto.FileInfo{}).Where("trashed = ? AND user_id = ?", 1, userId).Count(&total).Error + if err != nil { + return 0, 0, err + } + } else { + err := db.Model(&proto.FileInfo{}).Where("path = ? AND trashed = ? AND user_id = ?", "/", 0, userId).Count(&total).Error + if err != nil { + return 0, 0, err + } + } + pageNum = uint32(total) / pageSize + if uint32(total)%pageSize != 0 { + pageNum++ + } + return pageNum, total, nil + +} + +func SearchPageTotal(userId proto.UserIdType, currentDir string, name string, category string, order string, pageSize uint32) (uint32, int64, error) { + var total int64 + var pageNum uint32 + + if currentDir == "" && category == "" { + err := db.Model(&proto.FileInfo{}). + Where("name ILIKE ? AND trashed = ? AND user_id = ?", "%"+"\\"+name+"%", 0, userId). + Order(order).Count(&total).Error + if err != nil { + return 0, 0, err + } + } else if category == "" { + parentPath, folderName := GetPathByUuid(currentDir) + currentPath := parentPath + folderName + "/" + err := db.Model(&proto.FileInfo{}). + Where("path = ? AND name ILIKE ? AND trashed = ? AND user_id = ?", currentPath, "%"+"\\"+name+"%", 0, userId). + Order(order).Count(&total).Error + if err != nil { + return 0, 0, err + } + } else if category != "" && strings.Contains(category, ",") { + categories := strings.Split(category, ",") + err := db.Model(&proto.FileInfo{}). + Where("name ILIKE ? AND trashed = ? AND category IN (?,?) AND user_id = ?", "%"+"\\"+name+"%", 0, categories[0], categories[1], userId). + Order(order).Count(&total).Error + if err != nil { + return 0, 0, err + } + } else if category != "" { + err := db.Model(&proto.FileInfo{}). + Where("name ILIKE ? AND trashed = ? AND category = ? AND user_id = ?", "%"+"\\"+name+"%", 0, category, userId). + Order(order).Count(&total).Error + if err != nil { + return 0, 0, err + } + } + pageNum = uint32(total) / pageSize + if uint32(total)%pageSize != 0 { + pageNum++ + } + return pageNum, total, nil +} + +func SyncFolderIsExist(deviceId string, userId proto.UserIdType) bool { + var deviceInfo proto.SyncInfo + //var folderInfo proto.FolderInfo + if deviceId != "" { + rows := db.Model(&proto.SyncInfo{}).Where("device_id = ? AND user_id = ?", deviceId, userId).First(&deviceInfo).RowsAffected + if rows != 0 { + return true + } + } + return false +} + +func GetSyncFolderInfo(deviceId string, userId proto.UserIdType) (syncFolderInfo proto.SyncFolderRsp, err error) { + var info proto.SyncInfo + var fileInfo proto.FileInfo + err = db.Model(&proto.SyncInfo{}).Where("device_id = ? AND user_id = ?", deviceId, userId).First(&info).Error + if err == nil { + res := db.Model(proto.FileInfo{}).Where("uuid = ?", info.FolderId).First(&fileInfo) + err = res.Error + if err == nil && fileInfo.Trashed == 0 { + db.Model(proto.FileInfo{}).Select("uuid,name,path,user_id").Where("uuid = ?", info.FolderId).First(&syncFolderInfo) + return syncFolderInfo, nil + } else if fileInfo.Trashed != 0 { + return syncFolderInfo, errors.New("sync folder is deleted") + } + } + return +} + +func GetSyncedFiles(deviceId string, path string, timestamp uint64, userId proto.UserIdType) (fileInfo proto.FileInfoLst, err error) { + var folder proto.SyncInfo + var syncFolder proto.FileInfo + db.Model(&proto.SyncInfo{}).Where("device_id = ?", deviceId).First(&folder) + db.Model(&proto.FileInfo{}).Where("uuid = ?", folder.FolderId).First(&syncFolder) + if path == "" { + path = "/" + } + + if path != "" { + changedList := db.Model(&fileInfo).Where("operation_time > ? AND user_id = ? AND path LIKE ?", timestamp, userId, path+"%").Scan(&fileInfo) + if changedList.Error != nil { + return nil, changedList.Error + } else { + return fileInfo, nil + } + } + return nil, err +} + +func GetUsedSpaceByUser(userId proto.UserIdType) (storage int64, err error) { + + err = db.Raw(fmt.Sprintf("select sum(size) from (select distinct(betag),size from \"aofs_file_infos\" "+ + "where is_dir = false AND user_id = %d AND trashed in (%d,%d,%d)) as subQuery ", + userId, proto.TrashStatusNormal, proto.TrashStatusLogicDeleted, + proto.TrashStatusSubFilesLogicDeleted)).Pluck("subQuery", &storage).Error + if err != nil { + return 0, err + } else { + return storage, nil + } +} + +//func GetBackupStatusByBoxId(boxId string) (status uint8,err error) { +//} + +func GetAllFileInfo() (fileInfo []proto.FileInfo, err error) { + err = db.Model(&proto.FileInfo{}).Where("trashed in (0,1) ").Scan(&fileInfo).Error + if err != nil { + return nil, err + } else { + return fileInfo, nil + } + +} + +func GetAllFileInfoByUserId(userId uint8) (fileInfo []proto.FileInfo, err error) { + err = db.Model(&proto.FileInfo{}).Where("trashed in (0,1,4) AND user_id = ? ", userId).Scan(&fileInfo).Error + if err != nil { + return nil, err + } else { + return fileInfo, nil + } + +} + +func GetAllFileInfoByUserAndTime(userId proto.UserIdType, timestamp int64) (fileInfo []proto.FileInfo, err error) { + err = db.Model(&proto.FileInfo{}).Where("trashed in (0,1,4) AND user_id = ? AND operation_time < ?", userId, timestamp).Scan(&fileInfo).Error + if err != nil { + return nil, err + } else { + return fileInfo, nil + } + +} + +func GetTxtFileInfo() (fileInfo []proto.FileInfo, err error) { + err = db.Model(&proto.FileInfo{}).Where("mime = ? or mime = ?", "text/plain", "text/html").Scan(&fileInfo).Error + if err != nil { + return nil, err + } else { + return fileInfo, nil + } +} + diff --git a/repository/dbutils/trans.go b/repository/dbutils/trans.go new file mode 100644 index 0000000..fe808fc --- /dev/null +++ b/repository/dbutils/trans.go @@ -0,0 +1,284 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package dbutils + +import ( + "aofs/internal/proto" + "errors" + "fmt" + "path/filepath" + "time" + + "gorm.io/gorm" +) + +//此文件定义数据事务使用接口 +type ITranser interface { + Finish(err error) error //结束或回滚事务 + TryRollback() error + Commit() error + + Err() error //获取错误 + MoveFileToTrash(userId proto.UserIdType, deleteId string) (affect int, err error) + GetInfoByPath(userId proto.UserIdType, path string, name string, trashed uint32) (*proto.FileInfo, error) + GenIncNameByPath(userId proto.UserIdType, path string, name string, trashed uint32) (string, error) + AddFileV2(info proto.FileInfo, uuid string) (err error) + GetSetting(key string) (string, error) + SetSetting(key string, value string) error +} + +type TransProducter interface { + New() (ITranser, error) +} + +type transProduct struct { +} + +func (transProduct) New() (ITranser, error) { + tr := &trans{} + tr.tx = db.Begin() + if tr.tx.Error != nil { + return nil, tr.tx.Error + } + return tr, nil +} + +func newTrans() (*trans, error) { + tr := &trans{} + tr.tx = db.Begin() + if tr.tx.Error != nil { + return nil, tr.tx.Error + } + return tr, nil +} + +func NewTransProducter() TransProducter { + return transProduct{} +} + +type trans struct { + tx *gorm.DB + isOver bool +} + +func (tr *trans) Err() error { + return tr.tx.Error +} + +// 收尾 +func (tr *trans) Finish(err error) error { + if tr.isOver { + return nil + } + + if tr.Err() != nil || err != nil { + tr.tx.Rollback() + return nil + } else { + return tr.tx.Commit().Error + } +} + +func (tr *trans) TryRollback() error { + if tr.isOver { + return nil + } + tr.isOver = true + return tr.tx.Rollback().Error +} + +func (tr *trans) Commit() error { + if tr.isOver { + return fmt.Errorf("trans is over") + } + tr.isOver = true + return tr.tx.Commit().Error +} + +func (tr *trans) MoveFileToTrash(userId proto.UserIdType, deleteId string) (affect int, err error) { + + //fmt.Println(id) + // 如果回收站中已存在同名文件则对该文件改名 + var subQuery proto.FileInfo + var subUuids []string + var res *gorm.DB + tr.tx.Model(&proto.FileInfo{}).Where("user_id = ? AND uuid = ?", userId, deleteId).First(&subQuery) + if _, err := tr.GetInfoByPath(userId, subQuery.Path, subQuery.Name, 1); err == nil { + // 回收站同名文件改名 + tr.tx.Model(&proto.FileInfo{}).Where("user_id = ? AND path = ? AND name = ? AND trashed = ?", userId, subQuery.Path, subQuery.Name, 1).Update("name", subQuery.Name+time.Now().Format("2006-01-02 15:04:05")) + tr.tx.Model(&proto.FileInfo{}).Where("user_id = ? AND path LIKE ? AND trashed = ?", userId, subQuery.Path+subQuery.Name+"/%", 4).Update("path", subQuery.Path+subQuery.Name+time.Now().Format("2006-01-02 15:04:05")+"/") + // 再删除 + if subQuery.IsDir { + var deleteFolder proto.FileInfo + tr.tx.Model(&proto.FileInfo{}).Where("user_id = ? AND uuid =?", userId, deleteId).Updates(map[string]interface{}{"trashed": proto.TrashStatusLogicDeleted, "transaction_id": time.Now().Unix(), "operation_time": time.Now().UnixNano() / 1e6}) + tr.tx.Model(&proto.FileInfo{}).Where("user_id = ? AND uuid =?", userId, deleteId).First(&deleteFolder) + res = tr.tx.Model(&proto.FileInfo{}).Where("user_id = ? AND path LIKE ?", userId, subQuery.Path+subQuery.Name+"/%").Updates(map[string]interface{}{"trashed": proto.TrashStatusSubFilesLogicDeleted, "transaction_id": deleteFolder.TransactionId, "operation_time": time.Now().UnixNano() / 1e6}) + tr.tx.Model(&proto.FileInfo{}).Select("uuid").Where("user_id = ? AND path LIKE ? AND category IN (?,?)", userId, subQuery.Path+subQuery.Name+"/%", "video", "picture").Find(&subUuids) + affect = int(res.RowsAffected + 1) + } else { + + res = tr.tx.Model(&proto.FileInfo{}).Where("user_id = ? AND uuid = ?", userId, deleteId).Updates(map[string]interface{}{"trashed": 1, "transaction_id": time.Now().Unix(), "operation_time": time.Now().UnixNano() / 1e6}) + affect = 1 + } + + err = res.Error + + } else { + if subQuery.IsDir { + var deleteFolder proto.FileInfo + tr.tx.Model(&proto.FileInfo{}).Where("user_id = ? AND uuid =?", userId, deleteId).Updates(map[string]interface{}{"trashed": proto.TrashStatusLogicDeleted, "transaction_id": time.Now().Unix(), "operation_time": time.Now().UnixNano() / 1e6}) + tr.tx.Model(&proto.FileInfo{}).Where("user_id = ? AND uuid =?", userId, deleteId).First(&deleteFolder) + res = tr.tx.Model(&proto.FileInfo{}).Where("path LIKE ? AND user_id = ?", subQuery.Path+subQuery.Name+"/%", userId).Updates(map[string]interface{}{"trashed": proto.TrashStatusSubFilesLogicDeleted, "transaction_id": deleteFolder.TransactionId, "operation_time": time.Now().UnixNano() / 1e6}) + tr.tx.Model(&proto.FileInfo{}).Select("uuid").Where("user_id = ? AND path LIKE ?", userId, subQuery.Path+subQuery.Name+"/%").Find(&subUuids) + + affect = int(res.RowsAffected + 1) + } else { + + res = tr.tx.Model(&proto.FileInfo{}).Where("user_id = ? AND uuid =?", userId, deleteId).Updates(map[string]interface{}{"trashed": 1, "transaction_id": time.Now().Unix(), "operation_time": time.Now().UnixNano() / 1e6}) + affect = 1 + } + } + + if err != nil { + return 0, err + } else { + return affect, nil + } + +} +func (tr *trans) GetInfoByUuid(uuid string) (*proto.FileInfo, error) { + var fileInfo proto.FileInfo + tx := tr.tx.Model(fileInfo).Where("uuid = ?", uuid).First(&fileInfo) + if tx.Error != nil { + return nil, tr.tx.Error + } else if tx.RowsAffected == 0 { + return nil, fmt.Errorf("record not exist") + } else { + return &fileInfo, nil + } +} + +func (tr *trans) AddFile(info proto.FileInfo) (err error) { + err = tr.tx.Model(&proto.FileInfo{}).Create(&info).Error + return +} + +// AddFileV2 上传文件,path 传入参数为当前目录的uuid +func (tr *trans) AddFileV2(info proto.FileInfo, uuid string) (err error) { + fi, err := tr.GetInfoByUuid(uuid) + if err != nil { + return err + } + + info.Path = fi.AbsPath() + return tr.AddFile(info) +} + +func (tr *trans) GetInfoByPath(userId proto.UserIdType, path string, name string, trashed uint32) (*proto.FileInfo, error) { + var fileInfo proto.FileInfo + tx := tr.tx.Model(fileInfo).Where("user_id = ? AND name = ? AND path = ? AND trashed = ?", userId, name, path, trashed).First(&fileInfo) + if tx.Error == nil { + return &fileInfo, nil + } else { //if errors.Is(tx.Error, gorm.ErrRecordNotFound) { + return nil, tx.Error + } + +} + +func (tr *trans) GenIncNameByPath(userId proto.UserIdType, path string, name string, trashed uint32) (string, error) { + + _, err := tr.GetInfoByPath(userId, path, name, trashed) + if err == nil { + //按规则处理 + ext := filepath.Ext(name) + preName := name[:len(name)-len(ext)] + for i := 1; ; i++ { + newName := preName + fmt.Sprintf("(%d)", i) + ext + _, err = tr.GetInfoByPath(userId, path, newName, trashed) + if err == nil { + continue + } else if errors.Is(err, gorm.ErrRecordNotFound) { + return newName, nil + } else { + return "", err + } + } + + } else { + if errors.Is(err, gorm.ErrRecordNotFound) { + return name, nil + } else { + return "", nil + } + } + +} + +func (tr *trans) hisTaskOk(taskName string) error { + var htf proto.Setting + result := tr.tx.Model(&proto.Setting{}).Where("setting_name = ?", proto.HIS_TASK_BETAG).First(&htf) + if result.Error != nil && result.Error == gorm.ErrRecordNotFound { + return result.Error + } + if htf.Value == proto.HIS_TASK_STATUS_OK { + return nil + } else { + return fmt.Errorf(htf.Value) //这个流程应该走不了,因为成功了才会被记录 + } +} + +func (tr *trans) GetSetting(key string) (string, error) { + var htf proto.Setting + result := tr.tx.Model(&proto.Setting{}).Where("setting_name = ?", key).First(&htf) + if result.Error == nil { + return htf.Value, nil + } else { + return "", result.Error + } +} + +func (tr *trans) SetSetting(key string, value string) error { + var htf proto.Setting + htf.Name = key + htf.Value = value + htf.CreateTime = time.Now().Unix() + result := tr.tx.Model(proto.Setting{}).Create(&htf) + return result.Error +} + +func (tr *trans) getBETagInfo(betag string) (*proto.BETagInfo, error) { + var bi proto.BETagInfo + result := tr.tx.Model(proto.BETagInfo{}).Where("betag=?", betag).First(&bi) + if result.Error != nil { + return nil, result.Error + } else { + return &bi, nil + } +} + +func (tr *trans) deleteBETagInfo(betag string) error { + result := tr.tx.Delete(proto.BETagInfo{}, "betag=?", betag) + return result.Error +} +func (tr *trans) addBETagInfo(betag string, volId int) error { + var bi proto.BETagInfo + bi.BETag = betag + bi.VolId = uint16(volId) + bi.CreateTime = time.Now().Unix() + bi.ModifyTime = time.Now().Unix() + result := tr.tx.Model(proto.BETagInfo{}).Create(&bi) + return result.Error + +} diff --git a/repository/storage/bucket.go b/repository/storage/bucket.go new file mode 100644 index 0000000..3866722 --- /dev/null +++ b/repository/storage/bucket.go @@ -0,0 +1,163 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* + * @Author: zhongguang + * @Date: 2022-12-09 16:12:37 + * @Last Modified by: zhongguang + * @Last Modified time: 2022-12-09 16:23:20 + */ + +package storage + +import ( + "aofs/internal/proto" + "fmt" + "io" + "os" + "path/filepath" +) + +type MultiDisker interface { + GetRootPath(diskId int) (string, error) +} + +type Indexer interface { + Get(key string) (int, error) //获取索引信息 + Delete(key string) (int, error) //删除索引 + Add(key string, diskId int) error //增加 1 条索引 +} + +type Bucketer interface { + GetDiskid(key string) (bool, error) + //Put(key string, r io.Reader, attrs map[string]interface{}) error + Get(key string, part *proto.Part) (io.ReadCloser, error) + Del(key string) error + GetPath(key string) (string, error) + GetRelativePath(key string) string + GetMultipartPath() string //获取分片上传集中存储路径 + GetFileAbsPath(key string) string +} + +type bucket struct { + disker MultiDisker + indexer Indexer + name string //桶的名称,即子路径的名称 +} + +func (dp *bucket) IsExist(key string) bool { + fpath := dp.getFilePath(dp.name, key) + _, err := os.Stat(fpath) + return err == nil +} + +func (dp *bucket) getFilePath(rootPath string, key string) string { + if len(key) > 4 { + h1 := key[:2] + h2 := key[2:4] + return filepath.Join(rootPath, dp.name, h1, h2, key) + } + return fmt.Sprintf("file's betag error :%v", io.EOF) + +} + +func (dp *bucket) getDir(rootPath string, key string) (string, error) { + if len(key) > 4 { + h1 := key[:2] + h2 := key[2:4] + + dir := filepath.Join(rootPath, dp.name, h1, h2) + err := os.MkdirAll(dir, os.ModePerm) + return dir, err + } + return "", io.EOF + +} + +func (bkt *bucket) GetDiskid(key string) (int, error) { + return bkt.indexer.Get(key) +} + +func (bkt *bucket) Get(key string, part *proto.Part) (io.ReadCloser, error) { + diskId, err := bkt.indexer.Get(key) + if err != nil { + return nil, err + } + + rootPath, err := bkt.disker.GetRootPath(diskId) + if err != nil { + return nil, err + } + + filepath := bkt.getFilePath(rootPath, key) + + if file, err := os.Open(filepath); err != nil { + return file, err + } else if part == nil { + return file, err + } else { + if _, err := file.Seek(part.Start, os.SEEK_SET); err != nil { + file.Close() + return nil, err + } + + if part.End == -1 { + return file, nil + } + + if stat, err := file.Stat(); err != nil { + file.Close() + return nil, err + } else if part.End >= stat.Size() { + file.Close() + return nil, fmt.Errorf("Range Not Satisfiable") + } else { + r := io.LimitReader(file, part.Len()) + type RC struct { + io.Reader + io.Closer + } + var rc RC + rc.Reader = r + rc.Closer = file + return rc, nil + } + } + +} + +func (bkt *bucket) Del(key string) error { + + diskId, err := bkt.indexer.Get(key) + if err != nil { + return err + } + + rootPath, err := bkt.disker.GetRootPath(diskId) + if err != nil { + return err + } + + fpath := bkt.getFilePath(rootPath, key) + + err = os.Remove(fpath) + + logger.LogI().Msg(fmt.Sprintf("push deleteMsg to redis,key:%v", key)) + PushMsg(map[string]interface{}{"key": key, "bucket": bkt.name}, "delete") + if err != nil && os.IsNotExist(err) { + logger.LogE().Msg(fmt.Sprintf("Remove files err:%v", err)) + return nil + } + return err +} diff --git a/repository/storage/charset.go b/repository/storage/charset.go new file mode 100644 index 0000000..139b4b4 --- /dev/null +++ b/repository/storage/charset.go @@ -0,0 +1,46 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package storage + +import ( + "bufio" + "aofs/internal/env" + "os" + + "github.com/saintfish/chardet" +) + +func GetCharset(betag string) string { + filePath, err := GetStor().GetFileAbsPath(env.NORMAL_BUCKET, betag) + if err != nil { + return "" + } + f, err := os.Open(filePath) + if err != nil { + return "" + } + defer f.Close() + + reader := bufio.NewReader(f) + buf := make([]byte, 1024) + _, err = reader.Read(buf) + if err != nil { + return "" + } + detector := chardet.NewTextDetector() + charset, err := detector.DetectBest(buf) + + return charset.Charset +} diff --git a/repository/storage/crypto.go b/repository/storage/crypto.go new file mode 100644 index 0000000..9bb8f03 --- /dev/null +++ b/repository/storage/crypto.go @@ -0,0 +1,139 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package storage + +import ( + "bytes" + "crypto/aes" + "crypto/cipher" + "crypto/md5" + "crypto/sha256" + "encoding/base64" + "encoding/hex" + "io" + "os" +) + +func NewCryptReader(r io.Reader, pass string) io.Reader { + if len(pass) == 0 { + return r + } + + key := append([]byte{}, []byte(pass)...) + key = append(key, make([]byte, 32)...) + + block, _ := aes.NewCipher(key[:32]) + + var iv [aes.BlockSize]byte + stream := cipher.NewOFB(block, iv[:]) + return &cipher.StreamReader{S: stream, R: r} +} + +func NewCryptWriter(w io.Writer, pass string) io.Writer { + if len(pass) == 0 { + return w + } + + key := append([]byte{}, []byte(pass)...) + key = append(key, make([]byte, 32)...) + + block, _ := aes.NewCipher(key[:32]) + + // If the key is unique for each ciphertext, then it's ok to use a zero + // IV. + var iv [aes.BlockSize]byte + stream := cipher.NewOFB(block, iv[:]) + + return &cipher.StreamWriter{S: stream, W: w} +} + +func PKCS7Padding(ciphertext []byte, blockSize int) []byte { + padding := blockSize - len(ciphertext)%blockSize + padtext := bytes.Repeat([]byte{byte(padding)}, padding) + return append(ciphertext, padtext...) +} + +func PKCS7UnPadding(origData []byte) []byte { + length := len(origData) + unpadding := int(origData[length-1]) + return origData[:(length - unpadding)] +} + +//AES加密,CBC +func AesEncrypt(origData []byte, key []byte) ([]byte, error) { + block, err := aes.NewCipher(key[:32]) + if err != nil { + return nil, err + } + blockSize := block.BlockSize() + origData = PKCS7Padding(origData, blockSize) + blockMode := cipher.NewCBCEncrypter(block, key[:blockSize]) + crypted := make([]byte, len(origData)) + blockMode.CryptBlocks(crypted, origData) + return crypted, nil +} + +//AES解密 +func AesDecrypt(crypted, key []byte) ([]byte, error) { + block, err := aes.NewCipher(key[:32]) + if err != nil { + return nil, err + } + blockSize := block.BlockSize() + blockMode := cipher.NewCBCDecrypter(block, key[:blockSize]) + origData := make([]byte, len(crypted)) + blockMode.CryptBlocks(origData, crypted) + origData = PKCS7UnPadding(origData) + return origData, nil +} + +func Hash(src []byte, rounds int) []byte { + dst := src + for i := 0; i < rounds; i++ { + t := sha256.Sum256(dst) + dst = t[0:] + } + return dst +} +func HashHex(src []byte, rounds int) string { + h := Hash(src, rounds) + return hex.EncodeToString(h) +} + +func Md5Sum(path string) string { + f, err := os.Open(path) + if err != nil { + return "" + } + defer f.Close() + h := md5.New() + if _, err := io.Copy(h, f); err != nil { + return "" + } + return hex.EncodeToString(h.Sum(nil)) +} + +func AesDecryption(str string, pass string) (string, error) { + decodeBytes, err := base64.StdEncoding.DecodeString(str) + if err != nil { + return "", err + } + decryptBytes, err := AesDecrypt(decodeBytes, []byte(pass)) + if err != nil { + return "", err + } + return string(decryptBytes), nil +} + diff --git a/repository/storage/crypto_test.go b/repository/storage/crypto_test.go new file mode 100644 index 0000000..d3acf9b --- /dev/null +++ b/repository/storage/crypto_test.go @@ -0,0 +1,81 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package storage + +import ( + "bytes" + "crypto/rand" + "io/ioutil" + "testing" +) + +func TestCrypt(t *testing.T) { + data := make([]byte, 139) + rand.Read(data) + + r := NewCryptReader(bytes.NewReader(data), "123") + encData, err := ioutil.ReadAll(r) + + if err != nil { + t.Fatal(err) + } + if len(data) != len(encData) { + t.Fatal("size err") + } + + rPlain := NewCryptReader(bytes.NewReader(encData), "123") + plainData, err := ioutil.ReadAll(rPlain) + if err != nil { + t.Fatal(err) + } + if len(data) != len(plainData) { + t.Fatal("size err") + } + if bytes.Compare(data, plainData) != 0 { + t.Fatal("decrypt err") + } + +} + +func TestCrypt2(t *testing.T) { + for i := 0; i < 100; i++ { + data := make([]byte, 139+i) + rand.Read(data) + + bufer := bytes.NewBuffer(nil) + w := NewCryptWriter(bufer, "123") + + if n, err := w.Write(data); err != nil || n != len(data) || n != (139+i) { + t.Fatal(err) + } + if len(data) != len(bufer.Bytes()) { + t.Fatal("size err") + } + + rPlain := NewCryptReader(bytes.NewReader(bufer.Bytes()), "123") + plainData, err := ioutil.ReadAll(rPlain) + if err != nil { + t.Fatal(err) + } + if len(data) != len(plainData) { + t.Fatal("size err") + } + if bytes.Compare(data, plainData) != 0 { + t.Fatal("decrypt err") + } + + } + +} diff --git a/repository/storage/def.go b/repository/storage/def.go new file mode 100644 index 0000000..7a64a56 --- /dev/null +++ b/repository/storage/def.go @@ -0,0 +1,63 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package storage + +import ( + "fmt" + "io" + "os" + "path/filepath" +) + +type dataPath struct { + path string +} + +func (dp *dataPath) IsExist(bucket string, key string) bool { + fpath := dp.getFilePath(bucket, key) + _, err := os.Stat(fpath) + return err == nil +} + +func (dp *dataPath) getFilePath(bucket string, key string) string { + if len(key) > 4 { + h1 := key[:2] + h2 := key[2:4] + return filepath.Join(dp.path, bucket, h1, h2, key) + } + return fmt.Sprintf("file's betag error :%v", io.EOF) + +} + +func (dp *dataPath) getDir(bucket string, key string) (string, error) { + if len(key) > 4 { + h1 := key[:2] + h2 := key[2:4] + + dir := filepath.Join(dp.path, bucket, h1, h2) + err := os.MkdirAll(dir, os.ModePerm) + return dir, err + } + return "", io.EOF + +} + +func GetPathSize(path string) int64 { + fileInfo, err := os.Stat(path) + if err != nil { + return 0 + } + return fileInfo.Size() +} diff --git a/repository/storage/disk_info.go b/repository/storage/disk_info.go new file mode 100644 index 0000000..02bd7d6 --- /dev/null +++ b/repository/storage/disk_info.go @@ -0,0 +1,73 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package storage + +import ( + "aofs/internal/env" + "aofs/internal/utils" + "fmt" + "path/filepath" +) + +type SharedDiskInfo struct { + DiskInitialCode int `json:"diskInitialCode"` // 1: 磁盘正常; 2: 未初始化;3: 正在格式化; 4: 正在数据同步; 100: 未知错误; 101: 磁盘格式化错误; >101: 其他初始化错误; + DiskInitialMessage string `json:"diskInitialMessage"` // 磁盘初始化结果/异常信息。 + DiskInitialProgress uint `json:"diskInitialProgress"` // 磁盘初始化进度。 + + DiskExpandCode int `json:"diskExpandCode"` // 1: 扩容完成; 2: 未扩容状态; 3:正在扩容; 100: 扩容未知错误; 101: 扩容磁盘格式化错误; >101: 扩容其他错误; + DiskExpandMessage string `json:"diskExpandMessage"` // 磁盘扩容结果/异常信息。 + DiskExpandProgress uint `json:"diskExpandProgress"` // 磁盘扩容进度。 + + CreatedTime string `json:"createdTime"` // 创建时间 + UpdatedTime string `json:"updatedTime"` // 更新时间 + + RaidType int `json:"raidType"` // 1: normal; 2: raid1。 + RaidDiskHwIds []string `json:"raidDiskHwIds"` // 参与 raid 的磁盘 id 列表. + PrimaryStorageHwIds []string `json:"PrimaryStorageHwIds"` // 主存储磁盘硬件 id 列表 + SecondaryStorageHwIds []string `json:"secondaryStorageHwIds"` // 次存储磁盘硬件 id 列表 + + DiskMountInfos []*DiskMountInfo `json:"diskMountInfos"` + + FileStorageVolumePathPrefix string `json:"fileStorageVolumePathPrefix"` // 挂载给 aofs 容器的目录 /home/eulixspace_file_storage/parts/bp_part_nvme_3841a657 中 "bp_part_" 这样的前缀. +} + +type DiskMountInfo struct { + HwIds []string `json:"hwIds"` // e.g. "hwIds": ["52fa9e6c", "bd2c7570" ], 格式化之后不会变化 + MountDevice string `json:"mountDevice"` // e.g. /dev/sda1, /dev/sdb1, /dev/vg0/lv0 + DeviceUuid string `json:"deviceUuid"` // 格式化之后会变化 + DeviceSequenceNumber int64 `json:"dviceSequenceNumber"` // 设备自增序列号, 根据 DeviceUuid 判断,不重复时算新磁盘。从1自增。 + MountPath string `json:"mountPath"` // e.g. /mnt/bp/data/raid1_52fa9e6c-bd2c7570/mountpoint + DataFolderRoot string `json:"dataFolderRoot"` // raid1_138cf704-52fa9e6c , nvme_3841a657 in /mnt/bp/data/raid1_138cf704-52fa9e6c/mountpoint, /mnt/bp/data/nvme_3841a657/mountpoint" + MapperName string `json:"mapperName"` // e.g. luks_raid1_52fa9e6c-bd2c7570 + FSType string `json:"fSType"` // ext4 + IsPrimaryStorage bool `json:"isPrimaryStorage"` // 是否是主存储 +} + +func (di *DiskMountInfo) getPath(prefix string) string { + return filepath.Join(env.DATA_PATH, fmt.Sprintf("%v%v", prefix, di.DataFolderRoot)) +} + +func getDiskInfo() (*SharedDiskInfo, error) { + var sdi SharedDiskInfo + if err := utils.ReadJsonFromFile(filepath.Join(env.SHARED_PATH, "disk_info.json"), &sdi); err != nil { + return nil, err + } + if len(sdi.DiskMountInfos) == 0 { + return nil, fmt.Errorf("not found disk mount info") + } + + return &sdi, nil + +} diff --git a/repository/storage/disk_usage.go b/repository/storage/disk_usage.go new file mode 100644 index 0000000..e30b7ab --- /dev/null +++ b/repository/storage/disk_usage.go @@ -0,0 +1,28 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package storage + +type DiskStatus struct { + All uint64 `json:"all"` + Used uint64 `json:"used"` + Free uint64 `json:"free"` +} + +const ( + B = 1 + KB = 1024 * B + MB = 1024 * KB + GB = 1024 * MB +) diff --git a/repository/storage/disk_usage_linux.go b/repository/storage/disk_usage_linux.go new file mode 100644 index 0000000..644b850 --- /dev/null +++ b/repository/storage/disk_usage_linux.go @@ -0,0 +1,32 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package storage + +import ( + "syscall" +) + +// disk usage of path/disk +func DiskUsage(path string) (disk DiskStatus) { + fs := syscall.Statfs_t{} + err := syscall.Statfs(path, &fs) + if err != nil { + return + } + disk.All = fs.Blocks * uint64(fs.Bsize) + disk.Free = fs.Bfree * uint64(fs.Bsize) + disk.Used = disk.All - disk.Free + return +} diff --git a/repository/storage/disk_usage_mac.go b/repository/storage/disk_usage_mac.go new file mode 100644 index 0000000..5083034 --- /dev/null +++ b/repository/storage/disk_usage_mac.go @@ -0,0 +1,22 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package storage + +//import "fmt" +// +//func DiskUsage(path string) (disk DiskStatus) { +// fmt.Print("build for mac") +// return DiskStatus{} +//} diff --git a/repository/storage/disk_usage_windows.go b/repository/storage/disk_usage_windows.go new file mode 100644 index 0000000..c9a4fa7 --- /dev/null +++ b/repository/storage/disk_usage_windows.go @@ -0,0 +1,51 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package storage + +import ( + "log" + "syscall" + "unsafe" +) + +func DiskUsage(path string) (disk DiskStatus) { + kernel32, err := syscall.LoadLibrary("Kernel32.dll") + if err != nil { + log.Panic(err) + } + defer syscall.FreeLibrary(kernel32) + GetDiskFreeSpaceEx, err := syscall.GetProcAddress(kernel32, "GetDiskFreeSpaceExW") + + if err != nil { + log.Panic(err) + } + + lpFreeBytesAvailable := int64(0) + lpTotalNumberOfBytes := int64(0) + lpTotalNumberOfFreeBytes := int64(0) + _, _, _ = syscall.Syscall6(GetDiskFreeSpaceEx, 4, + uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr("D:"))), + uintptr(unsafe.Pointer(&lpFreeBytesAvailable)), + uintptr(unsafe.Pointer(&lpTotalNumberOfBytes)), + uintptr(unsafe.Pointer(&lpTotalNumberOfFreeBytes)), 0, 0) + + log.Printf("Available %db", lpFreeBytesAvailable) + log.Printf("Total %db", lpTotalNumberOfBytes) + log.Printf("Free %db", lpTotalNumberOfFreeBytes) + disk.Free = uint64(lpTotalNumberOfFreeBytes) + disk.All = uint64(lpTotalNumberOfBytes) + disk.Used = uint64(lpTotalNumberOfBytes - lpTotalNumberOfFreeBytes) + return +} diff --git a/repository/storage/init.go b/repository/storage/init.go new file mode 100644 index 0000000..262bdcb --- /dev/null +++ b/repository/storage/init.go @@ -0,0 +1,40 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package storage + +import ( + "aofs/internal/env" + "fmt" +) + +var mdstor MultiDiskStorager + +func GetStor() MultiDiskStorager { + return mdstor +} + +func Init(betagIdx Indexer) error { + + if err := md.Init(betagIdx); err != nil { + return err + } + + mdstor = &md + + logger.LogI().Msg(fmt.Sprintf("Init Disk Storage:%v", env.DATA_PATH)) + + return nil + +} diff --git a/repository/storage/multi_disk.go b/repository/storage/multi_disk.go new file mode 100644 index 0000000..082ef33 --- /dev/null +++ b/repository/storage/multi_disk.go @@ -0,0 +1,501 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package storage + +import ( + "archive/zip" + "errors" + "fmt" + "io" + "os" + "path/filepath" + "strings" + + "aofs/internal/env" + "aofs/internal/proto" + "aofs/internal/utils" + "aofs/repository/dbutils" +) + +/* +type MultiDisker interface { + Alloc(size int64) (string, error) + GetRootPath(diskId int) (string, error) +} +*/ + +var ErrEnoughSpace error = errors.New("not Enough Space") + +type MultiDiskStorager interface { + IsExist(bucket string, key string) (bool, error) + Put(bucket string, key string, r io.Reader, size int64) error + Get(bucket string, key string, part *proto.Part) (io.ReadCloser, error) + Del(bucket string, key string) error + GenPath(bucket string, key string, size int64) (int, string, error) //分配文件实际存储盘 + GetDiskPath(diskId int) (string, error) + GetDiskPathByBEtag(key string) (string, error) + GetDiskMPPath(diskId int) (string, error) + MoveFile(path string, diskId int, bucket, key string) (string, error) //将文件移动到内部 + GetPath(bucket string, key string) (string, error) + GetRelativePath(bucket string, key string) (string, error) + GetMultipartPath() (int, string) //获取分片上传集中存储路径 + GetFileAbsPath(bucket string, key string) (string, error) +} + +type multiDisk struct { + mapDisk map[int]string + indexer Indexer +} + +var md multiDisk + +//初始化目录 +func (m *multiDisk) Init(idx Indexer) error { + m.indexer = idx + m.mapDisk = make(map[int]string, 5) + + if sdi, err := getDiskInfo(); err != nil { + return err + } else { + for _, di := range sdi.DiskMountInfos { + + m.mapDisk[int(di.DeviceSequenceNumber)] = di.getPath(sdi.FileStorageVolumePathPrefix) + m.initDiskDir(m.mapDisk[int(di.DeviceSequenceNumber)], *di) + } + + dir := filepath.Join(env.DATA_PATH, "multipart-meta") + err := os.MkdirAll(dir, os.ModePerm) + if err != nil { + logger.LogF().Err(err).Msg("Failed to init multipart meta dir.") + return err + } + } + + fmt.Println("dirs:", m.mapDisk) + return nil +} + +func (m *multiDisk) GetDiskPath(diskId int) (string, error) { + if path, ok := m.mapDisk[diskId]; ok { + return path, nil + } else { + return "", fmt.Errorf("not found diskId:%v", diskId) + } +} + +func (m *multiDisk) GetDiskMPPath(diskId int) (string, error) { + if path, err := m.GetDiskPath(diskId); err != nil { + return "", err + } else { + return filepath.Join(path, "multipart"), nil + } + +} +func (m *multiDisk) MoveFile(path string, diskId int, bucket, key string) (string, error) { + if dstDir, err := m.PreDir(diskId, bucket, key, true); err != nil { + return "", err + } else { + fpath := filepath.Join(dstDir, key) + if err := os.Rename(path, fpath); err != nil { + return "", err + } else { + return fpath, m.indexer.Add(key, diskId) + } + } +} + +func (m *multiDisk) initDiskDir(path string, di DiskMountInfo) error { + + if err := utils.WriteJsonToFile(filepath.Join(path, ".disk.info"), di); err != nil { + return err + } + + dir := filepath.Join(path, "multipart") + err := os.MkdirAll(dir, os.ModePerm) + if err != nil { + logger.LogF().Err(err).Msg("Failed to init multipart dir.") + return err + } + + return nil +} + +func (m *multiDisk) getFilePath(bucket string, key string) (string, error) { + if dir, err := m.getFileDir(bucket, key); err != nil { + return "", err + } else { + return filepath.Join(dir, key), nil + } +} + +func (m *multiDisk) getFileDir(bucket string, key string) (string, error) { + if len(key) < 4 { + return "", fmt.Errorf("key(%v) is invalid", key) + } + + diskId, err := m.indexer.Get(key) + if err != nil { + return "", err + } + + diskPath, err := m.GetDiskPath(diskId) + if err != nil { + return "nil", err + } + + h1 := key[:2] + h2 := key[2:4] + return filepath.Join(diskPath, bucket, h1, h2), nil +} + +func (m *multiDisk) IsExist(bucket string, key string) (bool, error) { + if fpath, err := m.getFilePath(bucket, key); err != nil { + return false, err + } else { + _, err := os.Stat(fpath) + return err == nil, nil + } + +} + +func (m *multiDisk) Get(bucket string, key string, part *proto.Part) (io.ReadCloser, error) { + + filepath, err := m.getFilePath(bucket, key) + if err != nil { + return nil, err + } + + if file, err := os.Open(filepath); err != nil { + return file, err + } else if part == nil { + return file, err + } else { + if _, err := file.Seek(part.Start, os.SEEK_SET); err != nil { + file.Close() + return nil, err + } + + if part.End == -1 { + return file, nil + } + + if stat, err := file.Stat(); err != nil { + file.Close() + return nil, err + } else if part.End >= stat.Size() { + file.Close() + return nil, fmt.Errorf("range not satisfiable") + } else { + r := io.LimitReader(file, part.Len()) + type RC struct { + io.Reader + io.Closer + } + var rc RC + rc.Reader = r + rc.Closer = file + return rc, nil + } + } +} + +func (m *multiDisk) PreDir(diskId int, bucket string, key string, mkdir bool) (string, error) { + if path, err := m.GetDiskPath(diskId); err != nil { + return "", err + } else { + h1 := key[:2] + h2 := key[2:4] + + dir := filepath.Join(path, bucket, h1, h2) + if mkdir { + if err := os.MkdirAll(dir, os.ModePerm); err != nil { + return "", err + } + } + return dir, nil + } +} + +func (m *multiDisk) GenPath(bucket string, key string, size int64) (int, string, error) { + err := fmt.Errorf("failed to gen path") + for diskId, path := range m.mapDisk { + h1 := key[:2] + h2 := key[2:4] + + dir := filepath.Join(path, bucket, h1, h2) + os.MkdirAll(dir, os.ModePerm) + + // 剩余空间小于500M时候限制上传和同步, *** 暂时去掉大小判断 + freeDisk := DiskUsage(dir).Free + logger.LogD().Interface("dir", dir).Interface("freedisk", freeDisk).Msg("Get free disk") + if freeDisk < uint64(env.RESERVED_SPACE+size) { + err = ErrEnoughSpace + continue + } + + return diskId, dir, nil + } + + return 0, "", err +} + +func (m *multiDisk) Put(bucket string, key string, r io.Reader, size int64) error { + if len(bucket) < 1 || len(key) < 4 { + logger.LogE().Msg("put file:param error") + return fmt.Errorf("key(%v) error", key) + } + + // 如果 betag 已经存在记录,则不需要再次存储。 + if exists, err := m.IsExist(bucket, key); err == nil && exists { + return nil + } + + volId, dir, err := m.GenPath(bucket, key, size) + if err != nil { + logger.LogE().Msg(fmt.Sprintf("gen dir error:%v", err)) + return err + } + + filepath := filepath.Join(dir, key) + if w, err := os.OpenFile(filepath+".tmp", os.O_CREATE|os.O_TRUNC|os.O_WRONLY, os.ModePerm); err != nil { + if os.IsExist(err) { + fmt.Println(filepath+".tmp", err) + return nil //已经存在,直接认为成功 + } else { + logger.LogE().Msg(fmt.Sprintf("open file:%v", err)) + return fmt.Errorf("open:%v", err) + } + } else { + _, err = io.Copy(w, r) + if err == nil { + w.Sync() //刷盘,防止断电 + w.Close() + if err := os.Rename(filepath+".tmp", filepath); err != nil { + return err + } + + //加到索引里面 + if err := m.indexer.Add(key, volId); err != nil { + return err + } + + //logger.LogI().Interface("pushMsg", attrs).Msg("push uploadMsg to redis") + //PushMsg(attrs, "put") + return nil + } else { + //删除未能成功上传的文件 + w.Close() + os.Remove(filepath) + logger.LogE().Err(fmt.Errorf("copy:%v", err)).Msg("io.Copy failed") + return err + } + } +} + +func (m *multiDisk) Del(bucket string, key string) error { + + fpath, err := m.getFilePath(bucket, key) + if err != nil { + return err + } + + _, err = m.indexer.Delete(key) + if err != nil { + return err + } + + err = os.Remove(fpath) + logger.LogI().Msg(fmt.Sprintf("push deleteMsg to redis,key:%v", key)) + PushMsg(map[string]interface{}{"key": key, "bucket": bucket}, "delete") + if err != nil && os.IsNotExist(err) { + logger.LogE().Msg(fmt.Sprintf("Remove files err:%v", err)) + return nil + } + return err +} + +func (m *multiDisk) GetFileAbsPath(bucket string, key string) (string, error) { + + filepath, err := m.getFilePath(bucket, key) + if err != nil { + return "", err + } + return filepath, nil +} + +func (m *multiDisk) GetMultipartPath() (int, string) { + var diskId int + var path string + for k, v := range m.mapDisk { + if diskId < k { + diskId = k + path = v + } + } + return diskId, filepath.Join(path, "multipart") +} + +func (m *multiDisk) GetPath(bucket string, key string) (string, error) { + fpath, err := m.getFilePath(bucket, key) + if err != nil { + return "", err + } + dir, _ := filepath.Split(fpath) + return dir, nil +} + +func (m *multiDisk) GetDiskPathByBEtag(key string) (string, error) { + diskId, err := m.indexer.Get(key) + if err != nil { + return "", err + } + diskPath, err := m.GetDiskPath(diskId) + if err != nil { + return "", err + } + return diskPath, nil +} + +func (m *multiDisk) GetRelativePath(bucket string, key string) (string, error) { + fpath, err := m.getFilePath(bucket, key) + if err != nil { + return "", err + } + + return fpath[len(env.DATA_PATH):], nil +} + +func (m *multiDisk) zip(bucket string, uuid string, zw *zip.Writer) error { + fileInfo, err := dbutils.GetInfoByUuid(uuid) + if err != nil { + return err + } + + if fileInfo.IsDir { + fileCount := dbutils.CountFileInFolder(fileInfo.Id) + logger.LogD().Msg(fmt.Sprintf("file in %s dir count: %d", fileInfo.Name, fileCount)) + if fileCount == 0 { + logger.LogD().Msg(fmt.Sprintf("blank dir: %s", fileInfo.Name)) + //subDir := strings.TrimLeft(fileInfo.Path, fileInfo.Path+fileInfo.Name) + subDirPath := filepath.Join("/data/" + fileInfo.Name) + if _, err := os.Stat(subDirPath); err != nil { + err := os.Mkdir(subDirPath, os.ModePerm) + if err != nil { + logger.LogE().Err(err).Msg("mkdir error") + } + } + subFi, _ := os.Stat(subDirPath) + header, err := zip.FileInfoHeader(subFi) + header.Name = fileInfo.Name + "/" + if err != nil { + //fmt.Println("error is:"+err.Error()) + return err + } + _, err = zw.CreateHeader(header) + if err != nil { + //fmt.Println("create error is:"+err.Error()) + return err + } + os.Remove(subDirPath) + + } + if subFileIds, _ := dbutils.GetAllFileInFolder(fileInfo.UserId, uuid); subFileIds != nil { + for _, subId := range subFileIds { + subInfo, _ := dbutils.GetInfoByUuid(subId) + // 空文件夹处理 + if subInfo.IsDir { + fileCount := dbutils.CountFileInFolder(subInfo.Id) + logger.LogD().Msg(fmt.Sprintf("file in %s dir count: %d", subInfo.Name, fileCount)) + if fileCount == 0 { + logger.LogD().Msg(fmt.Sprintf("blank dir: %s", subInfo.Name)) + subDir := strings.TrimLeft(subInfo.Path, fileInfo.Path+fileInfo.Name) + subDirPath := filepath.Join("/data/" + subInfo.Name) + if _, err := os.Stat(subDirPath); err != nil { + err := os.Mkdir(subDirPath, os.ModePerm) + if err != nil { + logger.LogE().Err(err).Msg("mkdir error") + } + } + subFi, _ := os.Stat(subDirPath) + header, err := zip.FileInfoHeader(subFi) + header.Name = fileInfo.Name + "/" + subDir + subFi.Name() + "/" + if err != nil { + //fmt.Println("error is:"+err.Error()) + return err + } + _, err = zw.CreateHeader(header) + if err != nil { + //fmt.Println("create error is:"+err.Error()) + return err + } + os.Remove(subDirPath) + + } + + } + subFilePath, err := m.getFilePath(bucket, subInfo.BETag) + if err != nil { + return err + } + //subDir := strings.Split(subInfo.Path,"/") + + subDir := strings.TrimPrefix(subInfo.Path, fileInfo.Path+fileInfo.Name+"/") + + //在压缩包中创建一个文件 + if !subInfo.IsDir { + logger.LogD().Msg(fmt.Sprintf("开始压缩:%s", fileInfo.Path+fileInfo.Name+"/"+subDir+subInfo.Name)) + subfile, _ := os.Open(subFilePath) + subFileOnZip, err := zw.Create(fileInfo.Name + "/" + subDir + subInfo.Name) + if err != nil { + logger.LogE().Err(err).Msg(fmt.Sprintf("在压缩包中创建文件失败:%s", fileInfo.Name+"/"+subDir+subInfo.Name)) + subfile.Close() + return err + } + _, err = io.Copy(subFileOnZip, subfile) + if err != nil { + logger.LogE().Err(err).Msg(fmt.Sprintf("failed to io.copy %s", subInfo.Id)) + return err + } + } + + } + + } + + } else { + filePath, err := m.getFilePath(bucket, fileInfo.BETag) + if err != nil { + return err + } + + //zipWriter.CreateHeader() + //在压缩包中创建一个文件 + fileOnZip, err := zw.Create(fileInfo.Name) + if err != nil { + logger.LogE().Err(err).Msg(fmt.Sprintf("在压缩包中创建文件失败:%s", fileInfo.Name)) + return err + } + //读取需要压缩的文件 + subfile, _ := os.Open(filePath) + defer subfile.Close() + _, err = io.Copy(fileOnZip, subfile) + if err != nil { + return err + } + + } + //defer zw.Close() + return nil +} \ No newline at end of file diff --git a/repository/storage/multi_disk_test.go b/repository/storage/multi_disk_test.go new file mode 100644 index 0000000..9934037 --- /dev/null +++ b/repository/storage/multi_disk_test.go @@ -0,0 +1,78 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package storage + +import ( + "aofs/internal/proto" + "fmt" + "io/ioutil" + "strings" + "testing" + "time" +) + +// type Indexer interface { +// Get(key string) (int, error) //获取索引信息 +// Delete(key string) (int, error) //删除索引 +// Add(key string, diskId int) error // 增加1条索引 +// } + +type MockIndexer struct { + mapDiskFile map[string]int +} + +func (mi *MockIndexer) Get(key string) (int, error) { + if diskId, ok := mi.mapDiskFile[key]; ok { + return diskId, nil + } + return 0, fmt.Errorf("not found") +} +func (mi *MockIndexer) Delete(key string) (int, error) { + delete(mi.mapDiskFile, key) + return 1, nil +} + +func (mi *MockIndexer) Add(key string, diskId int) error { + mi.mapDiskFile[key] = diskId + return nil +} + +func TestPutAndGet(t *testing.T) { + var mi MockIndexer + mi.mapDiskFile = map[string]int{} + + var md multiDisk + if err := md.Init(&mi); err != nil { + t.Error(err) + } + + text := fmt.Sprintf("%v", time.Now().Unix()) + bucket := "bucketa" + key := text + + if err := md.Put(bucket, key, strings.NewReader(text), int64(len(text))); err != nil { + t.Error(err) + } else { + if rc, err := md.Get(bucket, key, &proto.Part{Start: 0, End: 2}); err != nil { + t.Error(err) + } else { + if data, err := ioutil.ReadAll(rc); err != nil { + t.Error(err) + } else if string(data) != text[0:3] { + t.Error(fmt.Errorf("data err:[%v]", string(data))) + } + } + } +} diff --git a/repository/storage/preview.go b/repository/storage/preview.go new file mode 100644 index 0000000..2b5c459 --- /dev/null +++ b/repository/storage/preview.go @@ -0,0 +1,79 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package storage + +import ( + "aofs/internal/env" + "path/filepath" +) + +const compressFileName = "preview.jpg" +const pdfFileName = "preview.pdf" +const thumbFileName = "thumbnail.jpg" + +type PreviewStore struct { + Mdisk MultiDiskStorager + Bucket string +} + + + +func NewPreview() *PreviewStore { + return &PreviewStore{ + Mdisk: GetStor(), + Bucket: env.DERIVE_BUCKET, + } +} + +// GetPreviewDir get the object's preview file basic dir path +func (s *PreviewStore) GetPreviewDir(key string) (string, error) { + diskPath, err := s.Mdisk.GetDiskPathByBEtag(key) + if err != nil { + return "", err + } + h1 := key[:2] + h2 := key[2:4] + dir := filepath.Join(diskPath, s.Bucket, h1, h2, key) + return dir, nil +} + +func (s *PreviewStore) GetPreviewPdfPath(key string) (string, error) { + baseDir, err := s.GetPreviewDir(key) + if err != nil { + return "", err + } + path := filepath.Join(baseDir, pdfFileName) + return path, nil +} + +func (s *PreviewStore) GetThumbnailPath(key string) (string, error) { + baseDir, err := s.GetPreviewDir(key) + if err != nil { + return "", err + } + path := filepath.Join(baseDir, thumbFileName) + return path, nil +} + +func (s *PreviewStore) GetCompressedImgPath(key string) (string, error) { + baseDir, err := s.GetPreviewDir(key) + if err != nil { + return "", err + } + path := filepath.Join(baseDir, compressFileName) + return path, nil +} + + diff --git a/repository/storage/redis_cli.go b/repository/storage/redis_cli.go new file mode 100644 index 0000000..2c8934b --- /dev/null +++ b/repository/storage/redis_cli.go @@ -0,0 +1,152 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package storage + +import ( + "encoding/json" + "aofs/internal/env" + "aofs/internal/log4bp" + "fmt" + "time" + + "github.com/gin-gonic/gin" + "github.com/go-redis/redis" +) + +var chanMsg chan map[string]interface{} +var newClient *redis.Client + +var logger = log4bp.New("", gin.Mode()) + +func InitClient(url string, pass string, db int) *redis.Client { + for i := 0; i < 60; i++ { + client := redis.NewClient(&redis.Options{ + Addr: url, // redis地址 + Password: pass, // redis密码,没有则留空 + DB: db, // 默认数据库,默认是0 + }) + _, err := client.Ping().Result() + if err != nil { + logger.LogW().Msg(fmt.Sprintf("failed to connect to redis,err: %v", err)) + time.Sleep(time.Second) + //return nil, err + } else { + newClient = client + logger.LogI().Msg(fmt.Sprintf("Connected to redis:%v", db)) + break + } + } + + if newClient == nil { + logger.LogF().Msg("failed to connect to redis") + //log.Println("failed to create publisher") + } else { + go SendMsg() + } + return newClient +} + +func init() { + chanMsg = make(chan map[string]interface{}, 1024) +} + +func PushMsg(msg map[string]interface{}, eventName string) { + if msg != nil && len(chanMsg) < cap(chanMsg)*3/4 { + msg["eventName"] = eventName + chanMsg <- msg + } +} + +func SendMsg() { + for { + msg, ok := <-chanMsg + if ok { + if newClient != nil { + if data, err := json.Marshal(msg); err == nil { + for i := 0; i < 60; i++ { + pubErr := newClient.XAdd(&redis.XAddArgs{Stream: env.REDIS_STREAM_NAME, + MaxLen: 20000, + ID: "*", + Values: msg}).Err() + if pubErr == nil { + logger.LogI().Msg(fmt.Sprintf("successfully add msg: %v", string(data))) + break + } else { + logger.LogW().Msg(fmt.Sprintf("failed to publish message,err: %v", pubErr)) + } + if i == 59 && len(chanMsg) < cap(chanMsg)/2 { + select { + case chanMsg <- msg: + logger.LogD().Interface("msg", msg).Msg("push chan again") + default: + break + } + break + } + time.Sleep(time.Second) + } + } + } + + } else { + break + } + } +} + +const RedisAppPrefix = "LS-" + +// +func RedisWriteUrl(shareId string, validDay uint8) error { + err := newClient.Set(RedisAppPrefix+shareId, 0, time.Duration(validDay)*24*time.Hour).Err() + if err != nil { + return err + } + return nil +} + +func RedisReadVisits(shareId string) (uv int, err error) { + uv, err = newClient.Get(RedisAppPrefix + shareId).Int() + if err != nil { + return 0, err + } + return uv, nil +} + +func RedisAddVisits(shareId string) (uv int64, err error) { + uv, err = newClient.Incr(RedisAppPrefix + shareId).Result() + if err != nil { + return 0, err + } + return uv, nil +} + + + +func PushStatusMsg(msg map[string]interface{}) { + + if newClient != nil { + pubErr := newClient.XAdd(&redis.XAddArgs{Stream: "push_notification", + MaxLen: 20000, + ID: "*", + Values: msg}).Err() + if pubErr == nil { + logger.LogI().Msg(fmt.Sprintf("xadd backup/restore status successfully %s", msg)) + return + } else { + logger.LogW().Msg(fmt.Sprintf("failed to publish message,err: %v", pubErr)) + } + } +} diff --git a/repository/storage/redis_test.go b/repository/storage/redis_test.go new file mode 100644 index 0000000..846953c --- /dev/null +++ b/repository/storage/redis_test.go @@ -0,0 +1,41 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package storage + +import ( + "fmt" + "testing" + "time" + + "github.com/alicebob/miniredis/v2" +) + +func TestPushMsg(t *testing.T) { + mr, err := miniredis.Run() + if err != nil { + fmt.Println(err) + return + } + + InitClient(fmt.Sprintf("%v:%v", mr.Host(), mr.Port()), "", 0) + + PushMsg(map[string]interface{}{"key": "0e01ce6a1829f9a01be7fdd4671fa85280", "bucket": "eulixspace-files"}, "delete") + + time.Sleep(time.Second) + se, err := mr.Stream("fileChangelogs") + if err != nil || len(se[0].Values) != 6 { + t.Fatalf("failed to get msg from redis. err=%v, values=%v", err, se[0].Values) + } +} diff --git a/routers/api/async_task.go b/routers/api/async_task.go new file mode 100644 index 0000000..066c906 --- /dev/null +++ b/routers/api/async_task.go @@ -0,0 +1,60 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package api + +import ( + "aofs/internal/bpctx" + "aofs/internal/proto" + "aofs/services/async" + + "github.com/gin-gonic/gin" +) + +var taskList = async.NewTaskList() + +// GetAsyncTaskInfo @Summary Query the status of an asynchronous task +// @Description Query the status of an asynchronous task +// @Tags Async +// @Accept application/json +// @Produce application/json +// @Param userId query int true "user id" +// @Param taskId query string true "task id" +// @Success 200 {object} proto.Rsp{results=async.AsyncTask} "response" +// @Router /space/v1/api/async/task [GET] +func GetAsyncTaskInfo(c *gin.Context) { + ctx := bpctx.NewCtx(c) + + var taskReq proto.AsyncStaskInfoReq + + if err := c.ShouldBind(&taskReq); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + + taskInfo, err := taskList.GetTaskStatus(taskReq.TaskId) + if err != nil { + ctx.SendErr(proto.CodeGetAsyncTaskInfoFailed, err) + return + } + defer func() { + ctx.LogI("async task", taskReq) + //time.Sleep(time.Second) + if taskInfo.TaskStatus == async.AsyncTaskStatusSuccess || taskInfo.TaskStatus == async.AsyncTaskStatusFailed { + taskList.Remove(taskInfo.TaskId) + } + }() + + ctx.SendOk(taskInfo) +} diff --git a/routers/api/docs/docs.go b/routers/api/docs/docs.go new file mode 100644 index 0000000..623f11a --- /dev/null +++ b/routers/api/docs/docs.go @@ -0,0 +1,2689 @@ +// Code generated by swaggo/swag. DO NOT EDIT. + +package docs + +import "github.com/swaggo/swag" + +const docTemplate = `{ + "schemes": {{ marshal .Schemes }}, + "swagger": "2.0", + "info": { + "description": "{{escape .Description}}", + "title": "{{.Title}}", + "termsOfService": "http://swagger.io/terms/", + "contact": { + "name": "AO.space", + "url": "https://ao.space/", + "email": "service@ao.space" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "{{.Version}}" + }, + "host": "{{.Host}}", + "basePath": "{{.BasePath}}", + "paths": { + "/space/v1/api/async/task": { + "get": { + "description": "Query the status of an asynchronous task", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Async" + ], + "parameters": [ + { + "type": "integer", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "task id", + "name": "taskId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "response", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/async.AsyncTask" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/file/compressed": { + "get": { + "description": "Get compressed graph", + "tags": [ + "File" + ], + "summary": "Get compressed graph", + "parameters": [ + { + "type": "string", + "description": "uuid", + "name": "uuid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "file content", + "schema": { + "type": "file" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/proto.ErrMess" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/proto.ErrMess" + } + } + } + } + }, + "/space/v1/api/file/copy": { + "post": { + "description": "Batch copy files", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Batch copy files", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "description": "params", + "name": "copyFilesReq", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.CopyFileReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.CopyRsp" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/file/delete": { + "post": { + "description": "Delete files/folders to Recycle bin", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Delete files/folders to Recycle bin", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "description": "params", + "name": "DeleteId", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.DeleteFileReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Rsp" + } + }, + "201": { + "description": "Created", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/async.AsyncTask" + } + } + } + ] + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/httputil.HTTPError" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/httputil.HTTPError" + } + } + } + } + }, + "/space/v1/api/file/download": { + "get": { + "description": "File download", + "produces": [ + "application/octet-stream" + ], + "tags": [ + "File" + ], + "summary": "File download", + "parameters": [ + { + "type": "string", + "description": "uuid", + "name": "uuid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "range, such as:bytes=200-1000", + "name": "Range", + "in": "header" + } + ], + "responses": { + "200": { + "description": "file content", + "schema": { + "type": "file" + } + }, + "206": { + "description": "Partial Content", + "schema": { + "type": "file" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/proto.ErrMess" + } + }, + "416": { + "description": "Range Not Satisfiable", + "schema": { + "$ref": "#/definitions/proto.ErrMess" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/proto.ErrMess" + } + } + } + } + }, + "/space/v1/api/file/info": { + "get": { + "description": "Query file info", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Query file info", + "parameters": [ + { + "type": "integer", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "file/folder uuid", + "name": "uuid", + "in": "query" + }, + { + "type": "string", + "description": "path", + "name": "path", + "in": "query" + }, + { + "type": "string", + "description": "name", + "name": "name", + "in": "query" + } + ], + "responses": { + "200": { + "description": "file info", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.FileInfoRsp" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/file/list": { + "get": { + "description": "Get file list", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Get file list", + "parameters": [ + { + "type": "integer", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "folder uuid", + "name": "uuid", + "in": "query" + }, + { + "type": "boolean", + "description": "Whether to filter folders", + "name": "isDir", + "in": "query" + }, + { + "type": "integer", + "description": "page,default:1", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size,default:10", + "name": "pageSize", + "in": "query" + }, + { + "type": "string", + "description": "Sort. The default is reverse order", + "name": "orderBy", + "in": "query" + }, + { + "type": "string", + "description": "file classification, field value: document,video,picture or other; If there is no field, all are included", + "name": "category", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.GetListRspData" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/file/move": { + "post": { + "description": "Move file/folder", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Move file/folder", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "description": "params", + "name": "moveFilesReq", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.MoveFileReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.DbAffect" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/file/rename": { + "post": { + "description": "Modify file/folder name", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Modify file/folder name", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "description": "request info", + "name": "ModifyFileReq", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.ModifyFileReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.DbAffect" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/file/search": { + "get": { + "description": "Search files", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Search files", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "folder's uuid,default: /", + "name": "uuid", + "in": "query" + }, + { + "type": "string", + "description": "filename", + "name": "name", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "file type", + "name": "category", + "in": "query" + }, + { + "type": "integer", + "description": "page, default:1", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size,default:10", + "name": "pageSize", + "in": "query" + }, + { + "type": "string", + "description": "sort type, default value is in reverse order of change time", + "name": "orderBy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.GetListRspData" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/file/thumb": { + "get": { + "description": "Get thumbnail", + "tags": [ + "File" + ], + "summary": "Get thumbnail", + "parameters": [ + { + "type": "string", + "description": "uuid", + "name": "uuid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "file content", + "schema": { + "type": "file" + } + }, + "400": { + "description": "param error", + "schema": { + "$ref": "#/definitions/proto.ErrMess" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/proto.ErrMess" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/proto.ErrMess" + } + } + } + } + }, + "/space/v1/api/file/vod/symlink": { + "post": { + "description": "Create symbolic link", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Create symbolic link", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "description": "parmas", + "name": "VodSymlinkReq", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.VodSymlinkReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.VodSymlinkRsp" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/folder/create": { + "post": { + "description": "Create Folder", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Folder" + ], + "summary": "Create Folder", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "description": "params", + "name": "createFolderReq", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.CreateFolderReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.FileInfo" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/folder/info": { + "get": { + "description": "Get folder details", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Folder" + ], + "summary": "Get folder details", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "folder's uuid", + "name": "uuid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.FolderInfo" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/inner/file/info": { + "get": { + "description": "Get file info for inner", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Get file info for inner", + "parameters": [ + { + "type": "integer", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "uuid", + "name": "uuid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.FileInfoForInnerRsp" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/inner/file/infos": { + "post": { + "description": "Get fileinfo list for inner", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Get fileinfo list for inner", + "parameters": [ + { + "type": "integer", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "description": "uuids", + "name": "FileInfoForTrendsReq", + "in": "body", + "schema": { + "$ref": "#/definitions/proto.FileInfoForTrendsReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.FileInfoForTrendsRsp" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/multipart/complete": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Multipart" + ], + "summary": "Complte multipart task", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "request id", + "name": "requestId", + "in": "query", + "required": true + }, + { + "description": "params", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.CompleteMultipartTaskReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.CompleteMultipartTaskRsp" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/multipart/create": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Multipart" + ], + "summary": "Creating a multipart task", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "request id", + "name": "requestId", + "in": "query", + "required": true + }, + { + "description": "params", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.CreateMultipartTaskReq" + } + } + ], + "responses": { + "200": { + "description": "task info", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.CreateMultipartTaskRsp" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/multipart/delete": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Multipart" + ], + "summary": "Delete multipart task", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "request id", + "name": "requestId", + "in": "query", + "required": true + }, + { + "description": "params", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.DeleteMultipartTaskReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Rsp" + } + } + } + } + }, + "/space/v1/api/multipart/list": { + "get": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Multipart" + ], + "summary": "Query multipart task info", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "request id", + "name": "requestId", + "in": "query", + "required": true + }, + { + "description": "param", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.ListMultipartReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.ListMultipartRsp" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/multipart/upload": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Multipart" + ], + "summary": "Upload multipart data", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "request id", + "name": "requestId", + "in": "query", + "required": true + }, + { + "type": "integer", + "name": "end", + "in": "query", + "required": true + }, + { + "type": "string", + "name": "md5sum", + "in": "query", + "required": true + }, + { + "minimum": 0, + "type": "integer", + "name": "start", + "in": "query" + }, + { + "type": "string", + "name": "uploadId", + "in": "query", + "required": true + }, + { + "description": "part content", + "name": "object", + "in": "body", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Rsp" + } + } + } + } + }, + "/space/v1/api/recycled/clear": { + "post": { + "description": "Clean out the recycle bin", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Recycled" + ], + "summary": "Clean out the recycle bin", + "parameters": [ + { + "type": "integer", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "description": "params", + "name": "uuids", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.RecycledPhyDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Rsp" + } + } + } + } + }, + "/space/v1/api/recycled/list": { + "get": { + "description": "Query the recycle bin file list", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Recycled" + ], + "summary": "Query the recycle bin file list", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "page index,default: 1", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size,default: 10", + "name": "pageSize", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.GetListRspData" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/recycled/restore": { + "post": { + "description": "Restore files from recycle bin", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Recycled" + ], + "summary": "Restore files from recycle bin", + "parameters": [ + { + "type": "integer", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "description": "params", + "name": "restoreFilesReq", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.RestoreRecycledReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "$ref": "#/definitions/Rsp" + } + }, + "201": { + "description": "asynchronous task", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/async.AsyncTask" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/status": { + "get": { + "description": "Querying service status", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "ServerStatus" + ], + "summary": "Querying service status", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.StatusRsp" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/sync/synced": { + "get": { + "description": "Obtain incremental synchronization data", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Sync" + ], + "summary": "Obtain incremental synchronization data", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "timestamp", + "name": "timestamp", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "path", + "name": "path", + "in": "query" + }, + { + "type": "string", + "description": "device id", + "name": "deviceId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.GetListRspData" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/user/delete": { + "post": { + "description": "Delete user", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "User" + ], + "summary": "Delete user", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "description": "user id", + "name": "userId", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.User" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Rsp" + } + } + } + } + }, + "/space/v1/api/user/init": { + "post": { + "description": "Initialize user", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "User" + ], + "summary": "Initialize user", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "description": "user id", + "name": "userId", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.User" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Rsp" + } + } + } + } + }, + "/space/v1/api/user/storage": { + "get": { + "description": "Query the user space capacity", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "User" + ], + "summary": "Query the user space capacity", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "user id", + "name": "targetUserId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.Storage" + } + } + } + ] + } + } + } + } + } + }, + "definitions": { + "Rsp": { + "type": "object", + "properties": { + "code": { + "description": "msg code", + "allOf": [ + { + "$ref": "#/definitions/proto.CodeType" + } + ] + }, + "message": { + "description": "msg info", + "type": "string" + }, + "requestId": { + "description": "trans id", + "type": "string" + }, + "results": { + "description": "response body" + } + } + }, + "async.AsyncTask": { + "type": "object", + "properties": { + "processed": { + "type": "integer" + }, + "taskId": { + "type": "string" + }, + "taskStatus": { + "type": "string" + }, + "total": { + "type": "integer" + } + } + }, + "httputil.HTTPError": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 400 + }, + "message": { + "type": "string", + "example": "status bad request" + } + } + }, + "proto.CodeType": { + "type": "integer", + "enum": [ + 200, + 201, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1021, + 1022, + 1027, + 1028, + 1029, + 1030, + 1031, + 1032, + 1036, + 1037, + 1038, + 1046, + 1050, + 1061, + 1062 + ], + "x-enum-comments": { + "CodeCopyIdError": "文件夹不能拷贝到自己", + "CodeFailedToConnect": "建立连接失败", + "CodeFailedToConnectDB": "连接DB失败", + "CodeFailedToCreateBucket": "失败去创建桶", + "CodeFailedToCreateFolder": "失败去创建文件夹", + "CodeFailedToCreateMultipartTask": "失败去创建任务", + "CodeFailedToCreateSymlink": "失败去创建符号链接", + "CodeFailedToDeleteUser": "删除用户失败", + "CodeFailedToGetUsedStorage": "获取用户空间使用量失败", + "CodeFailedToInitUser": "失败去初始化用户", + "CodeFailedToOpenFile": "打开文件失败", + "CodeFailedToOperateDB": "失败去操作数据库", + "CodeFailedToOptMinio": "失败去写文件", + "CodeFailedToSaveFile": "失败去保存数据", + "CodeFileExist": "文件已存在", + "CodeFileNotExist": "文件不存在", + "CodeFolderDepthTooLong": "文件夹层数超过5层", + "CodeFolderExist": "文件夹已存在", + "CodeFolderNotExist": "文件夹不存在", + "CodeGetAsyncTaskInfoFailed": "获取异步任务状态失败", + "CodeMultipartRangeUploaded": "分片范围已上传", + "CodeMultipartTaskCompleteErr": "合并错误", + "CodeMultipartTaskHashErr": "文件hash校验错误", + "CodeMultipartTaskNotFound": "未找到任务", + "CodeMultipartTaskOverlap": "任务重叠", + "CodeMultipartTaskRangeErr": "上传范围错误", + "CodeMultipartUploadingConflit": "分片范围上传冲突", + "CodeNotEnoughSpace": "空间不够,不上传", + "CodeParamErr": "参数错误", + "CodeReqParamErr": "请求参数错误(推荐)", + "CodeUserIdError": "用户Id的错误", + "CodeWriteRedisFailed": "写入redis 失败", + "CodeZipFileFailed": "压缩文件失败" + }, + "x-enum-varnames": [ + "CodeOk", + "CodeCreateAsyncTaskSuccess", + "CodeParamErr", + "CodeReqParamErr", + "CodeFileNotExist", + "CodeFailedToOpenFile", + "CodeFolderNotExist", + "CodeFailedToConnect", + "CodeFailedToConnectDB", + "CodeFailedToOptMinio", + "CodeFailedToCreateBucket", + "CodeFailedToSaveFile", + "CodeFailedToOperateDB", + "CodeFailedToCreateFolder", + "CodeFileExist", + "CodeFolderExist", + "CodeFolderDepthTooLong", + "CodeUserIdError", + "CodeFailedToInitUser", + "CodeFailedToDeleteUser", + "CodeFailedToGetUsedStorage", + "CodeCopyIdError", + "CodeFailedToCreateMultipartTask", + "CodeMultipartTaskNotFound", + "CodeMultipartTaskOverlap", + "CodeMultipartTaskRangeErr", + "CodeMultipartTaskHashErr", + "CodeMultipartTaskCompleteErr", + "CodeNotEnoughSpace", + "CodeMultipartRangeUploaded", + "CodeMultipartUploadingConflit", + "CodeWriteRedisFailed", + "CodeZipFileFailed", + "CodeFailedToCreateSymlink", + "CodeGetAsyncTaskInfoFailed" + ] + }, + "proto.CompleteMultipartTaskReq": { + "type": "object", + "required": [ + "uploadId" + ], + "properties": { + "uploadId": { + "type": "string" + } + } + }, + "proto.CompleteMultipartTaskRsp": { + "type": "object", + "properties": { + "betag": { + "type": "string" + }, + "bucketName": { + "type": "string" + }, + "category": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "executable": { + "type": "boolean" + }, + "ext": { + "type": "array", + "items": { + "type": "integer" + } + }, + "fileCount": { + "type": "integer" + }, + "isDir": { + "type": "boolean" + }, + "mime": { + "type": "string" + }, + "modifyAt": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "operationAt": { + "type": "integer" + }, + "parentUuid": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "tags": { + "type": "string" + }, + "transactionId": { + "type": "integer" + }, + "trashed": { + "description": "0-normal; 1-Logical delete, put into the recycle bin; 2-Has been cleared from the recycle bin and is to be physically deleted", + "type": "integer" + }, + "userId": { + "type": "integer" + }, + "uuid": { + "type": "string" + }, + "version": { + "type": "integer" + } + } + }, + "proto.CopyFileReq": { + "type": "object", + "properties": { + "dstPath": { + "description": "dest path", + "type": "string" + }, + "uuids": { + "description": "uuids", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "proto.CopyRsp": { + "type": "object", + "properties": { + "affectRows": { + "type": "integer" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/proto.NewAndOldUuid" + } + } + } + }, + "proto.CreateFolderReq": { + "type": "object", + "properties": { + "currentDirUuid": { + "description": "current folder's uuid", + "type": "string" + }, + "folderName": { + "description": "folder name", + "type": "string" + } + } + }, + "proto.CreateMultipartTaskConflictRsp": { + "type": "object", + "required": [ + "betag", + "fileName", + "size" + ], + "properties": { + "albumId": { + "type": "integer" + }, + "betag": { + "type": "string", + "maxLength": 34, + "minLength": 32 + }, + "businessId": { + "type": "integer" + }, + "createTime": { + "type": "integer" + }, + "fileName": { + "type": "string" + }, + "folderId": { + "type": "string" + }, + "folderPath": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "modifyTime": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "uploadId": { + "type": "string" + }, + "uploadedParts": { + "type": "array", + "items": { + "$ref": "#/definitions/proto.Part" + } + }, + "uploadingParts": { + "type": "array", + "items": { + "$ref": "#/definitions/proto.Part" + } + } + } + }, + "proto.CreateMultipartTaskReq": { + "type": "object", + "required": [ + "betag", + "fileName", + "size" + ], + "properties": { + "albumId": { + "type": "integer" + }, + "betag": { + "type": "string", + "maxLength": 34, + "minLength": 32 + }, + "businessId": { + "type": "integer" + }, + "createTime": { + "type": "integer" + }, + "fileName": { + "type": "string" + }, + "folderId": { + "type": "string" + }, + "folderPath": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "modifyTime": { + "type": "integer" + }, + "size": { + "type": "integer" + } + } + }, + "proto.CreateMultipartTaskRsp": { + "type": "object", + "properties": { + "completeInfo": { + "description": "task completed", + "allOf": [ + { + "$ref": "#/definitions/proto.FileInfo" + } + ] + }, + "conflictInfo": { + "description": "task exists", + "allOf": [ + { + "$ref": "#/definitions/proto.CreateMultipartTaskConflictRsp" + } + ] + }, + "rspType": { + "description": "rsp type", + "type": "integer" + }, + "succInfo": { + "description": "task info", + "allOf": [ + { + "$ref": "#/definitions/proto.CreateMultipartTaskSuccRsp" + } + ] + } + } + }, + "proto.CreateMultipartTaskSuccRsp": { + "type": "object", + "properties": { + "partSize": { + "type": "integer" + }, + "uploadId": { + "type": "string" + } + } + }, + "proto.DbAffect": { + "type": "object", + "properties": { + "affectRows": { + "type": "integer" + } + } + }, + "proto.DeleteFileReq": { + "type": "object", + "properties": { + "uuids": { + "description": "uuids", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "proto.DeleteMultipartTaskReq": { + "type": "object", + "required": [ + "uploadId" + ], + "properties": { + "uploadId": { + "type": "string" + } + } + }, + "proto.ErrMess": { + "type": "object", + "properties": { + "code": { + "$ref": "#/definitions/proto.CodeType" + }, + "message": { + "type": "string" + } + } + }, + "proto.FileInfo": { + "type": "object", + "properties": { + "betag": { + "type": "string" + }, + "bucketName": { + "type": "string" + }, + "category": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "executable": { + "type": "boolean" + }, + "ext": { + "type": "array", + "items": { + "type": "integer" + } + }, + "fileCount": { + "type": "integer" + }, + "isDir": { + "type": "boolean" + }, + "mime": { + "type": "string" + }, + "modifyAt": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "operationAt": { + "type": "integer" + }, + "parentUuid": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "tags": { + "type": "string" + }, + "transactionId": { + "type": "integer" + }, + "trashed": { + "description": "0-normal; 1-Logical delete, put into the recycle bin; 2-Has been cleared from the recycle bin and is to be physically deleted", + "type": "integer" + }, + "userId": { + "type": "integer" + }, + "uuid": { + "type": "string" + }, + "version": { + "type": "integer" + } + } + }, + "proto.FileInfoForInnerRsp": { + "type": "object", + "properties": { + "betag": { + "type": "string" + }, + "bucketName": { + "type": "string" + }, + "category": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "duration": { + "type": "integer" + }, + "executable": { + "type": "boolean" + }, + "ext": { + "type": "array", + "items": { + "type": "integer" + } + }, + "fileCount": { + "type": "integer" + }, + "isDir": { + "type": "boolean" + }, + "mime": { + "type": "string" + }, + "modifyAt": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "operationAt": { + "type": "integer" + }, + "parentUuid": { + "type": "string" + }, + "path": { + "type": "string" + }, + "relativePath": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "tags": { + "type": "string" + }, + "transactionId": { + "type": "integer" + }, + "trashed": { + "description": "0-normal; 1-Logical delete, put into the recycle bin; 2-Has been cleared from the recycle bin and is to be physically deleted", + "type": "integer" + }, + "userId": { + "type": "integer" + }, + "uuid": { + "type": "string" + }, + "version": { + "type": "integer" + } + } + }, + "proto.FileInfoForTrends": { + "type": "object", + "properties": { + "betag": { + "type": "string" + }, + "bucketName": { + "type": "string" + }, + "category": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "duration": { + "type": "integer" + }, + "executable": { + "type": "boolean" + }, + "ext": { + "type": "array", + "items": { + "type": "integer" + } + }, + "fileCount": { + "type": "integer" + }, + "isDir": { + "type": "boolean" + }, + "mime": { + "type": "string" + }, + "modifyAt": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "operationAt": { + "type": "integer" + }, + "parentUuid": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "tags": { + "type": "string" + }, + "transactionId": { + "type": "integer" + }, + "trashed": { + "description": "0-normal; 1-Logical delete, put into the recycle bin; 2-Has been cleared from the recycle bin and is to be physically deleted", + "type": "integer" + }, + "userId": { + "type": "integer" + }, + "uuid": { + "type": "string" + }, + "version": { + "type": "integer" + } + } + }, + "proto.FileInfoForTrendsReq": { + "type": "object", + "properties": { + "uuids": { + "description": "uuids", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "proto.FileInfoForTrendsRsp": { + "type": "object", + "properties": { + "fileInfos": { + "type": "array", + "items": { + "$ref": "#/definitions/proto.FileInfoForTrends" + } + } + } + }, + "proto.FileInfoPub": { + "type": "object", + "properties": { + "betag": { + "type": "string" + }, + "category": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "fileCount": { + "type": "integer" + }, + "isDir": { + "type": "boolean" + }, + "mime": { + "type": "string" + }, + "modifyAt": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "operationAt": { + "type": "integer" + }, + "parentUuid": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "trashed": { + "description": "0-normal; 1-Logical delete, put into the recycle bin; 2-Has been cleared from the recycle bin and is to be physically deleted", + "type": "integer" + }, + "uuid": { + "type": "string" + } + } + }, + "proto.FileInfoRsp": { + "type": "object", + "properties": { + "betag": { + "type": "string" + }, + "category": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "fileCount": { + "type": "integer" + }, + "isDir": { + "type": "boolean" + }, + "mime": { + "type": "string" + }, + "modifyAt": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "operationAt": { + "type": "integer" + }, + "parentUuid": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "trashed": { + "description": "0-normal; 1-Logical delete, put into the recycle bin; 2-Has been cleared from the recycle bin and is to be physically deleted", + "type": "integer" + }, + "uuid": { + "type": "string" + } + } + }, + "proto.FolderInfo": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "operationAt": { + "type": "integer" + }, + "path": { + "type": "string" + }, + "size": { + "type": "integer" + } + } + }, + "proto.GetListRspData": { + "type": "object", + "properties": { + "fileList": { + "type": "array", + "items": { + "$ref": "#/definitions/proto.FileInfoPub" + } + }, + "pageInfo": { + "$ref": "#/definitions/proto.PageInfoExt" + } + } + }, + "proto.ListMultipartReq": { + "type": "object", + "required": [ + "uploadId" + ], + "properties": { + "uploadId": { + "type": "string" + } + } + }, + "proto.ListMultipartRsp": { + "type": "object", + "properties": { + "uploadedParts": { + "type": "array", + "items": { + "$ref": "#/definitions/proto.Part" + } + }, + "uploadingParts": { + "type": "array", + "items": { + "$ref": "#/definitions/proto.Part" + } + } + } + }, + "proto.ModifyFileReq": { + "type": "object", + "properties": { + "fileName": { + "description": "new name", + "type": "string" + }, + "uuid": { + "description": "file/folder uuid", + "type": "string" + } + } + }, + "proto.MoveFileReq": { + "type": "object", + "required": [ + "uuids" + ], + "properties": { + "destPath": { + "description": "dest path", + "type": "string" + }, + "uuids": { + "description": "uuid", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "proto.NewAndOldUuid": { + "type": "object", + "properties": { + "newId": { + "type": "string" + }, + "oldId": { + "type": "string" + } + } + }, + "proto.PageInfoExt": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "page": { + "type": "integer" + }, + "pageSize": { + "type": "integer" + }, + "total": { + "type": "integer" + } + } + }, + "proto.Part": { + "type": "object", + "required": [ + "end" + ], + "properties": { + "end": { + "type": "integer" + }, + "start": { + "type": "integer", + "minimum": 0 + } + } + }, + "proto.RecycledPhyDeleteReq": { + "type": "object", + "properties": { + "uuids": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "proto.RestoreRecycledReq": { + "type": "object", + "required": [ + "uuids" + ], + "properties": { + "uuids": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "proto.StatusRsp": { + "type": "object", + "properties": { + "status": { + "type": "string" + } + } + }, + "proto.Storage": { + "type": "object", + "properties": { + "userStorage": { + "type": "integer" + } + } + }, + "proto.User": { + "type": "object", + "properties": { + "userId": { + "type": "integer" + } + } + }, + "proto.VodSymlinkReq": { + "type": "object", + "properties": { + "uuid": { + "description": "file's uuid", + "type": "string" + } + } + }, + "proto.VodSymlinkRsp": { + "type": "object", + "properties": { + "linkName": { + "type": "string" + } + } + } + } +}` + +// SwaggerInfo holds exported Swagger Info so clients can modify it +var SwaggerInfo = &swag.Spec{ + Version: "1.0", + Host: "", + BasePath: "/", + Schemes: []string{}, + Title: "aofs apis", + Description: "This is AO.space aofs OpenAPI reference document.", + InfoInstanceName: "swagger", + SwaggerTemplate: docTemplate, + LeftDelim: "{{", + RightDelim: "}}", +} + +func init() { + swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) +} diff --git a/routers/api/docs/swagger.json b/routers/api/docs/swagger.json new file mode 100644 index 0000000..2657a80 --- /dev/null +++ b/routers/api/docs/swagger.json @@ -0,0 +1,2663 @@ +{ + "swagger": "2.0", + "info": { + "description": "This is AO.space aofs OpenAPI reference document.", + "title": "aofs apis", + "termsOfService": "http://swagger.io/terms/", + "contact": { + "name": "AO.space", + "url": "https://ao.space/", + "email": "service@ao.space" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "1.0" + }, + "basePath": "/", + "paths": { + "/space/v1/api/async/task": { + "get": { + "description": "Query the status of an asynchronous task", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Async" + ], + "parameters": [ + { + "type": "integer", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "task id", + "name": "taskId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "response", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/async.AsyncTask" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/file/compressed": { + "get": { + "description": "Get compressed graph", + "tags": [ + "File" + ], + "summary": "Get compressed graph", + "parameters": [ + { + "type": "string", + "description": "uuid", + "name": "uuid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "file content", + "schema": { + "type": "file" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/proto.ErrMess" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/proto.ErrMess" + } + } + } + } + }, + "/space/v1/api/file/copy": { + "post": { + "description": "Batch copy files", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Batch copy files", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "description": "params", + "name": "copyFilesReq", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.CopyFileReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.CopyRsp" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/file/delete": { + "post": { + "description": "Delete files/folders to Recycle bin", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Delete files/folders to Recycle bin", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "description": "params", + "name": "DeleteId", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.DeleteFileReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Rsp" + } + }, + "201": { + "description": "Created", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/async.AsyncTask" + } + } + } + ] + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/httputil.HTTPError" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/httputil.HTTPError" + } + } + } + } + }, + "/space/v1/api/file/download": { + "get": { + "description": "File download", + "produces": [ + "application/octet-stream" + ], + "tags": [ + "File" + ], + "summary": "File download", + "parameters": [ + { + "type": "string", + "description": "uuid", + "name": "uuid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "range, such as:bytes=200-1000", + "name": "Range", + "in": "header" + } + ], + "responses": { + "200": { + "description": "file content", + "schema": { + "type": "file" + } + }, + "206": { + "description": "Partial Content", + "schema": { + "type": "file" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/proto.ErrMess" + } + }, + "416": { + "description": "Range Not Satisfiable", + "schema": { + "$ref": "#/definitions/proto.ErrMess" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/proto.ErrMess" + } + } + } + } + }, + "/space/v1/api/file/info": { + "get": { + "description": "Query file info", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Query file info", + "parameters": [ + { + "type": "integer", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "file/folder uuid", + "name": "uuid", + "in": "query" + }, + { + "type": "string", + "description": "path", + "name": "path", + "in": "query" + }, + { + "type": "string", + "description": "name", + "name": "name", + "in": "query" + } + ], + "responses": { + "200": { + "description": "file info", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.FileInfoRsp" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/file/list": { + "get": { + "description": "Get file list", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Get file list", + "parameters": [ + { + "type": "integer", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "folder uuid", + "name": "uuid", + "in": "query" + }, + { + "type": "boolean", + "description": "Whether to filter folders", + "name": "isDir", + "in": "query" + }, + { + "type": "integer", + "description": "page,default:1", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size,default:10", + "name": "pageSize", + "in": "query" + }, + { + "type": "string", + "description": "Sort. The default is reverse order", + "name": "orderBy", + "in": "query" + }, + { + "type": "string", + "description": "file classification, field value: document,video,picture or other; If there is no field, all are included", + "name": "category", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.GetListRspData" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/file/move": { + "post": { + "description": "Move file/folder", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Move file/folder", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "description": "params", + "name": "moveFilesReq", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.MoveFileReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.DbAffect" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/file/rename": { + "post": { + "description": "Modify file/folder name", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Modify file/folder name", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "description": "request info", + "name": "ModifyFileReq", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.ModifyFileReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.DbAffect" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/file/search": { + "get": { + "description": "Search files", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Search files", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "folder's uuid,default: /", + "name": "uuid", + "in": "query" + }, + { + "type": "string", + "description": "filename", + "name": "name", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "file type", + "name": "category", + "in": "query" + }, + { + "type": "integer", + "description": "page, default:1", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size,default:10", + "name": "pageSize", + "in": "query" + }, + { + "type": "string", + "description": "sort type, default value is in reverse order of change time", + "name": "orderBy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.GetListRspData" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/file/thumb": { + "get": { + "description": "Get thumbnail", + "tags": [ + "File" + ], + "summary": "Get thumbnail", + "parameters": [ + { + "type": "string", + "description": "uuid", + "name": "uuid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "file content", + "schema": { + "type": "file" + } + }, + "400": { + "description": "param error", + "schema": { + "$ref": "#/definitions/proto.ErrMess" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/proto.ErrMess" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/proto.ErrMess" + } + } + } + } + }, + "/space/v1/api/file/vod/symlink": { + "post": { + "description": "Create symbolic link", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Create symbolic link", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "description": "parmas", + "name": "VodSymlinkReq", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.VodSymlinkReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.VodSymlinkRsp" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/folder/create": { + "post": { + "description": "Create Folder", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Folder" + ], + "summary": "Create Folder", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "description": "params", + "name": "createFolderReq", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.CreateFolderReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.FileInfo" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/folder/info": { + "get": { + "description": "Get folder details", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Folder" + ], + "summary": "Get folder details", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "folder's uuid", + "name": "uuid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.FolderInfo" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/inner/file/info": { + "get": { + "description": "Get file info for inner", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Get file info for inner", + "parameters": [ + { + "type": "integer", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "uuid", + "name": "uuid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.FileInfoForInnerRsp" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/inner/file/infos": { + "post": { + "description": "Get fileinfo list for inner", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "File" + ], + "summary": "Get fileinfo list for inner", + "parameters": [ + { + "type": "integer", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "description": "uuids", + "name": "FileInfoForTrendsReq", + "in": "body", + "schema": { + "$ref": "#/definitions/proto.FileInfoForTrendsReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.FileInfoForTrendsRsp" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/multipart/complete": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Multipart" + ], + "summary": "Complte multipart task", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "request id", + "name": "requestId", + "in": "query", + "required": true + }, + { + "description": "params", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.CompleteMultipartTaskReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.CompleteMultipartTaskRsp" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/multipart/create": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Multipart" + ], + "summary": "Creating a multipart task", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "request id", + "name": "requestId", + "in": "query", + "required": true + }, + { + "description": "params", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.CreateMultipartTaskReq" + } + } + ], + "responses": { + "200": { + "description": "task info", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.CreateMultipartTaskRsp" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/multipart/delete": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Multipart" + ], + "summary": "Delete multipart task", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "request id", + "name": "requestId", + "in": "query", + "required": true + }, + { + "description": "params", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.DeleteMultipartTaskReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Rsp" + } + } + } + } + }, + "/space/v1/api/multipart/list": { + "get": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Multipart" + ], + "summary": "Query multipart task info", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "request id", + "name": "requestId", + "in": "query", + "required": true + }, + { + "description": "param", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.ListMultipartReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.ListMultipartRsp" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/multipart/upload": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Multipart" + ], + "summary": "Upload multipart data", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "request id", + "name": "requestId", + "in": "query", + "required": true + }, + { + "type": "integer", + "name": "end", + "in": "query", + "required": true + }, + { + "type": "string", + "name": "md5sum", + "in": "query", + "required": true + }, + { + "minimum": 0, + "type": "integer", + "name": "start", + "in": "query" + }, + { + "type": "string", + "name": "uploadId", + "in": "query", + "required": true + }, + { + "description": "part content", + "name": "object", + "in": "body", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Rsp" + } + } + } + } + }, + "/space/v1/api/recycled/clear": { + "post": { + "description": "Clean out the recycle bin", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Recycled" + ], + "summary": "Clean out the recycle bin", + "parameters": [ + { + "type": "integer", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "description": "params", + "name": "uuids", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.RecycledPhyDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Rsp" + } + } + } + } + }, + "/space/v1/api/recycled/list": { + "get": { + "description": "Query the recycle bin file list", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Recycled" + ], + "summary": "Query the recycle bin file list", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "page index,default: 1", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size,default: 10", + "name": "pageSize", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.GetListRspData" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/recycled/restore": { + "post": { + "description": "Restore files from recycle bin", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Recycled" + ], + "summary": "Restore files from recycle bin", + "parameters": [ + { + "type": "integer", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "description": "params", + "name": "restoreFilesReq", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.RestoreRecycledReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "$ref": "#/definitions/Rsp" + } + }, + "201": { + "description": "asynchronous task", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/async.AsyncTask" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/status": { + "get": { + "description": "Querying service status", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "ServerStatus" + ], + "summary": "Querying service status", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.StatusRsp" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/sync/synced": { + "get": { + "description": "Obtain incremental synchronization data", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Sync" + ], + "summary": "Obtain incremental synchronization data", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "timestamp", + "name": "timestamp", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "path", + "name": "path", + "in": "query" + }, + { + "type": "string", + "description": "device id", + "name": "deviceId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.GetListRspData" + } + } + } + ] + } + } + } + } + }, + "/space/v1/api/user/delete": { + "post": { + "description": "Delete user", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "User" + ], + "summary": "Delete user", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "description": "user id", + "name": "userId", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.User" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Rsp" + } + } + } + } + }, + "/space/v1/api/user/init": { + "post": { + "description": "Initialize user", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "User" + ], + "summary": "Initialize user", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "description": "user id", + "name": "userId", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proto.User" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Rsp" + } + } + } + } + }, + "/space/v1/api/user/storage": { + "get": { + "description": "Query the user space capacity", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "User" + ], + "summary": "Query the user space capacity", + "parameters": [ + { + "type": "string", + "description": "user id", + "name": "userId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "user id", + "name": "targetUserId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/Rsp" + }, + { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/proto.Storage" + } + } + } + ] + } + } + } + } + } + }, + "definitions": { + "Rsp": { + "type": "object", + "properties": { + "code": { + "description": "msg code", + "allOf": [ + { + "$ref": "#/definitions/proto.CodeType" + } + ] + }, + "message": { + "description": "msg info", + "type": "string" + }, + "requestId": { + "description": "trans id", + "type": "string" + }, + "results": { + "description": "response body" + } + } + }, + "async.AsyncTask": { + "type": "object", + "properties": { + "processed": { + "type": "integer" + }, + "taskId": { + "type": "string" + }, + "taskStatus": { + "type": "string" + }, + "total": { + "type": "integer" + } + } + }, + "httputil.HTTPError": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 400 + }, + "message": { + "type": "string", + "example": "status bad request" + } + } + }, + "proto.CodeType": { + "type": "integer", + "enum": [ + 200, + 201, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1021, + 1022, + 1027, + 1028, + 1029, + 1030, + 1031, + 1032, + 1036, + 1037, + 1038, + 1046, + 1050, + 1061, + 1062 + ], + "x-enum-comments": { + "CodeCopyIdError": "文件夹不能拷贝到自己", + "CodeFailedToConnect": "建立连接失败", + "CodeFailedToConnectDB": "连接DB失败", + "CodeFailedToCreateBucket": "失败去创建桶", + "CodeFailedToCreateFolder": "失败去创建文件夹", + "CodeFailedToCreateMultipartTask": "失败去创建任务", + "CodeFailedToCreateSymlink": "失败去创建符号链接", + "CodeFailedToDeleteUser": "删除用户失败", + "CodeFailedToGetUsedStorage": "获取用户空间使用量失败", + "CodeFailedToInitUser": "失败去初始化用户", + "CodeFailedToOpenFile": "打开文件失败", + "CodeFailedToOperateDB": "失败去操作数据库", + "CodeFailedToOptMinio": "失败去写文件", + "CodeFailedToSaveFile": "失败去保存数据", + "CodeFileExist": "文件已存在", + "CodeFileNotExist": "文件不存在", + "CodeFolderDepthTooLong": "文件夹层数超过5层", + "CodeFolderExist": "文件夹已存在", + "CodeFolderNotExist": "文件夹不存在", + "CodeGetAsyncTaskInfoFailed": "获取异步任务状态失败", + "CodeMultipartRangeUploaded": "分片范围已上传", + "CodeMultipartTaskCompleteErr": "合并错误", + "CodeMultipartTaskHashErr": "文件hash校验错误", + "CodeMultipartTaskNotFound": "未找到任务", + "CodeMultipartTaskOverlap": "任务重叠", + "CodeMultipartTaskRangeErr": "上传范围错误", + "CodeMultipartUploadingConflit": "分片范围上传冲突", + "CodeNotEnoughSpace": "空间不够,不上传", + "CodeParamErr": "参数错误", + "CodeReqParamErr": "请求参数错误(推荐)", + "CodeUserIdError": "用户Id的错误", + "CodeWriteRedisFailed": "写入redis 失败", + "CodeZipFileFailed": "压缩文件失败" + }, + "x-enum-varnames": [ + "CodeOk", + "CodeCreateAsyncTaskSuccess", + "CodeParamErr", + "CodeReqParamErr", + "CodeFileNotExist", + "CodeFailedToOpenFile", + "CodeFolderNotExist", + "CodeFailedToConnect", + "CodeFailedToConnectDB", + "CodeFailedToOptMinio", + "CodeFailedToCreateBucket", + "CodeFailedToSaveFile", + "CodeFailedToOperateDB", + "CodeFailedToCreateFolder", + "CodeFileExist", + "CodeFolderExist", + "CodeFolderDepthTooLong", + "CodeUserIdError", + "CodeFailedToInitUser", + "CodeFailedToDeleteUser", + "CodeFailedToGetUsedStorage", + "CodeCopyIdError", + "CodeFailedToCreateMultipartTask", + "CodeMultipartTaskNotFound", + "CodeMultipartTaskOverlap", + "CodeMultipartTaskRangeErr", + "CodeMultipartTaskHashErr", + "CodeMultipartTaskCompleteErr", + "CodeNotEnoughSpace", + "CodeMultipartRangeUploaded", + "CodeMultipartUploadingConflit", + "CodeWriteRedisFailed", + "CodeZipFileFailed", + "CodeFailedToCreateSymlink", + "CodeGetAsyncTaskInfoFailed" + ] + }, + "proto.CompleteMultipartTaskReq": { + "type": "object", + "required": [ + "uploadId" + ], + "properties": { + "uploadId": { + "type": "string" + } + } + }, + "proto.CompleteMultipartTaskRsp": { + "type": "object", + "properties": { + "betag": { + "type": "string" + }, + "bucketName": { + "type": "string" + }, + "category": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "executable": { + "type": "boolean" + }, + "ext": { + "type": "array", + "items": { + "type": "integer" + } + }, + "fileCount": { + "type": "integer" + }, + "isDir": { + "type": "boolean" + }, + "mime": { + "type": "string" + }, + "modifyAt": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "operationAt": { + "type": "integer" + }, + "parentUuid": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "tags": { + "type": "string" + }, + "transactionId": { + "type": "integer" + }, + "trashed": { + "description": "0-normal; 1-Logical delete, put into the recycle bin; 2-Has been cleared from the recycle bin and is to be physically deleted", + "type": "integer" + }, + "userId": { + "type": "integer" + }, + "uuid": { + "type": "string" + }, + "version": { + "type": "integer" + } + } + }, + "proto.CopyFileReq": { + "type": "object", + "properties": { + "dstPath": { + "description": "dest path", + "type": "string" + }, + "uuids": { + "description": "uuids", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "proto.CopyRsp": { + "type": "object", + "properties": { + "affectRows": { + "type": "integer" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/proto.NewAndOldUuid" + } + } + } + }, + "proto.CreateFolderReq": { + "type": "object", + "properties": { + "currentDirUuid": { + "description": "current folder's uuid", + "type": "string" + }, + "folderName": { + "description": "folder name", + "type": "string" + } + } + }, + "proto.CreateMultipartTaskConflictRsp": { + "type": "object", + "required": [ + "betag", + "fileName", + "size" + ], + "properties": { + "albumId": { + "type": "integer" + }, + "betag": { + "type": "string", + "maxLength": 34, + "minLength": 32 + }, + "businessId": { + "type": "integer" + }, + "createTime": { + "type": "integer" + }, + "fileName": { + "type": "string" + }, + "folderId": { + "type": "string" + }, + "folderPath": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "modifyTime": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "uploadId": { + "type": "string" + }, + "uploadedParts": { + "type": "array", + "items": { + "$ref": "#/definitions/proto.Part" + } + }, + "uploadingParts": { + "type": "array", + "items": { + "$ref": "#/definitions/proto.Part" + } + } + } + }, + "proto.CreateMultipartTaskReq": { + "type": "object", + "required": [ + "betag", + "fileName", + "size" + ], + "properties": { + "albumId": { + "type": "integer" + }, + "betag": { + "type": "string", + "maxLength": 34, + "minLength": 32 + }, + "businessId": { + "type": "integer" + }, + "createTime": { + "type": "integer" + }, + "fileName": { + "type": "string" + }, + "folderId": { + "type": "string" + }, + "folderPath": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "modifyTime": { + "type": "integer" + }, + "size": { + "type": "integer" + } + } + }, + "proto.CreateMultipartTaskRsp": { + "type": "object", + "properties": { + "completeInfo": { + "description": "task completed", + "allOf": [ + { + "$ref": "#/definitions/proto.FileInfo" + } + ] + }, + "conflictInfo": { + "description": "task exists", + "allOf": [ + { + "$ref": "#/definitions/proto.CreateMultipartTaskConflictRsp" + } + ] + }, + "rspType": { + "description": "rsp type", + "type": "integer" + }, + "succInfo": { + "description": "task info", + "allOf": [ + { + "$ref": "#/definitions/proto.CreateMultipartTaskSuccRsp" + } + ] + } + } + }, + "proto.CreateMultipartTaskSuccRsp": { + "type": "object", + "properties": { + "partSize": { + "type": "integer" + }, + "uploadId": { + "type": "string" + } + } + }, + "proto.DbAffect": { + "type": "object", + "properties": { + "affectRows": { + "type": "integer" + } + } + }, + "proto.DeleteFileReq": { + "type": "object", + "properties": { + "uuids": { + "description": "uuids", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "proto.DeleteMultipartTaskReq": { + "type": "object", + "required": [ + "uploadId" + ], + "properties": { + "uploadId": { + "type": "string" + } + } + }, + "proto.ErrMess": { + "type": "object", + "properties": { + "code": { + "$ref": "#/definitions/proto.CodeType" + }, + "message": { + "type": "string" + } + } + }, + "proto.FileInfo": { + "type": "object", + "properties": { + "betag": { + "type": "string" + }, + "bucketName": { + "type": "string" + }, + "category": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "executable": { + "type": "boolean" + }, + "ext": { + "type": "array", + "items": { + "type": "integer" + } + }, + "fileCount": { + "type": "integer" + }, + "isDir": { + "type": "boolean" + }, + "mime": { + "type": "string" + }, + "modifyAt": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "operationAt": { + "type": "integer" + }, + "parentUuid": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "tags": { + "type": "string" + }, + "transactionId": { + "type": "integer" + }, + "trashed": { + "description": "0-normal; 1-Logical delete, put into the recycle bin; 2-Has been cleared from the recycle bin and is to be physically deleted", + "type": "integer" + }, + "userId": { + "type": "integer" + }, + "uuid": { + "type": "string" + }, + "version": { + "type": "integer" + } + } + }, + "proto.FileInfoForInnerRsp": { + "type": "object", + "properties": { + "betag": { + "type": "string" + }, + "bucketName": { + "type": "string" + }, + "category": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "duration": { + "type": "integer" + }, + "executable": { + "type": "boolean" + }, + "ext": { + "type": "array", + "items": { + "type": "integer" + } + }, + "fileCount": { + "type": "integer" + }, + "isDir": { + "type": "boolean" + }, + "mime": { + "type": "string" + }, + "modifyAt": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "operationAt": { + "type": "integer" + }, + "parentUuid": { + "type": "string" + }, + "path": { + "type": "string" + }, + "relativePath": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "tags": { + "type": "string" + }, + "transactionId": { + "type": "integer" + }, + "trashed": { + "description": "0-normal; 1-Logical delete, put into the recycle bin; 2-Has been cleared from the recycle bin and is to be physically deleted", + "type": "integer" + }, + "userId": { + "type": "integer" + }, + "uuid": { + "type": "string" + }, + "version": { + "type": "integer" + } + } + }, + "proto.FileInfoForTrends": { + "type": "object", + "properties": { + "betag": { + "type": "string" + }, + "bucketName": { + "type": "string" + }, + "category": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "duration": { + "type": "integer" + }, + "executable": { + "type": "boolean" + }, + "ext": { + "type": "array", + "items": { + "type": "integer" + } + }, + "fileCount": { + "type": "integer" + }, + "isDir": { + "type": "boolean" + }, + "mime": { + "type": "string" + }, + "modifyAt": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "operationAt": { + "type": "integer" + }, + "parentUuid": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "tags": { + "type": "string" + }, + "transactionId": { + "type": "integer" + }, + "trashed": { + "description": "0-normal; 1-Logical delete, put into the recycle bin; 2-Has been cleared from the recycle bin and is to be physically deleted", + "type": "integer" + }, + "userId": { + "type": "integer" + }, + "uuid": { + "type": "string" + }, + "version": { + "type": "integer" + } + } + }, + "proto.FileInfoForTrendsReq": { + "type": "object", + "properties": { + "uuids": { + "description": "uuids", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "proto.FileInfoForTrendsRsp": { + "type": "object", + "properties": { + "fileInfos": { + "type": "array", + "items": { + "$ref": "#/definitions/proto.FileInfoForTrends" + } + } + } + }, + "proto.FileInfoPub": { + "type": "object", + "properties": { + "betag": { + "type": "string" + }, + "category": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "fileCount": { + "type": "integer" + }, + "isDir": { + "type": "boolean" + }, + "mime": { + "type": "string" + }, + "modifyAt": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "operationAt": { + "type": "integer" + }, + "parentUuid": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "trashed": { + "description": "0-normal; 1-Logical delete, put into the recycle bin; 2-Has been cleared from the recycle bin and is to be physically deleted", + "type": "integer" + }, + "uuid": { + "type": "string" + } + } + }, + "proto.FileInfoRsp": { + "type": "object", + "properties": { + "betag": { + "type": "string" + }, + "category": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "fileCount": { + "type": "integer" + }, + "isDir": { + "type": "boolean" + }, + "mime": { + "type": "string" + }, + "modifyAt": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "operationAt": { + "type": "integer" + }, + "parentUuid": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "trashed": { + "description": "0-normal; 1-Logical delete, put into the recycle bin; 2-Has been cleared from the recycle bin and is to be physically deleted", + "type": "integer" + }, + "uuid": { + "type": "string" + } + } + }, + "proto.FolderInfo": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "operationAt": { + "type": "integer" + }, + "path": { + "type": "string" + }, + "size": { + "type": "integer" + } + } + }, + "proto.GetListRspData": { + "type": "object", + "properties": { + "fileList": { + "type": "array", + "items": { + "$ref": "#/definitions/proto.FileInfoPub" + } + }, + "pageInfo": { + "$ref": "#/definitions/proto.PageInfoExt" + } + } + }, + "proto.ListMultipartReq": { + "type": "object", + "required": [ + "uploadId" + ], + "properties": { + "uploadId": { + "type": "string" + } + } + }, + "proto.ListMultipartRsp": { + "type": "object", + "properties": { + "uploadedParts": { + "type": "array", + "items": { + "$ref": "#/definitions/proto.Part" + } + }, + "uploadingParts": { + "type": "array", + "items": { + "$ref": "#/definitions/proto.Part" + } + } + } + }, + "proto.ModifyFileReq": { + "type": "object", + "properties": { + "fileName": { + "description": "new name", + "type": "string" + }, + "uuid": { + "description": "file/folder uuid", + "type": "string" + } + } + }, + "proto.MoveFileReq": { + "type": "object", + "required": [ + "uuids" + ], + "properties": { + "destPath": { + "description": "dest path", + "type": "string" + }, + "uuids": { + "description": "uuid", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "proto.NewAndOldUuid": { + "type": "object", + "properties": { + "newId": { + "type": "string" + }, + "oldId": { + "type": "string" + } + } + }, + "proto.PageInfoExt": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "page": { + "type": "integer" + }, + "pageSize": { + "type": "integer" + }, + "total": { + "type": "integer" + } + } + }, + "proto.Part": { + "type": "object", + "required": [ + "end" + ], + "properties": { + "end": { + "type": "integer" + }, + "start": { + "type": "integer", + "minimum": 0 + } + } + }, + "proto.RecycledPhyDeleteReq": { + "type": "object", + "properties": { + "uuids": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "proto.RestoreRecycledReq": { + "type": "object", + "required": [ + "uuids" + ], + "properties": { + "uuids": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "proto.StatusRsp": { + "type": "object", + "properties": { + "status": { + "type": "string" + } + } + }, + "proto.Storage": { + "type": "object", + "properties": { + "userStorage": { + "type": "integer" + } + } + }, + "proto.User": { + "type": "object", + "properties": { + "userId": { + "type": "integer" + } + } + }, + "proto.VodSymlinkReq": { + "type": "object", + "properties": { + "uuid": { + "description": "file's uuid", + "type": "string" + } + } + }, + "proto.VodSymlinkRsp": { + "type": "object", + "properties": { + "linkName": { + "type": "string" + } + } + } + } +} \ No newline at end of file diff --git a/routers/api/docs/swagger.yaml b/routers/api/docs/swagger.yaml new file mode 100644 index 0000000..580410e --- /dev/null +++ b/routers/api/docs/swagger.yaml @@ -0,0 +1,1739 @@ +basePath: / +definitions: + Rsp: + properties: + code: + allOf: + - $ref: '#/definitions/proto.CodeType' + description: msg code + message: + description: msg info + type: string + requestId: + description: trans id + type: string + results: + description: response body + type: object + async.AsyncTask: + properties: + processed: + type: integer + taskId: + type: string + taskStatus: + type: string + total: + type: integer + type: object + httputil.HTTPError: + properties: + code: + example: 400 + type: integer + message: + example: status bad request + type: string + type: object + proto.CodeType: + enum: + - 200 + - 201 + - 1001 + - 1002 + - 1003 + - 1004 + - 1005 + - 1006 + - 1007 + - 1008 + - 1009 + - 1010 + - 1011 + - 1012 + - 1013 + - 1014 + - 1015 + - 1016 + - 1017 + - 1018 + - 1021 + - 1022 + - 1027 + - 1028 + - 1029 + - 1030 + - 1031 + - 1032 + - 1036 + - 1037 + - 1038 + - 1046 + - 1050 + - 1061 + - 1062 + type: integer + x-enum-comments: + CodeCopyIdError: 文件夹不能拷贝到自己 + CodeFailedToConnect: 建立连接失败 + CodeFailedToConnectDB: 连接DB失败 + CodeFailedToCreateBucket: 失败去创建桶 + CodeFailedToCreateFolder: 失败去创建文件夹 + CodeFailedToCreateMultipartTask: 失败去创建任务 + CodeFailedToCreateSymlink: 失败去创建符号链接 + CodeFailedToDeleteUser: 删除用户失败 + CodeFailedToGetUsedStorage: 获取用户空间使用量失败 + CodeFailedToInitUser: 失败去初始化用户 + CodeFailedToOpenFile: 打开文件失败 + CodeFailedToOperateDB: 失败去操作数据库 + CodeFailedToOptMinio: 失败去写文件 + CodeFailedToSaveFile: 失败去保存数据 + CodeFileExist: 文件已存在 + CodeFileNotExist: 文件不存在 + CodeFolderDepthTooLong: 文件夹层数超过5层 + CodeFolderExist: 文件夹已存在 + CodeFolderNotExist: 文件夹不存在 + CodeGetAsyncTaskInfoFailed: 获取异步任务状态失败 + CodeMultipartRangeUploaded: 分片范围已上传 + CodeMultipartTaskCompleteErr: 合并错误 + CodeMultipartTaskHashErr: 文件hash校验错误 + CodeMultipartTaskNotFound: 未找到任务 + CodeMultipartTaskOverlap: 任务重叠 + CodeMultipartTaskRangeErr: 上传范围错误 + CodeMultipartUploadingConflit: 分片范围上传冲突 + CodeNotEnoughSpace: 空间不够,不上传 + CodeParamErr: 参数错误 + CodeReqParamErr: 请求参数错误(推荐) + CodeUserIdError: 用户Id的错误 + CodeWriteRedisFailed: 写入redis 失败 + CodeZipFileFailed: 压缩文件失败 + x-enum-varnames: + - CodeOk + - CodeCreateAsyncTaskSuccess + - CodeParamErr + - CodeReqParamErr + - CodeFileNotExist + - CodeFailedToOpenFile + - CodeFolderNotExist + - CodeFailedToConnect + - CodeFailedToConnectDB + - CodeFailedToOptMinio + - CodeFailedToCreateBucket + - CodeFailedToSaveFile + - CodeFailedToOperateDB + - CodeFailedToCreateFolder + - CodeFileExist + - CodeFolderExist + - CodeFolderDepthTooLong + - CodeUserIdError + - CodeFailedToInitUser + - CodeFailedToDeleteUser + - CodeFailedToGetUsedStorage + - CodeCopyIdError + - CodeFailedToCreateMultipartTask + - CodeMultipartTaskNotFound + - CodeMultipartTaskOverlap + - CodeMultipartTaskRangeErr + - CodeMultipartTaskHashErr + - CodeMultipartTaskCompleteErr + - CodeNotEnoughSpace + - CodeMultipartRangeUploaded + - CodeMultipartUploadingConflit + - CodeWriteRedisFailed + - CodeZipFileFailed + - CodeFailedToCreateSymlink + - CodeGetAsyncTaskInfoFailed + proto.CompleteMultipartTaskReq: + properties: + uploadId: + type: string + required: + - uploadId + type: object + proto.CompleteMultipartTaskRsp: + properties: + betag: + type: string + bucketName: + type: string + category: + type: string + createdAt: + type: integer + executable: + type: boolean + ext: + items: + type: integer + type: array + fileCount: + type: integer + isDir: + type: boolean + mime: + type: string + modifyAt: + type: integer + name: + type: string + operationAt: + type: integer + parentUuid: + type: string + path: + type: string + size: + type: integer + tags: + type: string + transactionId: + type: integer + trashed: + description: 0-normal; 1-Logical delete, put into the recycle bin; 2-Has been + cleared from the recycle bin and is to be physically deleted + type: integer + userId: + type: integer + uuid: + type: string + version: + type: integer + type: object + proto.CopyFileReq: + properties: + dstPath: + description: dest path + type: string + uuids: + description: uuids + items: + type: string + type: array + uniqueItems: true + type: object + proto.CopyRsp: + properties: + affectRows: + type: integer + data: + items: + $ref: '#/definitions/proto.NewAndOldUuid' + type: array + type: object + proto.CreateFolderReq: + properties: + currentDirUuid: + description: current folder's uuid + type: string + folderName: + description: folder name + type: string + type: object + proto.CreateMultipartTaskConflictRsp: + properties: + albumId: + type: integer + betag: + maxLength: 34 + minLength: 32 + type: string + businessId: + type: integer + createTime: + type: integer + fileName: + type: string + folderId: + type: string + folderPath: + type: string + mime: + type: string + modifyTime: + type: integer + size: + type: integer + uploadId: + type: string + uploadedParts: + items: + $ref: '#/definitions/proto.Part' + type: array + uploadingParts: + items: + $ref: '#/definitions/proto.Part' + type: array + required: + - betag + - fileName + - size + type: object + proto.CreateMultipartTaskReq: + properties: + albumId: + type: integer + betag: + maxLength: 34 + minLength: 32 + type: string + businessId: + type: integer + createTime: + type: integer + fileName: + type: string + folderId: + type: string + folderPath: + type: string + mime: + type: string + modifyTime: + type: integer + size: + type: integer + required: + - betag + - fileName + - size + type: object + proto.CreateMultipartTaskRsp: + properties: + completeInfo: + allOf: + - $ref: '#/definitions/proto.FileInfo' + description: task completed + conflictInfo: + allOf: + - $ref: '#/definitions/proto.CreateMultipartTaskConflictRsp' + description: task exists + rspType: + description: rsp type + type: integer + succInfo: + allOf: + - $ref: '#/definitions/proto.CreateMultipartTaskSuccRsp' + description: task info + type: object + proto.CreateMultipartTaskSuccRsp: + properties: + partSize: + type: integer + uploadId: + type: string + type: object + proto.DbAffect: + properties: + affectRows: + type: integer + type: object + proto.DeleteFileReq: + properties: + uuids: + description: uuids + items: + type: string + type: array + uniqueItems: true + type: object + proto.DeleteMultipartTaskReq: + properties: + uploadId: + type: string + required: + - uploadId + type: object + proto.ErrMess: + properties: + code: + $ref: '#/definitions/proto.CodeType' + message: + type: string + type: object + proto.FileInfo: + properties: + betag: + type: string + bucketName: + type: string + category: + type: string + createdAt: + type: integer + executable: + type: boolean + ext: + items: + type: integer + type: array + fileCount: + type: integer + isDir: + type: boolean + mime: + type: string + modifyAt: + type: integer + name: + type: string + operationAt: + type: integer + parentUuid: + type: string + path: + type: string + size: + type: integer + tags: + type: string + transactionId: + type: integer + trashed: + description: 0-normal; 1-Logical delete, put into the recycle bin; 2-Has been + cleared from the recycle bin and is to be physically deleted + type: integer + userId: + type: integer + uuid: + type: string + version: + type: integer + type: object + proto.FileInfoForInnerRsp: + properties: + betag: + type: string + bucketName: + type: string + category: + type: string + createdAt: + type: integer + duration: + type: integer + executable: + type: boolean + ext: + items: + type: integer + type: array + fileCount: + type: integer + isDir: + type: boolean + mime: + type: string + modifyAt: + type: integer + name: + type: string + operationAt: + type: integer + parentUuid: + type: string + path: + type: string + relativePath: + type: string + size: + type: integer + tags: + type: string + transactionId: + type: integer + trashed: + description: 0-normal; 1-Logical delete, put into the recycle bin; 2-Has been + cleared from the recycle bin and is to be physically deleted + type: integer + userId: + type: integer + uuid: + type: string + version: + type: integer + type: object + proto.FileInfoForTrends: + properties: + betag: + type: string + bucketName: + type: string + category: + type: string + createdAt: + type: integer + duration: + type: integer + executable: + type: boolean + ext: + items: + type: integer + type: array + fileCount: + type: integer + isDir: + type: boolean + mime: + type: string + modifyAt: + type: integer + name: + type: string + operationAt: + type: integer + parentUuid: + type: string + path: + type: string + size: + type: integer + tags: + type: string + transactionId: + type: integer + trashed: + description: 0-normal; 1-Logical delete, put into the recycle bin; 2-Has been + cleared from the recycle bin and is to be physically deleted + type: integer + userId: + type: integer + uuid: + type: string + version: + type: integer + type: object + proto.FileInfoForTrendsReq: + properties: + uuids: + description: uuids + items: + type: string + type: array + type: object + proto.FileInfoForTrendsRsp: + properties: + fileInfos: + items: + $ref: '#/definitions/proto.FileInfoForTrends' + type: array + type: object + proto.FileInfoPub: + properties: + betag: + type: string + category: + type: string + createdAt: + type: integer + fileCount: + type: integer + isDir: + type: boolean + mime: + type: string + modifyAt: + type: integer + name: + type: string + operationAt: + type: integer + parentUuid: + type: string + path: + type: string + size: + type: integer + trashed: + description: 0-normal; 1-Logical delete, put into the recycle bin; 2-Has been + cleared from the recycle bin and is to be physically deleted + type: integer + uuid: + type: string + type: object + proto.FileInfoRsp: + properties: + betag: + type: string + category: + type: string + createdAt: + type: integer + fileCount: + type: integer + isDir: + type: boolean + mime: + type: string + modifyAt: + type: integer + name: + type: string + operationAt: + type: integer + parentUuid: + type: string + path: + type: string + size: + type: integer + trashed: + description: 0-normal; 1-Logical delete, put into the recycle bin; 2-Has been + cleared from the recycle bin and is to be physically deleted + type: integer + uuid: + type: string + type: object + proto.FolderInfo: + properties: + name: + type: string + operationAt: + type: integer + path: + type: string + size: + type: integer + type: object + proto.GetListRspData: + properties: + fileList: + items: + $ref: '#/definitions/proto.FileInfoPub' + type: array + pageInfo: + $ref: '#/definitions/proto.PageInfoExt' + type: object + proto.ListMultipartReq: + properties: + uploadId: + type: string + required: + - uploadId + type: object + proto.ListMultipartRsp: + properties: + uploadedParts: + items: + $ref: '#/definitions/proto.Part' + type: array + uploadingParts: + items: + $ref: '#/definitions/proto.Part' + type: array + type: object + proto.ModifyFileReq: + properties: + fileName: + description: new name + type: string + uuid: + description: file/folder uuid + type: string + type: object + proto.MoveFileReq: + properties: + destPath: + description: dest path + type: string + uuids: + description: uuid + items: + type: string + type: array + uniqueItems: true + required: + - uuids + type: object + proto.NewAndOldUuid: + properties: + newId: + type: string + oldId: + type: string + type: object + proto.PageInfoExt: + properties: + count: + type: integer + page: + type: integer + pageSize: + type: integer + total: + type: integer + type: object + proto.Part: + properties: + end: + type: integer + start: + minimum: 0 + type: integer + required: + - end + type: object + proto.RecycledPhyDeleteReq: + properties: + uuids: + items: + type: string + type: array + type: object + proto.RestoreRecycledReq: + properties: + uuids: + items: + type: string + type: array + required: + - uuids + type: object + proto.StatusRsp: + properties: + status: + type: string + type: object + proto.Storage: + properties: + userStorage: + type: integer + type: object + proto.User: + properties: + userId: + type: integer + type: object + proto.VodSymlinkReq: + properties: + uuid: + description: file's uuid + type: string + type: object + proto.VodSymlinkRsp: + properties: + linkName: + type: string + type: object +info: + contact: + email: service@ao.space + name: AO.space + url: https://ao.space/ + description: This is AO.space aofs OpenAPI reference document. + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html + termsOfService: http://swagger.io/terms/ + title: aofs apis + version: "1.0" +paths: + /space/v1/api/async/task: + get: + consumes: + - application/json + description: Query the status of an asynchronous task + parameters: + - description: user id + in: query + name: userId + required: true + type: integer + - description: task id + in: query + name: taskId + required: true + type: string + produces: + - application/json + responses: + "200": + description: response + schema: + allOf: + - $ref: '#/definitions/Rsp' + - properties: + results: + $ref: '#/definitions/async.AsyncTask' + type: object + tags: + - Async + /space/v1/api/file/compressed: + get: + description: Get compressed graph + parameters: + - description: uuid + in: query + name: uuid + required: true + type: string + - description: user id + in: query + name: userId + required: true + type: string + responses: + "200": + description: file content + schema: + type: file + "404": + description: Not Found + schema: + $ref: '#/definitions/proto.ErrMess' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/proto.ErrMess' + summary: Get compressed graph + tags: + - File + /space/v1/api/file/copy: + post: + consumes: + - application/json + description: Batch copy files + parameters: + - description: user id + in: query + name: userId + required: true + type: string + - description: params + in: body + name: copyFilesReq + required: true + schema: + $ref: '#/definitions/proto.CopyFileReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + allOf: + - $ref: '#/definitions/Rsp' + - properties: + results: + $ref: '#/definitions/proto.CopyRsp' + type: object + summary: Batch copy files + tags: + - File + /space/v1/api/file/delete: + post: + consumes: + - application/json + description: Delete files/folders to Recycle bin + parameters: + - description: user id + in: query + name: userId + required: true + type: string + - description: params + in: body + name: DeleteId + required: true + schema: + $ref: '#/definitions/proto.DeleteFileReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/Rsp' + "201": + description: Created + schema: + allOf: + - $ref: '#/definitions/Rsp' + - properties: + results: + $ref: '#/definitions/async.AsyncTask' + type: object + "400": + description: Bad Request + schema: + $ref: '#/definitions/httputil.HTTPError' + "404": + description: Not Found + schema: + $ref: '#/definitions/httputil.HTTPError' + summary: Delete files/folders to Recycle bin + tags: + - File + /space/v1/api/file/download: + get: + description: File download + parameters: + - description: uuid + in: query + name: uuid + required: true + type: string + - description: user id + in: query + name: userId + required: true + type: string + - description: range, such as:bytes=200-1000 + in: header + name: Range + type: string + produces: + - application/octet-stream + responses: + "200": + description: file content + schema: + type: file + "206": + description: Partial Content + schema: + type: file + "404": + description: Not Found + schema: + $ref: '#/definitions/proto.ErrMess' + "416": + description: Range Not Satisfiable + schema: + $ref: '#/definitions/proto.ErrMess' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/proto.ErrMess' + summary: File download + tags: + - File + /space/v1/api/file/info: + get: + consumes: + - application/json + description: Query file info + parameters: + - description: user id + in: query + name: userId + required: true + type: integer + - description: file/folder uuid + in: query + name: uuid + type: string + - description: path + in: query + name: path + type: string + - description: name + in: query + name: name + type: string + produces: + - application/json + responses: + "200": + description: file info + schema: + allOf: + - $ref: '#/definitions/Rsp' + - properties: + results: + $ref: '#/definitions/proto.FileInfoRsp' + type: object + summary: Query file info + tags: + - File + /space/v1/api/file/list: + get: + consumes: + - application/json + description: Get file list + parameters: + - description: user id + in: query + name: userId + required: true + type: integer + - description: folder uuid + in: query + name: uuid + type: string + - description: Whether to filter folders + in: query + name: isDir + type: boolean + - description: page,default:1 + in: query + name: page + type: integer + - description: page size,default:10 + in: query + name: pageSize + type: integer + - description: Sort. The default is reverse order + in: query + name: orderBy + type: string + - description: 'file classification, field value: document,video,picture or + other; If there is no field, all are included' + in: query + name: category + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + allOf: + - $ref: '#/definitions/Rsp' + - properties: + results: + $ref: '#/definitions/proto.GetListRspData' + type: object + summary: Get file list + tags: + - File + /space/v1/api/file/move: + post: + consumes: + - application/json + description: Move file/folder + parameters: + - description: user id + in: query + name: userId + required: true + type: string + - description: params + in: body + name: moveFilesReq + required: true + schema: + $ref: '#/definitions/proto.MoveFileReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + allOf: + - $ref: '#/definitions/Rsp' + - properties: + results: + $ref: '#/definitions/proto.DbAffect' + type: object + summary: Move file/folder + tags: + - File + /space/v1/api/file/rename: + post: + consumes: + - application/json + description: Modify file/folder name + parameters: + - description: user id + in: query + name: userId + required: true + type: string + - description: request info + in: body + name: ModifyFileReq + required: true + schema: + $ref: '#/definitions/proto.ModifyFileReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + allOf: + - $ref: '#/definitions/Rsp' + - properties: + results: + $ref: '#/definitions/proto.DbAffect' + type: object + summary: Modify file/folder name + tags: + - File + /space/v1/api/file/search: + get: + consumes: + - application/json + description: Search files + parameters: + - description: user id + in: query + name: userId + required: true + type: string + - description: 'folder''s uuid,default: /' + in: query + name: uuid + type: string + - description: filename + in: query + name: name + required: true + type: string + - description: file type + in: query + name: category + type: string + - description: page, default:1 + in: query + name: page + type: integer + - description: page size,default:10 + in: query + name: pageSize + type: integer + - description: sort type, default value is in reverse order of change time + in: query + name: orderBy + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + allOf: + - $ref: '#/definitions/Rsp' + - properties: + results: + $ref: '#/definitions/proto.GetListRspData' + type: object + summary: Search files + tags: + - File + /space/v1/api/file/thumb: + get: + description: Get thumbnail + parameters: + - description: uuid + in: query + name: uuid + required: true + type: string + - description: user id + in: query + name: userId + required: true + type: string + responses: + "200": + description: file content + schema: + type: file + "400": + description: param error + schema: + $ref: '#/definitions/proto.ErrMess' + "404": + description: Not Found + schema: + $ref: '#/definitions/proto.ErrMess' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/proto.ErrMess' + summary: Get thumbnail + tags: + - File + /space/v1/api/file/vod/symlink: + post: + consumes: + - application/json + description: Create symbolic link + parameters: + - description: user id + in: query + name: userId + required: true + type: string + - description: parmas + in: body + name: VodSymlinkReq + required: true + schema: + $ref: '#/definitions/proto.VodSymlinkReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + allOf: + - $ref: '#/definitions/Rsp' + - properties: + results: + $ref: '#/definitions/proto.VodSymlinkRsp' + type: object + summary: Create symbolic link + tags: + - File + /space/v1/api/folder/create: + post: + consumes: + - application/json + description: Create Folder + parameters: + - description: user id + in: query + name: userId + required: true + type: string + - description: params + in: body + name: createFolderReq + required: true + schema: + $ref: '#/definitions/proto.CreateFolderReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + allOf: + - $ref: '#/definitions/Rsp' + - properties: + results: + $ref: '#/definitions/proto.FileInfo' + type: object + summary: Create Folder + tags: + - Folder + /space/v1/api/folder/info: + get: + consumes: + - application/json + description: Get folder details + parameters: + - description: user id + in: query + name: userId + required: true + type: string + - description: folder's uuid + in: query + name: uuid + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + allOf: + - $ref: '#/definitions/Rsp' + - properties: + results: + $ref: '#/definitions/proto.FolderInfo' + type: object + summary: Get folder details + tags: + - Folder + /space/v1/api/inner/file/info: + get: + consumes: + - application/json + description: Get file info for inner + parameters: + - description: user id + in: query + name: userId + required: true + type: integer + - description: uuid + in: query + name: uuid + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + allOf: + - $ref: '#/definitions/Rsp' + - properties: + results: + $ref: '#/definitions/proto.FileInfoForInnerRsp' + type: object + summary: Get file info for inner + tags: + - File + /space/v1/api/inner/file/infos: + post: + consumes: + - application/json + description: Get fileinfo list for inner + parameters: + - description: user id + in: query + name: userId + required: true + type: integer + - description: uuids + in: body + name: FileInfoForTrendsReq + schema: + $ref: '#/definitions/proto.FileInfoForTrendsReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + allOf: + - $ref: '#/definitions/Rsp' + - properties: + results: + $ref: '#/definitions/proto.FileInfoForTrendsRsp' + type: object + summary: Get fileinfo list for inner + tags: + - File + /space/v1/api/multipart/complete: + post: + consumes: + - application/json + parameters: + - description: user id + in: query + name: userId + required: true + type: string + - description: request id + in: query + name: requestId + required: true + type: string + - description: params + in: body + name: object + required: true + schema: + $ref: '#/definitions/proto.CompleteMultipartTaskReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + allOf: + - $ref: '#/definitions/Rsp' + - properties: + results: + $ref: '#/definitions/proto.CompleteMultipartTaskRsp' + type: object + summary: Complte multipart task + tags: + - Multipart + /space/v1/api/multipart/create: + post: + consumes: + - application/json + parameters: + - description: user id + in: query + name: userId + required: true + type: string + - description: request id + in: query + name: requestId + required: true + type: string + - description: params + in: body + name: object + required: true + schema: + $ref: '#/definitions/proto.CreateMultipartTaskReq' + produces: + - application/json + responses: + "200": + description: task info + schema: + allOf: + - $ref: '#/definitions/Rsp' + - properties: + results: + $ref: '#/definitions/proto.CreateMultipartTaskRsp' + type: object + summary: Creating a multipart task + tags: + - Multipart + /space/v1/api/multipart/delete: + post: + consumes: + - application/json + parameters: + - description: user id + in: query + name: userId + required: true + type: string + - description: request id + in: query + name: requestId + required: true + type: string + - description: params + in: body + name: object + required: true + schema: + $ref: '#/definitions/proto.DeleteMultipartTaskReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/Rsp' + summary: Delete multipart task + tags: + - Multipart + /space/v1/api/multipart/list: + get: + consumes: + - application/json + parameters: + - description: user id + in: query + name: userId + required: true + type: string + - description: request id + in: query + name: requestId + required: true + type: string + - description: param + in: body + name: object + required: true + schema: + $ref: '#/definitions/proto.ListMultipartReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + allOf: + - $ref: '#/definitions/Rsp' + - properties: + results: + $ref: '#/definitions/proto.ListMultipartRsp' + type: object + summary: Query multipart task info + tags: + - Multipart + /space/v1/api/multipart/upload: + post: + consumes: + - application/json + parameters: + - description: user id + in: query + name: userId + required: true + type: string + - description: request id + in: query + name: requestId + required: true + type: string + - in: query + name: end + required: true + type: integer + - in: query + name: md5sum + required: true + type: string + - in: query + minimum: 0 + name: start + type: integer + - in: query + name: uploadId + required: true + type: string + - description: part content + in: body + name: object + required: true + schema: + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/Rsp' + summary: Upload multipart data + tags: + - Multipart + /space/v1/api/recycled/clear: + post: + consumes: + - application/json + description: Clean out the recycle bin + parameters: + - description: user id + in: query + name: userId + required: true + type: integer + - description: params + in: body + name: uuids + required: true + schema: + $ref: '#/definitions/proto.RecycledPhyDeleteReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/Rsp' + summary: Clean out the recycle bin + tags: + - Recycled + /space/v1/api/recycled/list: + get: + consumes: + - application/json + description: Query the recycle bin file list + parameters: + - description: user id + in: query + name: userId + required: true + type: string + - description: 'page index,default: 1' + in: query + name: page + type: integer + - description: 'page size,default: 10' + in: query + name: pageSize + type: integer + produces: + - application/json + responses: + "200": + description: OK + schema: + allOf: + - $ref: '#/definitions/Rsp' + - properties: + results: + $ref: '#/definitions/proto.GetListRspData' + type: object + summary: Query the recycle bin file list + tags: + - Recycled + /space/v1/api/recycled/restore: + post: + consumes: + - application/json + description: Restore files from recycle bin + parameters: + - description: user id + in: query + name: userId + required: true + type: integer + - description: params + in: body + name: restoreFilesReq + required: true + schema: + $ref: '#/definitions/proto.RestoreRecycledReq' + produces: + - application/json + responses: + "200": + description: success + schema: + $ref: '#/definitions/Rsp' + "201": + description: asynchronous task + schema: + allOf: + - $ref: '#/definitions/Rsp' + - properties: + results: + $ref: '#/definitions/async.AsyncTask' + type: object + summary: Restore files from recycle bin + tags: + - Recycled + /space/v1/api/status: + get: + consumes: + - application/json + description: Querying service status + parameters: + - description: user id + in: query + name: userId + required: true + type: string + produces: + - application/json + responses: + "200": + description: success + schema: + allOf: + - $ref: '#/definitions/Rsp' + - properties: + results: + $ref: '#/definitions/proto.StatusRsp' + type: object + summary: Querying service status + tags: + - ServerStatus + /space/v1/api/sync/synced: + get: + consumes: + - application/json + description: Obtain incremental synchronization data + parameters: + - description: user id + in: query + name: userId + required: true + type: string + - description: timestamp + in: query + name: timestamp + required: true + type: integer + - description: path + in: query + name: path + type: string + - description: device id + in: query + name: deviceId + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + allOf: + - $ref: '#/definitions/Rsp' + - properties: + results: + $ref: '#/definitions/proto.GetListRspData' + type: object + summary: Obtain incremental synchronization data + tags: + - Sync + /space/v1/api/user/delete: + post: + consumes: + - application/json + description: Delete user + parameters: + - description: user id + in: query + name: userId + required: true + type: string + - description: user id + in: body + name: userId + required: true + schema: + $ref: '#/definitions/proto.User' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/Rsp' + summary: Delete user + tags: + - User + /space/v1/api/user/init: + post: + consumes: + - application/json + description: Initialize user + parameters: + - description: user id + in: query + name: userId + required: true + type: string + - description: user id + in: body + name: userId + required: true + schema: + $ref: '#/definitions/proto.User' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/Rsp' + summary: Initialize user + tags: + - User + /space/v1/api/user/storage: + get: + consumes: + - application/json + description: Query the user space capacity + parameters: + - description: user id + in: query + name: userId + required: true + type: string + - description: user id + in: query + name: targetUserId + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + allOf: + - $ref: '#/definitions/Rsp' + - properties: + results: + $ref: '#/definitions/proto.Storage' + type: object + summary: Query the user space capacity + tags: + - User +swagger: "2.0" diff --git a/routers/api/download.go b/routers/api/download.go new file mode 100644 index 0000000..fe1ec76 --- /dev/null +++ b/routers/api/download.go @@ -0,0 +1,208 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package api + +import ( + "aofs/internal/bpctx" + "aofs/internal/env" + "aofs/internal/proto" + "aofs/repository/dbutils" + "aofs/repository/storage" + "errors" + "fmt" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/gin-gonic/gin" + "gorm.io/gorm" +) + +func DecodeRange(rangestr string) (*proto.Part, error) { + if len(rangestr) == 0 { + return &proto.Part{}, nil + } + rangestr = strings.TrimSpace(rangestr) + if idx := strings.Index(rangestr, "bytes="); idx != 0 { + return nil, fmt.Errorf("range err.%s", rangestr) + } else { + rangestr = rangestr[len("bytes="):] + ranges := strings.Split(rangestr, "-") + if len(ranges) != 2 { + return nil, fmt.Errorf("range err.%s", rangestr) + } + part := &proto.Part{} + if len(ranges[0]) > 0 { + if i, err := strconv.Atoi(ranges[0]); err != nil || i < 0 { + return nil, fmt.Errorf("range start err.%s", rangestr) + } else { + part.Start = int64(i) + } + } + + if len(ranges[1]) > 0 { + if i, err := strconv.Atoi(ranges[1]); err != nil || i < 0 { + return nil, fmt.Errorf("range end err.%s", rangestr) + } else { + part.End = int64(i) + } + } else { + part.End = -1 + } + if part.End > 0 && part.Start > part.End { + return nil, fmt.Errorf("range end err.%s", rangestr) + } + + return part, nil + } +} + +// @Summary File download +// @Description File download +// @Tags File +// @Param uuid query string true "uuid" +// @Param userId query string true "user id" +// @Param Range header string false "range, such as:bytes=200-1000" +// @Produce application/octet-stream +// @Failure 404 {object} proto.ErrMess +// @Failure 416 {object} proto.ErrMess "Range Not Satisfiable" +// @Failure 500 {object} proto.ErrMess +// @Success 200 {file} formData "file content" +// @Success 206 {file} formData "Partial Content" +// @Router /space/v1/api/file/download [GET] +func DownloadFile(c *gin.Context) { + ctx := bpctx.NewCtx(c) + uuid := c.Query("uuid") + range_ := c.GetHeader("Range") + ctx.LogD().Str("uuid", uuid).Str("range", range_).Msg("param") + fileInfo, err := dbutils.GetFileInfoWithUid(ctx.GetUserId(), uuid) + if err != nil { + ctx.LogE().Msg(err.Error()) + if errors.Is(err, gorm.ErrRecordNotFound) { + c.JSON(http.StatusNotFound, proto.ErrMess{Code: proto.CodeFileNotExist, Message: "File not found"}) + } + return + } + objectKey := fileInfo.BETag + var part *proto.Part + if len(range_) > 0 { + part, err = DecodeRange(range_) + ctx.LogD().Str("range", range_).Interface("part", part).Msg("range") + if err != nil { + c.JSON(http.StatusRequestedRangeNotSatisfiable, proto.ErrMess{Code: proto.CodeParamErr, Message: err.Error()}) + return + } else if part.End >= fileInfo.Size { + c.JSON(http.StatusRequestedRangeNotSatisfiable, proto.ErrMess{Code: proto.CodeParamErr, Message: "RangeNotSatisfiable"}) + return + } + if part.End == -1 { + part.End = fileInfo.Size - 1 + } + } + + r, err := stor.Get(env.NORMAL_BUCKET, objectKey, part) + if err != nil { + c.String(http.StatusNotFound, "%s-%v", objectKey, err) + return + } + defer r.Close() + + extraHeaders := map[string]string{ + "Content-Disposition": fmt.Sprintf(`attachment; filename="%s"; filename*=UTF-8''%s`, + url.QueryEscape(fileInfo.Name), + url.QueryEscape(fileInfo.Name)), + } + + if part == nil { + c.DataFromReader(200, fileInfo.Size, fileInfo.Mime, r, extraHeaders) + + } else { + c.DataFromReader(206, part.Len(), fileInfo.Mime, r, extraHeaders) + } +} + +// @Summary Get thumbnail +// @Description Get thumbnail +// @Tags File +// @Param uuid query string true "uuid" +// @Param userId query string true "user id" +// @Failure 404 {object} proto.ErrMess "" +// @Failure 400 {object} proto.ErrMess "param error" +// @Failure 500 {object} proto.ErrMess +// @Success 200 {file} formData "file content" +// @Router /space/v1/api/file/thumb [GET] +func GetThumb(c *gin.Context) { + ctx := bpctx.NewCtx(c) + uuid := c.Query("uuid") + fileInfo, err := dbutils.GetFileInfoWithUid(ctx.GetUserId(), uuid) + if err != nil { + ctx.LogE().Msg(err.Error()) + if errors.Is(err, gorm.ErrRecordNotFound) { + c.JSON(http.StatusNotFound, proto.ErrMess{Code: proto.CodeFileNotExist, Message: "File not found"}) + } + return + } + + c.Header("Content-Disposition", fmt.Sprintf(`inline; filename="%s"; filename*=UTF-8''%s`, + url.QueryEscape(fileInfo.Name+"-thumbnail.jpg"), url.QueryEscape(fileInfo.Name+"-thumbnail.jpg"), + )) + c.Header("ETag", fileInfo.BETag) + previewStore := storage.NewPreview() + path, err := previewStore.GetThumbnailPath(fileInfo.BETag) + if err != nil { + ctx.LogE().Err(err).Msg("get thumb error") + c.JSON(http.StatusNotFound, proto.ErrMess{Code: proto.CodeFileNotExist, Message: "File not found"}) + return + } + + c.File(path) +} + +// @Summary Get compressed graph +// @Description Get compressed graph +// @Tags File +// @Param uuid query string true "uuid" +// @Param userId query string true "user id" +// @Failure 404 {object} proto.ErrMess "" +// @Failure 500 {object} proto.ErrMess +// @Success 200 {file} formData "file content" +// @Router /space/v1/api/file/compressed [GET] +func GetCompressed(c *gin.Context) { + ctx := bpctx.NewCtx(c) + uuid := c.Query("uuid") + fileInfo, err := dbutils.GetFileInfoWithUid(ctx.GetUserId(), uuid) + if err != nil { + ctx.LogW().Msg(err.Error()) + if errors.Is(err, gorm.ErrRecordNotFound) { + c.JSON(http.StatusNotFound, proto.ErrMess{Code: proto.CodeFileNotExist, Message: "File not found"}) + } + return + } + c.Header("Content-Disposition", fmt.Sprintf(`inline; filename="%s"; filename*=UTF-8''%s`, + url.QueryEscape(fileInfo.Name+"-preview.jpg"), url.QueryEscape(fileInfo.Name+"-preview.jpg"), + )) + c.Header("ETag", fileInfo.BETag) + previewStore := storage.NewPreview() + path, err := previewStore.GetCompressedImgPath(fileInfo.BETag) + if err != nil { + c.JSON(http.StatusNotFound, proto.ErrMess{Code: proto.CodeFileNotExist, Message: "File not found"}) + return + } + c.File(path) + +} + + diff --git a/routers/api/file.go b/routers/api/file.go new file mode 100644 index 0000000..8bafa55 --- /dev/null +++ b/routers/api/file.go @@ -0,0 +1,630 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package api + +import ( + "aofs/internal/bpctx" + "aofs/internal/env" + "aofs/repository/dbutils" + "aofs/services/file" + "errors" + "os" + "path/filepath" + "time" + + "aofs/internal/proto" + "fmt" + + "github.com/gin-gonic/gin" + _ "github.com/lib/pq" + _ "github.com/swaggo/swag/example/celler/httputil" +) + +// MoveFile Move file/folder +// @Summary Move file/folder +// @Description Move file/folder +// @Tags File +// @Accept application/json +// @Produce application/json +// @Param userId query string true "user id" +// @Param moveFilesReq body proto.MoveFileReq. true "params" +// @Success 200 {object} proto.Rsp{results=proto.DbAffect} "" +// @Router /space/v1/api/file/move [POST] +func MoveFile(c *gin.Context) { + + ctx := bpctx.NewCtx(c) + + var moveFileReq proto.MoveFileReq + var moveAffect proto.DbAffect + //var rsp proto.Rsp + // rsp.SetContext(c) + userId := ctx.GetUserId() + //获取请求参数 + if err := c.ShouldBind(&moveFileReq); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + + //请求参数验证 + err := validate.Struct(moveFileReq) + if err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + defer ctx.LogI("moveFiles", moveFileReq) + // 移动的uuid 和目录uuid 不能相同 + for _, value := range moveFileReq.Id { + if value == moveFileReq.DestPath { + ctx.SendErr(proto.CodeCopyIdError, nil) + return + } + } + //开始处理请求 + for i, id := range moveFileReq.Id { + /*判断文件是否存在*/ + if affect, err := dbutils.FileIsExist(userId, id, "", ""); affect == 1 { + if affectRow, err := dbutils.MoveFiles(userId, id, moveFileReq.DestPath); err != nil { + ctx.LogE().Err(err).Msg(fmt.Sprintf("Move File %v Failed ", id)) + //ctx.SendErr(proto.CodeFailedToOperateDB, err) + //return + } else if affectRow != 0 { + moveAffect.AffectRows = +uint32(affectRow) + } + } else { + ctx.LogE().Err(err).Msg(fmt.Sprintf("File %v Not Exist", id)) + } + if i == len(moveFileReq.Id)-1 { + if moveAffect.AffectRows > 0 { + ctx.SendOk(&moveAffect) + } else if errors.Is(err, errors.New("beyond 20 layers")) { + ctx.SendErr(proto.CodeFolderDepthTooLong, err) + } else { + ctx.SendErr(proto.CodeFileNotExist, err) + } + } + } + + moveId := moveFileReq.Id[0] + pathRecord, nameRecord := dbutils.GetPathByUuid(moveId) + + // 计算文件夹内文件数 + if fc, err := dbutils.CalculateFileCount(userId, pathRecord, nameRecord); err != nil { + logger.LogE().Err(err).Msg("calculate files failed !") + } else { + if len(pathRecord) == 0 { + logger.LogD().Msg(fmt.Sprintf("%s: %d files\r\n", pathRecord, fc)) + } else { + logger.LogD().Msg(fmt.Sprintf("/: %d files\r\n", fc)) + } + } +} + +// ListFiles Get file list +// @Summary Get file list +// @Description Get file list +// @Tags File +// @Accept application/json +// @Produce application/json +// @Param userId query int true "user id" +// @Param uuid query string false "folder uuid" +// @Param isDir query bool false "Whether to filter folders" +// @Param page query int false "page,default:1" +// @Param pageSize query int false "page size,default:10" +// @Param orderBy query string false "Sort. The default is reverse order" +// @Param category query string false "file classification, field value: document,video,picture or other; If there is no field, all are included" +// @Success 200 {object} proto.Rsp{results=proto.GetListRspData} +// @Router /space/v1/api/file/list [get] +func ListFiles(c *gin.Context) { + + ctx := bpctx.NewCtx(c) + + var req proto.GetListReq + var rspData proto.GetListRspData + //var rsp proto.Rsp + //var fileinfo proto.FileInfo + //rsp.SetContext(c) + + userId := ctx.GetUserId() + + //获取请求参数 + if err := c.ShouldBind(&req); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + + + if req.PageInfo.Page == 0 { + req.PageInfo.Page = 1 + } + if req.PageInfo.PageSize == 0 { + req.PageInfo.PageSize = 10 + } + // + if req.OrderBy == "" { + req.OrderBy = "is_dir desc,operation_time DESC" + } + + // category 参数为空则返回全部文件列表 + // category 参数不为空则返回分类文件列表(视频,文档,图片) + if req.Category == "" { + if req.Uuid == "" { + rootList, err := dbutils.GetRootList(userId, req.IsDir, req.PageInfo.Page, req.OrderBy, req.PageInfo.PageSize) + if err != nil { + ctx.SendErr(proto.CodeFailedToOperateDB, err) + return + } + rspData.List = rootList.ToPubLst() + rspData.PageInfo.PageInfo = req.PageInfo + rspData.PageInfo.TotalPage, rspData.PageInfo.FileCount, err = dbutils.PageTotal(userId, req.Uuid, req.Category, req.PageInfo.PageSize, false) + if err != nil { + ctx.SendErr(proto.CodeFolderNotExist, err) + return + } + } else if affect, err := dbutils.FileIsExist(userId, req.Uuid, "", ""); affect == 0 { + ctx.SendErr(proto.CodeFolderNotExist, err) + return + } else { + fileList, err := dbutils.GetFileList(ctx.GetUserId(), req.IsDir, req.Uuid, req.PageInfo.Page, req.OrderBy, "", int(req.PageInfo.PageSize)) + if err != nil { + ctx.SendErr(proto.CodeFailedToOperateDB, err) + return + } + rspData.List = fileList.ToPubLst() + rspData.PageInfo.PageInfo = req.PageInfo + rspData.PageInfo.TotalPage, rspData.PageInfo.FileCount, err = dbutils.PageTotal(userId, req.Uuid, req.Category, req.PageInfo.PageSize, false) + if err != nil { + ctx.SendErr(proto.CodeFolderNotExist, err) + return + } + + } + } else { + fileList, err := dbutils.GetFileList(ctx.GetUserId(), req.IsDir, "", req.PageInfo.Page, req.OrderBy, req.Category, int(req.PageInfo.PageSize)) + if err != nil { + ctx.SendErr(proto.CodeFailedToOperateDB, err) + return + } + rspData.List = fileList.ToPubLst() + rspData.PageInfo.PageInfo = req.PageInfo + rspData.PageInfo.TotalPage, rspData.PageInfo.FileCount, err = dbutils.PageTotal(userId, req.Uuid, req.Category, req.PageInfo.PageSize, false) + if err != nil { + ctx.SendErr(proto.CodeFolderNotExist, err) + return + } + } + + //发送处理结果 + ctx.SendOk(&rspData) +} + +// ModifyFile +// @Summary Modify file/folder name +// @Description Modify file/folder name +// @Tags File +// @Accept application/json +// @Produce application/json +// @Param userId query string true "user id" +// @Param ModifyFileReq body proto.ModifyFileReq true "request info" +// @Success 200 {object} proto.Rsp{results=proto.DbAffect} "" +// @Router /space/v1/api/file/rename [POST] +func ModifyFile(c *gin.Context) { + + ctx := bpctx.NewCtx(c) + + var modifyFileReq proto.ModifyFileReq + var modifyAffect proto.DbAffect + + userId := ctx.GetUserId() + // 获取请求参数 + if err := c.ShouldBind(&modifyFileReq); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + + err := validate.Struct(modifyFileReq) + if err != nil { + ctx.LogE().Err(err).Msg("validate failed") + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + defer ctx.LogI("modifyFile", modifyFileReq) + // 处理请求 + if affectRow, err := dbutils.RenameFiles(userId, modifyFileReq.Id, modifyFileReq.NewFileName); err != nil { + ctx.SendErr(proto.CodeFailedToOperateDB, err) + return + } else if affectRow != 0 { + modifyAffect.AffectRows = uint32(affectRow) + ctx.SendOk(&modifyAffect) + return + } +} + +// TrashFiles Delete files/folders to Recycle bin +// @Summary Delete files/folders to Recycle bin +// @Description Delete files/folders to Recycle bin +// @Tags File +// @Accept application/json +// @Produce application/json +// @Param userId query string true "user id" +// @Param DeleteId body proto.DeleteFileReq true "params" +// @Success 200 {object} proto.Rsp "" +// @Success 201 {object} proto.Rsp{results=async.AsyncTask} "" +// @Failure 400,404 {object} httputil.HTTPError +// @Router /space/v1/api/file/delete [POST] +func TrashFiles(c *gin.Context) { + + ctx := bpctx.NewCtx(c) + + var deleteReq proto.DeleteFileReq + + + userId := ctx.GetUserId() + //获取请求参数 + + if err := c.ShouldBind(&deleteReq); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + defer ctx.LogI("deleteFiles", deleteReq) + + err := validate.Struct(deleteReq) + if err != nil { + ctx.LogE().Err(err).Msg("validate failed") + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + + //改造 + // 第一步:改造MoveFileToTrashV2,让它可以返回code,如果处理量小则直接返回code-200 + // 处理量大的话,返回201 + + taskInfo, bpErr := file.MoveFilesToRecycledBin(userId, deleteReq.DeleteIds, taskList) + if taskInfo == nil && bpErr.Code == proto.CodeOk { + ctx.SendOk(nil) + return + } else if taskInfo != nil && bpErr.Code == proto.CodeCreateAsyncTaskSuccess { + ctx.SendRsp(taskInfo, bpErr) + return + } else { + ctx.SendErr(bpErr.Code, bpErr.Err) + return + } + +} + +// CopyFiles Batch copy files +// @Summary Batch copy files +// @Description Batch copy files +// @Tags File +// @Accept application/json +// @Produce application/json +// @Param userId query string true "user id" +// @Param copyFilesReq body proto.CopyFileReq true "params" +// @Success 200 {object} proto.Rsp{results=proto.CopyRsp} "" +// @Router /space/v1/api/file/copy [POST] +func CopyFiles(c *gin.Context) { + ctx := bpctx.NewCtx(c) + + var copyFileReq proto.CopyFileReq + var copyRsp proto.CopyRsp + + userId := ctx.GetUserId() + + //获取请求参数 + if err := c.ShouldBind(©FileReq); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + defer ctx.LogI("copyFiles", copyFileReq) + + err := validate.Struct(copyFileReq) + if err != nil { + ctx.LogE().Err(err).Msg("validate failed") + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + for _, value := range copyFileReq.Ids { + if value == copyFileReq.DestId { + ctx.SendErr(proto.CodeCopyIdError, nil) + return + } + } + + if affect, err := dbutils.FileIsExist(userId, copyFileReq.DestId, "", ""); affect == 1 { + if affectRow, newAndOldId, err := dbutils.CopyFile(userId, copyFileReq); err != nil { + if errors.Is(err, errors.New("beyond 20 layers")) { + ctx.SendErr(proto.CodeFolderDepthTooLong, err) + return + } + ctx.SendErr(proto.CodeFailedToOperateDB, err) + return + } else { + copyRsp.AffectRows = uint32(affectRow) + copyRsp.Data = newAndOldId + ctx.SendOk(©Rsp) + } + + } else { + ctx.SendErr(proto.CodeFolderNotExist, err) + return + } + + copyId := copyFileReq.Ids[0] + pathRecord, nameRecord := dbutils.GetPathByUuid(copyId) + // 计算文件夹内文件数 + if fc, err := dbutils.CalculateFileCount(userId, pathRecord, nameRecord); err != nil { + //log.Println(pathRecord+": calculate files failed !", err) + logger.LogE().Err(err).Msg("calculate files failed !") + } else { + if len(pathRecord) == 0 { + logger.LogD().Msg(fmt.Sprintf("%s: %d files\r\n", pathRecord, fc)) + } else { + logger.LogD().Msg(fmt.Sprintf("/: %d files\r\n", fc)) + } + } + +} + +// SearchFiles Search files +// @Summary Search files +// @Description Search files +// @Tags File +// @Accept application/json +// @Produce application/json +// @Param userId query string true "user id" +// @Param uuid query string false "folder's uuid,default: /" +// @Param name query string true "filename" +// @Param category query string false "file type" +// @Param page query int false "page, default:1" +// @Param pageSize query int false "page size,default:10" +// @Param orderBy query string false "sort type, default value is in reverse order of change time" +// @Success 200 {object} proto.Rsp{results=proto.GetListRspData} "" +// @Router /space/v1/api/file/search [GET] +func SearchFiles(c *gin.Context) { + + ctx := bpctx.NewCtx(c) + + var searchReq proto.SearchReq + var rspData proto.GetListRspData + + userId := ctx.GetUserId() + + //获取请求参数 + if err := c.ShouldBind(&searchReq); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + defer ctx.LogI("searchFiles", searchReq) + + //开始处理请求 + if searchReq.ObjectName != "/" /*根据实际情况*/ { + + + if searchReq.PageInfo.Page == 0 { + searchReq.PageInfo.Page = 1 + } + if searchReq.PageInfo.PageSize == 0 { + searchReq.PageInfo.PageSize = 10 + } + if searchReq.OrderBy == "" { + searchReq.OrderBy = "is_dir DESC" + } + + allMatchingFiles, err := dbutils.SearchFileByName(userId, searchReq.Uuid, searchReq.ObjectName, searchReq.Category, searchReq.OrderBy, searchReq.PageInfo.Page, searchReq.PageInfo.PageSize) + if err != nil { + ctx.SendErr(proto.CodeFileNotExist, err) + return + } + rspData.List = allMatchingFiles.ToPubLst() + rspData.PageInfo.PageInfo = searchReq.PageInfo + rspData.PageInfo.TotalPage, rspData.PageInfo.FileCount, err = dbutils.SearchPageTotal(userId, searchReq.Uuid, searchReq.ObjectName, searchReq.Category, searchReq.OrderBy, searchReq.PageInfo.PageSize) + if err != nil { + ctx.SendErr(proto.CodeFailedToOperateDB, nil) + return + } + ctx.SendOk(&rspData) + return + } else { + ctx.SendErr(proto.CodeReqParamErr, nil) + return + } + +} + +// GetFileInfo +// @Summary Query file info +// @Description Query file info +// @Tags File +// @Accept application/json +// @Produce application/json +// @Param userId query int true "user id" +// @Param uuid query string false "file/folder uuid" +// @Param path query string false "path" +// @Param name query string false "name" +// @Success 200 {object} proto.Rsp{results=proto.FileInfoRsp} "file info" +// @Router /space/v1/api/file/info [get] +func GetFileInfo(c *gin.Context) { + + ctx := bpctx.NewCtx(c) + + var req proto.FileInfoReq + var rsp proto.FileInfoRsp + + ctx.LogI("getFileInfo", &req) + if err := c.ShouldBind(&req); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + if req.Path == "" && req.Name == "" { + if info, err := dbutils.GetFileInfoWithUid(ctx.GetUserId(), req.Uuid); err != nil { + ctx.SendErr(proto.CodeFailedToOperateDB, err) + return + } else { + rsp = info.FileInfoPub + ctx.SendOk(&rsp) + return + } + } else if len(req.Path) > 0 && len(req.Name) > 0 { + if info, err := dbutils.GetInfoByPath(ctx.GetUserId(), req.Path, req.Name, 0); err != nil { + ctx.SendErr(proto.CodeFileNotExist, err) + return + } else { + rsp = info.FileInfoPub + ctx.SendOk(&rsp) + return + } + } else { + ctx.SendErr(proto.CodeReqParamErr, nil) + return + } + +} + +// GetFileInfoForInner Get file info for inner +// @Summary Get file info for inner +// @Description Get file info for inner +// @Tags File +// @Accept application/json +// @Produce application/json +// @Param userId query int true "user id" +// @Param uuid query string false "uuid" +// @Success 200 {object} proto.Rsp{results=proto.FileInfoForInnerRsp} "" +// @Router /space/v1/api/inner/file/info [get] +func GetFileInfoForInner(c *gin.Context) { + + ctx := bpctx.NewCtx(c) + + var req proto.FileInfoForInnerReq + var rsp proto.FileInfoForInnerRsp + + ctx.LogI("getFileInfoForInner", &req) + if err := c.ShouldBind(&req); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + + if info, err := dbutils.GetFileInfoForTrends(ctx.GetUserId(), req.Uuid); err != nil { + ctx.SendErr(proto.CodeFailedToOperateDB, err) + return + } else { + rsp.FileInfoForTrends = *info + if !info.IsDir { + if path, err := stor.GetRelativePath(env.NORMAL_BUCKET, rsp.BETag); err != nil { + ctx.SendErr(proto.CodeFailedToOperateDB, err) + return + } else { + dir, _ := filepath.Split(path) + rsp.RelativePath = dir + } + + } + ctx.SendOk(&rsp) + return + } +} + +// CreateVodSymlink Create symbolic link +// @Summary Create symbolic link +// @Description Create symbolic link +// @Tags File +// @Accept application/json +// @Produce application/json +// @Param userId query string true "user id" +// @Param VodSymlinkReq body proto.VodSymlinkReq true "parmas" +// @Success 200 {object} proto.Rsp{results=proto.VodSymlinkRsp} "" +// @Router /space/v1/api/file/vod/symlink [POST] +func CreateVodSymlink(c *gin.Context) { + ctx := bpctx.NewCtx(c) + + var req proto.VodSymlinkReq + var rsp proto.VodSymlinkRsp + + userId := ctx.GetUserId() + + //获取请求参数 + if err := c.ShouldBind(&req); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + defer ctx.LogI("CreateSoftlink", req) + + err := validate.Struct(req) + if err != nil { + ctx.LogE().Err(err).Msg("validate failed") + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + + info, err := dbutils.GetFileInfoWithUid(userId, req.Id) + if err != nil { + ctx.SendErr(proto.CodeFailedToOperateDB, err) + return + } + + if len(info.BETag) == 0 { + ctx.SendErr(proto.CodeReqParamErr, fmt.Errorf("%v is folder", req.Id)) + return + } + rpath, _ := stor.GetRelativePath(env.NORMAL_BUCKET, info.BETag) + oldName := filepath.Join("..", rpath) + + dir := filepath.Join(env.DATA_PATH, "symlink") + os.Mkdir(dir, os.ModePerm) + + linkName := req.Id + fmt.Sprintf("-%v", time.Now().Format("20060102030405")) + + linkPath := filepath.Join(dir, linkName) + ctx.Append("oldName", oldName) + if err := os.Symlink(oldName, linkPath); err != nil { + ctx.SendErr(proto.CodeFailedToCreateSymlink, err) + return + } + + rsp.Linkname = linkName + ctx.SendOk(rsp) +} + +// GetFileInfosForTrends Get fileinfo list for inner +// @Summary Get fileinfo list for inner +// @Description Get fileinfo list for inner +// @Tags File +// @Accept application/json +// @Produce application/json +// @Param userId query int true "user id" +// @Param FileInfoForTrendsReq body proto.FileInfoForTrendsReq false "uuids" +// @Success 200 {object} proto.Rsp{results=proto.FileInfoForTrendsRsp} "" +// @Router /space/v1/api/inner/file/infos [POST] +func GetFileInfosForTrends(c *gin.Context) { + + ctx := bpctx.NewCtx(c) + + var req proto.FileInfoForTrendsReq + var rsp proto.FileInfoForTrendsRsp + + //ctx.LogI("getFileInfoForInner", &req) + if err := c.ShouldBind(&req); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + + if info, err := dbutils.GetFileInfosForTrends(ctx.GetUserId(), req.Uuids); err != nil { + ctx.SendErr(proto.CodeFailedToOperateDB, err) + return + } else { + rsp.FileInfos = info + ctx.SendOk(&rsp) + return + } +} diff --git a/routers/api/folder.go b/routers/api/folder.go new file mode 100644 index 0000000..6b7f23d --- /dev/null +++ b/routers/api/folder.go @@ -0,0 +1,117 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package api + +import ( + "aofs/internal/bpctx" + "aofs/internal/proto" + "aofs/repository/dbutils" + + "github.com/gin-gonic/gin" + "github.com/go-playground/validator" +) + +// CreateFolders Create Folder +// @Summary Create Folder +// @Description Create Folder +// @Tags Folder +// @Accept application/json +// @Produce application/json +// @Param userId query string true "user id" +// @Param createFolderReq body proto.CreateFolderReq true "params" +// @Success 200 {object} proto.Rsp{results=proto.FileInfo} "" +// @Router /space/v1/api/folder/create [POST] +func CreateFolders(c *gin.Context) { + + ctx := bpctx.NewCtx(c) + + var crtFolderReq proto.CreateFolderReq + defer ctx.LogI("CreateFolders", &crtFolderReq) + + + validate := validator.New() + err := validate.Struct(crtFolderReq) + if err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + + // 获取请求参数 + if err := c.ShouldBind(&crtFolderReq); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + // 处理请求 + if _, err := dbutils.FileIsExist(ctx.GetUserId(), crtFolderReq.CurrentDirUuid, "", ""); err != nil { + ctx.SendErr(proto.CodeFolderNotExist, nil) + return + } + if newFolder, code, err := dbutils.CreateFolder(ctx.GetUserId(), crtFolderReq); err != nil { + ctx.SendErr(proto.CodeFailedToCreateFolder, err) + return + } else if newFolder.Name == crtFolderReq.FolderName && code == 3 { + ctx.SendOk(&newFolder) + return + } else if code == 2 { + ctx.SendErr(proto.CodeFolderDepthTooLong, err) + return + } else if code == 1 { + ctx.SendErr(proto.CodeFileExist, err) + return + } + +} + +// FolderInfo Get folder details +// @Summary Get folder details +// @Description Get folder details +// @Tags Folder +// @Accept application/json +// @Produce application/json +// @Param userId query string true "user id" +// @Param uuid query string true "folder's uuid" +// @Success 200 {object} proto.Rsp{results=proto.FolderInfo} "" +// @Router /space/v1/api/folder/info [GET] +func FolderInfo(c *gin.Context) { + ctx := bpctx.NewCtx(c) + + userId := ctx.GetUserId() + + + var folderInfoReq proto.FolderInfoReq + + // 获取请求参数 + if err := c.ShouldBind(&folderInfoReq); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + + //计算文件夹大小 + if fs, err := dbutils.CalculateFolderSizeWithUuid(userId, folderInfoReq.FolderUuid); err != nil { + ctx.LogE().Err(err).Msg("failed to Calculate FolderSize ") + return + } else { + logger.LogI().Int64("folderSize", fs).Msg("Calculate Folder Size") + } + //返回文件夹信息 + if fi, err := dbutils.GetFolderInfoByUuid(folderInfoReq.FolderUuid); err != nil { + ctx.SendErr(proto.CodeFileNotExist, err) + return + } else { + ctx.SendOk(&fi) + return + } + +} diff --git a/routers/api/init.go b/routers/api/init.go new file mode 100644 index 0000000..8b575b0 --- /dev/null +++ b/routers/api/init.go @@ -0,0 +1,120 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package api + +//此文件主要完成系统初始化和用户初始化 +import ( + "aofs/internal/env" + "aofs/internal/log4bp" + "aofs/internal/proto" + "aofs/repository/dbutils" + "aofs/repository/storage" + "bytes" + "crypto/md5" + "encoding/hex" + "fmt" + "io/ioutil" + "os" + "time" + + "github.com/gin-gonic/gin" + "github.com/go-playground/validator" + "github.com/google/uuid" +) + +var logger = log4bp.New("", gin.Mode()) + +var validate = validator.New() + +//此文件初始化系统readme文件到根目录 +func InitReadme(userId proto.UserIdType) { + trans, err := dbutils.NewTransProducter().New() + if err != nil { + logger.LogE().Err(err).Msg("failed to get trans") + os.Exit(1) + } + + defer trans.Commit() + + v, _ := trans.GetSetting(fmt.Sprintf("InitReadme-%v", userId)) + if v == "ok" { + return + } + //检查是否已经存在readme.txt, *** 后续要保存记录,避免用户删除后,又重新创建。 + if exists, err := dbutils.IsExistByPath(userId, "/", "说明.pdf"); err == nil && exists { + + logger.LogD().Msg("说明.pdf is exist") + return + } else { + + logger.LogD().Msg("init 说明.pdf") + } + + //如果文件不存在,则初始化一个 + { + data, err := ioutil.ReadFile("/tmp/说明.pdf") + if err != nil { + logger.LogE().Err(err).Msg("failed to read 说明.pdf") + } + + md5data := md5.Sum(data) + readme := proto.FileInfo{ + FileInfoPub: proto.FileInfoPub{ + Id: uuid.New().String(), + IsDir: false, + Name: "说明.pdf", + Path: "/", + BETag: hex.EncodeToString(md5data[:]), + CreateTime: time.Now().UnixNano() / 1e6, + ModifyTime: time.Now().UnixNano() / 1e6, + OperationTime: time.Now().UnixNano() / 1e6, + Size: int64(len(data)), + FileCount: 0, + Category: "document", + Mime: "application/pdf", + }, + UserId: userId, + Tags: "", + Executable: false, + Version: 0, + BucketName: env.NORMAL_BUCKET, + TransactionId: 0, + } + + + if err := stor.Put(env.NORMAL_BUCKET, readme.BETag, bytes.NewReader(data), int64(len(data))); err == nil { + if err := dbutils.AddFile(readme); err == nil { + logger.LogD().Msg("init 说明.pdf succ") + + trans.SetSetting(fmt.Sprintf("InitReadme-%v", userId), "ok") + } else { + logger.LogE().Err(err).Msg("init readme.pdf. failed to insert db.") + } + + } + } +} + +func initUser(userId proto.UserIdType) error { + dbutils.InitUser(userId) + InitReadme(userId) + logger.LogI().Msg(fmt.Sprintf("Init User:%v", userId)) + return nil +} + +func Init() { + stor = storage.GetStor() + initUser(1) +} diff --git a/routers/api/multipart.go b/routers/api/multipart.go new file mode 100644 index 0000000..a757a76 --- /dev/null +++ b/routers/api/multipart.go @@ -0,0 +1,344 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package api + +import ( + "aofs/internal/bpctx" + "aofs/internal/env" + "aofs/internal/proto" + "aofs/repository/bpredis" + "aofs/repository/dbutils" + "aofs/repository/storage" + "encoding/hex" + "errors" + "strconv" + + "aofs/services/multipart" + "fmt" + "os" + "sync" + + "github.com/gin-gonic/gin" +) + +var rwmutex sync.RWMutex +var stor storage.MultiDiskStorager + +// CreateMultipartTask +// @Summary Creating a multipart task +// @Description +// @Tags Multipart +// @Accept application/json +// @Produce application/json +// @Param userId query string true "user id" +// @Param requestId query string true "request id" +// @Param object body proto.CreateMultipartTaskReq true "params" +// @Success 200 {object} proto.Rsp{results=proto.CreateMultipartTaskRsp} "task info" +// @Router /space/v1/api/multipart/create [POST] +func CreateMultipartTask(c *gin.Context) { + + ctx := bpctx.NewCtx(c) + rwmutex.Lock() + defer rwmutex.Unlock() + + var req proto.CreateMultipartTaskReq + var rsp proto.CreateMultipartTaskRsp + + if err := c.ShouldBind(&req); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + + defer ctx.LogI("createMultipartTask", &req) + if err := validate.Struct(req); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + + + spaceLimit := c.Query("spaceLimit") + + spaceLimitInt, _ := strconv.Atoi(spaceLimit) + redis := bpredis.GetRedis() + if spaceLimitInt != 0 { + // 在线试用用户容量判断 + usedStorage, err := redis.GetInt64(bpredis.UsedSpace + strconv.Itoa(int(ctx.GetUserId()))) + if err != nil { + usedStorage, err = dbutils.GetUsedSpaceByUser(ctx.GetUserId()) + if err != nil { + logger.LogE().Err(err).Msg("GetUsedSpaceByUser error") + } + } + if usedStorage >= int64(spaceLimitInt) { + ctx.SendErr(proto.CodeNotEnoughSpace, errors.New("not Enough Space")) + return + } + } + + param := req + if tagLen := len(param.BETag); tagLen == 34 { + if sizeFlag, err := hex.DecodeString(param.BETag[:2]); err != nil || sizeFlag[0] != multipart.GetSizeFlag(param.Size) { + ctx.SendErr(proto.CodeReqParamErr, fmt.Errorf("size flag err:%v", err)) + return + } + } else if tagLen == 32 { + param.BETag = hex.EncodeToString([]byte{multipart.GetSizeFlag(param.Size)}) + param.BETag + } else { + ctx.SendErr(proto.CodeReqParamErr, fmt.Errorf("betag err")) + return + } + + if len(param.FolderId) == 0 && len(param.FolderPath) == 0 { + ctx.SendErr(proto.CodeReqParamErr, fmt.Errorf("folder param err")) + return + } else if len(param.FolderId) > 0 { + if fi, err := dbutils.GetFileInfoWithUid(ctx.GetUserId(), param.FolderId); err != nil || !fi.IsDir { + ctx.SendErr(proto.CodeReqParamErr, fmt.Errorf("folder param err")) + return + } else { + param.FolderPath = fi.AbsPath() + } + } else { + //循环创建目录 + if fi, err := dbutils.RecursiveCreateFolder(ctx.GetUserId(), param.FolderPath); err != nil { + ctx.SendErr(proto.CodeReqParamErr, fmt.Errorf("failed to create folder(%s):%v", param.FolderPath, err)) + return + } else { + param.FolderId = fi.Id + } + } + + //处理秒传 + if ok, _ := stor.IsExist(env.NORMAL_BUCKET, param.BETag); ok { + if fi, err := multipart.InsertIndex(ctx, param, false, nil); err == nil { + rsp.RspType = proto.CREATE_MULTIPART_TASK_COMPLETE + rsp.CompleteInfo = &fi + ctx.SendOk(&rsp) + return + } else { + ctx.SendErr(proto.CodeMultipartTaskCompleteErr, err) + return + } + } + + task, err := multipart.Taskmgr.GenTask(param) + if errors.Is(err, os.ErrExist) { + conflict := task.GetTaskInfo() + rsp.RspType = proto.CREATE_MULTIPART_TASK_CONFLICT + rsp.ConflictInfo = &conflict + + ctx.SendOk(&rsp) + return + } else if errors.Is(err, storage.ErrEnoughSpace) { + ctx.SendErr(proto.CodeNotEnoughSpace, err) + return + } + + if err != nil { + //失败 + ctx.SendErr(proto.CodeFailedToCreateMultipartTask, err) + return + } + task.UpdateLast() + + var succInfo proto.CreateMultipartTaskSuccRsp + succInfo.UploadId = task.UploadId + succInfo.PartSize = multipart.HASH_PART_SIZE + + rsp.RspType = proto.CREATE_MULTIPART_TASK_SUCC + rsp.SuccInfo = &succInfo + ctx.Append("taskInfo", task) + ctx.SendOk(&rsp) +} + +// DeleteMultipartTask +// @Summary Delete multipart task +// @Description +// @Tags Multipart +// @Accept application/json +// @Produce application/json +// @Param userId query string true "user id" +// @Param requestId query string true "request id" +// @Param object body proto.DeleteMultipartTaskReq true "params" +// @Success 200 {object} proto.Rsp "" +// @Router /space/v1/api/multipart/delete [POST] +func DeleteMultipartTask(c *gin.Context) { + + ctx := bpctx.NewCtx(c) + + rwmutex.Lock() + defer rwmutex.Unlock() + + var req proto.DeleteMultipartTaskReq + + if err := c.ShouldBind(&req); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + defer ctx.LogI("deleteMultipartTask", &req) + if err := validate.Struct(req); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + + multipart.Taskmgr.DeleteTask(req.UploadId) + ctx.SendOk(nil) +} + +// ListMultipartTask +// @Summary Query multipart task info +// @Description +// @Tags Multipart +// @Accept application/json +// @Produce application/json +// @Param userId query string true "user id" +// @Param requestId query string true "request id" +// @Param object body proto.ListMultipartReq true "param" +// @Success 200 {object} proto.Rsp{results=proto.ListMultipartRsp} "" +// @Router /space/v1/api/multipart/list [GET] +func ListMultipartTask(c *gin.Context) { + + ctx := bpctx.NewCtx(c) + + rwmutex.RLock() + defer rwmutex.RUnlock() + + var req proto.ListMultipartReq + var rsp proto.ListMultipartRsp + + if err := c.ShouldBind(&req); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + defer ctx.LogI("listMultipartTask", &req) + + if err := validate.Struct(req); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + + if task, err := multipart.Taskmgr.GetTask(req.UploadId); err != nil { + ctx.SendErr(proto.CodeFailedToCreateMultipartTask, err) + return + } else { + task.UpdateLast() + rsp.UploadedParts = task.UploadedParts + rsp.UploadingParts = task.UploadingParts + ctx.SendOk(&rsp) + return + } +} + +// UploadPart +// @Summary Upload multipart data +// @Description +// @Tags Multipart +// @Accept application/json +// @Produce application/json +// @Param userId query string true "user id" +// @Param requestId query string true "request id" +// @Param object query proto.UploadPartReq true "part" +// @Param object body string true "part content" +// @Success 200 {object} proto.Rsp "" +// @Router /space/v1/api/multipart/upload [POST] +func UploadPart(c *gin.Context) { + + ctx := bpctx.NewCtx(c) + + var req proto.UploadPartReq + + if err := c.BindQuery(&req); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + defer ctx.LogI("uploadPart", &req) + + if err := validate.Struct(req); err != nil || req.Start >= req.End { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + + task, err := multipart.Taskmgr.GetTask(req.UploadId) + if err != nil { + ctx.SendErr(proto.CodeMultipartTaskNotFound, err) + return + } + + + //进行任务上传 + if code, err := task.Upload(req.Start, req.End, c.Request.Body); err != nil { + ctx.SendErr(code, err) + return + } + + task.UpdateLast() + + ctx.SendOk(nil) +} + +// CompleteMultipartTask Complte multipart task +// @Summary Complte multipart task +// @Description +// @Tags Multipart +// @Accept application/json +// @Produce application/json +// @Param userId query string true "user id" +// @Param requestId query string true "request id" +// @Param object body proto.CompleteMultipartTaskReq true "params" +// @Success 200 {object} proto.Rsp{results=proto.CompleteMultipartTaskRsp} "" +// @Router /space/v1/api/multipart/complete [POST] +func CompleteMultipartTask(c *gin.Context) { + + ctx := bpctx.NewCtx(c) + + var req proto.CompleteMultipartTaskReq + var rsp proto.CompleteMultipartTaskRsp + + if err := c.ShouldBind(&req); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + defer ctx.LogI("completeMultipartTask", &req) + + if err := validate.Struct(req); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + task, err := multipart.Taskmgr.GetTask(req.UploadId) + if err != nil { + ctx.SendErr(proto.CodeMultipartTaskNotFound, err) + return + } + redis := bpredis.GetRedis() + if err := task.Complete(); err != nil { + ctx.SendErr(proto.CodeMultipartTaskCompleteErr, err) + return + } else { + if used, err := redis.GetInt64(bpredis.UsedSpace + strconv.Itoa(int(ctx.GetUserId()))); err != nil { + redis.Set(bpredis.UsedSpace+strconv.Itoa(int(ctx.GetUserId())), task.Param.Size, 0) + } else { + redis.Set(bpredis.UsedSpace+strconv.Itoa(int(ctx.GetUserId())), used+task.Param.Size, 0) + } + + rsp, err = multipart.InsertIndex(ctx, task.Param, true, task) + if err != nil { + ctx.SendErr(proto.CodeMultipartTaskCompleteErr, err) + return + } + } + + multipart.Taskmgr.RemoveTask(req.UploadId) + ctx.SendOk(&rsp) +} diff --git a/routers/api/recycled.go b/routers/api/recycled.go new file mode 100644 index 0000000..58d994d --- /dev/null +++ b/routers/api/recycled.go @@ -0,0 +1,153 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package api + +import ( + "aofs/internal/bpctx" + "aofs/internal/proto" + "aofs/repository/dbutils" + "aofs/services/file" + "aofs/services/recycled" + "github.com/gin-gonic/gin" +) + +// ListRecycled Query the recycle bin file list +// @Summary Query the recycle bin file list +// @Description Query the recycle bin file list +// @Tags Recycled +// @Accept application/json +// @Produce application/json +// @Param userId query string true "user id" +// @Param page query int false "page index,default: 1" +// @Param pageSize query int false "page size,default: 10" +// @Success 200 {object} proto.Rsp{results=proto.GetListRspData} "" +// @Router /space/v1/api/recycled/list [GET] +func ListRecycled(c *gin.Context) { + + ctx := bpctx.NewCtx(c) + + var pageInfo proto.PageInfo + var rspData proto.GetListRspData + + userId := ctx.GetUserId() + //获取请求参数 + if err := c.ShouldBind(&pageInfo); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + + if pageInfo.Page == 0 { + pageInfo.Page = 1 + } + if pageInfo.PageSize == 0 { + pageInfo.PageSize = 10 + } + + recycleList, err := dbutils.GetRecycledList(userId, pageInfo.Page, "desc", pageInfo.PageSize) + if err != nil { + ctx.SendErr(proto.CodeFileNotExist, err) + return + } else { + rspData.List = recycleList.ToPubLst() + rspData.PageInfo.PageInfo = pageInfo + rspData.PageInfo.TotalPage, rspData.PageInfo.FileCount, err = dbutils.PageTotal(userId, "", "", pageInfo.PageSize, true) + if err != nil { + ctx.SendErr(proto.CodeFailedToOperateDB, err) + return + } + ctx.SendOk(&rspData) + return + } + +} + +// RestoreRecycled Restore files from recycle bin +// @Summary Restore files from recycle bin +// @Description Restore files from recycle bin +// @Tags Recycled +// @Accept application/json +// @Produce application/json +// @Param userId query int true "user id" +// @Param restoreFilesReq body proto.RestoreRecycledReq true "params" +// @Success 200 {object} proto.Rsp "success" +// @Success 201 {object} proto.Rsp{results=async.AsyncTask} "asynchronous task" +// @Router /space/v1/api/recycled/restore [POST] +func RestoreRecycled(c *gin.Context) { + + ctx := bpctx.NewCtx(c) + var restoreReq proto.RestoreRecycledReq + + //获取请求参数 + if err := c.ShouldBind(&restoreReq); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + defer ctx.LogI("restoreRecycled", restoreReq) + //处理请求 + err := validate.Struct(restoreReq) + if err != nil { + ctx.LogE().Err(err).Msg("validate failed") + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + + taskInfo, bpErr := file.RestoreFilesFromRecycledBin(ctx.GetUserId(), restoreReq.RecycledUuids, taskList) + if taskInfo == nil && bpErr.Code == proto.CodeOk { + ctx.SendOk(nil) + return + } else if taskInfo != nil && bpErr.Code == proto.CodeCreateAsyncTaskSuccess { + ctx.SendRsp(taskInfo, bpErr) + return + } else { + ctx.SendErr(bpErr.Code, bpErr.Err) + return + } + +} + +// ClearRecycled Clean out the recycle bin +// @Summary Clean out the recycle bin +// @Description Clean out the recycle bin +// @Tags Recycled +// @Accept application/json +// @Produce application/json +// @Param userId query int true "user id" +// @Param uuids body proto.RecycledPhyDeleteReq true "params" +// @Success 200 {object} proto.Rsp{} "" +// @Router /space/v1/api/recycled/clear [POST] +func ClearRecycled(c *gin.Context) { + ctx := bpctx.NewCtx(c) + //对回收状态为1和4的,全部修改为2 + var req proto.RecycledPhyDeleteReq + //var rsp proto.Rsp + //rsp.SetContext(c) + + if err := c.ShouldBind(&req); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + affect, err := dbutils.RecycledFromLogicToPhy(ctx.GetUserId(), req.Uuids) + + defer ctx.LogI("clearRecycled", req) + + if err != nil { + logger.LogE().Err(err).Msg("clear recycled failed") + ctx.SendErr(proto.CodeFailedToOperateDB, err) + } else { + logger.LogI().Interface("uuids", req.Uuids).Interface("affect:", affect).Msg("clearRecycled") + ctx.SendOk(nil) + } + recycled.DoClearRecycledTask() +} diff --git a/routers/api/status.go b/routers/api/status.go new file mode 100644 index 0000000..ebf5a0d --- /dev/null +++ b/routers/api/status.go @@ -0,0 +1,44 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package api + +import ( + "aofs/internal/bpctx" + "aofs/internal/proto" + + "github.com/gin-gonic/gin" +) + +// Status Querying service status +// @Summary Querying service status +// @Description Querying service status +// @Tags ServerStatus +// @Accept application/json +// @Produce application/json +// @Param userId query string true "user id" +// @Success 200 {object} proto.Rsp{results=proto.StatusRsp} "success" +// @Router /space/v1/api/status [GET] +func Status(c *gin.Context) { + + ctx := bpctx.NewCtx(c) + + var statusRsp proto.StatusRsp + + defer ctx.LogI("get status", nil) + + statusRsp.Status = "ok" + ctx.SendOk(&statusRsp) + +} diff --git a/routers/api/sync.go b/routers/api/sync.go new file mode 100644 index 0000000..b314284 --- /dev/null +++ b/routers/api/sync.go @@ -0,0 +1,63 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package api + +import ( + "aofs/internal/bpctx" + "aofs/internal/proto" + "aofs/repository/dbutils" + + "github.com/gin-gonic/gin" +) + +// GetSyncedFiles Obtain incremental synchronization data +// @Summary Obtain incremental synchronization data +// @Description Obtain incremental synchronization data +// @Tags Sync +// @Accept application/json +// @Produce application/json +// @Param userId query string true "user id" +// @Param timestamp query int true "timestamp" +// @Param path query string false "path" +// @Param deviceId query string true "device id" +// @Success 200 {object} proto.Rsp{results=proto.GetListRspData} "" +// @Router /space/v1/api/sync/synced [GET] +func GetSyncedFiles(c *gin.Context) { + + ctx := bpctx.NewCtx(c) + + var syncedFilesReq proto.SyncedFilesReq + + var rspData proto.GetListRspData + + + userId := ctx.GetUserId() + + if err := c.ShouldBind(&syncedFilesReq); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + + changedList, syncErr := dbutils.GetSyncedFiles(syncedFilesReq.DeviceId, syncedFilesReq.Path, syncedFilesReq.Timestamp, userId) + if syncErr != nil { + ctx.SendErr(proto.CodeFileNotExist, syncErr) + return + } else { + rspData.List = changedList.ToPubLst() + ctx.SendOk(&rspData) + return + } + +} diff --git a/routers/api/user.go b/routers/api/user.go new file mode 100644 index 0000000..88771e4 --- /dev/null +++ b/routers/api/user.go @@ -0,0 +1,131 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package api + +import ( + "aofs/internal/bpctx" + "aofs/internal/proto" + "aofs/repository/dbutils" + "aofs/services/recycled" + "strconv" + + "github.com/gin-gonic/gin" +) + +// UserInit Initialize user +// @Summary Initialize user +// @Description Initialize user +// @Tags User +// @Accept application/json +// @Produce application/json +// @Param userId query string true "user id" +// @Param userId body proto.User true "user id" +// @Success 200 {object} proto.Rsp "" +// @Router /space/v1/api/user/init [POST] +func UserInit(c *gin.Context) { + + ctx := bpctx.NewCtx(c) + + defer ctx.LogI("init user", ctx.GetUserId()) + if err := initUser(ctx.GetUserId()); err != nil { + ctx.SendErr(proto.CodeFailedToInitUser, err) + } else { + ctx.SendOk(nil) + } + +} + +// UserUsedSpace Query the user space capacity +// @Summary Query the user space capacity +// @Description Query the user space capacity +// @Tags User +// @Accept application/json +// @Produce application/json +// @Param userId query string true "user id" +// @Param targetUserId query string true "user id" +// @Success 200 {object} proto.Rsp{results=proto.Storage} "" +// @Router /space/v1/api/user/storage [GET] +func UserUsedSpace(c *gin.Context) { + + ctx := bpctx.NewCtx(c) + + var storage proto.Storage + userId := ctx.GetUserId() + + targetUserId := c.Query("targetUserId") + u64, err := strconv.ParseUint(targetUserId, 10, 64) + + defer ctx.LogI("Get used space", userId) + if err != nil || u64 == 0 { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + if userId >= 1 && u64 >= 1 && userId <= proto.UserIdType(u64) { + if userId == 1 || userId == proto.UserIdType(u64) { + if res, err := dbutils.GetUsedSpaceByUser(proto.UserIdType(u64)); err != nil { + storage.UserStorage = 0 + ctx.SendOk(&storage) + //ctx.SendErr(proto.CodeFailedToGetUsedStorage, err) + return + } else { + storage.UserStorage = res + ctx.SendOk(&storage) + } + } + } else { + ctx.SendErr(proto.CodeUserIdError, nil) + } + +} + +// UserDelete Delete user +// @Summary Delete user +// @Description Delete user +// @Tags User +// @Accept application/json +// @Produce application/json +// @Param userId query string true "user id" +// @Param userId body proto.User true "user id" +// @Success 200 {object} proto.Rsp "" +// @Router /space/v1/api/user/delete [POST] +func UserDelete(c *gin.Context) { + ctx := bpctx.NewCtx(c) + + var user proto.User + //获取请求参数 + + if err := c.ShouldBind(&user); err != nil { + ctx.SendErr(proto.CodeReqParamErr, err) + return + } + userId := ctx.GetUserId() + + if user.User > 1 && userId >= 1 { + if user.User == userId || userId == 1 { + if err := dbutils.DeleteUser(user.User); err != nil { + ctx.SendErr(proto.CodeFailedToDeleteUser, err) + } else { + go recycled.DoClearRecycledTask() + ctx.SendOk(nil) + } + } else { + ctx.SendErr(proto.CodeUserIdError, nil) + return + } + } else { + ctx.SendErr(proto.CodeFailedToDeleteUser, nil) + } + +} diff --git a/routers/middleware/cors.go b/routers/middleware/cors.go new file mode 100644 index 0000000..49773f3 --- /dev/null +++ b/routers/middleware/cors.go @@ -0,0 +1,30 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package middleware + +import "github.com/gin-gonic/gin" + +func Cors() gin.HandlerFunc { + return func(c *gin.Context) { + + c.Header("Access-Control-Allow-Origin", "*") + //主要设置Access-Control-Allow-Origin + //c.Header("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE, UPDATE") + //c.Header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Authorization") + //c.Header("Access-Control-Expose-Headers", "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Cache-Control, Content-Language, Content-Type") + c.Header("Access-Control-Allow-Credentials", "true") + //c.Set("content-type", "application/json") + } +} diff --git a/routers/middleware/log_handler.go b/routers/middleware/log_handler.go new file mode 100644 index 0000000..a9786fd --- /dev/null +++ b/routers/middleware/log_handler.go @@ -0,0 +1,49 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package middleware + +import ( + "fmt" + "github.com/gin-gonic/gin" + "time" +) + +//FormatGinLog 日志格式化 +func LoggerHandler() gin.HandlerFunc { + + var statusColor, resetColor, level string + return gin.LoggerWithFormatter(func(param gin.LogFormatterParams) string { + + if param.IsOutputColor() { + statusColor = param.StatusCodeColor() + resetColor = param.ResetColor() + } + if param.StatusCode >= 300 { + level = "error" + } else { + level = "info" + } + return fmt.Sprintf("{\"level\":\"%s\",\"timestamp\":%s,\"client\":\"%s\",\"method\":\"%s\",\"path\":\"%s\",\"request.proto\":\"%s\",\"code\":\"%s %3d %s\",\"latency\":\"%s\"}\n", + level, + param.TimeStamp.Format(time.RFC3339), + param.ClientIP, + param.Method, + param.Path, + param.Request.Proto, + statusColor, param.StatusCode, resetColor, + param.Latency, + ) + }) +} diff --git a/routers/middleware/sessions.go b/routers/middleware/sessions.go new file mode 100644 index 0000000..18bf676 --- /dev/null +++ b/routers/middleware/sessions.go @@ -0,0 +1,28 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package middleware + +import ( + "github.com/gin-contrib/sessions" + "github.com/gin-contrib/sessions/cookie" + "github.com/gin-gonic/gin" +) + +// InitSession 初始化session +func InitSession() gin.HandlerFunc { + + store := cookie.NewStore([]byte("eulixspace")) + return sessions.Sessions("sessionId", store) +} diff --git a/routers/routers/routers.go b/routers/routers/routers.go new file mode 100644 index 0000000..92def37 --- /dev/null +++ b/routers/routers/routers.go @@ -0,0 +1,103 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package routers + +import ( + "aofs/routers/api" + "aofs/routers/middleware" + + "github.com/gin-gonic/gin" + swaggerFiles "github.com/swaggo/files" + gs "github.com/swaggo/gin-swagger" +) + +func InitRoute() *gin.Engine { + route := gin.New() + + //内部接口,不需要放到路由表中 + route.Use(middleware.LoggerHandler(), middleware.InitSession()) + + inner := route.Group("/space/v1/api/inner") + { + inner.GET("/file/info", api.GetFileInfoForInner) + inner.POST("/file/infos", api.GetFileInfosForTrends) + } + // 文件接口 + file := route.Group("/space/v1/api/file") + { + file.GET("/info", api.GetFileInfo) + file.GET("/list", api.ListFiles) + file.POST("/rename", api.ModifyFile) + file.POST("/copy", api.CopyFiles) + file.POST("/move", api.MoveFile) + file.POST("/delete", api.TrashFiles) + file.GET("/download", api.DownloadFile) + file.GET("/search", api.SearchFiles) + file.GET("/thumb", api.GetThumb) + file.GET("/compressed", api.GetCompressed) + file.POST("/vod/symlink", api.CreateVodSymlink) + } + + folder := route.Group("/space/v1/api/folder") + { + folder.POST("/create", api.CreateFolders) + folder.GET("/info", api.FolderInfo) + } + // user接口 + user := route.Group("/space/v1/api/user") + { + user.POST("/init", api.UserInit) + user.POST("/delete", api.UserDelete) + user.GET("/storage", api.UserUsedSpace) + } + //同步接口 + sync := route.Group("/space/v1/api/sync") + { + sync.GET("/synced", api.GetSyncedFiles) + } + + // 回收站接口 + recycled := route.Group("/space/v1/api/recycled") + { + recycled.GET("/clear", api.ClearRecycled) + recycled.POST("/clear", api.ClearRecycled) + recycled.POST("/restore", api.RestoreRecycled) + recycled.GET("/list", api.ListRecycled) + + } + + // multipart 分片上传 + multipart := route.Group("/space/v1/api/multipart") + { + multipart.POST("/create", api.CreateMultipartTask) + multipart.POST("/delete", api.DeleteMultipartTask) + multipart.GET("/list", api.ListMultipartTask) + multipart.POST("/upload", api.UploadPart) + multipart.POST("/complete", api.CompleteMultipartTask) + } + + route.GET("/space/v1/api/status", api.Status) + + async := route.Group("/space/v1/api/async") + { + async.GET("/task", api.GetAsyncTaskInfo) + } + + if gin.Mode() == gin.DebugMode { + route.GET("swagger/*any", gs.WrapHandler(swaggerFiles.Handler)) + } + + return route +} diff --git a/services/async/async_task.go b/services/async/async_task.go new file mode 100644 index 0000000..8e2bfc5 --- /dev/null +++ b/services/async/async_task.go @@ -0,0 +1,92 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package async + +import ( + "aofs/internal/utils" + "errors" + "sync" +) + +// 定义一个任务的struct,包含任务ID,任务处理总数,已处理数 +type AsyncTask struct { + TaskId string `json:"taskId"` + TaskStatus string `json:"taskStatus"` + Total int `json:"total"` + Processed int `json:"processed"` +} + +func (a *AsyncTask) UpdateStatus(status string) { + a.TaskStatus = status +} + +func (a *AsyncTask) Init(total int) { + a.TaskStatus = AsyncTaskStatusInit + a.Total = total + a.TaskId = utils.RandomID()[:8] + a.Processed = 0 +} + +const ( + AsyncTaskStatusInit = "init" + AsyncTaskStatusProcessing = "processing" + AsyncTaskStatusSuccess = "success" + AsyncTaskStatusFailed = "failed" +) + +// 任务初始化 +type TaskList struct { + mu sync.Mutex + tasks map[string]*AsyncTask +} + +//var tl *TaskList + +func NewTaskList() *TaskList { + return &TaskList{ + tasks: make(map[string]*AsyncTask), + } +} + +func (t *TaskList) Add(task *AsyncTask) { + t.mu.Lock() + defer t.mu.Unlock() + t.tasks[task.TaskId] = task +} + +func (t *TaskList) Get(taskID string) *AsyncTask { + t.mu.Lock() + defer t.mu.Unlock() + return t.tasks[taskID] +} + +func (t *TaskList) Remove(taskID string) { + t.mu.Lock() + defer t.mu.Unlock() + delete(t.tasks, taskID) +} + +// GetTaskStatus 获取任务状态 +func (t *TaskList) GetTaskStatus(taskID string) (*AsyncTask, error) { + // 获取任务列表 + //taskList := NewTaskList() + // 根据任务 ID 获取任务 + task := t.Get(taskID) + // 返回任务和错误 + if task == nil { + return nil, errors.New("task not found") + } + return task, nil +} diff --git a/services/file/delete.go b/services/file/delete.go new file mode 100644 index 0000000..a78fedf --- /dev/null +++ b/services/file/delete.go @@ -0,0 +1,81 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package file + +import ( + "aofs/internal/env" + "aofs/internal/proto" + "aofs/repository/dbutils" + "aofs/services/async" +) + +func MoveFilesToRecycledBin(userId proto.UserIdType, deleteIDs []string, taskList *async.TaskList) (*async.AsyncTask, *proto.BpErr) { + //获取文件数量 + count := len(deleteIDs) + + subFiles, err := dbutils.GetSubFilesInUuids(userId, deleteIDs, []uint32{proto.TrashStatusNormal}) + if err != nil { + return nil, &proto.BpErr{ + Code: proto.CodeFailedToOperateDB, + Err: err, + } + } + + if count < len(subFiles) { + count = len(subFiles) + count + } + newTask := new(async.AsyncTask) + newTask.Init(count) + + if count > env.ASYNC_TASK_THRESHOLD { + + taskList.Add(newTask) + } + + code, err := dbutils.MoveFileToTrashV2(userId, deleteIDs, subFiles, count, newTask) + if err != nil { + return nil, &proto.BpErr{ + Code: proto.CodeFailedToOperateDB, + Err: err, + } + } + + var allFiles []string + allFiles = append(allFiles, subFiles...) + + for _, deleteId := range deleteIDs { + fi, _ := dbutils.GetInfoByUuid(deleteId) + if fi != nil && !fi.IsDir { + allFiles = append(allFiles, deleteId) + } else if fi == nil { + return nil, &proto.BpErr{ + Code: proto.CodeFailedToOperateDB, + Err: err, + } + } + } + + // 历史动态:推送文件变化到网关 + go func() { + PushChanges("file_delete", userId, allFiles) + + }() + + if code == proto.CodeCreateAsyncTaskSuccess { + + return taskList.Get(newTask.TaskId), &proto.BpErr{Code: proto.CodeCreateAsyncTaskSuccess, Err: nil} + } + return nil, &proto.BpErr{Code: proto.CodeOk, Err: nil} +} diff --git a/services/file/download.go b/services/file/download.go new file mode 100644 index 0000000..299fd23 --- /dev/null +++ b/services/file/download.go @@ -0,0 +1,113 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package file + +import ( + "aofs/repository/dbutils" + "aofs/repository/storage" + "archive/zip" + "errors" + "io" + "os" +) + +// ProcessPicZip 批量压缩 +func ProcessPicZip(bucket string, uuids []string, w io.Writer, picType int) error { + + if len(uuids) <= 0 { + return errors.New("zipFile: uuid param error") + } + + zipWriter := zip.NewWriter(w) + defer zipWriter.Close() + if picType == 0 { + for _, fileId := range uuids { + if err := zipThumb(bucket, fileId, zipWriter); err != nil { + continue + } + } + } else if picType == 1 { + for _, fileId := range uuids { + if err := zipCompressed(bucket, fileId, zipWriter); err != nil { + continue + } + } + } + + return nil + +} + +// ZipThumb 压缩缩略图 +func zipThumb(bucket string, uuid string, zw *zip.Writer) error { + fileInfo, err := dbutils.GetInfoByUuid(uuid) + if err != nil { + return err + } + + previewStore := storage.NewPreview() + path, err := previewStore.GetThumbnailPath(fileInfo.BETag) + if err != nil { + return err + } + + + if _, err = os.Stat(path); err == nil { + fileOnZip, err := zw.Create(fileInfo.Id) + if err != nil { + return err + } + //读取需要压缩的文件 + subfile, _ := os.Open(path) + defer subfile.Close() + _, err = io.Copy(fileOnZip, subfile) + if err != nil { + return err + } + } + + return nil +} + +// ZipThumb 压缩图 +func zipCompressed(bucket string, uuid string, zw *zip.Writer) error { + fileInfo, err := dbutils.GetInfoByUuid(uuid) + if err != nil { + return err + } + previewStore := storage.NewPreview() + + path, err := previewStore.GetCompressedImgPath(fileInfo.BETag) + if err != nil { + return err + } + + //在压缩包中创建一个文件 + if _, err = os.Stat(path); err == nil { + fileOnZip, err := zw.Create(fileInfo.Id) + if err != nil { + return err + } + //读取需要压缩的文件 + subfile, _ := os.Open(path) + defer subfile.Close() + _, err = io.Copy(fileOnZip, subfile) + if err != nil { + return err + } + } + + return nil +} diff --git a/services/file/notification.go b/services/file/notification.go new file mode 100644 index 0000000..4c728cd --- /dev/null +++ b/services/file/notification.go @@ -0,0 +1,60 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package file + +import ( + "encoding/base64" + "encoding/json" + "aofs/internal/proto" + "aofs/repository/bpredis" + "aofs/repository/dbutils" + "github.com/google/uuid" +) + +var redis = bpredis.GetRedis() + +func PushChanges(optType string, userId proto.UserIdType, uuids []string) error { + var changeUuids []string + files, err := dbutils.GetFilesInUuids(userId, uuids) + if err != nil { + return err + } + + subfiles, err := dbutils.GetSubFilesInUuids(userId, uuids, []uint32{proto.TrashStatusNormal, proto.TrashStatusLogicDeleted, proto.TrashStatusSubFilesLogicDeleted}) + if err != nil { + return err + } + + changeUuids = append(changeUuids, files...) + + if len(subfiles) > 0 { + changeUuids = append(changeUuids, subfiles...) + } + + pushData := &proto.FileChangePushMsg{ + OperatorType: optType, + Uuids: changeUuids, + } + dataBytes, _ := json.Marshal(pushData) + fileChangeMsg := map[string]interface{}{ + "userId": int(userId), + "optType": "HISTORY_RECORD", + "requestId": uuid.New().String(), + "data": base64.StdEncoding.EncodeToString(dataBytes), + } + redis.PushNotificationMsg(fileChangeMsg) + + return nil +} diff --git a/services/file/restore.go b/services/file/restore.go new file mode 100644 index 0000000..a7d737d --- /dev/null +++ b/services/file/restore.go @@ -0,0 +1,68 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package file + +import ( + "aofs/internal/proto" + "aofs/repository/dbutils" + "aofs/services/async" +) + +func RestoreFilesFromRecycledBin(userId proto.UserIdType, restoreIDs []string, taskList *async.TaskList) (*async.AsyncTask, *proto.BpErr) { + //获取文件数量 + count := len(restoreIDs) + + subFiles, err := dbutils.GetSubFilesInUuids(userId, restoreIDs, []uint32{proto.TrashStatusLogicDeleted, proto.TrashStatusSubFilesLogicDeleted}) + if err != nil { + return nil, &proto.BpErr{ + Code: proto.CodeFailedToOperateDB, + Err: err, + } + } + + if count < len(subFiles) { + count = len(subFiles) + count + } + + newTask := new(async.AsyncTask) + newTask.Init(count) + taskList.Add(newTask) + code, err := dbutils.RestoreFilesFromTrashV2(userId, restoreIDs, subFiles, count, newTask) + if err != nil { + return nil, &proto.BpErr{ + Code: proto.CodeFailedToOperateDB, + Err: err, + } + } + + var allFiles []string + allFiles = append(allFiles, subFiles...) + + for _, restoreId := range restoreIDs { + fi, _ := dbutils.GetInfoByUuid(restoreId) + if !fi.IsDir { + allFiles = append(allFiles, restoreId) + } + } + + go func() { + PushChanges("file_recovery", userId, allFiles) + }() + + if code == proto.CodeCreateAsyncTaskSuccess { + return taskList.Get(newTask.TaskId), &proto.BpErr{Code: proto.CodeCreateAsyncTaskSuccess, Err: nil} + } + return nil, &proto.BpErr{Code: proto.CodeOk, Err: nil} +} diff --git a/services/multipart/multipart.go b/services/multipart/multipart.go new file mode 100644 index 0000000..72bb987 --- /dev/null +++ b/services/multipart/multipart.go @@ -0,0 +1,654 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package multipart + +import ( + "aofs/internal/bpctx" + "aofs/internal/env" + "aofs/internal/log4bp" + "aofs/internal/proto" + "aofs/repository/dbutils" + "aofs/repository/storage" + "crypto/md5" + + "encoding/hex" + "encoding/json" + + "aofs/internal/utils" + "fmt" + "hash" + "io" + "io/fs" + "io/ioutil" + "log" + "os" + "path/filepath" + "sort" + "sync" + "time" + + "github.com/gin-gonic/gin" + "github.com/google/uuid" +) + +var stor storage.MultiDiskStorager + +var logger = log4bp.New("", gin.Mode()) + +//此文件完成分片上传接口实现 + +const HASH_PART_SIZE = 4 * 1024 * 1024 +const HASH_SUM_SIZE = 16 + +func NewHash() hash.Hash { + return md5.New() +} + +func GetSizeFlag(size int64) uint8 { + n := uint8(0) + for size/2 >= 1 { + n++ + size /= 2 + } + return n +} + +type MultipartTask struct { + UploadId string //上传任务id + DiskId int //存储的磁盘id + MPDataPath string //数据存储路径, 包括 hash 和 data 文件,分片记录文件存在主目录下。 + Param proto.CreateMultipartTaskParam //创建任务时的参数 + HashPartSize int64 // hash分片大小 + UploadedParts []proto.Part //已上传的分片 + UploadingParts []proto.Part //正在上传的分片 + last int64 //最后的活跃时间 + mutex sync.Mutex + betagPath string //betag 对应的文件存储路径 + diskPath string +} + +func (task *MultipartTask) UpdateLast() { + task.last = time.Now().Unix() +} +func (task *MultipartTask) timeout() bool { + return (time.Now().Unix() - task.last) > 30*60 //30分钟超时 +} + +func (task *MultipartTask) GetTaskInfo() proto.MultipartTaskStatusInfo { + task.mutex.Lock() + defer task.mutex.Unlock() + var info proto.MultipartTaskStatusInfo + info.UploadId = task.UploadId + info.CreateMultipartTaskParam = task.Param + info.UploadedParts = task.UploadedParts + info.UploadingParts = task.UploadingParts + return info +} + +func (task *MultipartTask) GetBHashPartSize() int64 { + return 4 * 1024 * 1024 +} + +func (task *MultipartTask) Complete() error { + task.mutex.Lock() + defer task.mutex.Unlock() + if len(task.UploadingParts) != 0 { + return fmt.Errorf("uploading, uploadingParts:%v", task.UploadingParts) + } + + if len(task.UploadedParts) != 1 { + return fmt.Errorf("parts is not as expected, uploadedParts:%v", task.UploadedParts) + } + + if task.UploadedParts[0].Start != 0 || task.UploadedParts[0].End != task.Param.Size { + return fmt.Errorf("not finish. uploadedParts:%v, task.param.size=%v", task.UploadedParts, task.Param.Size) + } + + //校验 + file, err := os.Open(filepath.Join(task.MPDataPath, task.UploadId+".hash")) + if err != nil { + return fmt.Errorf("failed to open hash file") + } + var shasum []byte + if task.Param.Size <= HASH_PART_SIZE { + shasum, err = ioutil.ReadAll(file) + file.Close() + + if len(shasum) != HASH_SUM_SIZE || err != nil { + return fmt.Errorf("failed to read hash file") + } + + } else { + sha := NewHash() + io.Copy(sha, file) + + file.Close() + shasum = sha.Sum(nil) + + } + shasum = append([]byte{GetSizeFlag(task.Param.Size)}, shasum...) + + if hex.EncodeToString(shasum) != task.Param.BETag { + return fmt.Errorf("hash err, actual:%v, expect:%v", hex.EncodeToString(shasum), task.Param.BETag) + } + + //校验通过 + if fpath, err := stor.MoveFile(filepath.Join(task.MPDataPath, task.UploadId+".data"), task.DiskId, env.NORMAL_BUCKET, task.UploadId); err != nil { + return err + } else { + task.betagPath = fpath + if err := os.Remove(filepath.Join(task.MPDataPath, task.UploadId+".hash")); err != nil { + log.Println("failed to remove hash:", err) + } + os.Remove(filepath.Join(getMPMetaPath(), task.UploadId+".mp")) + return nil + } + +} + +type HashWrite struct { + hash.Hash + W io.Writer +} + +func (hw *HashWrite) Write(b []byte) (int, error) { + n, err := hw.W.Write(b) + if n > 0 && hw.Hash != nil { + hw.Hash.Write(b) + } + return n, err +} + +func (task *MultipartTask) checkUploadedOverlap(start, end int64) (bool, error) { + for _, part := range task.UploadedParts { + if start >= part.Start && end <= part.End { + return true, nil + } else if start < part.End && end > part.Start { + return true, fmt.Errorf("overlap to uploaded") + } + } + return false, nil +} + +func (task *MultipartTask) checkUploadingOverlap(start, end int64) (bool, error) { + for _, part := range task.UploadingParts { + if start >= part.Start && end <= part.End { + return true, nil + } else if start < part.End && end > part.Start { + return true, fmt.Errorf("overlap to uploading") + } + } + return false, nil +} + +func (task *MultipartTask) removeFromUploading(start int64, lock bool) { + if lock { + task.mutex.Lock() + defer task.mutex.Unlock() + } + + for i, part := range task.UploadingParts { + if part.Start == start { + task.UploadingParts = append(task.UploadingParts[:i], task.UploadingParts[i+1:]...) + break + } + } +} + +//合并当前完成的分段,返回需要计算hash的分段, 支持随机分片长度。 +func (task *MultipartTask) mergeToUploaded(start, end int64, lock bool) []int64 { + ret := []int64{} + if lock { + task.mutex.Lock() + defer task.mutex.Unlock() + } + task.UploadedParts = append(task.UploadedParts, proto.Part{Start: start, End: end}) + sort.Slice(task.UploadedParts, func(i, j int) bool { + return task.UploadedParts[i].Start < task.UploadedParts[j].Start + }) + + //合并 + subparts := []proto.Part{} + cur := task.UploadedParts[0] + for _, part := range task.UploadedParts[1:] { + if part.Start == cur.End { + //找出需要计算的 + if cur.End%HASH_PART_SIZE != 0 && + (part.End/HASH_PART_SIZE > cur.End/HASH_PART_SIZE || part.End == task.Param.Size) { + ret = append(ret, cur.End/HASH_PART_SIZE) + } + cur.End = part.End + } else { + subparts = append(subparts, cur) + cur = part + } + } + task.UploadedParts = append(subparts, cur) + + return ret +} + +func (task *MultipartTask) splitPart(start, end int64) []proto.Part { + parts := []proto.Part{} + for { + part := proto.Part{Start: start, End: start + HASH_PART_SIZE} + part.End -= part.End % HASH_PART_SIZE + if part.End >= end { + part.End = end + parts = append(parts, part) + break + } else { + parts = append(parts, part) + start = part.End + } + } + return parts +} + +//写文件,如果本次分片包含完整的hash计算端,则在内存完成计算;否则不计算,留待后续合并再计算 +func (task *MultipartTask) writeDatafile(start, end int64, r io.Reader) (map[int64][]byte, error) { + + w, err := os.OpenFile(filepath.Join(task.MPDataPath, task.UploadId+".data"), os.O_WRONLY, os.ModePerm) + if err != nil { + return nil, fmt.Errorf("failed to open file:%v", err) + } + defer w.Close() + defer w.Sync() + if pos, err := w.Seek(start, io.SeekStart); err != nil || pos != start { + return nil, fmt.Errorf("failed to seek.%v", err) + } else { + //进行分段计算,找出可以内存计算hash的段 + hashMaps := map[int64][]byte{} + parts := task.splitPart(start, end) + for _, part := range parts { + hw := &HashWrite{W: w} + if part.Start%HASH_PART_SIZE == 0 && (part.End%HASH_PART_SIZE == 0 || part.End == task.Param.Size) { + hw.Hash = NewHash() + } + + if _, err := io.CopyN(hw, r, part.End-part.Start); err != nil { + return nil, fmt.Errorf("failed to copy.%v", err) + } + + if hw.Hash != nil { + hashMaps[part.Start/HASH_PART_SIZE] = hw.Sum(nil) + } + } + + return hashMaps, nil + } +} + +func (task *MultipartTask) getPartHash(pos int64) ([]byte, error) { + + datafile, err := os.OpenFile(filepath.Join(task.MPDataPath, task.UploadId+".data"), os.O_RDONLY, os.ModePerm) + if err != nil { + return nil, fmt.Errorf("failed to open file:%v", err) + } + defer datafile.Close() + start := pos * HASH_PART_SIZE + if pos, err := datafile.Seek(start, io.SeekStart); err != nil || pos != start { + return nil, err + } + end := start + HASH_PART_SIZE + if end > task.Param.Size { + end = task.Param.Size + } + + pr := io.LimitReader(datafile, end-start) + + sha := NewHash() + if n, err := io.Copy(sha, pr); err != nil { + return nil, err + } else if n != (end - start) { + return nil, fmt.Errorf("sha size err") + } + + return sha.Sum(nil), nil +} + +func (task *MultipartTask) writeMpfile() error { + task.mutex.Lock() + defer task.mutex.Unlock() + mpfile, err := os.OpenFile(filepath.Join(getMPMetaPath(), task.UploadId+".mp"), os.O_WRONLY|os.O_TRUNC, os.ModePerm) + if err != nil { + return fmt.Errorf("failed to write mp file:%v", err) + } + defer mpfile.Close() + defer mpfile.Sync() + + d, _ := json.Marshal(task) + if n, err := mpfile.Write(d); n != len(d) || err != nil { + return fmt.Errorf("failed to write mp:%v", err) + } + + return nil + +} + +//写入第几段hash, 如果hash值为空,则从文件读取 +func (task *MultipartTask) writeHashfile(posHash map[int64][]byte) error { + //写hash文件 + hashfile, err := os.OpenFile(filepath.Join(task.MPDataPath, task.UploadId+".hash"), os.O_WRONLY, os.ModePerm) + if err != nil { + return fmt.Errorf("failed to write hash file:%v", err) + } + defer hashfile.Close() + defer hashfile.Sync() + + for pos, hashData := range posHash { + seekpos, err := hashfile.Seek(pos*HASH_SUM_SIZE, io.SeekStart) + if err != nil || seekpos != pos*HASH_SUM_SIZE { + return fmt.Errorf("failed to seek hash file") + } + if hashData == nil { + //从文件扒出来做hash + if hashData, err = task.getPartHash(pos); err != nil { + return err + } + } + + if n, err := hashfile.Write(hashData); err != nil || n != HASH_SUM_SIZE { + return fmt.Errorf("failed to write hash file:n=%d, err=%v", n, err) + } + } + + return nil +} + +func (task *MultipartTask) Upload(start, end int64, r io.Reader) (proto.CodeType, error) { + //检测文件是否出错 + { + task.mutex.Lock() + task.last = time.Now().Unix() + if start < 0 || end > task.Param.Size || start >= end { + task.mutex.Unlock() + return proto.CodeMultipartTaskRangeErr, fmt.Errorf("pos invalid") + } + + //检查重叠 + if isOverlap, err := task.checkUploadedOverlap(start, end); isOverlap && err == nil { + task.mutex.Unlock() + return proto.CodeMultipartRangeUploaded, fmt.Errorf("range uploaded") + } else if isOverlap { + task.mutex.Unlock() + return proto.CodeMultipartTaskOverlap, fmt.Errorf("uploaded overlap") + } + + if isOverlap, _ := task.checkUploadingOverlap(start, end); isOverlap { + task.mutex.Unlock() + return proto.CodeMultipartUploadingConflit, fmt.Errorf("uploading conflit") + } + + task.UploadingParts = append(task.UploadingParts, proto.Part{Start: start, End: end}) + sort.Slice(task.UploadingParts, func(i, j int) bool { + return task.UploadingParts[i].Start < task.UploadingParts[j].Start + }) + task.mutex.Unlock() + } + + //如果出错则删除正在上传中的记录 + defer task.removeFromUploading(start, true) + + //正式上传 + hashData, err := task.writeDatafile(start, end, r) + if err != nil { + return proto.CodeFailedToSaveFile, err + } else if len(hashData) > 0 { + //写入hash + err = task.writeHashfile(hashData) + if err != nil { + return proto.CodeFailedToSaveFile, err + } + } + + //copy完成, 保存hash文件 + parts := task.mergeToUploaded(start, end, true) + for _, pos := range parts { + err = task.writeHashfile(map[int64][]byte{pos: nil}) + if err != nil { + return proto.CodeFailedToSaveFile, err + } + } + //保存记录文件 + + if err := task.writeMpfile(); err != nil { + return proto.CodeFailedToSaveFile, err + } + + return proto.CodeOk, nil +} + +type multipartTaskMng struct { + mutex sync.Mutex + mapTask map[string]*MultipartTask +} + +func (mtm *multipartTaskMng) lru() { + lastDay := 0 + for { + + mtm.mutex.Lock() + for k, v := range mtm.mapTask { + if v.timeout() { + delete(mtm.mapTask, k) + break + } + } + mtm.mutex.Unlock() + if time.Now().Day() != lastDay { + filepath.Walk(getMPMetaPath(), mtm.clearExpiredTask) + lastDay = time.Now().Day() + } + + time.Sleep(time.Minute * 5) + } +} + +func (mtm *multipartTaskMng) clearExpiredTask(path string, info fs.FileInfo, err error) error { + if !info.IsDir() && filepath.Ext(info.Name()) == ".mp" && int(time.Now().Unix()-info.ModTime().Unix()) > env.MULTIPART_TASK_LRU_SECOND { + etag := info.Name()[:len(info.Name())-3] + mtm.DeleteTask(etag) + log.Println("delete task files:", etag) + } + return nil +} + +func (mtm *multipartTaskMng) GetTask(uploadId string) (*MultipartTask, error) { + mtm.mutex.Lock() + defer mtm.mutex.Unlock() + + //内存中查找 + if task, ok := mtm.mapTask[uploadId]; ok { + return task, nil + } + + path := filepath.Join(getMPMetaPath(), uploadId+".mp") + task := &MultipartTask{} + if data, err := ioutil.ReadFile(path); err == nil { + json.Unmarshal(data, task) + task.UploadingParts = nil + task.UpdateLast() + mtm.mapTask[uploadId] = task + //此处需要判断是否是同一个文件,请求参数是否一致 + return task, nil + } else { + logger.LogE().Msg("not found upload task") + return nil, fmt.Errorf("not found task:%v", err) + } + +} + +func getMPMetaPath() string { + return filepath.Join(env.DATA_PATH, "multipart-meta") +} + +func (mtm *multipartTaskMng) GenTask(param proto.CreateMultipartTaskReq) (*MultipartTask, error) { + mtm.mutex.Lock() + defer mtm.mutex.Unlock() + + //内存中查找 + if task, ok := mtm.mapTask[param.BETag]; ok { + return task, os.ErrExist + } + + //从文件加载 + dir := getMPMetaPath() + path := filepath.Join(dir, param.BETag+".mp") + task := &MultipartTask{} + + if data, err := ioutil.ReadFile(path); err == nil && len(data) != 0 { + if err := json.Unmarshal(data, task); err != nil { + os.Remove(path) + return nil, fmt.Errorf("failed to marshal mp file:%v", err) + } + task.UploadingParts = nil + task.UpdateLast() + mtm.mapTask[param.BETag] = task + //此处需要判断是否是同一个文件,请求参数是否一致 + return task, os.ErrExist + + } else { + task.Param = param + task.UploadId = param.BETag + task.DiskId, _, err = stor.GenPath(env.NORMAL_BUCKET, task.UploadId, task.Param.Size) + if err != nil { + return task, err + } + task.MPDataPath, _ = stor.GetDiskMPPath(task.DiskId) + task.diskPath, _ = stor.GetDiskPath(task.DiskId) + + data, _ = json.Marshal(task) + + ioutil.WriteFile(path, data, os.ModePerm) + + //创建数据文件和hash文件 + ioutil.WriteFile(filepath.Join(task.MPDataPath, task.UploadId+".hash"), []byte{}, os.ModePerm) + ioutil.WriteFile(filepath.Join(task.MPDataPath, task.UploadId+".data"), []byte{}, os.ModePerm) + mtm.mapTask[param.BETag] = task + return task, nil + } + +} + +func (mtm *multipartTaskMng) DeleteTask(uploadId string) error { + mtm.mutex.Lock() + defer mtm.mutex.Unlock() + + if task, ok := mtm.mapTask[uploadId]; ok && len(task.UploadingParts) > 0 { + logger.LogW().Msg("uploading") + return fmt.Errorf("uploading") + } else { + delete(mtm.mapTask, uploadId) + + os.Remove(filepath.Join(getMPMetaPath(), uploadId+".mp")) + if task != nil { + os.Remove(filepath.Join(task.MPDataPath, uploadId+".data")) + os.Remove(filepath.Join(task.MPDataPath, uploadId+".hash")) + } + + return nil + } + +} + +func (mtm *multipartTaskMng) RemoveTask(uploadId string) { + mtm.mutex.Lock() + defer mtm.mutex.Unlock() + delete(mtm.mapTask, uploadId) +} + +var Taskmgr multipartTaskMng + +func Init() { + stor = storage.GetStor() + Taskmgr.mapTask = make(map[string]*MultipartTask) + go Taskmgr.lru() +} + +func InsertIndex(ctx *bpctx.Context, param proto.CreateMultipartTaskReq, isUploadData bool, task *MultipartTask) (proto.FileInfo, error) { + + var extJson []byte + if utils.GetMimeTypeByFilename(param.FileName) == "text/plain" || utils.GetMimeTypeByFilename(param.FileName) == "text/html" { + ext := proto.FileInfoExt{ + Charset: storage.GetCharset(param.BETag), + } + extJson, _ = json.Marshal(ext) + } + //任务完成上传,创建索引 + fileinfo := proto.FileInfo{ + FileInfoPub: proto.FileInfoPub{ + Id: uuid.New().String(), + ParentUuid: param.FolderId, + IsDir: false, + Name: param.FileName, + Path: param.FolderPath, + BETag: param.BETag, + CreateTime: time.Now().UnixNano() / 1e6, + ModifyTime: time.Now().UnixNano() / 1e6, + OperationTime: time.Now().UnixNano() / 1e6, + Size: param.Size, + FileCount: 0, + Category: utils.ParseCategoryByFilename(param.FileName), + Mime: utils.GetMimeTypeByFilename(param.FileName), + }, + + UserId: ctx.GetUserId(), + BucketName: env.NORMAL_BUCKET, + FileInfoExt: extJson, + } + if param.CreateTime > 0 { + fileinfo.CreateTime = param.CreateTime + } + if param.ModifyTime > 0 { + fileinfo.ModifyTime = param.ModifyTime + } + + // 判断是否有同名文件 + fi, err := dbutils.GetInfoByPath(ctx.GetUserId(), param.FolderPath, param.FileName, proto.TrashStatusNormal) + if err == nil { + //betag相同文件处理 + if param.BETag == fi.BETag { + //直接覆盖 + if err := dbutils.UpdateOperationTime(fi.Id); err != nil { + return *fi, err + } else { + return *fi, nil + } + } else { + //改名上传 + newName, err := dbutils.GenIncNameByPath(ctx.GetUserId(), param.FolderPath, param.FileName, proto.TrashStatusNormal) + if err != nil { + return fileinfo, err + } + fileinfo.Name = newName + } + } + + err = dbutils.AddFileV2(fileinfo, fileinfo.ParentUuid) + if err == nil && isUploadData { + attrs := map[string]interface{}{"key": fileinfo.BETag, + "betagPath": task.betagPath, + "diskPath": task.diskPath, + "size": fileinfo.Size, + "name": fileinfo.Name, + "bucket": fileinfo.BucketName, + "contentType": fileinfo.Mime} + storage.PushMsg(attrs, "put") + } + + return fileinfo, err + +} diff --git a/services/recycled/recycled_clear.go b/services/recycled/recycled_clear.go new file mode 100644 index 0000000..5acafde --- /dev/null +++ b/services/recycled/recycled_clear.go @@ -0,0 +1,148 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package recycled + +import ( + "aofs/internal/env" + "aofs/internal/log4bp" + "aofs/internal/proto" + "aofs/repository/bpredis" + "aofs/repository/dbutils" + "aofs/repository/storage" + "fmt" + "strconv" + + "time" + + "github.com/gin-gonic/gin" +) + +var stor storage.MultiDiskStorager +var logger = log4bp.New("", gin.Mode()) + +func dispatchClearTask() { + if len(chClearRecycled) < 1 { + chClearRecycled <- time.Now().String() + } +} + +var chClearRecycled chan string + +func Init() { + stor = storage.GetStor() + chClearRecycled = make(chan string, 3) + chClearRecycled <- "init" + + go doClearRecycled() + go timerClearRecycled() +} + +func timerClearRecycled() { + for { + time.Sleep(time.Hour) + dispatchClearTask() + } +} + +func doClearRecycled() { + for task := range chClearRecycled { + logger.LogD().Interface("doClearRecycled", task).Msg("deal clear recycled task") + DoClearRecycledTask() + } +} + +func doClearRecycledFolder(dir proto.FileInfo) error { + //直接删除记录 + if _, err := dbutils.DeleteByUuid(dir.Id); err != nil { + logger.LogE().Err(err).Msg(fmt.Sprintf("failed to remove dir: %v,%v", dir.Id, dir.Name)) + dbutils.RecycledFromPhyToException(dir.Id) //放到异常队列,后续重试处理 + } else { + logger.LogI().Msg(fmt.Sprintf("success to remove dir: %v,%v", dir.Id, dir.Name)) + } + + return nil +} + +func DoClearRecycledFile(file proto.FileInfo) error { + //查询md5是否存在共用 + if sharCnt, err := dbutils.GetSharedCntByBEtag(file.BETag); err != nil { + logger.LogE().Err(err).Msg("Failed to GetSharedCntByMd5sum") + return err + } else if sharCnt <= 1 { + stor.Del(env.NORMAL_BUCKET, file.BETag) + redis := bpredis.GetRedis() + if used, err := redis.GetInt64(bpredis.UsedSpace + strconv.Itoa(int(file.UserId))); err != nil { + usedSpace, _ := dbutils.GetUsedSpaceByUser(file.UserId) + redis.Set(bpredis.UsedSpace+strconv.Itoa(int(file.UserId)), usedSpace, 0) + } else { + redis.Set(bpredis.UsedSpace+strconv.Itoa(int(file.UserId)), used-file.Size, 0) + } + } else { + logger.LogW().Msg("there is a same betag file,cancel clear real file") + } + + //从数据库中删除记录 + if affect, err := dbutils.DeleteByUuid(file.Id); err != nil { + logger.LogE().Err(err).Msg(fmt.Sprintf("failed to remove file:%v,%v", file.Id, file.Name)) + dbutils.RecycledFromPhyToException(file.Id) //放到异常队列,后续重试处理 + } else { + logger.LogI().Msg(fmt.Sprintf("success to remove file: %v,%v,%v", file.Id, file.Name, affect)) + } + + return nil +} + +func doClearRecycledList(files []proto.FileInfo, folderCnt *int, fileCnt *int) error { + //执行删除动作 + for _, file := range files { + if file.IsDir { + (*folderCnt)++ + if err := doClearRecycledFolder(file); err != nil { + return err + } + + } else { + (*fileCnt)++ + if err := DoClearRecycledFile(file); err != nil { + return err + } + } + } + + return nil +} +func DoClearRecycledTask() { + + folderCnt := 0 + fileCnt := 0 + defer func() { + logger.LogD().Msg("finish to clear") + }() + + for { + if files, err := dbutils.GetRecycledPhyDeletedList(0, 1024); err != nil { + logger.LogE().Err(err).Msg("failed to get recycle list") + return + } else if len(files) == 0 { + logger.LogD().Interface("folder cnt", folderCnt).Interface("file cnt", fileCnt).Msg("clear recycle") + return + } else { + if err := doClearRecycledList(files, &folderCnt, &fileCnt); err != nil { + return + } + } + } + +} diff --git "a/template/\350\257\264\346\230\216.pdf" "b/template/\350\257\264\346\230\216.pdf" new file mode 100644 index 0000000..c4550c0 Binary files /dev/null and "b/template/\350\257\264\346\230\216.pdf" differ diff --git a/tests/download_test.go b/tests/download_test.go new file mode 100644 index 0000000..f2bb7e6 --- /dev/null +++ b/tests/download_test.go @@ -0,0 +1,56 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package tests + +import ( + "aofs/internal/proto" + "aofs/routers/api" + "reflect" + "testing" +) + +func testDownloadAll(t *testing.T) { + t.Run("testDecodeRange", testDecodeRange) +} + +func testDecodeRange(t *testing.T) { + type args struct { + rangestr string + } + tests := []struct { + name string + args args + want *proto.Part + wantErr bool + }{ + // TODO: Add test cases. + {"", args{"bytes=0-"}, &proto.Part{Start: 0, End: -1}, false}, + {"", args{"bytes=0-5"}, &proto.Part{Start: 0, End: 5}, false}, + {"", args{"bytes=-5"}, &proto.Part{Start: 0, End: 5}, false}, + {"", args{"bytes=-5,"}, nil, true}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := api.DecodeRange(tt.args.rangestr) + if (err != nil) != tt.wantErr { + t.Errorf("decodeRange() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("decodeRange() = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/tests/file_test.go b/tests/file_test.go new file mode 100644 index 0000000..c78c2bf --- /dev/null +++ b/tests/file_test.go @@ -0,0 +1,212 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package tests + +import ( + "aofs/internal/proto" + "aofs/repository/dbutils" + "aofs/routers/api" + "aofs/services/async" + "fmt" + "strconv" + "testing" + "time" + + "github.com/google/uuid" + "github.com/stretchr/testify/assert" +) + +func testFilesAll(t *testing.T) { + //t.Run("testVodSymlink", testVodSymlink) + //return + + t.Run("testFilesCopy", testFilesCopy) + t.Run("testFilesList", testFilesList) + t.Run("testFilesRename", testFilesRename) + t.Run("testFolderRename", testFolderRename) + t.Run("testFilesMove", testFilesMove) +} + +// func testVodSymlink(t *testing.T) { +// assert := assert.New(t) +// var req proto.SoftlinkReq +// var linkRsp proto.SoftlinkRsp +// var rsp proto.Rsp +// rsp.Body = &linkRsp + +// fi, err := dbutils.GetInfoByPath(1, "/", "说明.pdf", proto.TrashStatusNormal) +// assert.Equal(nil, err, "文档目录不存在:%v", err) + +// req.Id = fi.Id + +// { +// TPostRsp(fmt.Sprintf("/space/v1/api/file/softlink?userId=1"), nil, &req, &rsp, assert) +// assert.Equal(int(proto.CodeOk), int(rsp.Code)) +// } + +// } + +func testFilesCopy(t *testing.T) { + assert := assert.New(t) + var req proto.CopyFileReq + var copyRsp proto.CopyRsp + var rsp proto.Rsp + rsp.Body = ©Rsp + + fi, err := dbutils.GetInfoByPath(1, "/", "文档", proto.TrashStatusNormal) + assert.Equal(nil, err, "文档目录不存在:%v", err) + + req.DestId = fi.Id + + { + TPostRsp("/space/v1/api/file/copy?userId=1", nil, &req, &rsp, assert) + assert.Equal(int(proto.CodeReqParamErr), int(rsp.Code)) + } + + { + req.Ids = append(req.Ids, "xxxxxxxxxxxxxxxxxx") + TPostRsp("/space/v1/api/file/copy?userId=1", nil, &req, &rsp, assert) + assert.Equal(int(proto.CodeFailedToOperateDB), int(rsp.Code)) + } + +} + +func testFilesList(t *testing.T) { + assert := assert.New(t) + var rsp proto.Rsp + var body proto.GetListRspData + rsp.Body = &body + TGetRsp("/space/v1/api/file/list?userId=1", &rsp, assert) + assert.Equal(int(200), int(rsp.Code)) + assert.True(len(body.List) > 0) +} + +func testFilesRename(t *testing.T) { + assert := assert.New(t) + var rsp proto.Rsp + var req proto.ModifyFileReq + var body proto.DbAffect + //var rspHead proto.Rsp + + if fi, err := dbutils.GetInfoByPath(1, "/", "说明.pdf", proto.TrashStatusNormal); err == nil { + req.Id = fi.Id + req.NewFileName = strconv.FormatInt(time.Now().Unix(), 10) + } + rsp.Body = &body + TPostRsp("/space/v1/api/file/rename?userId=1", nil, &req, &rsp, assert) + assert.Equal(int(200), int(rsp.Code)) + assert.True(body.AffectRows > 0) +} + +func testFolderRename(t *testing.T) { + assert := assert.New(t) + var rsp proto.Rsp + var req proto.ModifyFileReq + var body proto.DbAffect + //var rspHead proto.Rsp + + if fi, err := dbutils.GetInfoByPath(1, "/", "文档", proto.TrashStatusNormal); err == nil { + req.Id = fi.Id + req.NewFileName = uuid.New().String() + } else { + assert.Equal(nil, err, "err=%v", err) + return + } + rsp.Body = &body + TPostRsp("/space/v1/api/file/rename?userId=1", nil, &req, &rsp, assert) + assert.Equal(int(200), int(rsp.Code)) + assert.True(body.AffectRows > 0) +} + +func testFilesMove(t *testing.T) { + assert := assert.New(t) + var rsp proto.Rsp + var req proto.MoveFileReq + var body proto.DbAffect + //var rspHead proto.Rsp + api.InitReadme(1) + + if fi, err := dbutils.GetInfoByPath(1, "/", "说明.pdf", proto.TrashStatusNormal); err == nil { + req.Id = append(req.Id, fi.Id) + } + if di, err := dbutils.GetInfoByPath(1, "/", "文档", proto.TrashStatusNormal); err == nil { + req.DestPath = di.Id + } + + rsp.Body = &body + TPostRsp("/space/v1/api/file/move?userId=1", nil, &req, &rsp, assert) + assert.Equal(int(200), int(rsp.Code)) + assert.True(body.AffectRows > 0) +} + +//func testFilesCopy(t *testing.T) { +// assert := assert.New(t) +// var rsp proto.Rsp +// var req proto.CopyFileReq +// var body proto.DbAffect +// //var rspHead proto.Rsp +// initReadme(1) +// +// if fi, err := dbutils.GetInfoByPath(1, "/", "readme.txt", proto.TrashStatusNormal); err == nil { +// req.Id = append(req.Id,fi.Id) +// } +// if di, err := dbutils.GetInfoByPath(1, "/", "Documents", proto.TrashStatusNormal); err == nil { +// req.DestPath = di.Id +// } +// +// +// rsp.Body = &body +// TPostRsp("/space/v1/api/file/copy?userId=1",nil,&req, &rsp, assert) +// assert.Equal(int(200), int(rsp.Code)) +// assert.True(body.AffectRows > 0) +//} + +func TestAsyncDelete(t *testing.T) { + assert := assert.New(t) + var rsp proto.Rsp + var body async.AsyncTask + rsp.Body = &body + var req proto.DeleteFileReq + req.DeleteIds = []string{"2003d06b-f7f5-4c7d-bf41-a07f19cfd249"} + TPostRsp("/space/v1/api/file/delete?userId=1", nil, &req, &rsp, assert) + fmt.Println(body) + taskId := body.TaskId + for { + TGetRsp(fmt.Sprintf("/space/v1/api/async/task?userId=1&taskId=%s", taskId), &rsp, assert) + if body.TaskStatus == async.AsyncTaskStatusSuccess || rsp.Code == proto.CodeGetAsyncTaskInfoFailed { + break + } + time.Sleep(100 * time.Millisecond) + + } +} + +func TestAsyncRestore(t *testing.T) { + assert := assert.New(t) + var rsp proto.Rsp + var body async.AsyncTask + rsp.Body = &body + var req proto.RestoreRecycledReq + req.RecycledUuids = []string{"2003d06b-f7f5-4c7d-bf41-a07f19cfd249"} + TPostRsp("/space/v1/api/recycled/restore?userId=1", nil, &req, &rsp, assert) + taskId := body.TaskId + for { + TGetRsp(fmt.Sprintf("/space/v1/api/async/task?userId=1&taskId=%s", taskId), &rsp, assert) + if body.TaskStatus == async.AsyncTaskStatusSuccess || rsp.Code == proto.CodeGetAsyncTaskInfoFailed { + return + } + time.Sleep(100 * time.Millisecond) + } +} diff --git a/tests/folder_test.go b/tests/folder_test.go new file mode 100644 index 0000000..6874f22 --- /dev/null +++ b/tests/folder_test.go @@ -0,0 +1,81 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package tests + +import ( + "aofs/internal/proto" + "strconv" + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +func testFolderAll(t *testing.T) { + t.Run("testFolderCreate", testFolderCreate) +} + +func testFolderCreate(t *testing.T) { + assertions := assert.New(t) + var rsp proto.Rsp + var req proto.CreateFolderReq + + var body proto.FileInfo + req.FolderName = strconv.FormatInt(time.Now().UnixNano(), 10) + req.CurrentDirUuid = "" + rsp.Body = &body + + TPostRsp("/space/v1/api/folder/create?userId=1", nil, &req, &rsp, assertions) + + assertions.Equal(int(200), int(rsp.Code)) + assertions.True(body.Name == req.FolderName, "req:%v, rsp:%v", req.FolderName, body.Name) +} + +// func testFolderInfo(t *testing.T) { +// assert := assert.New(t) +// var rsp proto.Rsp +// var body proto.FolderInfo +// var req proto.FolderInfoReq + +// // 上传一个文件 +// t.Run("testUpload", testUpload) + +// if fi, err := dbutils.GetInfoByPath(1, "/", "Documents", proto.TrashStatusNormal); err == nil { +// req.FolderUuid = fi.Id +// } + +// TPostRsp("/space/v1/api/folder/info?userId=1", nil, &req, &rsp, assert) +// rsp.Body = &body + +// assert.Equal(int(200), int(rsp.Code)) +// assert.True(body.FolderSize > 0) +// } + +// func TestMoveFile(t *testing.T) { + +// reqstr := ` +// { +// "id": "91c8c5c3-ad46-4721-9687-09df8f2e88c2", +// "dest-path": "/picture" +// } +// ` + +// if rsp, err := http.Post(fmt.Sprintf("http://%s/space/v1/api/files/move", addr), "application/json", strings.NewReader(reqstr)); err != nil { +// t.Error(err) +// } else { +// defer rsp.Body.Close() +// io.Copy(os.Stdout, rsp.Body) +// } +// } diff --git a/tests/init_api_test.go b/tests/init_api_test.go new file mode 100644 index 0000000..a81d371 --- /dev/null +++ b/tests/init_api_test.go @@ -0,0 +1,182 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package tests + +import ( + "aofs/internal/log4bp" + "aofs/internal/proto" + "aofs/repository/dbutils" + "aofs/repository/storage" + "aofs/routers/api" + "aofs/routers/routers" + "aofs/services/multipart" + "aofs/services/recycled" + "bytes" + "crypto/md5" + "encoding/hex" + "encoding/json" + "fmt" + "io" + "io/ioutil" + "log" + "net/http" + "net/http/httptest" + "os" + "testing" + + "github.com/rs/zerolog" + + "github.com/stretchr/testify/assert" +) + +var route = routers.InitRoute() + +func TGet(uri string, header http.Header) *httptest.ResponseRecorder { + // 构造get请求 + req := httptest.NewRequest("GET", uri, nil) + if len(header) > 0 { + for k, v := range header { + req.Header[k] = v + } + } + // 初始化响应 + w := httptest.NewRecorder() + + // 调用相应的handler接口 + route.ServeHTTP(w, req) + return w +} + +func TPost(uri string, header http.Header, r io.Reader) *httptest.ResponseRecorder { + // 构造get请求 + req := httptest.NewRequest("POST", uri, r) + if header != nil { + for k, v := range header { + req.Header[k] = v + } + } + log.Println("head", req.Header) + + // 初始化响应 + w := httptest.NewRecorder() + + // 调用相应的handler接口 + route.ServeHTTP(w, req) + return w +} + +//解析响应体到标准消息形式 +func TParseRsp(response *httptest.ResponseRecorder, rsp *proto.Rsp, assert *assert.Assertions) { + if response.Code < 200 || response.Code > 599 { + assert.FailNowf("http code err", "response.Code:%v, expected: 200", response.Code) + } + + defer response.Result().Body.Close() + if data, err := ioutil.ReadAll(response.Body); err != nil { + assert.FailNow("read body err.", "msg:%v", err) + } else { + if len(data) < 512 { + fmt.Println("rsp data:", string(data)) + } + if err := json.Unmarshal(data, &rsp); err != nil { + assert.FailNow("parse body err.", "msg:%v", err) + } + } +} + +//获取url的包体数据,就像下载文件一样 +func TGetFile(uri string, t *testing.T) []byte { + return TGetFileRange(uri, nil, t) +} +func TGetFileRange(uri string, part *proto.Part, t *testing.T) []byte { + assert := assert.New(t) + header := http.Header{} + if part != nil { + if part.End != -1 { + header["Range"] = []string{fmt.Sprintf("bytes=%d-%d", part.Start, part.End)} + } else { + header["Range"] = []string{fmt.Sprintf("bytes=%d-", part.Start)} + } + } + response := TGet(uri, header) + + if part != nil { + if response.Code != 206 { + assert.FailNowf("http code err", "response.Code:%v, expected: 206", response.Code) + } + } else { + if response.Code != 200 { + assert.FailNowf("http code err", "response.Code:%v, expected: 200", response.Code) + } + } + + defer response.Result().Body.Close() + data, err := ioutil.ReadAll(response.Body) + if err != nil { + assert.FailNow("read body err:", "%v", err) + } + return data +} + +//直接根据(GET)url到协议的标准响应json对应的响应结果 +func TGetRsp(url string, rsp *proto.Rsp, assert *assert.Assertions) { + response := TGet(url, nil) + TParseRsp(response, rsp, assert) +} + +//直接POST并得到标准协议结果, r 支持 io.Reader 或其它类型,其它类型会转成json格式上传 +func TPostRsp(uri string, header http.Header, r interface{}, rsp *proto.Rsp, assert *assert.Assertions) { + if header == nil { + header = http.Header{} + } + var realr io.Reader + if rr, ok := r.(io.Reader); ok { + realr = rr + + } else { + if data, err := json.Marshal(r); err != nil { + assert.Fail("%v", err) + } else { + fmt.Println("req body json:", string(data)) + realr = bytes.NewReader(data) + header["Content-Type"] = []string{"application/json"} + } + } + + response := TPost(uri, header, realr) + TParseRsp(response, rsp, assert) +} + +//计算md5 +func TMd5sum(d []byte) string { + ms := md5.Sum(d) + return hex.EncodeToString(ms[:]) +} + +func init() { + log4bp.Logger.Level(zerolog.DebugLevel) + + dbutils.Init() + + if err := storage.Init(dbutils.NewBETagIndexer()); err != nil { + fmt.Println("failed to storage.Init") + os.Exit(2) + } + + api.Init() + recycled.Init() //回收站初始化 + multipart.Init() //初始化分片上传的信息 + +} diff --git a/tests/main_test.go b/tests/main_test.go new file mode 100644 index 0000000..88613c2 --- /dev/null +++ b/tests/main_test.go @@ -0,0 +1,36 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package tests + +import ( + "fmt" + "testing" +) + +func TestAll(t *testing.T) { + + t.Run("multipart", testMultipartAll) + + t.Run("files", testFilesAll) + + t.Run("folders", testFolderAll) + + t.Run("download", testDownloadAll) +} + +func TestMain(m *testing.M) { + fmt.Println("tests begin") + m.Run() +} diff --git a/tests/multipart_test.go b/tests/multipart_test.go new file mode 100644 index 0000000..07536cd --- /dev/null +++ b/tests/multipart_test.go @@ -0,0 +1,1020 @@ +// Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package tests + +import ( + "bytes" + "crypto/md5" + "encoding/hex" + "aofs/repository/dbutils" + "aofs/services/multipart" + "fmt" + "io" + "log" + "math/rand" + "os" + "sync" + "time" + + "aofs/internal/proto" + "testing" + + "github.com/stretchr/testify/assert" +) + +const _2M int64 = 2 * 1024 * 1024 +const _4M int64 = _2M * 2 +const _8M int64 = _4M * 2 +const _16M int64 = _8M * 2 + +func init() { + rand.Seed(time.Now().UnixNano()) +} + +func testMultipartAll(t *testing.T) { + t.Run("testMultipartLess4M", testMultipartLess4M) + + t.Run("testMultipartConflict", testMultipartConflict) + //t.Run("testMultipartConflictOfPowerOff", testMultipartConflictOfPowerOff) + t.Run("testMultipartSpeed", testMultipartSpeed) + + t.Run("testMultipartUploadExecp", testMultipartUploadExecp) + go t.Run("testMultipartInterface", testMultipartInterface) + t.Run("testMultipartInterface", testMultipartInterface) + t.Run("testMultipartConflict", testMultipartConflict) + t.Run("testMultipartLess8K", testMultipartLess8K) + t.Run("testMultipartAlbum", testMultipartAlbum) + t.Run("testMultipartSeq", testMultipartSeq) + t.Run("testHw", testHw) + + t.Run("testMultipartLess4M_8M", testMultipartLess4M_8M) + t.Run("testMultipartMore8M", testMultipartMore8M) + //t.Run("testMultipartMore500M", testMultipartMore500M) + t.Run("testSizeFlag", testSizeFlag) + +} + +func testSizeFlag(t *testing.T) { + assert := assert.New(t) + m := map[int64]uint8{0: 0, 1: 0, 2: 1, 3: 1, 4: 2, 5: 2, 6: 2, 7: 2, 8: 3} + for k, v := range m { + assert.True(multipart.GetSizeFlag(k) == v, "k:%d, v:%d", k, v) + } +} +func testHw(t *testing.T) { + assert := assert.New(t) + hw := &multipart.HashWrite{} + buf := bytes.NewBuffer(nil) + hw.W = buf + hw.Hash = multipart.NewHash() + filedata := make([]byte, _8M) + rand.Read(filedata) + + io.CopyN(hw, bytes.NewReader(filedata), int64(len(filedata))) + sha := md5.Sum(filedata) + + shanew := multipart.NewHash() + shanew.Write(filedata) + fmt.Println("shanew:", hex.EncodeToString(shanew.Sum(nil))) + assert.Equal(hex.EncodeToString(sha[:]), hex.EncodeToString(hw.Sum(nil))) + +} + +func testMultipartLess8K(t *testing.T) { + size := int64(8 * 1024) + testMultipartRandFun(size, t) +} +func testMultipartLess4M(t *testing.T) { + size := rand.Int63()%(_2M) + _2M + testMultipartRandFun(size, t) +} +func testMultipartLess4M_8M(t *testing.T) { + size := rand.Int63()%(_4M) + _4M + testMultipartRandFun(size, t) +} +func testMultipartMore8M(t *testing.T) { + size := rand.Int63()%(_8M) + _8M + testMultipartRandFun(size, t) +} +func testMultipartMore500M(t *testing.T) { + size := rand.Int63()%(_8M) + 500*1024*1024 + testMultipartRandFun(size, t) +} + +func calcFile(file string) { + st, err := os.Stat(file) + if err != nil { + log.Println(err) + return + } + FileSize := st.Size() + filedata, err := os.ReadFile(file) + if err != nil { + log.Println(err) + return + } + + hash := multipart.NewHash() + + if FileSize <= multipart.HASH_PART_SIZE { + hash.Write(filedata) + } else { + sumall := []byte{} + for i := int64(0); i < FileSize; i += multipart.HASH_PART_SIZE { + start := i + end := start + multipart.HASH_PART_SIZE + if end >= FileSize { + end = FileSize + } + sum := md5.Sum(filedata[start:end]) + log.Println("hash:", hex.EncodeToString(sum[:]), "start:", start, "end:", end) + sumall = append(sumall, sum[:]...) + } + + hash.Write(sumall) + } + + etagdata := []byte{multipart.GetSizeFlag(int64(len(filedata)))} + etagdata = append(etagdata, hash.Sum(nil)...) + bhash := hex.EncodeToString(etagdata) + log.Println("betag:", bhash, "filesize:", FileSize) +} + +func testMultipartRandFun(size int64, t *testing.T) { + + FileSize := size + assert := assert.New(t) + filedata := make([]byte, FileSize) + rand.Read(filedata) + + hash := multipart.NewHash() + + if FileSize <= multipart.HASH_PART_SIZE { + hash.Write(filedata) + } else { + sumall := []byte{} + for i := int64(0); i < FileSize; i += multipart.HASH_PART_SIZE { + start := i + end := start + multipart.HASH_PART_SIZE + if end >= FileSize { + end = FileSize + } + sum := md5.Sum(filedata[start:end]) + log.Println("hash:", hex.EncodeToString(sum[:]), start, end, FileSize) + sumall = append(sumall, sum[:]...) + } + + hash.Write(sumall) + } + + etagdata := []byte{multipart.GetSizeFlag(int64(len(filedata)))} + if multipart.GetSizeFlag(int64(len(filedata)))%2 == 0 { + etagdata = []byte{} + } + etagdata = append(etagdata, hash.Sum(nil)...) + bhash := hex.EncodeToString(etagdata) + + //ioutil.WriteFile(fmt.Sprintf("%s-size-%d", bhash, FileSize), filedata, os.ModePerm) + + uploadId := "" + var info *proto.FileInfo + var isFolderId bool + + //创建任务 + { + info, _ = dbutils.GetInfoByPath(1, "", "/", proto.TrashStatusNormal) + var req proto.CreateMultipartTaskReq + var rsp proto.CreateMultipartTaskRsp + req.FileName = fmt.Sprintf("%d.txt", time.Now().UnixNano()) + + req.Mime = "text/plain" + req.Size = FileSize + req.BETag = bhash + + if multipart.GetSizeFlag(int64(len(filedata)))%2 == 0 { + req.FolderId = info.Id //测试folderId + isFolderId = true + } else { + req.FolderPath = fmt.Sprintf("/%d/", FileSize) //测试folderPath + } + + var succInfo proto.CreateMultipartTaskSuccRsp + + var rspHead proto.Rsp + rspHead.Body = &rsp + rsp.SuccInfo = &succInfo + + TPostRsp("/space/v1/api/multipart/create?userId=1", nil, &req, &rspHead, assert) + assert.Equal(int(proto.CodeOk), int(rspHead.Code), "%v", rspHead.Message) + assert.True(len(succInfo.UploadId) > 0 && succInfo.PartSize == _4M, "rsp:%+v", rsp) + uploadId = succInfo.UploadId + + } + + //进行文件切片 + //parts := []proto.Part{} + parts := map[int64]proto.Part{} + for i := int64(0); i < FileSize; { + size := rand.Int63()%_4M + 1 + part := proto.Part{Start: i, End: i + size} + if part.End >= FileSize { + part.End = FileSize + //parts = append(parts, part) + parts[part.Start] = part + break + } + //parts = append(parts, part) + parts[part.Start] = part + i = part.End + } + + //upload + for _, part := range parts { + sum := md5.Sum(filedata[part.Start:part.End]) + md5sum := hex.EncodeToString(sum[:]) + var rspHead proto.Rsp + TPostRsp(fmt.Sprintf("/space/v1/api/multipart/upload?userId=1&uploadId=%s&start=%d&end=%d&md5sum=%s", uploadId, part.Start, part.End, md5sum), nil, bytes.NewReader(filedata[part.Start:part.End]), &rspHead, assert) + assert.Equal(proto.CodeOk, rspHead.Code, "%v", rspHead.Message) + } + + //complete + fileid := "" + { + var req proto.CompleteMultipartTaskReq + var rsp proto.CompleteMultipartTaskRsp + req.UploadId = uploadId + + var rspHead proto.Rsp + rspHead.Body = &rsp + + TPostRsp("/space/v1/api/multipart/complete?userId=1", nil, &req, &rspHead, assert) + assert.Equal(int(proto.CodeOk), int(rspHead.Code), "rsp:%+v, uploadid:%v", rsp, uploadId) + fileid = rsp.Id + if isFolderId { + assert.Equal(info.Id, rsp.ParentUuid) + } + + } + + //文件下载, 比较 + { + fmt.Println("***************") + data := TGetFile(fmt.Sprintf("/space/v1/api/file/download?uuid=%s&userId=1", fileid), t) + assert.True(bytes.Compare(data, filedata) == 0, fileid) + } + + { + + data := TGetFileRange(fmt.Sprintf("/space/v1/api/file/download?uuid=%s&userId=1", fileid), &proto.Part{}, t) + assert.Equal(1, len(data)) + assert.Equal(filedata[0], data[0], fileid) + } + { + + data := TGetFileRange(fmt.Sprintf("/space/v1/api/file/download?uuid=%s&userId=1", fileid), &proto.Part{Start: 2, End: 3}, t) + assert.Equal(2, len(data)) + assert.True(bytes.Compare(data, filedata[2:4]) == 0, fileid) + } + + { + + data := TGetFileRange(fmt.Sprintf("/space/v1/api/file/download?uuid=%s&userId=1", fileid), &proto.Part{Start: 0, End: int64(len(filedata) - 1)}, t) + assert.Equal(len(filedata), len(data)) + assert.True(bytes.Compare(data, filedata) == 0, fileid) + } +} + +func testMultipartUploadExecp(t *testing.T) { + assert := assert.New(t) + filedata := make([]byte, _8M) + rand.Read(filedata) + sha1data := md5.Sum(filedata[:_4M]) + sha2data := md5.Sum(filedata[_4M:]) + shadata := append(sha1data[:], sha2data[:]...) + fmt.Println("sha1data:", hex.EncodeToString(sha1data[:]), "sha2data:", hex.EncodeToString(sha2data[:])) + shaall := md5.Sum(shadata) + etagdata := []byte{multipart.GetSizeFlag(int64(len(filedata)))} + etagdata = append(etagdata, shaall[:]...) + bhash := hex.EncodeToString(etagdata) + fileName := fmt.Sprintf("%d.txt", time.Now().UnixNano()) + uploadId := "" + //创建任务 + { + info, _ := dbutils.GetInfoByPath(1, "", "/", proto.TrashStatusNormal) + var req proto.CreateMultipartTaskReq + var rsp proto.CreateMultipartTaskRsp + req.FileName = fileName + + req.Mime = "text/plain" + req.Size = _8M + req.BETag = bhash + req.FolderId = info.Id + + var succInfo proto.CreateMultipartTaskSuccRsp + var rspHead proto.Rsp + rspHead.Body = &rsp + rsp.SuccInfo = &succInfo + + TPostRsp("/space/v1/api/multipart/create?userId=1", nil, &req, &rspHead, assert) + assert.True(len(succInfo.UploadId) > 0 && succInfo.PartSize == _4M, "rsp:%+v", rsp) + uploadId = succInfo.UploadId + } + + //已完成分片测试 + { + start := 0 + end := 1024 + sum := md5.Sum(filedata[start:end]) + md5sum := hex.EncodeToString(sum[:]) + var rspHead proto.Rsp + TPostRsp(fmt.Sprintf("/space/v1/api/multipart/upload?userId=1&uploadId=%s&start=%d&end=%d&md5sum=%s", uploadId, start, end, md5sum), nil, bytes.NewReader(filedata[start:end]), &rspHead, assert) + assert.Equal(rspHead.Code, proto.CodeOk) + } + { + start := 2048 + end := 4096 + sum := md5.Sum(filedata[start:end]) + md5sum := hex.EncodeToString(sum[:]) + var rspHead proto.Rsp + TPostRsp(fmt.Sprintf("/space/v1/api/multipart/upload?userId=1&uploadId=%s&start=%d&end=%d&md5sum=%s", uploadId, start, end, md5sum), nil, bytes.NewReader(filedata[start:end]), &rspHead, assert) + assert.Equal(rspHead.Code, proto.CodeOk) + } + //异常 + { + start := 1023 + end := 1025 + sum := md5.Sum(filedata[start:end]) + md5sum := hex.EncodeToString(sum[:]) + var rspHead proto.Rsp + TPostRsp(fmt.Sprintf("/space/v1/api/multipart/upload?userId=1&uploadId=%s&start=%d&end=%d&md5sum=%s", uploadId, start, end, md5sum), nil, bytes.NewReader(filedata[start:end]), &rspHead, assert) + assert.Equal(rspHead.Code, proto.CodeMultipartTaskOverlap) + } + { + start := 1022 + end := 1023 + sum := md5.Sum(filedata[start:end]) + md5sum := hex.EncodeToString(sum[:]) + var rspHead proto.Rsp + TPostRsp(fmt.Sprintf("/space/v1/api/multipart/upload?userId=1&uploadId=%s&start=%d&end=%d&md5sum=%s", uploadId, start, end, md5sum), nil, bytes.NewReader(filedata[start:end]), &rspHead, assert) + assert.Equal(rspHead.Code, proto.CodeMultipartRangeUploaded) + } + { + start := 4096 + end := 4096 + 1 + sum := md5.Sum(filedata[start:end]) + md5sum := hex.EncodeToString(sum[:]) + var rspHead proto.Rsp + TPostRsp(fmt.Sprintf("/space/v1/api/multipart/upload?userId=1&uploadId=%s&start=%d&end=%d&md5sum=%s", uploadId, start, 9*1024*1024, md5sum), nil, bytes.NewReader(filedata[start:end]), &rspHead, assert) + assert.Equal(rspHead.Code, proto.CodeMultipartTaskRangeErr) + } + + { + start := 1 + end := 4096 + 1 + sum := md5.Sum(filedata[start:end]) + md5sum := hex.EncodeToString(sum[:]) + var rspHead proto.Rsp + TPostRsp(fmt.Sprintf("/space/v1/api/multipart/upload?userId=1&uploadId=%s&start=%d&end=%d&md5sum=%s", uploadId, start, end, md5sum), nil, bytes.NewReader(filedata[start:end]), &rspHead, assert) + assert.Equal(rspHead.Code, proto.CodeMultipartTaskOverlap) + } + + //正在上传分片测试, 速度太快,需要手动,用例暂时屏蔽 + // go func() { + // start := 4096 + // end := _2M + // sum := md5.Sum(filedata[start:end]) + // md5sum := hex.EncodeToString(sum[:]) + // var rspHead proto.Rsp + // TPostRsp(fmt.Sprintf("/space/v1/api/multipart/upload?userId=1&uploadId=%s&start=%d&end=%d&md5sum=%s", uploadId, start, end, md5sum), nil, bytes.NewReader(filedata[start:end]), &rspHead, assert) + // //assert.Equal(rspHead.Code, proto.CodeOk) + // }() + // { + // time.Sleep(time.Microsecond * 50) + // start := 4 * 1024 + // end := _4M + // sum := md5.Sum(filedata[start:end]) + // md5sum := hex.EncodeToString(sum[:]) + // var rspHead proto.Rsp + // TPostRsp(fmt.Sprintf("/space/v1/api/multipart/upload?userId=1&uploadId=%s&start=%d&end=%d&md5sum=%s", uploadId, start, end, md5sum), nil, bytes.NewReader(filedata[start:end]), &rspHead, assert) + // assert.Equal(int(rspHead.Code), int(proto.CodeMultipartUploadingConflit)) + // } + +} + +func testMultipartConflictOfPowerOff(t *testing.T) { + assert := assert.New(t) + filedata := make([]byte, _8M) + rand.Read(filedata) + sha1data := md5.Sum(filedata[:_4M]) + sha2data := md5.Sum(filedata[_4M:]) + shadata := append(sha1data[:], sha2data[:]...) + fmt.Println("sha1data:", hex.EncodeToString(sha1data[:]), "sha2data:", hex.EncodeToString(sha2data[:])) + shaall := md5.Sum(shadata) + etagdata := []byte{multipart.GetSizeFlag(int64(len(filedata)))} + etagdata = append(etagdata, shaall[:]...) + bhash := hex.EncodeToString(etagdata) + + fileName := fmt.Sprintf("%d.txt", time.Now().UnixNano()) + //创建任务 + { + info, err := dbutils.GetInfoByPath(1, "", "/", proto.TrashStatusNormal) + if err != nil { + assert.Fail("failed to get info ", "err:%v", err) + } + var req proto.CreateMultipartTaskReq + var rsp proto.CreateMultipartTaskRsp + req.FileName = fileName + + req.Mime = "text/plain" + req.Size = _8M + req.BETag = bhash + req.FolderId = info.Id + + var succInfo proto.CreateMultipartTaskSuccRsp + var rspHead proto.Rsp + rspHead.Body = &rsp + rsp.SuccInfo = &succInfo + + TPostRsp("/space/v1/api/multipart/create?userId=1", nil, &req, &rspHead, assert) + assert.True(len(succInfo.UploadId) > 0 && succInfo.PartSize == _4M, "rsp:%+v", rsp) + } + + log.Println("shutdown box") + + time.Sleep(time.Minute) + log.Println("goon") + + //创建任务 + { + info, err := dbutils.GetInfoByPath(1, "", "/", proto.TrashStatusNormal) + if err != nil { + assert.Fail("failed to get info ", "err:%v", err) + } + var req proto.CreateMultipartTaskReq + var rsp proto.CreateMultipartTaskRsp + req.FileName = fmt.Sprintf("%d222.txt", time.Now().UnixNano()) + + req.Mime = "text/plain" + req.Size = _8M + req.BETag = bhash + req.FolderId = info.Id + + var conflictInfo proto.CreateMultipartTaskConflictRsp + var rspHead proto.Rsp + rspHead.Body = &rsp + rsp.ConflictInfo = &conflictInfo + + TPostRsp("/space/v1/api/multipart/create?userId=1", nil, &req, &rspHead, assert) + assert.Equal(int(proto.CREATE_MULTIPART_TASK_CONFLICT), int(rsp.RspType)) + assert.Equal(fileName, conflictInfo.FileName) + + } + +} + +func testMultipartConflict(t *testing.T) { + assert := assert.New(t) + filedata := make([]byte, _8M) + rand.Read(filedata) + sha1data := md5.Sum(filedata[:_4M]) + sha2data := md5.Sum(filedata[_4M:]) + shadata := append(sha1data[:], sha2data[:]...) + fmt.Println("sha1data:", hex.EncodeToString(sha1data[:]), "sha2data:", hex.EncodeToString(sha2data[:])) + shaall := md5.Sum(shadata) + etagdata := []byte{multipart.GetSizeFlag(int64(len(filedata)))} + etagdata = append(etagdata, shaall[:]...) + bhash := hex.EncodeToString(etagdata) + + fileName := fmt.Sprintf("%d.txt", time.Now().UnixNano()) + //创建任务 + { + info, _ := dbutils.GetInfoByPath(1, "", "/", proto.TrashStatusNormal) + var req proto.CreateMultipartTaskReq + var rsp proto.CreateMultipartTaskRsp + req.FileName = fileName + + req.Mime = "text/plain" + req.Size = _8M + req.BETag = bhash + req.FolderId = info.Id + + var succInfo proto.CreateMultipartTaskSuccRsp + var rspHead proto.Rsp + rspHead.Body = &rsp + rsp.SuccInfo = &succInfo + + TPostRsp("/space/v1/api/multipart/create?userId=1", nil, &req, &rspHead, assert) + assert.True(len(succInfo.UploadId) > 0 && succInfo.PartSize == _4M, "rsp:%+v", rsp) + } + + //创建任务 + { + info, _ := dbutils.GetInfoByPath(1, "", "/", proto.TrashStatusNormal) + var req proto.CreateMultipartTaskReq + var rsp proto.CreateMultipartTaskRsp + req.FileName = fmt.Sprintf("%d222.txt", time.Now().UnixNano()) + + req.Mime = "text/plain" + req.Size = _8M + req.BETag = bhash + req.FolderId = info.Id + + var conflictInfo proto.CreateMultipartTaskConflictRsp + var rspHead proto.Rsp + rspHead.Body = &rsp + rsp.ConflictInfo = &conflictInfo + + TPostRsp("/space/v1/api/multipart/create?userId=1", nil, &req, &rspHead, assert) + assert.Equal(int(proto.CREATE_MULTIPART_TASK_CONFLICT), int(rsp.RspType)) + assert.Equal(fileName, conflictInfo.FileName) + + } + +} + +//测试顺序增加 +func testMultipartSeq(t *testing.T) { + assert := assert.New(t) + filedata := make([]byte, _8M) + rand.Read(filedata) + sha1data := md5.Sum(filedata[:_4M]) + sha2data := md5.Sum(filedata[_4M:]) + shadata := append(sha1data[:], sha2data[:]...) + fmt.Println("sha1data:", hex.EncodeToString(sha1data[:]), "sha2data:", hex.EncodeToString(sha2data[:])) + shaall := md5.Sum(shadata) + etagdata := []byte{multipart.GetSizeFlag(int64(len(filedata)))} + etagdata = append(etagdata, shaall[:]...) + bhash := hex.EncodeToString(etagdata) + + uploadId := "" + + //创建任务 + { + info, _ := dbutils.GetInfoByPath(1, "", "/", proto.TrashStatusNormal) + var req proto.CreateMultipartTaskReq + var rsp proto.CreateMultipartTaskRsp + req.FileName = fmt.Sprintf("%d.txt", time.Now().UnixNano()) + + req.Mime = "text/plain" + req.Size = _8M + req.BETag = bhash + req.FolderId = info.Id + + var succInfo proto.CreateMultipartTaskSuccRsp + var rspHead proto.Rsp + rspHead.Body = &rsp + rsp.SuccInfo = &succInfo + + TPostRsp("/space/v1/api/multipart/create?userId=1", nil, &req, &rspHead, assert) + assert.True(len(succInfo.UploadId) > 0 && succInfo.PartSize == _4M, "rsp:%+v", rsp) + uploadId = succInfo.UploadId + } + + //进行文件切片 + parts := []proto.Part{{Start: 0, End: multipart.HASH_PART_SIZE / 2}, + {Start: multipart.HASH_PART_SIZE / 2, End: multipart.HASH_PART_SIZE}, + {Start: multipart.HASH_PART_SIZE, End: multipart.HASH_PART_SIZE * 2}} + + //upload + for _, part := range parts { + sum := md5.Sum(filedata[part.Start:part.End]) + md5sum := hex.EncodeToString(sum[:]) + var rspHead proto.Rsp + TPostRsp(fmt.Sprintf("/space/v1/api/multipart/upload?userId=1&uploadId=%s&start=%d&end=%d&md5sum=%s", uploadId, part.Start, part.End, md5sum), nil, bytes.NewReader(filedata[part.Start:part.End]), &rspHead, assert) + } + + //complete + fileid := "" + { + var req proto.CompleteMultipartTaskReq + var rsp proto.CompleteMultipartTaskRsp + req.UploadId = uploadId + + var rspHead proto.Rsp + rspHead.Body = &rsp + + TPostRsp("/space/v1/api/multipart/complete?userId=1", nil, &req, &rspHead, assert) + assert.Equal(int(proto.CodeOk), int(rspHead.Code), "rsp:%+v", rsp) + fileid = rsp.Id + } + + //文件下载, 比较 + { + fmt.Println("***************") + data := TGetFile(fmt.Sprintf("/space/v1/api/file/download?uuid=%s&userId=1", fileid), t) + assert.True(bytes.Compare(data, filedata) == 0, "") + } + + //秒传 + { + info, _ := dbutils.GetInfoByPath(1, "", "/", proto.TrashStatusNormal) + var req proto.CreateMultipartTaskReq + var rsp proto.CreateMultipartTaskRsp + req.FileName = fmt.Sprintf("%d.txt", time.Now().UnixNano()) + + req.Mime = "text/plain" + req.Size = _8M + req.BETag = bhash + req.FolderId = info.Id + + var completeInfo proto.CompleteMultipartTaskRsp + var rspHead proto.Rsp + rspHead.Body = &rsp + rsp.CompleteInfo = &completeInfo + + TPostRsp("/space/v1/api/multipart/create?userId=1", nil, &req, &rspHead, assert) + assert.Equal(int(proto.CREATE_MULTIPART_TASK_COMPLETE), int(rsp.RspType)) + + assert.Equal(req.FileName, completeInfo.Name) + + } +} + +//测试速度 +func testMultipartSpeed(t *testing.T) { + times := 128 + assert := assert.New(t) + filedata := make([]byte, 1024*1024*1024) + rand.Read(filedata) + + shadata := []byte{} + for i := 0; i < 256; i++ { + md5hash := md5.Sum(filedata[i*int(_4M) : (i+1)*int(_4M)]) + shadata = append(shadata, md5hash[:]...) + } + + shaall := md5.Sum(shadata) + etagdata := []byte{multipart.GetSizeFlag(int64(len(filedata)))} + etagdata = append(etagdata, shaall[:]...) + bhash := hex.EncodeToString(etagdata) + + uploadId := "" + + //创建任务 + { + info, _ := dbutils.GetInfoByPath(1, "", "/", proto.TrashStatusNormal) + var req proto.CreateMultipartTaskReq + var rsp proto.CreateMultipartTaskRsp + req.FileName = fmt.Sprintf("%d.txt", time.Now().UnixNano()) + + req.Mime = "text/plain" + req.Size = 1024 * 1024 * 1024 + req.BETag = bhash + req.FolderId = info.Id + + var succInfo proto.CreateMultipartTaskSuccRsp + var rspHead proto.Rsp + rspHead.Body = &rsp + rsp.SuccInfo = &succInfo + + TPostRsp("/space/v1/api/multipart/create?userId=1", nil, &req, &rspHead, assert) + assert.True(len(succInfo.UploadId) > 0 && succInfo.PartSize == _4M, "rsp:%+v", rsp) + uploadId = succInfo.UploadId + } + + ts := time.Now() + //进行文件切片并发上传 + chBlocks := make(chan int, 10) + var wg sync.WaitGroup + wg.Add(times) + + f := func(blockId int) { + BLOCKSIZE := _4M * (256 / int64(times)) + sum := md5.Sum(filedata[blockId*int(BLOCKSIZE) : (blockId+1)*int(BLOCKSIZE)]) + md5sum := hex.EncodeToString(sum[:]) + var rspHead proto.Rsp + TPostRsp(fmt.Sprintf("/space/v1/api/multipart/upload?userId=1&uploadId=%s&start=%d&end=%d&md5sum=%s", uploadId, blockId*int(BLOCKSIZE), (blockId+1)*int(BLOCKSIZE), md5sum), nil, bytes.NewReader(filedata[(blockId)*int(BLOCKSIZE):(blockId+1)*int(BLOCKSIZE)]), &rspHead, assert) + wg.Done() + <-chBlocks + } + + go func() { + for i := 0; i < times; i++ { + chBlocks <- i + go f(i) + } + }() + + wg.Wait() + + speed := float64(1024) / (float64(time.Now().Sub(ts)) / float64(time.Second)) + fmt.Printf("********* speed: %f m/s\n", speed) + + //complete + { + var req proto.CompleteMultipartTaskReq + var rsp proto.CompleteMultipartTaskRsp + req.UploadId = uploadId + + var rspHead proto.Rsp + rspHead.Body = &rsp + + TPostRsp("/space/v1/api/multipart/complete?userId=1", nil, &req, &rspHead, assert) + assert.Equal(int(proto.CodeOk), int(rspHead.Code), "rsp:%+v", rsp) + } +} + +var folderId string + +func init() { + folderId = fmt.Sprintf("/%d/%d/", time.Now().UnixNano(), time.Now().UnixNano()) +} +func testMultipartInterface(t *testing.T) { + // defer func() { + // os.Exit(1) + // }() + assert := assert.New(t) + filedata := make([]byte, _8M) + rand.Read(filedata) + sha1data := md5.Sum(filedata[:_4M]) + sha2data := md5.Sum(filedata[_4M:]) + shadata := append(sha1data[:], sha2data[:]...) + fmt.Println("sha1data:", hex.EncodeToString(sha1data[:]), "sha2data:", hex.EncodeToString(sha2data[:])) + shaall := md5.Sum(shadata) + etagdata := []byte{multipart.GetSizeFlag(int64(len(filedata)))} + etagdata = append(etagdata, shaall[:]...) + bhash := hex.EncodeToString(etagdata) + + uploadId := "" + + //创建任务 + { + + var req proto.CreateMultipartTaskReq + var rsp proto.CreateMultipartTaskRsp + req.FileName = fmt.Sprintf("%d.txt", time.Now().UnixNano()) + + req.Mime = "text/plain" + req.Size = _8M + req.BETag = bhash + req.FolderPath = folderId // "/111/" //fmt.Sprintf("/%d/", time.Now().UnixNano()) + + var succInfo proto.CreateMultipartTaskSuccRsp + var rspHead proto.Rsp + rspHead.Body = &rsp + rsp.SuccInfo = &succInfo + + TPostRsp("/space/v1/api/multipart/create?userId=1", nil, &req, &rspHead, assert) + assert.True(len(succInfo.UploadId) > 0 && succInfo.PartSize == _4M, "rsp:%+v", rsp) + uploadId = succInfo.UploadId + } + + // list + { + var req proto.ListMultipartReq + var rsp proto.ListMultipartRsp + req.UploadId = "xxx" + + var rspHead proto.Rsp + rspHead.Body = &rsp + + TGetRsp(fmt.Sprintf("/space/v1/api/multipart/list?userId=1&uploadId=%s", uploadId), &rspHead, assert) + assert.Equal(proto.CodeOk, rspHead.Code, "rsp:%+v", rspHead) + assert.Equal(0, len(rsp.UploadedParts), "rsp:%+v", rsp) + } + + //upload + { + sum := md5.Sum(filedata[:_4M]) + md5sum := hex.EncodeToString(sum[:]) + var rspHead proto.Rsp + TPostRsp(fmt.Sprintf("/space/v1/api/multipart/upload?userId=1&uploadId=%s&start=0&end=%d&md5sum=%s", uploadId, _4M, md5sum), nil, bytes.NewReader(filedata[:_4M]), &rspHead, assert) + } + + // list + { + + var rsp proto.ListMultipartRsp + + var rspHead proto.Rsp + rspHead.Body = &rsp + + TGetRsp(fmt.Sprintf("/space/v1/api/multipart/list?userId=1&uploadId=%s", uploadId), &rspHead, assert) + assert.True(len(rsp.UploadedParts) == 1, "rsp:%+v", rsp) + } + + //upload + { + sum := md5.Sum(filedata[_4M:]) + md5sum := hex.EncodeToString(sum[:]) + var rspHead proto.Rsp + TPostRsp(fmt.Sprintf("/space/v1/api/multipart/upload?userId=1&uploadId=%s&start=%d&end=%d&md5sum=%s", uploadId, _4M, len(filedata), md5sum), nil, bytes.NewReader(filedata[_4M:]), &rspHead, assert) + } + + // list + { + + var rsp proto.ListMultipartRsp + + var rspHead proto.Rsp + rspHead.Body = &rsp + + TGetRsp(fmt.Sprintf("/space/v1/api/multipart/list?userId=1&uploadId=%s", uploadId), &rspHead, assert) + assert.True(len(rsp.UploadedParts) == 1, "rsp:%+v", rsp) + } + + //complete + fileid := "" + { + var req proto.CompleteMultipartTaskReq + var rsp proto.CompleteMultipartTaskRsp + req.UploadId = uploadId + + var rspHead proto.Rsp + rspHead.Body = &rsp + + TPostRsp("/space/v1/api/multipart/complete?userId=1", nil, &req, &rspHead, assert) + assert.Equal(int(proto.CodeOk), int(rspHead.Code), "rsp:%+v", rsp) + fileid = rsp.Id + } + + //文件下载, 比较 + { + fmt.Println("***************") + data := TGetFile(fmt.Sprintf("/space/v1/api/file/download?uuid=%s&userId=1", fileid), t) + assert.True(bytes.Compare(data, filedata) == 0, "") + } + + //delete + { + var req proto.DeleteMultipartTaskReq + req.UploadId = uploadId + + var rspHead proto.Rsp + + TPostRsp("/space/v1/api/multipart/delete?userId=1", nil, &req, &rspHead, assert) + assert.True(rspHead.Code == proto.CodeOk, "rsp:%+v", rspHead) + } + + //os.Exit(1) +} + +func testMultipartAlbum(t *testing.T) { + assert := assert.New(t) + filedata := make([]byte, _8M) + rand.Read(filedata) + sha1data := md5.Sum(filedata[:_4M]) + sha2data := md5.Sum(filedata[_4M:]) + shadata := append(sha1data[:], sha2data[:]...) + fmt.Println("sha1data:", hex.EncodeToString(sha1data[:]), "sha2data:", hex.EncodeToString(sha2data[:])) + shaall := md5.Sum(shadata) + etagdata := []byte{multipart.GetSizeFlag(int64(len(filedata)))} + etagdata = append(etagdata, shaall[:]...) + bhash := hex.EncodeToString(etagdata) + + uploadId := "" + + //创建任务 + { + info, _ := dbutils.GetInfoByPath(1, "", "/", proto.TrashStatusNormal) + var req proto.CreateMultipartTaskReq + var rsp proto.CreateMultipartTaskRsp + req.FileName = fmt.Sprintf("%d.txt", time.Now().UnixNano()) + + req.Mime = "text/plain" + req.Size = _8M + req.BETag = bhash + req.FolderId = info.Id + + var succInfo proto.CreateMultipartTaskSuccRsp + var rspHead proto.Rsp + rspHead.Body = &rsp + rsp.SuccInfo = &succInfo + + TPostRsp("/space/v1/api/multipart/create?userId=1", nil, &req, &rspHead, assert) + assert.True(len(succInfo.UploadId) > 0 && succInfo.PartSize == _4M, "rsp:%+v", rsp) + uploadId = succInfo.UploadId + } + + //进行文件切片 + parts := []proto.Part{{Start: 0, End: multipart.HASH_PART_SIZE / 2}, + {Start: multipart.HASH_PART_SIZE / 2, End: multipart.HASH_PART_SIZE}, + {Start: multipart.HASH_PART_SIZE, End: multipart.HASH_PART_SIZE * 2}} + + //upload + for _, part := range parts { + sum := md5.Sum(filedata[part.Start:part.End]) + md5sum := hex.EncodeToString(sum[:]) + var rspHead proto.Rsp + TPostRsp(fmt.Sprintf("/space/v1/api/multipart/upload?userId=1&uploadId=%s&start=%d&end=%d&md5sum=%s", uploadId, part.Start, part.End, md5sum), nil, bytes.NewReader(filedata[part.Start:part.End]), &rspHead, assert) + } + + //complete + fileid := "" + { + var req proto.CompleteMultipartTaskReq + var rsp proto.CompleteMultipartTaskRsp + req.UploadId = uploadId + + var rspHead proto.Rsp + rspHead.Body = &rsp + + TPostRsp("/space/v1/api/multipart/complete?userId=1", nil, &req, &rspHead, assert) + assert.Equal(int(proto.CodeOk), int(rspHead.Code), "rsp:%+v", rsp) + fileid = rsp.Id + } + + //文件下载, 比较 + { + fmt.Println("***************") + data := TGetFile(fmt.Sprintf("/space/v1/api/file/download?uuid=%s&userId=1", fileid), t) + assert.True(bytes.Compare(data, filedata) == 0, "") + } + + //普通秒传 + sameFilename := fmt.Sprintf("%d.txt", time.Now().UnixNano()) + { + info, _ := dbutils.GetInfoByPath(1, "", "/", proto.TrashStatusNormal) + var req proto.CreateMultipartTaskReq + var rsp proto.CreateMultipartTaskRsp + req.FileName = sameFilename + + req.Mime = "text/plain" + req.Size = _8M + req.BETag = bhash + req.FolderId = info.Id + + var completeInfo proto.CompleteMultipartTaskRsp + var rspHead proto.Rsp + rspHead.Body = &rsp + rsp.CompleteInfo = &completeInfo + + TPostRsp("/space/v1/api/multipart/create?userId=1", nil, &req, &rspHead, assert) + assert.Equal(int(proto.CREATE_MULTIPART_TASK_COMPLETE), int(rsp.RspType)) + + assert.Equal(req.FileName, completeInfo.Name) + } + + { + info, _ := dbutils.GetInfoByPath(1, "", "/", proto.TrashStatusNormal) + var req proto.CreateMultipartTaskReq + var rsp proto.CreateMultipartTaskRsp + req.FileName = sameFilename + + req.Mime = "text/plain" + req.Size = _8M + req.BETag = bhash + req.FolderId = info.Id + + var completeInfo proto.CompleteMultipartTaskRsp + var rspHead proto.Rsp + rspHead.Body = &rsp + rsp.CompleteInfo = &completeInfo + + TPostRsp("/space/v1/api/multipart/create?userId=1", nil, &req, &rspHead, assert) + assert.Equal(int(proto.CREATE_MULTIPART_TASK_COMPLETE), int(rsp.RspType)) + + //直接覆盖? + //assert.NotEqual(req.FileName, completeInfo.Name) + } + + //秒传 + { + info, _ := dbutils.GetInfoByPath(1, "", "/", proto.TrashStatusNormal) + var req proto.CreateMultipartTaskReq + var rsp proto.CreateMultipartTaskRsp + req.FileName = sameFilename + + req.Mime = "text/plain" + req.Size = _8M + req.BETag = bhash + req.FolderId = info.Id + + + var completeInfo proto.CompleteMultipartTaskRsp + var rspHead proto.Rsp + rspHead.Body = &rsp + rsp.CompleteInfo = &completeInfo + + TPostRsp("/space/v1/api/multipart/create?userId=1", nil, &req, &rspHead, assert) + assert.Equal(int(proto.CREATE_MULTIPART_TASK_COMPLETE), int(rsp.RspType)) + + assert.Equal(req.FileName, completeInfo.Name) + } +} + +//func TestGetCharset(t *testing.T) { +// assert := assert.New(t) +// param := proto.CreateMultipartTaskReq{ +// BETag: "0385fb99a9b4be08806ce2f5da0574fa8d", +// } +// +// //mime := "text/html" +// +// name := GetCharset(param.BETag) +// +// assert.Equal("GB2312",name) +// +//}