-startup --windows_enable_symlinks
+startup --windows_enable_symlinks\r
build --enable_runfiles
\ No newline at end of file
-# This is a basic workflow to help you get started with Actions
-
-name: Build
-
-# Controls when the workflow will run
-on:
- push:
- # Allows you to run this workflow manually from the Actions tab
- workflow_dispatch:
-# A workflow run is made up of one or more jobs that can run sequentially or in parallel
-jobs:
- # This workflow contains a single job called "build"
- build:
- strategy:
- fail-fast: false
- matrix:
- os: [ubuntu-latest, macos-latest, windows-latest]
- # The type of runner that the job will run on
- runs-on: ${{ matrix.os }}
- # Steps represent a sequence of tasks that will be executed as part of the job
- steps:
- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v2
- - uses: docker-practice/actions-setup-docker@master
- - name: Login to GitHub Container Registry
- uses: docker/login-action@v1
- with:
- registry: ghcr.io
- username: ${{ github.actor }}
- password: ${{ secrets.GITHUB_TOKEN }}
- - name: Setup Bazelisk
- # You may pin to the exact commit or the version.
- # uses: bazelbuild/setup-bazelisk@2351cf5a7584ce72638fbce7c22e5128a5fcd5b2
- uses: bazelbuild/setup-bazelisk@v1.0.1
- with:
- # The Bazelisk version to download (if necessary) and use. Supports semver spec and ranges.
- bazelisk-version: 1.x # optional, default is 1.x
- # Used to query bazelisk releases. Since there's a default, this is typically not supplied by the user.
- token: ${{ github.token }}
- # Runs a single command using the runners shell
- - name: Mount bazel cache # Optional
- uses: actions/cache@v2
- with:
- path: "~/.cache/bazel"
- key: bazel-${{ matrix.os }}
- - name: Execute Bazel tests
- shell: bash
- run: |
- bazel test ...:all
- # Runs a set of commands using the runners shell
- - name: Execute build script
- shell: bash
- run: |
- bazel build //:package
-
- - name: Bazel artifacts
- uses: actions/upload-artifact@v2
- with:
- name: all-${{ matrix.os }}
- path: |
- bazel-bin*/package_*
- bazel-bin*/package_zip.zip
- bazel-bin*/package_tar.tar.gz
-
- - name: Setup docker
- - name: Publish docker images
- shell: bash
- run: |
- bazel run //:publish
\ No newline at end of file
+# This is a basic workflow to help you get started with Actions\r
+\r
+name: Build\r
+\r
+# Controls when the workflow will run\r
+on:\r
+ push:\r
+ # Allows you to run this workflow manually from the Actions tab\r
+ workflow_dispatch:\r
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel\r
+jobs:\r
+ # This workflow contains a single job called "build"\r
+ build:\r
+ strategy:\r
+ fail-fast: false\r
+ matrix:\r
+ os: [ubuntu-latest, macos-latest, windows-latest]\r
+ # The type of runner that the job will run on\r
+ runs-on: ${{ matrix.os }}\r
+ # Steps represent a sequence of tasks that will be executed as part of the job\r
+ steps:\r
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it\r
+ - uses: actions/checkout@v2\r
+ - uses: docker-practice/actions-setup-docker@master\r
+ if: ${{ matrix.os == "ubuntu-latest" }}\r
+ - uses: docker/login-action@v1\r
+ if: ${{ matrix.os === "ubuntu-latest" }}\r
+ with:\r
+ registry: ghcr.io\r
+ username: ${{ github.actor }}\r
+ password: ${{ secrets.GITHUB_TOKEN }}\r
+ - name: Setup Bazelisk\r
+ # You may pin to the exact commit or the version.\r
+ # uses: bazelbuild/setup-bazelisk@2351cf5a7584ce72638fbce7c22e5128a5fcd5b2\r
+ uses: bazelbuild/setup-bazelisk@v1.0.1\r
+ with:\r
+ # The Bazelisk version to download (if necessary) and use. Supports semver spec and ranges.\r
+ bazelisk-version: 1.x # optional, default is 1.x\r
+ # Used to query bazelisk releases. Since there's a default, this is typically not supplied by the user.\r
+ token: ${{ github.token }}\r
+ # Runs a single command using the runners shell\r
+ - name: Mount bazel cache # Optional\r
+ uses: actions/cache@v2\r
+ with:\r
+ path: "~/.cache/bazel"\r
+ key: bazel-${{ matrix.os }}\r
+ - name: Execute Bazel tests\r
+ shell: bash\r
+ run: |\r
+ bazel test //:test\r
+ # Runs a set of commands using the runners shell\r
+ - name: Execute build script\r
+ shell: bash\r
+ run: |\r
+ bazel build //:package\r
+\r
+ - name: Bazel artifacts\r
+ uses: actions/upload-artifact@v2\r
+ with:\r
+ name: all-${{ matrix.os }}\r
+ path: |\r
+ bazel-bin*/package_*\r
+ bazel-bin*/package_zip.zip\r
+ bazel-bin*/package_tar.tar.gz\r
+\r
+ - name: Publish docker images\r
+ shell: bash\r
+ run: |\r
+ bazel run //:publish\r
+ if: ${{ matrix.os === "ubuntu-latest" }}
\ No newline at end of file
-bazel-*
-.vscode
-ratelimiter/target
+bazel-*\r
+.vscode\r
+ratelimiter/target\r
target/
\ No newline at end of file
name = "package_bin",
srcs = [
"//novactl",
- ] + select({
- "@bazel_tools//src/conditions:windows": [],
- "//conditions:default": ["//webhook", "//gateway", "//ratelimiter"],
- }),
+ "//webhook",
+ "//gateway",
+ "//ratelimiter"
+ ]
)
container_bundle(
-[workspace]
-
-members = [
- "webhook",
- "ratelimiter",
- "gateway"
-]
-
-[package]
-name = "nova"
-version = "0.1.0"
-edition = "2018"
-
-[[bin]]
-name = "nova"
-path = "src/main.rs"
-
-[dependencies]
-libc = "0.2.101"
-
-[package.metadata.raze]
-workspace_path = "//cargo"
-genmode = "Remote"
-default_gen_buildrs = true
-package_aliases_dir = "cargo"
-experimental_api = true
-
-[package.metadata.raze.crates.cpufeatures.'*']
-skipped_deps = ["libc-0.2.101"]
-additional_deps = ["@raze__libc__0_2_101//:libc"]
-
-[package.metadata.raze.crates.ring.'*']
-compile_data_attr = "glob([\"*/**\"])"
-skipped_deps = ["once_cell-1.8.0"]
-additional_deps = ["@raze__once_cell__1_8_0//:once_cell"]
-
-[package.metadata.raze.crates.flate2.'*']
-compile_data_attr = "glob([\"*/**\"])"
-skipped_deps = ["miniz_oxide-0.4.4"]
-additional_deps = ["@raze__miniz_oxide__0_4_4//:miniz_oxide"]
-
-
-[package.metadata.raze.crates.webpki.'*']
-compile_data_attr = "glob([\"*/**\"])"
-
-[package.metadata.raze.crates.libsodium-sys.'*']
-buildrs_additional_environment_variables = { PATH = "/usr/sbin:/usr/bin:/sbin:/bin", "NUM_JOBS" = "2" }
+[workspace]\r
+\r
+members = [\r
+ "webhook",\r
+ "ratelimiter",\r
+ "gateway"\r
+]\r
+\r
+[package]\r
+name = "nova"\r
+version = "0.1.0"\r
+edition = "2018"\r
+\r
+[[bin]]\r
+name = "nova"\r
+path = "src/main.rs"\r
+\r
+[dependencies]\r
+libc = "0.2.101"\r
+\r
+[package.metadata.raze]\r
+workspace_path = "//cargo"\r
+genmode = "Remote"\r
+default_gen_buildrs = true\r
+package_aliases_dir = "cargo"\r
+experimental_api = true\r
+\r
+[package.metadata.raze.crates.cpufeatures.'*']\r
+skipped_deps = ["libc-0.2.101"]\r
+additional_deps = ["@raze__libc__0_2_101//:libc"]\r
+\r
+[package.metadata.raze.crates.ring.'*']\r
+compile_data_attr = "glob([\"*/**\"])"\r
+skipped_deps = ["once_cell-1.8.0"]\r
+additional_deps = ["@raze__once_cell__1_8_0//:once_cell"]\r
+\r
+[package.metadata.raze.crates.flate2.'*']\r
+compile_data_attr = "glob([\"*/**\"])"\r
+skipped_deps = ["miniz_oxide-0.4.4"]\r
+additional_deps = ["@raze__miniz_oxide__0_4_4//:miniz_oxide"]\r
+\r
+\r
+[package.metadata.raze.crates.webpki.'*']\r
+compile_data_attr = "glob([\"*/**\"])"\r
+\r
+[package.metadata.raze.crates.libsodium-sys.'*']\r
+buildrs_additional_environment_variables = { PATH = "/usr/sbin:/usr/bin:/sbin:/bin", "NUM_JOBS" = "2" }\r
+compile_data_attr = "glob([\"*/**\"])"\r
+gen_buildrs = false\r
+additional_build_file = ["bazel/patch/libsodium_buildrs.rs"]
\ No newline at end of file
- 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 2021 Developer's House
-
- 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 License\r
+ Version 2.0, January 2004\r
+ http://www.apache.org/licenses/\r
+\r
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\r
+\r
+ 1. Definitions.\r
+\r
+ "License" shall mean the terms and conditions for use, reproduction,\r
+ and distribution as defined by Sections 1 through 9 of this document.\r
+\r
+ "Licensor" shall mean the copyright owner or entity authorized by\r
+ the copyright owner that is granting the License.\r
+\r
+ "Legal Entity" shall mean the union of the acting entity and all\r
+ other entities that control, are controlled by, or are under common\r
+ control with that entity. For the purposes of this definition,\r
+ "control" means (i) the power, direct or indirect, to cause the\r
+ direction or management of such entity, whether by contract or\r
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the\r
+ outstanding shares, or (iii) beneficial ownership of such entity.\r
+\r
+ "You" (or "Your") shall mean an individual or Legal Entity\r
+ exercising permissions granted by this License.\r
+\r
+ "Source" form shall mean the preferred form for making modifications,\r
+ including but not limited to software source code, documentation\r
+ source, and configuration files.\r
+\r
+ "Object" form shall mean any form resulting from mechanical\r
+ transformation or translation of a Source form, including but\r
+ not limited to compiled object code, generated documentation,\r
+ and conversions to other media types.\r
+\r
+ "Work" shall mean the work of authorship, whether in Source or\r
+ Object form, made available under the License, as indicated by a\r
+ copyright notice that is included in or attached to the work\r
+ (an example is provided in the Appendix below).\r
+\r
+ "Derivative Works" shall mean any work, whether in Source or Object\r
+ form, that is based on (or derived from) the Work and for which the\r
+ editorial revisions, annotations, elaborations, or other modifications\r
+ represent, as a whole, an original work of authorship. For the purposes\r
+ of this License, Derivative Works shall not include works that remain\r
+ separable from, or merely link (or bind by name) to the interfaces of,\r
+ the Work and Derivative Works thereof.\r
+\r
+ "Contribution" shall mean any work of authorship, including\r
+ the original version of the Work and any modifications or additions\r
+ to that Work or Derivative Works thereof, that is intentionally\r
+ submitted to Licensor for inclusion in the Work by the copyright owner\r
+ or by an individual or Legal Entity authorized to submit on behalf of\r
+ the copyright owner. For the purposes of this definition, "submitted"\r
+ means any form of electronic, verbal, or written communication sent\r
+ to the Licensor or its representatives, including but not limited to\r
+ communication on electronic mailing lists, source code control systems,\r
+ and issue tracking systems that are managed by, or on behalf of, the\r
+ Licensor for the purpose of discussing and improving the Work, but\r
+ excluding communication that is conspicuously marked or otherwise\r
+ designated in writing by the copyright owner as "Not a Contribution."\r
+\r
+ "Contributor" shall mean Licensor and any individual or Legal Entity\r
+ on behalf of whom a Contribution has been received by Licensor and\r
+ subsequently incorporated within the Work.\r
+\r
+ 2. Grant of Copyright License. Subject to the terms and conditions of\r
+ this License, each Contributor hereby grants to You a perpetual,\r
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r
+ copyright license to reproduce, prepare Derivative Works of,\r
+ publicly display, publicly perform, sublicense, and distribute the\r
+ Work and such Derivative Works in Source or Object form.\r
+\r
+ 3. Grant of Patent License. Subject to the terms and conditions of\r
+ this License, each Contributor hereby grants to You a perpetual,\r
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r
+ (except as stated in this section) patent license to make, have made,\r
+ use, offer to sell, sell, import, and otherwise transfer the Work,\r
+ where such license applies only to those patent claims licensable\r
+ by such Contributor that are necessarily infringed by their\r
+ Contribution(s) alone or by combination of their Contribution(s)\r
+ with the Work to which such Contribution(s) was submitted. If You\r
+ institute patent litigation against any entity (including a\r
+ cross-claim or counterclaim in a lawsuit) alleging that the Work\r
+ or a Contribution incorporated within the Work constitutes direct\r
+ or contributory patent infringement, then any patent licenses\r
+ granted to You under this License for that Work shall terminate\r
+ as of the date such litigation is filed.\r
+\r
+ 4. Redistribution. You may reproduce and distribute copies of the\r
+ Work or Derivative Works thereof in any medium, with or without\r
+ modifications, and in Source or Object form, provided that You\r
+ meet the following conditions:\r
+\r
+ (a) You must give any other recipients of the Work or\r
+ Derivative Works a copy of this License; and\r
+\r
+ (b) You must cause any modified files to carry prominent notices\r
+ stating that You changed the files; and\r
+\r
+ (c) You must retain, in the Source form of any Derivative Works\r
+ that You distribute, all copyright, patent, trademark, and\r
+ attribution notices from the Source form of the Work,\r
+ excluding those notices that do not pertain to any part of\r
+ the Derivative Works; and\r
+\r
+ (d) If the Work includes a "NOTICE" text file as part of its\r
+ distribution, then any Derivative Works that You distribute must\r
+ include a readable copy of the attribution notices contained\r
+ within such NOTICE file, excluding those notices that do not\r
+ pertain to any part of the Derivative Works, in at least one\r
+ of the following places: within a NOTICE text file distributed\r
+ as part of the Derivative Works; within the Source form or\r
+ documentation, if provided along with the Derivative Works; or,\r
+ within a display generated by the Derivative Works, if and\r
+ wherever such third-party notices normally appear. The contents\r
+ of the NOTICE file are for informational purposes only and\r
+ do not modify the License. You may add Your own attribution\r
+ notices within Derivative Works that You distribute, alongside\r
+ or as an addendum to the NOTICE text from the Work, provided\r
+ that such additional attribution notices cannot be construed\r
+ as modifying the License.\r
+\r
+ You may add Your own copyright statement to Your modifications and\r
+ may provide additional or different license terms and conditions\r
+ for use, reproduction, or distribution of Your modifications, or\r
+ for any such Derivative Works as a whole, provided Your use,\r
+ reproduction, and distribution of the Work otherwise complies with\r
+ the conditions stated in this License.\r
+\r
+ 5. Submission of Contributions. Unless You explicitly state otherwise,\r
+ any Contribution intentionally submitted for inclusion in the Work\r
+ by You to the Licensor shall be under the terms and conditions of\r
+ this License, without any additional terms or conditions.\r
+ Notwithstanding the above, nothing herein shall supersede or modify\r
+ the terms of any separate license agreement you may have executed\r
+ with Licensor regarding such Contributions.\r
+\r
+ 6. Trademarks. This License does not grant permission to use the trade\r
+ names, trademarks, service marks, or product names of the Licensor,\r
+ except as required for reasonable and customary use in describing the\r
+ origin of the Work and reproducing the content of the NOTICE file.\r
+\r
+ 7. Disclaimer of Warranty. Unless required by applicable law or\r
+ agreed to in writing, Licensor provides the Work (and each\r
+ Contributor provides its Contributions) on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\r
+ implied, including, without limitation, any warranties or conditions\r
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\r
+ PARTICULAR PURPOSE. You are solely responsible for determining the\r
+ appropriateness of using or redistributing the Work and assume any\r
+ risks associated with Your exercise of permissions under this License.\r
+\r
+ 8. Limitation of Liability. In no event and under no legal theory,\r
+ whether in tort (including negligence), contract, or otherwise,\r
+ unless required by applicable law (such as deliberate and grossly\r
+ negligent acts) or agreed to in writing, shall any Contributor be\r
+ liable to You for damages, including any direct, indirect, special,\r
+ incidental, or consequential damages of any character arising as a\r
+ result of this License or out of the use or inability to use the\r
+ Work (including but not limited to damages for loss of goodwill,\r
+ work stoppage, computer failure or malfunction, or any and all\r
+ other commercial damages or losses), even if such Contributor\r
+ has been advised of the possibility of such damages.\r
+\r
+ 9. Accepting Warranty or Additional Liability. While redistributing\r
+ the Work or Derivative Works thereof, You may choose to offer,\r
+ and charge a fee for, acceptance of support, warranty, indemnity,\r
+ or other liability obligations and/or rights consistent with this\r
+ License. However, in accepting such obligations, You may act only\r
+ on Your own behalf and on Your sole responsibility, not on behalf\r
+ of any other Contributor, and only if You agree to indemnify,\r
+ defend, and hold each Contributor harmless for any liability\r
+ incurred by, or claims asserted against, such Contributor by reason\r
+ of your accepting any such warranty or additional liability.\r
+\r
+ END OF TERMS AND CONDITIONS\r
+\r
+ APPENDIX: How to apply the Apache License to your work.\r
+\r
+ To apply the Apache License to your work, attach the following\r
+ boilerplate notice, with the fields enclosed by brackets "[]"\r
+ replaced with your own identifying information. (Don't include\r
+ the brackets!) The text should be enclosed in the appropriate\r
+ comment syntax for the file format. We also recommend that a\r
+ file or class name and description of purpose be included on the\r
+ same "printed page" as the copyright notice for easier\r
+ identification within third-party archives.\r
+\r
+ Copyright 2021 Developer's House\r
+\r
+ Licensed under the Apache License, Version 2.0 (the "License");\r
+ you may not use this file except in compliance with the License.\r
+ You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
-# Nova
-
-Nova is an open source Discord framework for creating high-performance app.
-
-Nova is built upon [Go](https://github.com/golang/go) and [Rust](https://github.com/rust-lang/rust) and uses [Bazel](https://github.com/bazelbuild/bazel) as a build system to maintain an effective, safe and production-ready solution.
-
-With Nova you can be sure to build reliable and efficient Discord bots.
-
-### Disclaimer
-
-Nova requires a good infrastructure to operate and may consume lot of resources. It's not made for small Discord Bots but for those who are present on many servers and want to ensure excellent performance.
-
----
-
-## Features
-
-- **Scalability**
-- **High-Performance**
-- **Reliability**
-- **Production-ready**
-
-## Quick Start
-
-> SOON
-
-## Contributing
-
-If you wish to contribute to Nova, go to [CONTRIBUTING]().
-
-## License
-
-Nova is distributed under the Apache 2.0 license, see [LICENSE](LICENSE) for more information.
+# Nova\r
+\r
+Nova is an open source Discord framework for creating high-performance app.\r
+\r
+Nova is built upon [Go](https://github.com/golang/go) and [Rust](https://github.com/rust-lang/rust) and uses [Bazel](https://github.com/bazelbuild/bazel) as a build system to maintain an effective, safe and production-ready solution.\r
+\r
+With Nova you can be sure to build reliable and efficient Discord bots.\r
+\r
+### Disclaimer\r
+\r
+Nova requires a good infrastructure to operate and may consume lot of resources. It's not made for small Discord Bots but for those who are present on many servers and want to ensure excellent performance.\r
+\r
+---\r
+\r
+## Features\r
+\r
+- **Scalability**\r
+- **High-Performance**\r
+- **Reliability**\r
+- **Production-ready**\r
+\r
+## Quick Start\r
+\r
+> SOON\r
+\r
+## Contributing\r
+\r
+If you wish to contribute to Nova, go to [CONTRIBUTING]().\r
+\r
+## License\r
+\r
+Nova is distributed under the Apache 2.0 license, see [LICENSE](LICENSE) for more information.\r
-# Todo
-
-## GitHub
-
-- PR and Issue template
-- Contributing GUIDE
-
-### Readme
-
-- Features
-- Explaination of each components
-- How to use (dev, prod)
-- Contributing
+# Todo\r
+\r
+## GitHub\r
+\r
+- PR and Issue template\r
+- Contributing GUIDE\r
+\r
+### Readme\r
+\r
+- Features\r
+- Explaination of each components\r
+- How to use (dev, prod)\r
+- Contributing\r
- Sponsor?
\ No newline at end of file
"https://github.com/bazelbuild/rules_pkg/releases/download/0.5.1/rules_pkg-0.5.1.tar.gz",
],
)
+
http_archive(
name = "rules_rust",
sha256 = "531bdd470728b61ce41cf7604dc4f9a115983e455d46ac1d0c1632f613ab9fc3",
sha256 = "1f4e59843b61981a96835dc4ac377ad4da9f8c334ebe5e0bb3f58f80c09735f4",
strip_prefix = "rules_docker-0.19.0",
urls = [
- "https://github.com/bazelbuild/rules_docker/releases/download/v0.19.0/rules_docker-v0.19.0.tar.gz"
+ "https://github.com/bazelbuild/rules_docker/releases/download/v0.19.0/rules_docker-v0.19.0.tar.gz",
],
)
load("//bazel:utils.bzl", "get_toolchain_utils_protocolbuffers", "get_toolchain_utils_rules_pkg")
+
get_toolchain_utils_protocolbuffers()
+
get_toolchain_utils_rules_pkg()
load("//bazel:rust.bzl", "load_rust_toolchains")
+
load_rust_toolchains()
load("//bazel:go.bzl", "load_golang_toolchains")
+
load_golang_toolchains()
load("//bazel:docker.bzl", "load_docker")
-load_docker()
\ No newline at end of file
+
+load_docker()
--- /dev/null
+load("@bazel_gazelle//:deps.bzl", "go_repository")
+
+def go_dependencies():
+ go_repository(
+ name = "co_honnef_go_tools",
+ importpath = "honnef.co/go/tools",
+ sum = "h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM=",
+ version = "v0.0.1-2019.2.3",
+ )
+ go_repository(
+ name = "com_github_acomagu_bufpipe",
+ importpath = "github.com/acomagu/bufpipe",
+ sum = "h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk=",
+ version = "v1.0.3",
+ )
+ go_repository(
+ name = "com_github_afex_hystrix_go",
+ importpath = "github.com/afex/hystrix-go",
+ sum = "h1:rFw4nCn9iMW+Vajsk51NtYIcwSTkXr+JGrMd36kTDJw=",
+ version = "v0.0.0-20180502004556-fa1af6a1f4f5",
+ )
+ go_repository(
+ name = "com_github_alecthomas_template",
+ importpath = "github.com/alecthomas/template",
+ sum = "h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM=",
+ version = "v0.0.0-20190718012654-fb15b899a751",
+ )
+ go_repository(
+ name = "com_github_alecthomas_units",
+ importpath = "github.com/alecthomas/units",
+ sum = "h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E=",
+ version = "v0.0.0-20190924025748-f65c72e2690d",
+ )
+ go_repository(
+ name = "com_github_anmitsu_go_shlex",
+ importpath = "github.com/anmitsu/go-shlex",
+ sum = "h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA=",
+ version = "v0.0.0-20161002113705-648efa622239",
+ )
+ go_repository(
+ name = "com_github_apache_thrift",
+ importpath = "github.com/apache/thrift",
+ sum = "h1:5hryIiq9gtn+MiLVn0wP37kb/uTeRZgN08WoCsAhIhI=",
+ version = "v0.13.0",
+ )
+ go_repository(
+ name = "com_github_armon_circbuf",
+ importpath = "github.com/armon/circbuf",
+ sum = "h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA=",
+ version = "v0.0.0-20150827004946-bbbad097214e",
+ )
+ go_repository(
+ name = "com_github_armon_go_metrics",
+ importpath = "github.com/armon/go-metrics",
+ sum = "h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I=",
+ version = "v0.0.0-20180917152333-f0300d1749da",
+ )
+ go_repository(
+ name = "com_github_armon_go_radix",
+ importpath = "github.com/armon/go-radix",
+ sum = "h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to=",
+ version = "v0.0.0-20180808171621-7fddfc383310",
+ )
+ go_repository(
+ name = "com_github_armon_go_socks5",
+ importpath = "github.com/armon/go-socks5",
+ sum = "h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=",
+ version = "v0.0.0-20160902184237-e75332964ef5",
+ )
+ go_repository(
+ name = "com_github_aryann_difflib",
+ importpath = "github.com/aryann/difflib",
+ sum = "h1:pv34s756C4pEXnjgPfGYgdhg/ZdajGhyOvzx8k+23nw=",
+ version = "v0.0.0-20170710044230-e206f873d14a",
+ )
+ go_repository(
+ name = "com_github_aws_aws_lambda_go",
+ importpath = "github.com/aws/aws-lambda-go",
+ sum = "h1:SuCy7H3NLyp+1Mrfp+m80jcbi9KYWAs9/BXwppwRDzY=",
+ version = "v1.13.3",
+ )
+ go_repository(
+ name = "com_github_aws_aws_sdk_go",
+ importpath = "github.com/aws/aws-sdk-go",
+ sum = "h1:0xphMHGMLBrPMfxR2AmVjZKcMEESEgWF8Kru94BNByk=",
+ version = "v1.27.0",
+ )
+ go_repository(
+ name = "com_github_aws_aws_sdk_go_v2",
+ importpath = "github.com/aws/aws-sdk-go-v2",
+ sum = "h1:qZ+woO4SamnH/eEbjM2IDLhRNwIwND/RQyVlBLp3Jqg=",
+ version = "v0.18.0",
+ )
+ go_repository(
+ name = "com_github_beorn7_perks",
+ importpath = "github.com/beorn7/perks",
+ sum = "h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=",
+ version = "v1.0.1",
+ )
+ go_repository(
+ name = "com_github_bgentry_speakeasy",
+ importpath = "github.com/bgentry/speakeasy",
+ sum = "h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY=",
+ version = "v0.1.0",
+ )
+ go_repository(
+ name = "com_github_burntsushi_toml",
+ importpath = "github.com/BurntSushi/toml",
+ sum = "h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=",
+ version = "v0.3.1",
+ )
+ go_repository(
+ name = "com_github_casbin_casbin_v2",
+ importpath = "github.com/casbin/casbin/v2",
+ sum = "h1:bTwon/ECRx9dwBy2ewRVr5OiqjeXSGiTUY74sDPQi/g=",
+ version = "v2.1.2",
+ )
+ go_repository(
+ name = "com_github_cenkalti_backoff",
+ importpath = "github.com/cenkalti/backoff",
+ sum = "h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4=",
+ version = "v2.2.1+incompatible",
+ )
+ go_repository(
+ name = "com_github_census_instrumentation_opencensus_proto",
+ importpath = "github.com/census-instrumentation/opencensus-proto",
+ sum = "h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk=",
+ version = "v0.2.1",
+ )
+ go_repository(
+ name = "com_github_cespare_xxhash_v2",
+ importpath = "github.com/cespare/xxhash/v2",
+ sum = "h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=",
+ version = "v2.1.1",
+ )
+ go_repository(
+ name = "com_github_clbanning_x2j",
+ importpath = "github.com/clbanning/x2j",
+ sum = "h1:EdRZT3IeKQmfCSrgo8SZ8V3MEnskuJP0wCYNpe+aiXo=",
+ version = "v0.0.0-20191024224557-825249438eec",
+ )
+ go_repository(
+ name = "com_github_client9_misspell",
+ importpath = "github.com/client9/misspell",
+ sum = "h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI=",
+ version = "v0.3.4",
+ )
+ go_repository(
+ name = "com_github_cockroachdb_datadriven",
+ importpath = "github.com/cockroachdb/datadriven",
+ sum = "h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y=",
+ version = "v0.0.0-20190809214429-80d97fb3cbaa",
+ )
+ go_repository(
+ name = "com_github_codahale_hdrhistogram",
+ importpath = "github.com/codahale/hdrhistogram",
+ sum = "h1:qMd81Ts1T2OTKmB4acZcyKaMtRnY5Y44NuXGX2GFJ1w=",
+ version = "v0.0.0-20161010025455-3a0bb77429bd",
+ )
+ go_repository(
+ name = "com_github_coreos_go_semver",
+ importpath = "github.com/coreos/go-semver",
+ sum = "h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazuY=",
+ version = "v0.2.0",
+ )
+ go_repository(
+ name = "com_github_coreos_go_systemd",
+ importpath = "github.com/coreos/go-systemd",
+ sum = "h1:u9SHYsPQNyt5tgDm3YN7+9dYrpK96E5wFilTFWIDZOM=",
+ version = "v0.0.0-20180511133405-39ca1b05acc7",
+ )
+ go_repository(
+ name = "com_github_coreos_go_systemd_v22",
+ importpath = "github.com/coreos/go-systemd/v22",
+ sum = "h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI=",
+ version = "v22.3.2",
+ )
+ go_repository(
+ name = "com_github_coreos_pkg",
+ importpath = "github.com/coreos/pkg",
+ sum = "h1:CAKfRE2YtTUIjjh1bkBtyYFaUT/WmOqsJjgtihT0vMI=",
+ version = "v0.0.0-20160727233714-3ac0863d7acf",
+ )
+ go_repository(
+ name = "com_github_cpuguy83_go_md2man_v2",
+ importpath = "github.com/cpuguy83/go-md2man/v2",
+ sum = "h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=",
+ version = "v2.0.0-20190314233015-f79a8a8ca69d",
+ )
+ go_repository(
+ name = "com_github_creack_pty",
+ importpath = "github.com/creack/pty",
+ sum = "h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w=",
+ version = "v1.1.9",
+ )
+ go_repository(
+ name = "com_github_davecgh_go_spew",
+ importpath = "github.com/davecgh/go-spew",
+ sum = "h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=",
+ version = "v1.1.1",
+ )
+ go_repository(
+ name = "com_github_dgrijalva_jwt_go",
+ importpath = "github.com/dgrijalva/jwt-go",
+ sum = "h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=",
+ version = "v3.2.0+incompatible",
+ )
+ go_repository(
+ name = "com_github_dustin_go_humanize",
+ importpath = "github.com/dustin/go-humanize",
+ sum = "h1:qk/FSDDxo05wdJH28W+p5yivv7LuLYLRXPPD8KQCtZs=",
+ version = "v0.0.0-20171111073723-bb3d318650d4",
+ )
+ go_repository(
+ name = "com_github_eapache_go_resiliency",
+ importpath = "github.com/eapache/go-resiliency",
+ sum = "h1:1NtRmCAqadE2FN4ZcN6g90TP3uk8cg9rn9eNK2197aU=",
+ version = "v1.1.0",
+ )
+ go_repository(
+ name = "com_github_eapache_go_xerial_snappy",
+ importpath = "github.com/eapache/go-xerial-snappy",
+ sum = "h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw=",
+ version = "v0.0.0-20180814174437-776d5712da21",
+ )
+ go_repository(
+ name = "com_github_eapache_queue",
+ importpath = "github.com/eapache/queue",
+ sum = "h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc=",
+ version = "v1.1.0",
+ )
+ go_repository(
+ name = "com_github_edsrzf_mmap_go",
+ importpath = "github.com/edsrzf/mmap-go",
+ sum = "h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_emirpasic_gods",
+ importpath = "github.com/emirpasic/gods",
+ sum = "h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg=",
+ version = "v1.12.0",
+ )
+ go_repository(
+ name = "com_github_envoyproxy_go_control_plane",
+ importpath = "github.com/envoyproxy/go-control-plane",
+ sum = "h1:4cmBvAEBNJaGARUEs3/suWRyfyBfhf7I60WBZq+bv2w=",
+ version = "v0.9.1-0.20191026205805-5f8ba28d4473",
+ )
+ go_repository(
+ name = "com_github_envoyproxy_protoc_gen_validate",
+ importpath = "github.com/envoyproxy/protoc-gen-validate",
+ sum = "h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A=",
+ version = "v0.1.0",
+ )
+ go_repository(
+ name = "com_github_fatih_color",
+ importpath = "github.com/fatih/color",
+ sum = "h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=",
+ version = "v1.7.0",
+ )
+ go_repository(
+ name = "com_github_flynn_go_shlex",
+ importpath = "github.com/flynn/go-shlex",
+ sum = "h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ=",
+ version = "v0.0.0-20150515145356-3f9db97f8568",
+ )
+ go_repository(
+ name = "com_github_franela_goblin",
+ importpath = "github.com/franela/goblin",
+ sum = "h1:gb2Z18BhTPJPpLQWj4T+rfKHYCHxRHCtRxhKKjRidVw=",
+ version = "v0.0.0-20200105215937-c9ffbefa60db",
+ )
+ go_repository(
+ name = "com_github_franela_goreq",
+ importpath = "github.com/franela/goreq",
+ sum = "h1:a9ENSRDFBUPkJ5lCgVZh26+ZbGyoVJG7yb5SSzF5H54=",
+ version = "v0.0.0-20171204163338-bcd34c9993f8",
+ )
+ go_repository(
+ name = "com_github_fsnotify_fsnotify",
+ importpath = "github.com/fsnotify/fsnotify",
+ sum = "h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=",
+ version = "v1.4.7",
+ )
+ go_repository(
+ name = "com_github_ghodss_yaml",
+ importpath = "github.com/ghodss/yaml",
+ sum = "h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_gliderlabs_ssh",
+ importpath = "github.com/gliderlabs/ssh",
+ sum = "h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0=",
+ version = "v0.2.2",
+ )
+ go_repository(
+ name = "com_github_go_git_gcfg",
+ importpath = "github.com/go-git/gcfg",
+ sum = "h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4=",
+ version = "v1.5.0",
+ )
+ go_repository(
+ name = "com_github_go_git_go_billy_v5",
+ importpath = "github.com/go-git/go-billy/v5",
+ sum = "h1:CPiOUAzKtMRvolEKw+bG1PLRpT7D3LIs3/3ey4Aiu34=",
+ version = "v5.3.1",
+ )
+ go_repository(
+ name = "com_github_go_git_go_git_fixtures_v4",
+ importpath = "github.com/go-git/go-git-fixtures/v4",
+ sum = "h1:n9gGL1Ct/yIw+nfsfr8s4+sbhT+Ncu2SubfXjIWgci8=",
+ version = "v4.2.1",
+ )
+ go_repository(
+ name = "com_github_go_git_go_git_v5",
+ importpath = "github.com/go-git/go-git/v5",
+ sum = "h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4=",
+ version = "v5.4.2",
+ )
+ go_repository(
+ name = "com_github_go_kit_kit",
+ importpath = "github.com/go-kit/kit",
+ sum = "h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo=",
+ version = "v0.10.0",
+ )
+ go_repository(
+ name = "com_github_go_logfmt_logfmt",
+ importpath = "github.com/go-logfmt/logfmt",
+ sum = "h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4=",
+ version = "v0.5.0",
+ )
+ go_repository(
+ name = "com_github_go_sql_driver_mysql",
+ importpath = "github.com/go-sql-driver/mysql",
+ sum = "h1:7LxgVwFb2hIQtMm87NdgAVfXjnt4OePseqT1tKx+opk=",
+ version = "v1.4.0",
+ )
+ go_repository(
+ name = "com_github_go_stack_stack",
+ importpath = "github.com/go-stack/stack",
+ sum = "h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=",
+ version = "v1.8.0",
+ )
+ go_repository(
+ name = "com_github_godbus_dbus_v5",
+ importpath = "github.com/godbus/dbus/v5",
+ sum = "h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA=",
+ version = "v5.0.4",
+ )
+ go_repository(
+ name = "com_github_gogo_googleapis",
+ importpath = "github.com/gogo/googleapis",
+ sum = "h1:kFkMAZBNAn4j7K0GiZr8cRYzejq68VbheufiV3YuyFI=",
+ version = "v1.1.0",
+ )
+ go_repository(
+ name = "com_github_gogo_protobuf",
+ importpath = "github.com/gogo/protobuf",
+ sum = "h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE=",
+ version = "v1.2.1",
+ )
+ go_repository(
+ name = "com_github_golang_glog",
+ importpath = "github.com/golang/glog",
+ sum = "h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=",
+ version = "v0.0.0-20160126235308-23def4e6c14b",
+ )
+ go_repository(
+ name = "com_github_golang_groupcache",
+ importpath = "github.com/golang/groupcache",
+ sum = "h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I=",
+ version = "v0.0.0-20190702054246-869f871628b6",
+ )
+ go_repository(
+ name = "com_github_golang_mock",
+ importpath = "github.com/golang/mock",
+ sum = "h1:G5FRp8JnTd7RQH5kemVNlMeyXQAztQ3mOWV95KxsXH8=",
+ version = "v1.1.1",
+ )
+ go_repository(
+ name = "com_github_golang_protobuf",
+ importpath = "github.com/golang/protobuf",
+ sum = "h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=",
+ version = "v1.5.2",
+ )
+ go_repository(
+ name = "com_github_golang_snappy",
+ importpath = "github.com/golang/snappy",
+ sum = "h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w=",
+ version = "v0.0.0-20180518054509-2e65f85255db",
+ )
+ go_repository(
+ name = "com_github_google_btree",
+ importpath = "github.com/google/btree",
+ sum = "h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_google_go_cmp",
+ importpath = "github.com/google/go-cmp",
+ sum = "h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=",
+ version = "v0.5.5",
+ )
+ go_repository(
+ name = "com_github_google_gofuzz",
+ importpath = "github.com/google/gofuzz",
+ sum = "h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_google_renameio",
+ importpath = "github.com/google/renameio",
+ sum = "h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA=",
+ version = "v0.1.0",
+ )
+ go_repository(
+ name = "com_github_google_uuid",
+ importpath = "github.com/google/uuid",
+ sum = "h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_gopherjs_gopherjs",
+ importpath = "github.com/gopherjs/gopherjs",
+ sum = "h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=",
+ version = "v0.0.0-20181017120253-0766667cb4d1",
+ )
+ go_repository(
+ name = "com_github_gorilla_context",
+ importpath = "github.com/gorilla/context",
+ sum = "h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8=",
+ version = "v1.1.1",
+ )
+ go_repository(
+ name = "com_github_gorilla_mux",
+ importpath = "github.com/gorilla/mux",
+ sum = "h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw=",
+ version = "v1.7.3",
+ )
+ go_repository(
+ name = "com_github_gorilla_websocket",
+ importpath = "github.com/gorilla/websocket",
+ sum = "h1:Lh2aW+HnU2Nbe1gqD9SOJLJxW1jBMmQOktN2acDyJk8=",
+ version = "v0.0.0-20170926233335-4201258b820c",
+ )
+ go_repository(
+ name = "com_github_grpc_ecosystem_go_grpc_middleware",
+ importpath = "github.com/grpc-ecosystem/go-grpc-middleware",
+ sum = "h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg=",
+ version = "v1.0.1-0.20190118093823-f849b5445de4",
+ )
+ go_repository(
+ name = "com_github_grpc_ecosystem_go_grpc_prometheus",
+ importpath = "github.com/grpc-ecosystem/go-grpc-prometheus",
+ sum = "h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=",
+ version = "v1.2.0",
+ )
+ go_repository(
+ name = "com_github_grpc_ecosystem_grpc_gateway",
+ importpath = "github.com/grpc-ecosystem/grpc-gateway",
+ sum = "h1:UImYN5qQ8tuGpGE16ZmjvcTtTw24zw1QAp/SlnNrZhI=",
+ version = "v1.9.5",
+ )
+ go_repository(
+ name = "com_github_hashicorp_consul_api",
+ importpath = "github.com/hashicorp/consul/api",
+ sum = "h1:HXNYlRkkM/t+Y/Yhxtwcy02dlYwIaoxzvxPnS+cqy78=",
+ version = "v1.3.0",
+ )
+ go_repository(
+ name = "com_github_hashicorp_consul_sdk",
+ importpath = "github.com/hashicorp/consul/sdk",
+ sum = "h1:UOxjlb4xVNF93jak1mzzoBatyFju9nrkxpVwIp/QqxQ=",
+ version = "v0.3.0",
+ )
+ go_repository(
+ name = "com_github_hashicorp_errwrap",
+ importpath = "github.com/hashicorp/errwrap",
+ sum = "h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_hashicorp_go_cleanhttp",
+ importpath = "github.com/hashicorp/go-cleanhttp",
+ sum = "h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM=",
+ version = "v0.5.1",
+ )
+ go_repository(
+ name = "com_github_hashicorp_go_immutable_radix",
+ importpath = "github.com/hashicorp/go-immutable-radix",
+ sum = "h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_hashicorp_go_msgpack",
+ importpath = "github.com/hashicorp/go-msgpack",
+ sum = "h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4=",
+ version = "v0.5.3",
+ )
+ go_repository(
+ name = "com_github_hashicorp_go_multierror",
+ importpath = "github.com/hashicorp/go-multierror",
+ sum = "h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_hashicorp_go_net",
+ importpath = "github.com/hashicorp/go.net",
+ sum = "h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw=",
+ version = "v0.0.1",
+ )
+ go_repository(
+ name = "com_github_hashicorp_go_rootcerts",
+ importpath = "github.com/hashicorp/go-rootcerts",
+ sum = "h1:Rqb66Oo1X/eSV1x66xbDccZjhJigjg0+e82kpwzSwCI=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_hashicorp_go_sockaddr",
+ importpath = "github.com/hashicorp/go-sockaddr",
+ sum = "h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_hashicorp_go_syslog",
+ importpath = "github.com/hashicorp/go-syslog",
+ sum = "h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_hashicorp_go_uuid",
+ importpath = "github.com/hashicorp/go-uuid",
+ sum = "h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE=",
+ version = "v1.0.1",
+ )
+ go_repository(
+ name = "com_github_hashicorp_go_version",
+ importpath = "github.com/hashicorp/go-version",
+ sum = "h1:3vNe/fWF5CBgRIguda1meWhsZHy3m8gCJ5wx+dIzX/E=",
+ version = "v1.2.0",
+ )
+ go_repository(
+ name = "com_github_hashicorp_golang_lru",
+ importpath = "github.com/hashicorp/golang-lru",
+ sum = "h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU=",
+ version = "v0.5.1",
+ )
+ go_repository(
+ name = "com_github_hashicorp_logutils",
+ importpath = "github.com/hashicorp/logutils",
+ sum = "h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_hashicorp_mdns",
+ importpath = "github.com/hashicorp/mdns",
+ sum = "h1:WhIgCr5a7AaVH6jPUwjtRuuE7/RDufnUvzIr48smyxs=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_hashicorp_memberlist",
+ importpath = "github.com/hashicorp/memberlist",
+ sum = "h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M=",
+ version = "v0.1.3",
+ )
+ go_repository(
+ name = "com_github_hashicorp_serf",
+ importpath = "github.com/hashicorp/serf",
+ sum = "h1:YZ7UKsJv+hKjqGVUUbtE3HNj79Eln2oQ75tniF6iPt0=",
+ version = "v0.8.2",
+ )
+ go_repository(
+ name = "com_github_hpcloud_tail",
+ importpath = "github.com/hpcloud/tail",
+ sum = "h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_hudl_fargo",
+ importpath = "github.com/hudl/fargo",
+ sum = "h1:0U6+BtN6LhaYuTnIJq4Wyq5cpn6O2kWrxAtcqBmYY6w=",
+ version = "v1.3.0",
+ )
+ go_repository(
+ name = "com_github_imdario_mergo",
+ importpath = "github.com/imdario/mergo",
+ sum = "h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=",
+ version = "v0.3.12",
+ )
+ go_repository(
+ name = "com_github_inconshreveable_mousetrap",
+ importpath = "github.com/inconshreveable/mousetrap",
+ sum = "h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_influxdata_influxdb1_client",
+ importpath = "github.com/influxdata/influxdb1-client",
+ sum = "h1:/WZQPMZNsjZ7IlCpsLGdQBINg5bxKQ1K1sh6awxLtkA=",
+ version = "v0.0.0-20191209144304-8bf82d3c094d",
+ )
+ go_repository(
+ name = "com_github_jbenet_go_context",
+ importpath = "github.com/jbenet/go-context",
+ sum = "h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=",
+ version = "v0.0.0-20150711004518-d14ea06fba99",
+ )
+ go_repository(
+ name = "com_github_jessevdk_go_flags",
+ importpath = "github.com/jessevdk/go-flags",
+ sum = "h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc=",
+ version = "v1.5.0",
+ )
+ go_repository(
+ name = "com_github_jmespath_go_jmespath",
+ importpath = "github.com/jmespath/go-jmespath",
+ sum = "h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM=",
+ version = "v0.0.0-20180206201540-c2b33e8439af",
+ )
+ go_repository(
+ name = "com_github_jonboulle_clockwork",
+ importpath = "github.com/jonboulle/clockwork",
+ sum = "h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=",
+ version = "v0.1.0",
+ )
+ go_repository(
+ name = "com_github_jpillora_backoff",
+ importpath = "github.com/jpillora/backoff",
+ sum = "h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_json_iterator_go",
+ importpath = "github.com/json-iterator/go",
+ sum = "h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68=",
+ version = "v1.1.10",
+ )
+ go_repository(
+ name = "com_github_jtolds_gls",
+ importpath = "github.com/jtolds/gls",
+ sum = "h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=",
+ version = "v4.20.0+incompatible",
+ )
+ go_repository(
+ name = "com_github_julienschmidt_httprouter",
+ importpath = "github.com/julienschmidt/httprouter",
+ sum = "h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U=",
+ version = "v1.3.0",
+ )
+ go_repository(
+ name = "com_github_kevinburke_ssh_config",
+ importpath = "github.com/kevinburke/ssh_config",
+ sum = "h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck=",
+ version = "v0.0.0-20201106050909-4977a11b4351",
+ )
+ go_repository(
+ name = "com_github_kisielk_errcheck",
+ importpath = "github.com/kisielk/errcheck",
+ sum = "h1:ZqfnKyx9KGpRcW04j5nnPDgRgoXUeLh2YFBeFzphcA0=",
+ version = "v1.1.0",
+ )
+ go_repository(
+ name = "com_github_kisielk_gotool",
+ importpath = "github.com/kisielk/gotool",
+ sum = "h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_knetic_govaluate",
+ importpath = "github.com/Knetic/govaluate",
+ sum = "h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw=",
+ version = "v3.0.1-0.20171022003610-9aa49832a739+incompatible",
+ )
+ go_repository(
+ name = "com_github_konsorten_go_windows_terminal_sequences",
+ importpath = "github.com/konsorten/go-windows-terminal-sequences",
+ sum = "h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8=",
+ version = "v1.0.3",
+ )
+ go_repository(
+ name = "com_github_kr_logfmt",
+ importpath = "github.com/kr/logfmt",
+ sum = "h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY=",
+ version = "v0.0.0-20140226030751-b84e30acd515",
+ )
+ go_repository(
+ name = "com_github_kr_pretty",
+ importpath = "github.com/kr/pretty",
+ sum = "h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=",
+ version = "v0.2.1",
+ )
+ go_repository(
+ name = "com_github_kr_pty",
+ importpath = "github.com/kr/pty",
+ sum = "h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw=",
+ version = "v1.1.1",
+ )
+ go_repository(
+ name = "com_github_kr_text",
+ importpath = "github.com/kr/text",
+ sum = "h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=",
+ version = "v0.2.0",
+ )
+ go_repository(
+ name = "com_github_lightstep_lightstep_tracer_common_golang_gogo",
+ importpath = "github.com/lightstep/lightstep-tracer-common/golang/gogo",
+ sum = "h1:143Bb8f8DuGWck/xpNUOckBVYfFbBTnLevfRZ1aVVqo=",
+ version = "v0.0.0-20190605223551-bc2310a04743",
+ )
+ go_repository(
+ name = "com_github_lightstep_lightstep_tracer_go",
+ importpath = "github.com/lightstep/lightstep-tracer-go",
+ sum = "h1:vi1F1IQ8N7hNWytK9DpJsUfQhGuNSc19z330K6vl4zk=",
+ version = "v0.18.1",
+ )
+ go_repository(
+ name = "com_github_lyft_protoc_gen_validate",
+ importpath = "github.com/lyft/protoc-gen-validate",
+ sum = "h1:KNt/RhmQTOLr7Aj8PsJ7mTronaFyx80mRTT9qF261dA=",
+ version = "v0.0.13",
+ )
+ go_repository(
+ name = "com_github_matryer_is",
+ importpath = "github.com/matryer/is",
+ sum = "h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A=",
+ version = "v1.2.0",
+ )
+ go_repository(
+ name = "com_github_mattn_go_colorable",
+ importpath = "github.com/mattn/go-colorable",
+ sum = "h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4=",
+ version = "v0.0.9",
+ )
+ go_repository(
+ name = "com_github_mattn_go_isatty",
+ importpath = "github.com/mattn/go-isatty",
+ sum = "h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs=",
+ version = "v0.0.4",
+ )
+ go_repository(
+ name = "com_github_mattn_go_runewidth",
+ importpath = "github.com/mattn/go-runewidth",
+ sum = "h1:UnlwIPBGaTZfPQ6T1IGzPI0EkYAQmT9fAEJ/poFC63o=",
+ version = "v0.0.2",
+ )
+ go_repository(
+ name = "com_github_matttproud_golang_protobuf_extensions",
+ importpath = "github.com/matttproud/golang_protobuf_extensions",
+ sum = "h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=",
+ version = "v1.0.1",
+ )
+ go_repository(
+ name = "com_github_microsoft_go_winio",
+ importpath = "github.com/Microsoft/go-winio",
+ sum = "h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk=",
+ version = "v0.4.16",
+ )
+ go_repository(
+ name = "com_github_miekg_dns",
+ importpath = "github.com/miekg/dns",
+ sum = "h1:9jZdLNd/P4+SfEJ0TNyxYpsK8N4GtfylBLqtbYN1sbA=",
+ version = "v1.0.14",
+ )
+ go_repository(
+ name = "com_github_mitchellh_cli",
+ importpath = "github.com/mitchellh/cli",
+ sum = "h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_mitchellh_go_homedir",
+ importpath = "github.com/mitchellh/go-homedir",
+ sum = "h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=",
+ version = "v1.1.0",
+ )
+ go_repository(
+ name = "com_github_mitchellh_go_testing_interface",
+ importpath = "github.com/mitchellh/go-testing-interface",
+ sum = "h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_mitchellh_gox",
+ importpath = "github.com/mitchellh/gox",
+ sum = "h1:lfGJxY7ToLJQjHHwi0EX6uYBdK78egf954SQl13PQJc=",
+ version = "v0.4.0",
+ )
+ go_repository(
+ name = "com_github_mitchellh_iochan",
+ importpath = "github.com/mitchellh/iochan",
+ sum = "h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_mitchellh_mapstructure",
+ importpath = "github.com/mitchellh/mapstructure",
+ sum = "h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=",
+ version = "v1.1.2",
+ )
+ go_repository(
+ name = "com_github_modern_go_concurrent",
+ importpath = "github.com/modern-go/concurrent",
+ sum = "h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=",
+ version = "v0.0.0-20180306012644-bacd9c7ef1dd",
+ )
+ go_repository(
+ name = "com_github_modern_go_reflect2",
+ importpath = "github.com/modern-go/reflect2",
+ sum = "h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=",
+ version = "v1.0.1",
+ )
+ go_repository(
+ name = "com_github_mwitkow_go_conntrack",
+ importpath = "github.com/mwitkow/go-conntrack",
+ sum = "h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=",
+ version = "v0.0.0-20190716064945-2f068394615f",
+ )
+ go_repository(
+ name = "com_github_nats_io_jwt",
+ importpath = "github.com/nats-io/jwt",
+ sum = "h1:+RB5hMpXUUA2dfxuhBTEkMOrYmM+gKIZYS1KjSostMI=",
+ version = "v0.3.2",
+ )
+ go_repository(
+ name = "com_github_nats_io_nats_go",
+ importpath = "github.com/nats-io/nats.go",
+ sum = "h1:ik3HbLhZ0YABLto7iX80pZLPw/6dx3T+++MZJwLnMrQ=",
+ version = "v1.9.1",
+ )
+ go_repository(
+ name = "com_github_nats_io_nats_server_v2",
+ importpath = "github.com/nats-io/nats-server/v2",
+ sum = "h1:i2Ly0B+1+rzNZHHWtD4ZwKi+OU5l+uQo1iDHZ2PmiIc=",
+ version = "v2.1.2",
+ )
+ go_repository(
+ name = "com_github_nats_io_nkeys",
+ importpath = "github.com/nats-io/nkeys",
+ sum = "h1:6JrEfig+HzTH85yxzhSVbjHRJv9cn0p6n3IngIcM5/k=",
+ version = "v0.1.3",
+ )
+ go_repository(
+ name = "com_github_nats_io_nuid",
+ importpath = "github.com/nats-io/nuid",
+ sum = "h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=",
+ version = "v1.0.1",
+ )
+ go_repository(
+ name = "com_github_niemeyer_pretty",
+ importpath = "github.com/niemeyer/pretty",
+ sum = "h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=",
+ version = "v0.0.0-20200227124842-a10e7caefd8e",
+ )
+ go_repository(
+ name = "com_github_oklog_oklog",
+ importpath = "github.com/oklog/oklog",
+ sum = "h1:wVfs8F+in6nTBMkA7CbRw+zZMIB7nNM825cM1wuzoTk=",
+ version = "v0.3.2",
+ )
+ go_repository(
+ name = "com_github_oklog_run",
+ importpath = "github.com/oklog/run",
+ sum = "h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_olekukonko_tablewriter",
+ importpath = "github.com/olekukonko/tablewriter",
+ sum = "h1:58+kh9C6jJVXYjt8IE48G2eWl6BjwU5Gj0gqY84fy78=",
+ version = "v0.0.0-20170122224234-a0225b3f23b5",
+ )
+ go_repository(
+ name = "com_github_onsi_ginkgo",
+ importpath = "github.com/onsi/ginkgo",
+ sum = "h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs=",
+ version = "v1.7.0",
+ )
+ go_repository(
+ name = "com_github_onsi_gomega",
+ importpath = "github.com/onsi/gomega",
+ sum = "h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU=",
+ version = "v1.4.3",
+ )
+ go_repository(
+ name = "com_github_op_go_logging",
+ importpath = "github.com/op/go-logging",
+ sum = "h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88=",
+ version = "v0.0.0-20160315200505-970db520ece7",
+ )
+ go_repository(
+ name = "com_github_opentracing_basictracer_go",
+ importpath = "github.com/opentracing/basictracer-go",
+ sum = "h1:YyUAhaEfjoWXclZVJ9sGoNct7j4TVk7lZWlQw5UXuoo=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_opentracing_contrib_go_observer",
+ importpath = "github.com/opentracing-contrib/go-observer",
+ sum = "h1:lM6RxxfUMrYL/f8bWEUqdXrANWtrL7Nndbm9iFN0DlU=",
+ version = "v0.0.0-20170622124052-a52f23424492",
+ )
+ go_repository(
+ name = "com_github_opentracing_opentracing_go",
+ importpath = "github.com/opentracing/opentracing-go",
+ sum = "h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU=",
+ version = "v1.1.0",
+ )
+ go_repository(
+ name = "com_github_openzipkin_contrib_zipkin_go_opentracing",
+ importpath = "github.com/openzipkin-contrib/zipkin-go-opentracing",
+ sum = "h1:ZCnq+JUrvXcDVhX/xRolRBZifmabN1HcS1wrPSvxhrU=",
+ version = "v0.4.5",
+ )
+ go_repository(
+ name = "com_github_openzipkin_zipkin_go",
+ importpath = "github.com/openzipkin/zipkin-go",
+ sum = "h1:nY8Hti+WKaP0cRsSeQ026wU03QsM762XBeCXBb9NAWI=",
+ version = "v0.2.2",
+ )
+ go_repository(
+ name = "com_github_pact_foundation_pact_go",
+ importpath = "github.com/pact-foundation/pact-go",
+ sum = "h1:OYkFijGHoZAYbOIb1LWXrwKQbMMRUv1oQ89blD2Mh2Q=",
+ version = "v1.0.4",
+ )
+ go_repository(
+ name = "com_github_pascaldekloe_goe",
+ importpath = "github.com/pascaldekloe/goe",
+ sum = "h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs=",
+ version = "v0.0.0-20180627143212-57f6aae5913c",
+ )
+ go_repository(
+ name = "com_github_pborman_uuid",
+ importpath = "github.com/pborman/uuid",
+ sum = "h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g=",
+ version = "v1.2.0",
+ )
+ go_repository(
+ name = "com_github_performancecopilot_speed",
+ importpath = "github.com/performancecopilot/speed",
+ sum = "h1:2WnRzIquHa5QxaJKShDkLM+sc0JPuwhXzK8OYOyt3Vg=",
+ version = "v3.0.0+incompatible",
+ )
+ go_repository(
+ name = "com_github_pierrec_lz4",
+ importpath = "github.com/pierrec/lz4",
+ sum = "h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I=",
+ version = "v2.0.5+incompatible",
+ )
+ go_repository(
+ name = "com_github_pkg_errors",
+ importpath = "github.com/pkg/errors",
+ sum = "h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=",
+ version = "v0.9.1",
+ )
+ go_repository(
+ name = "com_github_pkg_profile",
+ importpath = "github.com/pkg/profile",
+ sum = "h1:F++O52m40owAmADcojzM+9gyjmMOY/T4oYJkgFDH8RE=",
+ version = "v1.2.1",
+ )
+ go_repository(
+ name = "com_github_pmezard_go_difflib",
+ importpath = "github.com/pmezard/go-difflib",
+ sum = "h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_posener_complete",
+ importpath = "github.com/posener/complete",
+ sum = "h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w=",
+ version = "v1.1.1",
+ )
+ go_repository(
+ name = "com_github_prometheus_client_golang",
+ importpath = "github.com/prometheus/client_golang",
+ sum = "h1:Rrch9mh17XcxvEu9D9DEpb4isxjGBtcevQjKvxPRQIU=",
+ version = "v1.9.0",
+ )
+ go_repository(
+ name = "com_github_prometheus_client_model",
+ importpath = "github.com/prometheus/client_model",
+ sum = "h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=",
+ version = "v0.2.0",
+ )
+ go_repository(
+ name = "com_github_prometheus_common",
+ importpath = "github.com/prometheus/common",
+ sum = "h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM=",
+ version = "v0.15.0",
+ )
+ go_repository(
+ name = "com_github_prometheus_procfs",
+ importpath = "github.com/prometheus/procfs",
+ sum = "h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4=",
+ version = "v0.2.0",
+ )
+ go_repository(
+ name = "com_github_protonmail_go_crypto",
+ importpath = "github.com/ProtonMail/go-crypto",
+ sum = "h1:YoJbenK9C67SkzkDfmQuVln04ygHj3vjZfd9FL+GmQQ=",
+ version = "v0.0.0-20210428141323-04723f9f07d7",
+ )
+ go_repository(
+ name = "com_github_rcrowley_go_metrics",
+ importpath = "github.com/rcrowley/go-metrics",
+ sum = "h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ=",
+ version = "v0.0.0-20181016184325-3113b8401b8a",
+ )
+ go_repository(
+ name = "com_github_rogpeppe_fastuuid",
+ importpath = "github.com/rogpeppe/fastuuid",
+ sum = "h1:gu+uRPtBe88sKxUCEXRoeCvVG90TJmwhiqRpvdhQFng=",
+ version = "v0.0.0-20150106093220-6724a57986af",
+ )
+ go_repository(
+ name = "com_github_rogpeppe_go_internal",
+ importpath = "github.com/rogpeppe/go-internal",
+ sum = "h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk=",
+ version = "v1.3.0",
+ )
+ go_repository(
+ name = "com_github_rs_xid",
+ importpath = "github.com/rs/xid",
+ sum = "h1:mhH9Nq+C1fY2l1XIpgxIiUOfNpRBYH1kKcr+qfKgjRc=",
+ version = "v1.2.1",
+ )
+ go_repository(
+ name = "com_github_rs_zerolog",
+ importpath = "github.com/rs/zerolog",
+ sum = "h1:UskrK+saS9P9Y789yNNulYKdARjPZuS35B8gJF2x60g=",
+ version = "v1.23.0",
+ )
+ go_repository(
+ name = "com_github_russross_blackfriday_v2",
+ importpath = "github.com/russross/blackfriday/v2",
+ sum = "h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=",
+ version = "v2.0.1",
+ )
+ go_repository(
+ name = "com_github_ryanuber_columnize",
+ importpath = "github.com/ryanuber/columnize",
+ sum = "h1:UFr9zpz4xgTnIE5yIMtWAMngCdZ9p/+q6lTbgelo80M=",
+ version = "v0.0.0-20160712163229-9b3edd62028f",
+ )
+ go_repository(
+ name = "com_github_samuel_go_zookeeper",
+ importpath = "github.com/samuel/go-zookeeper",
+ sum = "h1:p3Vo3i64TCLY7gIfzeQaUJ+kppEO5WQG3cL8iE8tGHU=",
+ version = "v0.0.0-20190923202752-2cc03de413da",
+ )
+ go_repository(
+ name = "com_github_sean_seed",
+ importpath = "github.com/sean-/seed",
+ sum = "h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I=",
+ version = "v0.0.0-20170313163322-e2103e2c3529",
+ )
+ go_repository(
+ name = "com_github_sergi_go_diff",
+ importpath = "github.com/sergi/go-diff",
+ sum = "h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=",
+ version = "v1.1.0",
+ )
+ go_repository(
+ name = "com_github_shopify_sarama",
+ importpath = "github.com/Shopify/sarama",
+ sum = "h1:9oksLxC6uxVPHPVYUmq6xhr1BOF/hHobWH2UzO67z1s=",
+ version = "v1.19.0",
+ )
+ go_repository(
+ name = "com_github_shopify_toxiproxy",
+ importpath = "github.com/Shopify/toxiproxy",
+ sum = "h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc=",
+ version = "v2.1.4+incompatible",
+ )
+ go_repository(
+ name = "com_github_shurcool_sanitized_anchor_name",
+ importpath = "github.com/shurcooL/sanitized_anchor_name",
+ sum = "h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_sirupsen_logrus",
+ importpath = "github.com/sirupsen/logrus",
+ sum = "h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I=",
+ version = "v1.6.0",
+ )
+ go_repository(
+ name = "com_github_smartystreets_assertions",
+ importpath = "github.com/smartystreets/assertions",
+ sum = "h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=",
+ version = "v0.0.0-20180927180507-b2de0cb4f26d",
+ )
+ go_repository(
+ name = "com_github_smartystreets_goconvey",
+ importpath = "github.com/smartystreets/goconvey",
+ sum = "h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=",
+ version = "v1.6.4",
+ )
+ go_repository(
+ name = "com_github_soheilhy_cmux",
+ importpath = "github.com/soheilhy/cmux",
+ sum = "h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E=",
+ version = "v0.1.4",
+ )
+ go_repository(
+ name = "com_github_sony_gobreaker",
+ importpath = "github.com/sony/gobreaker",
+ sum = "h1:oMnRNZXX5j85zso6xCPRNPtmAycat+WcoKbklScLDgQ=",
+ version = "v0.4.1",
+ )
+ go_repository(
+ name = "com_github_spf13_cobra",
+ importpath = "github.com/spf13/cobra",
+ sum = "h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8=",
+ version = "v0.0.3",
+ )
+ go_repository(
+ name = "com_github_spf13_pflag",
+ importpath = "github.com/spf13/pflag",
+ sum = "h1:aCvUg6QPl3ibpQUxyLkrEkCHtPqYJL4x9AuhqVqFis4=",
+ version = "v1.0.1",
+ )
+ go_repository(
+ name = "com_github_streadway_amqp",
+ importpath = "github.com/streadway/amqp",
+ sum = "h1:WhxRHzgeVGETMlmVfqhRn8RIeeNoPr2Czh33I4Zdccw=",
+ version = "v0.0.0-20190827072141-edfb9018d271",
+ )
+ go_repository(
+ name = "com_github_streadway_handy",
+ importpath = "github.com/streadway/handy",
+ sum = "h1:AhmOdSHeswKHBjhsLs/7+1voOxT+LLrSk/Nxvk35fug=",
+ version = "v0.0.0-20190108123426-d5acb3125c2a",
+ )
+ go_repository(
+ name = "com_github_stretchr_objx",
+ importpath = "github.com/stretchr/objx",
+ sum = "h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A=",
+ version = "v0.1.1",
+ )
+ go_repository(
+ name = "com_github_stretchr_testify",
+ importpath = "github.com/stretchr/testify",
+ sum = "h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=",
+ version = "v1.7.0",
+ )
+ go_repository(
+ name = "com_github_tmc_grpc_websocket_proxy",
+ importpath = "github.com/tmc/grpc-websocket-proxy",
+ sum = "h1:ndzgwNDnKIqyCvHTXaCqh9KlOWKvBry6nuXMJmonVsE=",
+ version = "v0.0.0-20170815181823-89b8d40f7ca8",
+ )
+ go_repository(
+ name = "com_github_twinproduction_go_color",
+ importpath = "github.com/TwinProduction/go-color",
+ sum = "h1:8n59tqmLmt8jyRsY44RPy2ixPDDw0FcVoAhlYeyz3Jw=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_urfave_cli",
+ importpath = "github.com/urfave/cli",
+ sum = "h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY=",
+ version = "v1.22.1",
+ )
+ go_repository(
+ name = "com_github_vividcortex_gohistogram",
+ importpath = "github.com/VividCortex/gohistogram",
+ sum = "h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE=",
+ version = "v1.0.0",
+ )
+ go_repository(
+ name = "com_github_xanzy_ssh_agent",
+ importpath = "github.com/xanzy/ssh-agent",
+ sum = "h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI=",
+ version = "v0.3.0",
+ )
+ go_repository(
+ name = "com_github_xiang90_probing",
+ importpath = "github.com/xiang90/probing",
+ sum = "h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=",
+ version = "v0.0.0-20190116061207-43a291ad63a2",
+ )
+ go_repository(
+ name = "com_github_yuin_goldmark",
+ importpath = "github.com/yuin/goldmark",
+ sum = "h1:ruQGxdhGHe7FWOJPT0mKs5+pD2Xs1Bm/kdGlHO04FmM=",
+ version = "v1.2.1",
+ )
+ go_repository(
+ name = "com_google_cloud_go",
+ importpath = "cloud.google.com/go",
+ sum = "h1:eOI3/cP2VTU6uZLDYAoic+eyzzB9YyGmJ7eIjl8rOPg=",
+ version = "v0.34.0",
+ )
+ go_repository(
+ name = "com_sourcegraph_sourcegraph_appdash",
+ importpath = "sourcegraph.com/sourcegraph/appdash",
+ sum = "h1:ucqkfpjg9WzSUubAO62csmucvxl4/JeW3F4I4909XkM=",
+ version = "v0.0.0-20190731080439-ebfcffb1b5c0",
+ )
+ go_repository(
+ name = "in_gopkg_alecthomas_kingpin_v2",
+ importpath = "gopkg.in/alecthomas/kingpin.v2",
+ sum = "h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=",
+ version = "v2.2.6",
+ )
+ go_repository(
+ name = "in_gopkg_check_v1",
+ importpath = "gopkg.in/check.v1",
+ sum = "h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=",
+ version = "v1.0.0-20201130134442-10cb98267c6c",
+ )
+ go_repository(
+ name = "in_gopkg_cheggaaa_pb_v1",
+ importpath = "gopkg.in/cheggaaa/pb.v1",
+ sum = "h1:Ev7yu1/f6+d+b3pi5vPdRPc6nNtP1umSfcWiEfRqv6I=",
+ version = "v1.0.25",
+ )
+ go_repository(
+ name = "in_gopkg_errgo_v2",
+ importpath = "gopkg.in/errgo.v2",
+ sum = "h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8=",
+ version = "v2.1.0",
+ )
+ go_repository(
+ name = "in_gopkg_fsnotify_v1",
+ importpath = "gopkg.in/fsnotify.v1",
+ sum = "h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=",
+ version = "v1.4.7",
+ )
+ go_repository(
+ name = "in_gopkg_gcfg_v1",
+ importpath = "gopkg.in/gcfg.v1",
+ sum = "h1:m8OOJ4ccYHnx2f4gQwpno8nAX5OGOh7RLaaz0pj3Ogs=",
+ version = "v1.2.3",
+ )
+ go_repository(
+ name = "in_gopkg_resty_v1",
+ importpath = "gopkg.in/resty.v1",
+ sum = "h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI=",
+ version = "v1.12.0",
+ )
+ go_repository(
+ name = "in_gopkg_tomb_v1",
+ importpath = "gopkg.in/tomb.v1",
+ sum = "h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=",
+ version = "v1.0.0-20141024135613-dd632973f1e7",
+ )
+ go_repository(
+ name = "in_gopkg_warnings_v0",
+ importpath = "gopkg.in/warnings.v0",
+ sum = "h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=",
+ version = "v0.1.2",
+ )
+ go_repository(
+ name = "in_gopkg_yaml_v2",
+ importpath = "gopkg.in/yaml.v2",
+ sum = "h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=",
+ version = "v2.3.0",
+ )
+ go_repository(
+ name = "in_gopkg_yaml_v3",
+ importpath = "gopkg.in/yaml.v3",
+ sum = "h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=",
+ version = "v3.0.0-20200313102051-9f266ea9e77c",
+ )
+ go_repository(
+ name = "io_etcd_go_bbolt",
+ importpath = "go.etcd.io/bbolt",
+ sum = "h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk=",
+ version = "v1.3.3",
+ )
+ go_repository(
+ name = "io_etcd_go_etcd",
+ importpath = "go.etcd.io/etcd",
+ sum = "h1:VcrIfasaLFkyjk6KNlXQSzO+B0fZcnECiDrKJsfxka0=",
+ version = "v0.0.0-20191023171146-3cf2f69b5738",
+ )
+ go_repository(
+ name = "io_k8s_sigs_yaml",
+ importpath = "sigs.k8s.io/yaml",
+ sum = "h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=",
+ version = "v1.1.0",
+ )
+ go_repository(
+ name = "io_opencensus_go",
+ importpath = "go.opencensus.io",
+ sum = "h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs=",
+ version = "v0.22.2",
+ )
+ go_repository(
+ name = "org_golang_google_api",
+ importpath = "google.golang.org/api",
+ sum = "h1:oJra/lMfmtm13/rgY/8i3MzjFWYXvQIAKjQ3HqofMk8=",
+ version = "v0.3.1",
+ )
+ go_repository(
+ name = "org_golang_google_appengine",
+ importpath = "google.golang.org/appengine",
+ sum = "h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508=",
+ version = "v1.4.0",
+ )
+ go_repository(
+ name = "org_golang_google_genproto",
+ importpath = "google.golang.org/genproto",
+ sum = "h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE=",
+ version = "v0.0.0-20190819201941-24fa4b261c55",
+ )
+ go_repository(
+ name = "org_golang_google_grpc",
+ importpath = "google.golang.org/grpc",
+ sum = "h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg=",
+ version = "v1.26.0",
+ )
+ go_repository(
+ name = "org_golang_google_protobuf",
+ importpath = "google.golang.org/protobuf",
+ sum = "h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=",
+ version = "v1.27.1",
+ )
+ go_repository(
+ name = "org_golang_x_crypto",
+ importpath = "golang.org/x/crypto",
+ sum = "h1:7mWr3k41Qtv8XlltBkDkl8LoP3mpSgBW8BUoxtEdbXg=",
+ version = "v0.0.0-20210421170649-83a5a9bb288b",
+ )
+ go_repository(
+ name = "org_golang_x_exp",
+ importpath = "golang.org/x/exp",
+ sum = "h1:c2HOrn5iMezYjSlGPncknSEr/8x5LELb/ilJbXi9DEA=",
+ version = "v0.0.0-20190121172915-509febef88a4",
+ )
+ go_repository(
+ name = "org_golang_x_lint",
+ importpath = "golang.org/x/lint",
+ sum = "h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs=",
+ version = "v0.0.0-20190930215403-16217165b5de",
+ )
+ go_repository(
+ name = "org_golang_x_mod",
+ importpath = "golang.org/x/mod",
+ sum = "h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=",
+ version = "v0.3.0",
+ )
+ go_repository(
+ name = "org_golang_x_net",
+ importpath = "golang.org/x/net",
+ sum = "h1:KrsHThm5nFk34YtATK1LsThyGhGbGe1olrte/HInHvs=",
+ version = "v0.0.0-20210326060303-6b1517762897",
+ )
+ go_repository(
+ name = "org_golang_x_oauth2",
+ importpath = "golang.org/x/oauth2",
+ sum = "h1:Wo7BWFiOk0QRFMLYMqJGFMd9CgUAcGx7V+qEg/h5IBI=",
+ version = "v0.0.0-20190226205417-e64efc72b421",
+ )
+ go_repository(
+ name = "org_golang_x_sync",
+ importpath = "golang.org/x/sync",
+ sum = "h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck=",
+ version = "v0.0.0-20201020160332-67f06af15bc9",
+ )
+ go_repository(
+ name = "org_golang_x_sys",
+ importpath = "golang.org/x/sys",
+ sum = "h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=",
+ version = "v0.0.0-20210510120138-977fb7262007",
+ )
+ go_repository(
+ name = "org_golang_x_term",
+ importpath = "golang.org/x/term",
+ sum = "h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=",
+ version = "v0.0.0-20201126162022-7de9c90e9dd1",
+ )
+ go_repository(
+ name = "org_golang_x_text",
+ importpath = "golang.org/x/text",
+ sum = "h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=",
+ version = "v0.3.3",
+ )
+ go_repository(
+ name = "org_golang_x_time",
+ importpath = "golang.org/x/time",
+ sum = "h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs=",
+ version = "v0.0.0-20191024005414-555d28b269f0",
+ )
+ go_repository(
+ name = "org_golang_x_tools",
+ importpath = "golang.org/x/tools",
+ sum = "h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY=",
+ version = "v0.1.0",
+ )
+ go_repository(
+ name = "org_golang_x_xerrors",
+ importpath = "golang.org/x/xerrors",
+ sum = "h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=",
+ version = "v0.0.0-20200804184101-5ec99f83aff1",
+ )
+ go_repository(
+ name = "org_uber_go_atomic",
+ importpath = "go.uber.org/atomic",
+ sum = "h1:OI5t8sDa1Or+q8AeE+yKeB/SDYioSHAgcVljj9JIETY=",
+ version = "v1.5.0",
+ )
+ go_repository(
+ name = "org_uber_go_multierr",
+ importpath = "go.uber.org/multierr",
+ sum = "h1:sFPn2GLc3poCkfrpIXGhBD2X0CMIo4Q/zSULXrj/+uc=",
+ version = "v1.3.0",
+ )
+ go_repository(
+ name = "org_uber_go_tools",
+ importpath = "go.uber.org/tools",
+ sum = "h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4=",
+ version = "v0.0.0-20190618225709-2cfd321de3ee",
+ )
+ go_repository(
+ name = "org_uber_go_zap",
+ importpath = "go.uber.org/zap",
+ sum = "h1:nR6NoDBgAf67s68NhaXbsojM+2gxp3S1hWkHDl27pVU=",
+ version = "v1.13.0",
+ )
load("@io_bazel_rules_docker//repositories:repositories.bzl", "repositories")
load("@io_bazel_rules_docker//repositories:deps.bzl", "deps")
load("@io_bazel_rules_docker//container:container.bzl", "container_pull")
+
load(
"@io_bazel_rules_docker//go:image.bzl",
_go_image_repos = "repositories",
_rust_image_repos()
container_pull(
name = "io_docker_index_library_debian_stable_slim",
- digest = "sha256:7bb9de2067f4e4e3e2377070e180a05d33a0bc4289c66b9e71504063cf18da15",
- registry = "index.docker.io",
- repository = "library/debian",
- tag = "stable-slim",
- )
\ No newline at end of file
+ digest = "sha256:2c4bb6b7236db0a55ec54ba8845e4031f5db2be957ac61867872bf42e56c4deb",
+ registry = "gcr.io",
+ repository = "distroless/cc-debian10",
+ tag = "latest",
+ )
+ container_pull(
+ name = "ubuntu1604",
+ registry = "l.gcr.io",
+ repository = "google/ubuntu1604",
+ tag = "latest",
+ )
"""
Utilities used by the workspace to load the golang toolchain
"""
-load("//:deps.bzl", "go_dependencies")
+load("//bazel:deps.bzl", "go_dependencies")
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
go_rules_dependencies()
# Used to generate the go dependencies & build files
-
- # gazelle:repository_macro deps.bzl%go_dependencies
go_dependencies()
gazelle_dependencies()
--- /dev/null
+"""
+"""
+
+def images():
+
\ No newline at end of file
--- /dev/null
+#[cfg(not(windows))]\r
+extern crate cc;\r
+\r
+#[cfg(target_env = "msvc")]\r
+extern crate libc;\r
+\r
+extern crate pkg_config;\r
+extern crate walkdir;\r
+\r
+use std::{\r
+ env,\r
+ path::{Path, PathBuf},\r
+};\r
+\r
+static VERSION: &str = "1.0.18";\r
+\r
+fn main() {\r
+ println!("cargo:rerun-if-env-changed=SODIUM_LIB_DIR");\r
+ println!("cargo:rerun-if-env-changed=SODIUM_SHARED");\r
+ println!("cargo:rerun-if-env-changed=SODIUM_USE_PKG_CONFIG");\r
+\r
+ if cfg!(not(windows)) {\r
+ println!("cargo:rerun-if-env-changed=SODIUM_DISABLE_PIE");\r
+ }\r
+\r
+ if env::var("SODIUM_STATIC").is_ok() {\r
+ panic!("SODIUM_STATIC is deprecated. Use SODIUM_SHARED instead.");\r
+ }\r
+\r
+ let lib_dir_isset = env::var("SODIUM_LIB_DIR").is_ok();\r
+ let use_pkg_isset = if cfg!(feature = "use-pkg-config") {\r
+ true\r
+ } else {\r
+ env::var("SODIUM_USE_PKG_CONFIG").is_ok()\r
+ };\r
+ let shared_isset = env::var("SODIUM_SHARED").is_ok();\r
+\r
+ if lib_dir_isset && use_pkg_isset {\r
+ panic!("SODIUM_LIB_DIR is incompatible with SODIUM_USE_PKG_CONFIG. Set the only one env variable");\r
+ }\r
+\r
+ if lib_dir_isset {\r
+ find_libsodium_env();\r
+ } else if use_pkg_isset {\r
+ if shared_isset {\r
+ println!("cargo:warning=SODIUM_SHARED has no effect with SODIUM_USE_PKG_CONFIG");\r
+ }\r
+\r
+ find_libsodium_pkg();\r
+ } else {\r
+ if shared_isset {\r
+ println!(\r
+ "cargo:warning=SODIUM_SHARED has no effect for building libsodium from source"\r
+ );\r
+ }\r
+\r
+ build_libsodium();\r
+ }\r
+}\r
+\r
+/* Must be called when SODIUM_LIB_DIR is set to any value\r
+This function will set `cargo` flags.\r
+*/\r
+fn find_libsodium_env() {\r
+ let lib_dir = env::var("SODIUM_LIB_DIR").unwrap(); // cannot fail\r
+\r
+ println!("cargo:rustc-link-search=native={}", lib_dir);\r
+ let mode = if env::var("SODIUM_SHARED").is_ok() {\r
+ "dylib"\r
+ } else {\r
+ "static"\r
+ };\r
+ let name = if cfg!(target_env = "msvc") {\r
+ "libsodium"\r
+ } else {\r
+ "sodium"\r
+ };\r
+ println!("cargo:rustc-link-lib={}={}", mode, name);\r
+ println!(\r
+ "cargo:warning=Using unknown libsodium version. This crate is tested against \\r
+ {} and may not be fully compatible with other versions.",\r
+ VERSION\r
+ );\r
+}\r
+\r
+/* Must be called when no SODIUM_USE_PKG_CONFIG env var is set\r
+This function will set `cargo` flags.\r
+*/\r
+#[cfg(target_env = "msvc")]\r
+fn find_libsodium_pkg() {\r
+ panic!("SODIUM_USE_PKG_CONFIG is not supported on msvc");\r
+}\r
+\r
+/* Must be called when SODIUM_USE_PKG_CONFIG env var is set\r
+This function will set `cargo` flags.\r
+*/\r
+#[cfg(not(target_env = "msvc"))]\r
+fn find_libsodium_pkg() {\r
+ match pkg_config::Config::new().probe("libsodium") {\r
+ Ok(lib) => {\r
+ if lib.version != VERSION {\r
+ println!(\r
+ "cargo:warning=Using libsodium version {}. This crate is tested against {} \\r
+ and may not be fully compatible with {}.",\r
+ lib.version, VERSION, lib.version\r
+ );\r
+ }\r
+ for lib_dir in &lib.link_paths {\r
+ println!("cargo:lib={}", lib_dir.to_str().unwrap());\r
+ }\r
+ for include_dir in &lib.include_paths {\r
+ println!("cargo:include={}", include_dir.to_str().unwrap());\r
+ }\r
+ }\r
+ Err(e) => {\r
+ panic!(\r
+ "\r
+Failed to run pkg-config:\r
+{:?}\r
+\r
+You can try fixing this by installing pkg-config:\r
+\r
+ # On Ubuntu\r
+ sudo apt install pkg-config\r
+ # On Arch Linux\r
+ sudo pacman -S pkgconf\r
+ # On Fedora\r
+ sudo dnf install pkgconf-pkg-config\r
+\r
+",\r
+ e\r
+ );\r
+ }\r
+ }\r
+}\r
+\r
+#[cfg(windows)]\r
+fn make_libsodium(_: &str, _: &Path, _: &Path) -> PathBuf {\r
+ // We don't build anything on windows, we simply linked to precompiled\r
+ // libs.\r
+ get_lib_dir()\r
+}\r
+\r
+#[cfg(not(windows))]\r
+fn make_libsodium(target: &str, source_dir: &Path, install_dir: &Path) -> PathBuf {\r
+ use std::{fs, process::Command, str};\r
+\r
+ // Decide on CC, CFLAGS and the --host configure argument\r
+ let build_compiler = cc::Build::new().get_compiler();\r
+ let mut compiler = build_compiler.path().to_str().unwrap().to_string();\r
+ let mut cflags = build_compiler.cflags_env().into_string().unwrap();\r
+ let mut host_arg = format!("--host={}", target);\r
+ let mut cross_compiling = target != env::var("HOST").unwrap();\r
+ if target.contains("-ios") {\r
+ // Determine Xcode directory path\r
+ let xcode_select_output = Command::new("xcode-select").arg("-p").output().unwrap();\r
+ if !xcode_select_output.status.success() {\r
+ panic!("Failed to run xcode-select -p");\r
+ }\r
+ let xcode_dir = str::from_utf8(&xcode_select_output.stdout)\r
+ .unwrap()\r
+ .trim()\r
+ .to_string();\r
+\r
+ // Determine SDK directory paths\r
+ let sdk_dir_simulator = Path::new(&xcode_dir)\r
+ .join("Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk")\r
+ .to_str()\r
+ .unwrap()\r
+ .to_string();\r
+ let sdk_dir_ios = Path::new(&xcode_dir)\r
+ .join("Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk")\r
+ .to_str()\r
+ .unwrap()\r
+ .to_string();\r
+\r
+ // Min versions\r
+ let ios_simulator_version_min = "6.0.0";\r
+ let ios_version_min = "6.0.0";\r
+\r
+ // Roughly based on `dist-build/ios.sh` in the libsodium sources\r
+ match &*target {\r
+ "aarch64-apple-ios" => {\r
+ cflags += " -arch arm64";\r
+ cflags += &format!(" -isysroot {}", sdk_dir_ios);\r
+ cflags += &format!(" -mios-version-min={}", ios_version_min);\r
+ cflags += " -fembed-bitcode";\r
+ host_arg = "--host=arm-apple-darwin10".to_string();\r
+ }\r
+ "armv7-apple-ios" => {\r
+ cflags += " -arch armv7";\r
+ cflags += &format!(" -isysroot {}", sdk_dir_ios);\r
+ cflags += &format!(" -mios-version-min={}", ios_version_min);\r
+ cflags += " -mthumb";\r
+ host_arg = "--host=arm-apple-darwin10".to_string();\r
+ }\r
+ "armv7s-apple-ios" => {\r
+ cflags += " -arch armv7s";\r
+ cflags += &format!(" -isysroot {}", sdk_dir_ios);\r
+ cflags += &format!(" -mios-version-min={}", ios_version_min);\r
+ cflags += " -mthumb";\r
+ host_arg = "--host=arm-apple-darwin10".to_string();\r
+ }\r
+ "i386-apple-ios" => {\r
+ cflags += " -arch i386";\r
+ cflags += &format!(" -isysroot {}", sdk_dir_simulator);\r
+ cflags += &format!(" -mios-simulator-version-min={}", ios_simulator_version_min);\r
+ host_arg = "--host=i686-apple-darwin10".to_string();\r
+ }\r
+ "x86_64-apple-ios" => {\r
+ cflags += " -arch x86_64";\r
+ cflags += &format!(" -isysroot {}", sdk_dir_simulator);\r
+ cflags += &format!(" -mios-simulator-version-min={}", ios_simulator_version_min);\r
+ host_arg = "--host=x86_64-apple-darwin10".to_string();\r
+ }\r
+ _ => panic!("Unknown iOS build target: {}", target),\r
+ }\r
+ cross_compiling = true;\r
+ } else if target.contains("i686") {\r
+ compiler += " -m32 -maes";\r
+ cflags += " -march=i686";\r
+ }\r
+\r
+ let help = if cross_compiling {\r
+ "***********************************************************\n\\r
+ Possible missing dependencies.\n\\r
+ See https://github.com/sodiumoxide/sodiumoxide#cross-compiling\n\\r
+ ***********************************************************\n\n"\r
+ } else {\r
+ ""\r
+ };\r
+\r
+ // Run `./configure`\r
+ let prefix_arg = format!("--prefix={}", install_dir.to_str().unwrap());\r
+ let libdir_arg = format!("--libdir={}/lib", install_dir.to_str().unwrap());\r
+ let mut configure_cmd = Command::new(fs::canonicalize(source_dir.join("configure")).expect("Failed to find configure script! Did you clone the submodule at `libsodium-sys/libsodium`?"));\r
+ if !compiler.is_empty() {\r
+ configure_cmd.env("CC", &compiler);\r
+ }\r
+ if !cflags.is_empty() {\r
+ configure_cmd.env("CFLAGS", &cflags);\r
+ }\r
+ if env::var("SODIUM_DISABLE_PIE").is_ok() {\r
+ configure_cmd.arg("--disable-pie");\r
+ }\r
+ let configure_status = configure_cmd\r
+ .current_dir(&source_dir)\r
+ .arg(&prefix_arg)\r
+ .arg(&libdir_arg)\r
+ .arg(&host_arg)\r
+ .arg("--enable-shared=no")\r
+ .status()\r
+ .unwrap_or_else(|error| {\r
+ panic!("Failed to run './configure': {}\n{}", error, help);\r
+ });\r
+ if !configure_status.success() {\r
+ panic!(\r
+ "\nFailed to configure libsodium using {:?}\nCFLAGS={}\nCC={}\n{}\n",\r
+ configure_cmd, cflags, compiler, help\r
+ );\r
+ }\r
+\r
+ // Run `make check`, or `make all` if we're cross-compiling\r
+ let j_arg = format!("-j{}", env::var("NUM_JOBS").unwrap());\r
+ let make_arg = if cross_compiling { "all" } else { "check" };\r
+ let mut make_cmd = Command::new("make");\r
+ let make_status = make_cmd\r
+ .current_dir(&source_dir)\r
+ .env("V", "1")\r
+ .arg(make_arg)\r
+ .arg(&j_arg)\r
+ .status()\r
+ .unwrap_or_else(|error| {\r
+ panic!("Failed to run 'make {}': {}\n{}", make_arg, error, help);\r
+ });\r
+ if !make_status.success() {\r
+ panic!("\nFailed to build libsodium using {:?}\n{}", make_cmd, help);\r
+ }\r
+\r
+ // Run `make install`\r
+ let mut install_cmd = Command::new("make");\r
+ let install_status = install_cmd\r
+ .current_dir(&source_dir)\r
+ .arg("install")\r
+ .status()\r
+ .unwrap_or_else(|error| {\r
+ panic!("Failed to run 'make install': {}", error);\r
+ });\r
+ if !install_status.success() {\r
+ panic!("\nFailed to install libsodium using {:?}", install_cmd);\r
+ }\r
+\r
+ install_dir.join("lib")\r
+}\r
+\r
+#[cfg(any(windows, target_env = "msvc"))]\r
+fn get_crate_dir() -> PathBuf {\r
+ env::var("CARGO_MANIFEST_DIR").unwrap().into()\r
+}\r
+\r
+#[cfg(target_env = "msvc")]\r
+fn is_release_profile() -> bool {\r
+ env::var("PROFILE").unwrap() == "release"\r
+}\r
+\r
+#[cfg(all(target_env = "msvc", target_pointer_width = "32"))]\r
+fn get_lib_dir() -> PathBuf {\r
+ if is_release_profile() {\r
+ get_crate_dir().join("msvc/Win32/Release/v142/")\r
+ } else {\r
+ get_crate_dir().join("msvc/Win32/Debug/v142/")\r
+ }\r
+}\r
+\r
+#[cfg(all(target_env = "msvc", target_pointer_width = "64"))]\r
+fn get_lib_dir() -> PathBuf {\r
+ if is_release_profile() {\r
+ get_crate_dir().join("msvc/x64/Release/v142/")\r
+ } else {\r
+ get_crate_dir().join("msvc/x64/Debug/v142/")\r
+ }\r
+}\r
+\r
+#[cfg(all(windows, not(target_env = "msvc"), target_pointer_width = "32"))]\r
+fn get_lib_dir() -> PathBuf {\r
+ get_crate_dir().join("mingw/win32/")\r
+}\r
+\r
+#[cfg(all(windows, not(target_env = "msvc"), target_pointer_width = "64"))]\r
+fn get_lib_dir() -> PathBuf {\r
+ get_crate_dir().join("mingw/win64/")\r
+}\r
+\r
+fn build_libsodium() {\r
+ use std::{ffi::OsStr, fs};\r
+\r
+ // Determine build target triple\r
+ let mut out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());\r
+ let target = env::var("TARGET").unwrap();\r
+ let profile = env::var("PROFILE").unwrap();\r
+\r
+ // Avoid issues with paths containing spaces by falling back to using a tempfile.\r
+ // See https://github.com/jedisct1/libsodium/issues/207\r
+ if out_dir.to_str().unwrap().contains(' ') {\r
+ out_dir = env::temp_dir()\r
+ .join("libsodium-sys")\r
+ .join(&target)\r
+ .join(&profile);\r
+ println!(\r
+ "cargo:warning=The path to the usual build directory contains spaces and hence \\r
+ can't be used to build libsodium. Falling back to use {}. If running `cargo \\r
+ clean`, ensure you also delete this fallback directory",\r
+ out_dir.display()\r
+ );\r
+ }\r
+\r
+ // Determine source and install dir\r
+ let install_dir = out_dir.join("installed");\r
+ let source_dir = out_dir.join("source").join("libsodium");\r
+\r
+ // Create directories\r
+ fs::create_dir_all(&install_dir).unwrap();\r
+ fs::create_dir_all(&source_dir).unwrap();\r
+\r
+ let paths = std::fs::read_dir("./libsodium").unwrap();\r
+\r
+ for path in paths {\r
+ println!("Name: {}", path.unwrap().path().display())\r
+ }\r
+\r
+ if !target.contains("msvc") {\r
+ // Copy sources into build directory\r
+ // Skip .git because it's marked read-only and that causes problems re-building\r
+ for entry in walkdir::WalkDir::new("libsodium")\r
+ .into_iter()\r
+ .filter_entry(|e| e.file_name() != OsStr::new(".git"))\r
+ .filter_map(Result::ok)\r
+ {\r
+ let outpath = out_dir.join("source").join(entry.path());\r
+ if let Err(e) = if entry.file_type().is_dir() {\r
+ fs::create_dir_all(outpath)\r
+ } else {\r
+ fs::copy(entry.path(), outpath).map(|_| ())\r
+ } {\r
+ panic!("Failed to copy sources into build directory: {}", e);\r
+ }\r
+ }\r
+ }\r
+\r
+ let lib_dir = make_libsodium(&target, &source_dir, &install_dir);\r
+\r
+ if target.contains("msvc") {\r
+ println!("cargo:rustc-link-lib=static=libsodium");\r
+ } else {\r
+ println!("cargo:rustc-link-lib=static=sodium");\r
+ }\r
+\r
+ println!(\r
+ "cargo:rustc-link-search=native={}",\r
+ lib_dir.to_str().unwrap()\r
+ );\r
+\r
+ let include_dir = source_dir.join("src/libsodium/include");\r
+\r
+ println!("cargo:include={}", include_dir.to_str().unwrap());\r
+ println!("cargo:lib={}", lib_dir.to_str().unwrap());\r
+}\r
crate_root = "src/lib.rs",
crate_type = "lib",
data = [],
+ compile_data = glob(["*/**"]),
edition = "2015",
rustc_flags = [
"--cap-lints=allow",
-package commands
-
-// GatewayCommandHeartbeat is used to maintain an active gateway connection.
-// Must be sent every heartbeat_interval milliseconds after the Opcode 10 Hello payload is received.
-// The inner d key is the last sequence number—s—received by the client. If you have not yet received one, send null.
-type GatewayCommandHeartbeat int
+package commands\r
+\r
+// GatewayCommandHeartbeat is used to maintain an active gateway connection.\r
+// Must be sent every heartbeat_interval milliseconds after the Opcode 10 Hello payload is received.\r
+// The inner d key is the last sequence number—s—received by the client. If you have not yet received one, send null.\r
+type GatewayCommandHeartbeat int\r
-package commands
-
-import (
- "github.com/discordnova/nova/common/discord/types/structures"
- "github.com/discordnova/nova/common/discord/types/types"
-)
-
-// GatewayCommandIdentifyPayload is used to trigger the initial handshake with the gateway.
-type GatewayCommandIdentifyPayload struct {
- // authentication token
- Token string `json:"token"`
- // connection properties
- Properties structures.IdentifyConnectionProperties `json:"properties"`
- // whether this connection supports compression of packets
- // Default to false
- Compress bool `json:"compress,omitempty"`
- // value between 50 and 250, total number of members where the gateway will stop sending offline members in the
- // guild member list
- // Default to 50
- LargeThreshold int `json:"large_threshold,omitempty"`
- // used for Guild Sharding. array of two integers (shard_id, num_shards)
- Shard []int `json:"shard,omitempty"`
- // presence structure for initial presence information
- Presence GatewayCommandUpdateStatusPayload `json:"presence,omitempty"`
- // enables dispatching of guild subscription events (presence and typing events)
- // Default to true
- GuildSubscriptions bool `json:"guild_subscriptions,omitempty"`
- // the Gateway Intents you wish to receive
- Intents types.GatewayIntents `json:"intents"`
-}
+package commands\r
+\r
+import (\r
+ "github.com/discordnova/nova/common/discord/types/structures"\r
+ "github.com/discordnova/nova/common/discord/types/types"\r
+)\r
+\r
+// GatewayCommandIdentifyPayload is used to trigger the initial handshake with the gateway.\r
+type GatewayCommandIdentifyPayload struct {\r
+ // authentication token\r
+ Token string `json:"token"`\r
+ // connection properties\r
+ Properties structures.IdentifyConnectionProperties `json:"properties"`\r
+ // whether this connection supports compression of packets\r
+ // Default to false\r
+ Compress bool `json:"compress,omitempty"`\r
+ // value between 50 and 250, total number of members where the gateway will stop sending offline members in the\r
+ // guild member list\r
+ // Default to 50\r
+ LargeThreshold int `json:"large_threshold,omitempty"`\r
+ // used for Guild Sharding. array of two integers (shard_id, num_shards)\r
+ Shard []int `json:"shard,omitempty"`\r
+ // presence structure for initial presence information\r
+ Presence GatewayCommandUpdateStatusPayload `json:"presence,omitempty"`\r
+ // enables dispatching of guild subscription events (presence and typing events)\r
+ // Default to true\r
+ GuildSubscriptions bool `json:"guild_subscriptions,omitempty"`\r
+ // the Gateway Intents you wish to receive\r
+ Intents types.GatewayIntents `json:"intents"`\r
+}\r
-package commands
-
-// GatewayCommandRequestGuildMembersPayload is used o request all members for a guild or a list of guilds.
-// When initially connecting,the gateway will only send offline members if a guild has less than the large_threshold
-// members (value in the Gateway Identify).
-// If a client wishes to receive additional members, they need to explicitly request them via this operation.
-// The server will send Guild Members Chunk events in response with up to 1000 members per chunk until all members
-// that match the request have been sent.
-// Due to our privacy and infrastructural concerns with this feature, there are some limitations that apply:
-// GUILD_PRESENCES intent is required to set presences = true. Otherwise, it will always be false
-// GUILD_MEMBERS intent is required to request the entire member list—(query=‘’, limit=0<=n)
-// You will be limited to requesting 1 guild_id per request
-// Requesting a prefix (query parameter) will return a maximum of 100 members
-// Requesting user_ids will continue to be limited to returning 100 members
-type GatewayCommandRequestGuildMembersPayload struct {
- // id of the guild to get members for
- // Required: true
- GuildID string `json:"guild_id"`
- // string that username starts with, or an empty string to return all members
- // Required: one of query or user_ids
- Query string `json:"query,omitempty"`
- // maximum number of members to send matching the query; a limit of 0 can be used with an empty string query to return
- // all members
- // Required: true when specifying query
- Limit int `json:"limit,omitempty"`
- // used to specify if we want the presences of the matched members
- // Required: false
- Presences bool `json:"presences,omitempty"`
- // used to specify which users you wish to fetch
- // Required: one of query or user_ids
- UserIDs string `json:"user_ids,omitempty"`
- // nonce to identify the Guild Members Chunk response
- // Required: false
- Nonce string `json:"nonce,omitempty"`
-}
+package commands\r
+\r
+// GatewayCommandRequestGuildMembersPayload is used o request all members for a guild or a list of guilds.\r
+// When initially connecting,the gateway will only send offline members if a guild has less than the large_threshold\r
+// members (value in the Gateway Identify).\r
+// If a client wishes to receive additional members, they need to explicitly request them via this operation.\r
+// The server will send Guild Members Chunk events in response with up to 1000 members per chunk until all members\r
+// that match the request have been sent.\r
+// Due to our privacy and infrastructural concerns with this feature, there are some limitations that apply:\r
+// GUILD_PRESENCES intent is required to set presences = true. Otherwise, it will always be false\r
+// GUILD_MEMBERS intent is required to request the entire member list—(query=‘’, limit=0<=n)\r
+// You will be limited to requesting 1 guild_id per request\r
+// Requesting a prefix (query parameter) will return a maximum of 100 members\r
+// Requesting user_ids will continue to be limited to returning 100 members\r
+type GatewayCommandRequestGuildMembersPayload struct {\r
+ // id of the guild to get members for\r
+ // Required: true\r
+ GuildID string `json:"guild_id"`\r
+ // string that username starts with, or an empty string to return all members\r
+ // Required: one of query or user_ids\r
+ Query string `json:"query,omitempty"`\r
+ // maximum number of members to send matching the query; a limit of 0 can be used with an empty string query to return\r
+ // all members\r
+ // Required: true when specifying query\r
+ Limit int `json:"limit,omitempty"`\r
+ // used to specify if we want the presences of the matched members\r
+ // Required: false\r
+ Presences bool `json:"presences,omitempty"`\r
+ // used to specify which users you wish to fetch\r
+ // Required: one of query or user_ids\r
+ UserIDs string `json:"user_ids,omitempty"`\r
+ // nonce to identify the Guild Members Chunk response\r
+ // Required: false\r
+ Nonce string `json:"nonce,omitempty"`\r
+}\r
-package commands
-
-// GatewayCommandResumePayload is used to replay missed events when a disconnected client resumes
-type GatewayCommandResumePayload struct {
- // session token
- Token string `json:"token"`
- // session id
- SessionID string `json:"session_id"`
- // last sequence number received
- Seq int64 `json:"seq"`
-}
+package commands\r
+\r
+// GatewayCommandResumePayload is used to replay missed events when a disconnected client resumes\r
+type GatewayCommandResumePayload struct {\r
+ // session token\r
+ Token string `json:"token"`\r
+ // session id\r
+ SessionID string `json:"session_id"`\r
+ // last sequence number received\r
+ Seq int64 `json:"seq"`\r
+}\r
-package commands
-
-import (
- "github.com/discordnova/nova/common/discord/types/structures"
- "github.com/discordnova/nova/common/discord/types/types"
-)
-
-// GatewayCommandUpdateStatusPayload is sent by the client to indicate a presence or status update.
-type GatewayCommandUpdateStatusPayload struct {
- // unix time (in milliseconds) of when the client went idle, or null if the client is not idle
- Since int `json:"since,omitempty"`
- // null, or the user's activities
- Activities []structures.Activity `json:"activities,omitempty"`
- // the user's new status
- Status types.UpdateStatusStatuses `json:"status"`
- // whether or not the client is afk
- AFK bool `json:"afk"`
-}
+package commands\r
+\r
+import (\r
+ "github.com/discordnova/nova/common/discord/types/structures"\r
+ "github.com/discordnova/nova/common/discord/types/types"\r
+)\r
+\r
+// GatewayCommandUpdateStatusPayload is sent by the client to indicate a presence or status update.\r
+type GatewayCommandUpdateStatusPayload struct {\r
+ // unix time (in milliseconds) of when the client went idle, or null if the client is not idle\r
+ Since int `json:"since,omitempty"`\r
+ // null, or the user's activities\r
+ Activities []structures.Activity `json:"activities,omitempty"`\r
+ // the user's new status\r
+ Status types.UpdateStatusStatuses `json:"status"`\r
+ // whether or not the client is afk\r
+ AFK bool `json:"afk"`\r
+}\r
-package commands
-
-// GatewayCommandUpdateVoiceStatePayload is sent when a client wants to join, move, or disconnect from a voice channel.
-type GatewayCommandUpdateVoiceStatePayload struct {
- // id of the guild
- GuildID string `json:"guild_id"`
- // id of the voice channel client wants to join (null if disconnecting)
- ChannelID string `json:"channel_id,omitempty"`
- // is the client muted
- SelfMute bool `json:"self_mute"`
- // is the client deafened
- SelfDeaf bool `json:"self_deaf"`
-}
+package commands\r
+\r
+// GatewayCommandUpdateVoiceStatePayload is sent when a client wants to join, move, or disconnect from a voice channel.\r
+type GatewayCommandUpdateVoiceStatePayload struct {\r
+ // id of the guild\r
+ GuildID string `json:"guild_id"`\r
+ // id of the voice channel client wants to join (null if disconnecting)\r
+ ChannelID string `json:"channel_id,omitempty"`\r
+ // is the client muted\r
+ SelfMute bool `json:"self_mute"`\r
+ // is the client deafened\r
+ SelfDeaf bool `json:"self_deaf"`\r
+}\r
-package events
-
-import "github.com/discordnova/nova/common/discord/types/structures"
-
-// GatewayEventChannelCreatePayload is sent when a new guild channel is created, relevant to the current user.
-// The inner payload is a channel object.
-type GatewayEventChannelCreatePayload structures.Channel
+package events\r
+\r
+import "github.com/discordnova/nova/common/discord/types/structures"\r
+\r
+// GatewayEventChannelCreatePayload is sent when a new guild channel is created, relevant to the current user.\r
+// The inner payload is a channel object.\r
+type GatewayEventChannelCreatePayload structures.Channel\r
-package events
-
-import "github.com/discordnova/nova/common/discord/types/structures"
-
-// GatewayEventChannelDeletePayload is sent when a channel relevant to the current user is deleted.
-// The inner payload is a channel object.
-type GatewayEventChannelDeletePayload structures.Channel
+package events\r
+\r
+import "github.com/discordnova/nova/common/discord/types/structures"\r
+\r
+// GatewayEventChannelDeletePayload is sent when a channel relevant to the current user is deleted.\r
+// The inner payload is a channel object.\r
+type GatewayEventChannelDeletePayload structures.Channel\r
-package events
-
-// GatewayEventChannelPinsUpdatePayload is sent when a message is pinned or unpinned in a text channel.
-// This is not sent when a pinned message is deleted.
-type GatewayEventChannelPinsUpdatePayload struct {
- // the id of the guild
- GuildID string `json:"guild_id,omitempty"`
- // the id of the channel
- ChannelID string `json:"channel_id"`
- // the time at which the most recent pinned message was pinned
- LastPinTimestamp string `json:"last_pin_timestamp,omitempty"`
-}
+package events\r
+\r
+// GatewayEventChannelPinsUpdatePayload is sent when a message is pinned or unpinned in a text channel.\r
+// This is not sent when a pinned message is deleted.\r
+type GatewayEventChannelPinsUpdatePayload struct {\r
+ // the id of the guild\r
+ GuildID string `json:"guild_id,omitempty"`\r
+ // the id of the channel\r
+ ChannelID string `json:"channel_id"`\r
+ // the time at which the most recent pinned message was pinned\r
+ LastPinTimestamp string `json:"last_pin_timestamp,omitempty"`\r
+}\r
-package events
-
-import "github.com/discordnova/nova/common/discord/types/structures"
-
-// GatewayEventChannelUpdatePayload is sent when a channel is updated. The inner payload is a channel object.
-// This is not sent when the field last_message_id is altered.
-// To keep track of the last_message_id changes, we should listen for Message Create events.
-type GatewayEventChannelUpdatePayload structures.Channel
+package events\r
+\r
+import "github.com/discordnova/nova/common/discord/types/structures"\r
+\r
+// GatewayEventChannelUpdatePayload is sent when a channel is updated. The inner payload is a channel object.\r
+// This is not sent when the field last_message_id is altered.\r
+// To keep track of the last_message_id changes, we should listen for Message Create events.\r
+type GatewayEventChannelUpdatePayload structures.Channel\r
-package events
-
-import "github.com/discordnova/nova/common/discord/types/structures"
-
-// GatewayEventGuildBanAddPayload is sent when a user is banned from a guild.
-type GatewayEventGuildBanAddPayload struct {
- // id of the guild
- GuildID string `json:"guild_id"`
- // the banned user
- User structures.User `json:"user"`
-}
+package events\r
+\r
+import "github.com/discordnova/nova/common/discord/types/structures"\r
+\r
+// GatewayEventGuildBanAddPayload is sent when a user is banned from a guild.\r
+type GatewayEventGuildBanAddPayload struct {\r
+ // id of the guild\r
+ GuildID string `json:"guild_id"`\r
+ // the banned user\r
+ User structures.User `json:"user"`\r
+}\r
-package events
-
-import "github.com/discordnova/nova/common/discord/types/structures"
-
-// GatewayEventGuildBanRemovePayload is sent when a user is unbanned from a guild.
-type GatewayEventGuildBanRemovePayload struct {
- // id of the guild
- GuildID string `json:"guild_id"`
- // the unbanned user
- User structures.User `json:"user"`
-}
+package events\r
+\r
+import "github.com/discordnova/nova/common/discord/types/structures"\r
+\r
+// GatewayEventGuildBanRemovePayload is sent when a user is unbanned from a guild.\r
+type GatewayEventGuildBanRemovePayload struct {\r
+ // id of the guild\r
+ GuildID string `json:"guild_id"`\r
+ // the unbanned user\r
+ User structures.User `json:"user"`\r
+}\r
-package events
-
-import "github.com/discordnova/nova/common/discord/types/structures"
-
-// GatewayEventGuildCreatePayload can be sent in three different scenarios:
-// When a user is initially connecting,
-// to lazily load and back fill information for all unavailable guilds sent in the Ready event.
-// Guilds that are unavailable due to an outage will send a Guild Delete event.
-// When a Guild becomes available again to the client.
-// When the current user joins a new Guild.
-// The inner payload is a guild object, with all the extra fields specified. (Nothing on the doc)
-type GatewayEventGuildCreatePayload structures.Guild
+package events\r
+\r
+import "github.com/discordnova/nova/common/discord/types/structures"\r
+\r
+// GatewayEventGuildCreatePayload can be sent in three different scenarios:\r
+// When a user is initially connecting,\r
+// to lazily load and back fill information for all unavailable guilds sent in the Ready event.\r
+// Guilds that are unavailable due to an outage will send a Guild Delete event.\r
+// When a Guild becomes available again to the client.\r
+// When the current user joins a new Guild.\r
+// The inner payload is a guild object, with all the extra fields specified. (Nothing on the doc)\r
+type GatewayEventGuildCreatePayload structures.Guild\r
-package events
-
-import "github.com/discordnova/nova/common/discord/types/structures"
-
-// GatewayEventGuildDeletePayload is sent when a guild becomes or was already unavailable due to an outage,
-// or when the user leaves or is removed from a guild.
-// The inner payload is an unavailable guild object.
-// If the unavailable field is not set, the user was removed from the guild.
-type GatewayEventGuildDeletePayload structures.Guild
+package events\r
+\r
+import "github.com/discordnova/nova/common/discord/types/structures"\r
+\r
+// GatewayEventGuildDeletePayload is sent when a guild becomes or was already unavailable due to an outage,\r
+// or when the user leaves or is removed from a guild.\r
+// The inner payload is an unavailable guild object.\r
+// If the unavailable field is not set, the user was removed from the guild.\r
+type GatewayEventGuildDeletePayload structures.Guild\r
-package events
-
-import "github.com/discordnova/nova/common/discord/types/structures"
-
-// GatewayEventGuildEmojisUpdatePayload is sent when when a guild's emojis have been updated.
-type GatewayEventGuildEmojisUpdatePayload struct {
- // id of the guild
- GuildID string `json:"guild_id"`
- // array of emojis
- Emojis []structures.Emoji `json:"emojis"`
-}
+package events\r
+\r
+import "github.com/discordnova/nova/common/discord/types/structures"\r
+\r
+// GatewayEventGuildEmojisUpdatePayload is sent when when a guild's emojis have been updated.\r
+type GatewayEventGuildEmojisUpdatePayload struct {\r
+ // id of the guild\r
+ GuildID string `json:"guild_id"`\r
+ // array of emojis\r
+ Emojis []structures.Emoji `json:"emojis"`\r
+}\r
-package events
-
-// GatewayEventGuildIntegrationsUpdatePayload is sent when a guild integration is updated.
-type GatewayEventGuildIntegrationsUpdatePayload struct {
- // id of the guild whose integrations were updated
- GuildID string `json:"guild_id"`
-}
+package events\r
+\r
+// GatewayEventGuildIntegrationsUpdatePayload is sent when a guild integration is updated.\r
+type GatewayEventGuildIntegrationsUpdatePayload struct {\r
+ // id of the guild whose integrations were updated\r
+ GuildID string `json:"guild_id"`\r
+}\r
-package events
-
-import "github.com/discordnova/nova/common/discord/types/structures"
-
-// GatewayEventGuildMemberAddPayload is sent when a new user joins a guild.
-// The inner payload is a guild member object with an extra guild_id key
-// If using Gateway Intents, the GUILD_MEMBERS intent will be required to receive this event.
-type GatewayEventGuildMemberAddPayload struct {
- structures.GuildMember
- // id of the guild
- GuildID string `json:"guild_id"`
-}
+package events\r
+\r
+import "github.com/discordnova/nova/common/discord/types/structures"\r
+\r
+// GatewayEventGuildMemberAddPayload is sent when a new user joins a guild.\r
+// The inner payload is a guild member object with an extra guild_id key\r
+// If using Gateway Intents, the GUILD_MEMBERS intent will be required to receive this event.\r
+type GatewayEventGuildMemberAddPayload struct {\r
+ structures.GuildMember\r
+ // id of the guild\r
+ GuildID string `json:"guild_id"`\r
+}\r
-package events
-
-import "github.com/discordnova/nova/common/discord/types/structures"
-
-// GatewayEventGuildMemberRemovePayload is sent when a user is removed from a guild (leave/kick/ban).
-// If using Gateway Intents, the GUILD_MEMBERS intent will be required to receive this event.
-type GatewayEventGuildMemberRemovePayload struct {
- // the id of the guild
- GuildID string `json:"guild_id"`
- // the user who was removed
- User structures.User `json:"user"`
-}
+package events\r
+\r
+import "github.com/discordnova/nova/common/discord/types/structures"\r
+\r
+// GatewayEventGuildMemberRemovePayload is sent when a user is removed from a guild (leave/kick/ban).\r
+// If using Gateway Intents, the GUILD_MEMBERS intent will be required to receive this event.\r
+type GatewayEventGuildMemberRemovePayload struct {\r
+ // the id of the guild\r
+ GuildID string `json:"guild_id"`\r
+ // the user who was removed\r
+ User structures.User `json:"user"`\r
+}\r
-package events
-
-import "github.com/discordnova/nova/common/discord/types/structures"
-
-// GatewayEventGuildMemberUpdatePayload is sent when a guild member is updated.
-// This will also fire when the user object of a guild member changes.
-// If using Gateway Intents, the GUILD_MEMBERS intent will be required to receive this event.
-type GatewayEventGuildMemberUpdatePayload struct {
- // the id of the guild
- GuildID string `json:"guild_id"`
- // user role ids
- Roles []string `json:"roles"`
- // the user
- User structures.User `json:"user"`
- // nickname of the user in the guild
- Nick string `json:"nick,omitempty"`
- // when the user joined the guild
- JoinedAt string `json:"joined_at"`
- // when the user starting boosting the guild
- PremiumSince string `json:"premium_since,omitempty"`
- // whether the user has not yet passed the guild's Membership Screening requirements
- Pending bool `json:"pending"`
-}
+package events\r
+\r
+import "github.com/discordnova/nova/common/discord/types/structures"\r
+\r
+// GatewayEventGuildMemberUpdatePayload is sent when a guild member is updated.\r
+// This will also fire when the user object of a guild member changes.\r
+// If using Gateway Intents, the GUILD_MEMBERS intent will be required to receive this event.\r
+type GatewayEventGuildMemberUpdatePayload struct {\r
+ // the id of the guild\r
+ GuildID string `json:"guild_id"`\r
+ // user role ids\r
+ Roles []string `json:"roles"`\r
+ // the user\r
+ User structures.User `json:"user"`\r
+ // nickname of the user in the guild\r
+ Nick string `json:"nick,omitempty"`\r
+ // when the user joined the guild\r
+ JoinedAt string `json:"joined_at"`\r
+ // when the user starting boosting the guild\r
+ PremiumSince string `json:"premium_since,omitempty"`\r
+ // whether the user has not yet passed the guild's Membership Screening requirements\r
+ Pending bool `json:"pending"`\r
+}\r
-package events
-
-import "github.com/discordnova/nova/common/discord/types/structures"
-
-// GatewayEventGuildMembersChunkPayload is sent in response to Guild Request Members.
-// You can use the chunk_index and chunk_count to calculate how many chunks are left for your request.
-type GatewayEventGuildMembersChunkPayload struct {
- // the id of the guild
- GuildID string `json:"guild_id"`
- // set of guild members
- Members []structures.GuildMember `json:"members"`
- // the chunk index in the expected chunks for this response (0 <= chunk_index < chunk_count)
- ChunkIndex int `json:"chunk_index"`
- // the total number of expected chunks for this response
- ChunkCount int `json:"chunk_count"`
- // if passing an invalid id to REQUEST_GUILD_MEMBERS, it will be returned here
- NotFound []string `json:"not_found,omitempty"`
- // if passing true to REQUEST_GUILD_MEMBERS, presences of the returned members will be here
- Presences []structures.Presence `json:"presences"`
- // the nonce used in the Guild Members Request
- Nonce string `json:"nonce"`
-}
+package events\r
+\r
+import "github.com/discordnova/nova/common/discord/types/structures"\r
+\r
+// GatewayEventGuildMembersChunkPayload is sent in response to Guild Request Members.\r
+// You can use the chunk_index and chunk_count to calculate how many chunks are left for your request.\r
+type GatewayEventGuildMembersChunkPayload struct {\r
+ // the id of the guild\r
+ GuildID string `json:"guild_id"`\r
+ // set of guild members\r
+ Members []structures.GuildMember `json:"members"`\r
+ // the chunk index in the expected chunks for this response (0 <= chunk_index < chunk_count)\r
+ ChunkIndex int `json:"chunk_index"`\r
+ // the total number of expected chunks for this response\r
+ ChunkCount int `json:"chunk_count"`\r
+ // if passing an invalid id to REQUEST_GUILD_MEMBERS, it will be returned here\r
+ NotFound []string `json:"not_found,omitempty"`\r
+ // if passing true to REQUEST_GUILD_MEMBERS, presences of the returned members will be here\r
+ Presences []structures.Presence `json:"presences"`\r
+ // the nonce used in the Guild Members Request\r
+ Nonce string `json:"nonce"`\r
+}\r
-package events
-
-import "github.com/discordnova/nova/common/discord/types/structures"
-
-// GatewayEventGuildRoleCreatePayload is sent when a guild role is created.
-type GatewayEventGuildRoleCreatePayload struct {
- // the id of the guild
- GuildID string `json:"guild_id"`
- // the role created
- Role structures.Role `json:"role"`
-}
+package events\r
+\r
+import "github.com/discordnova/nova/common/discord/types/structures"\r
+\r
+// GatewayEventGuildRoleCreatePayload is sent when a guild role is created.\r
+type GatewayEventGuildRoleCreatePayload struct {\r
+ // the id of the guild\r
+ GuildID string `json:"guild_id"`\r
+ // the role created\r
+ Role structures.Role `json:"role"`\r
+}\r
-package events
-
-// GatewayEventGuildRoleDeletePayload is sent when a guild role is updated.
-type GatewayEventGuildRoleDeletePayload struct {
- // the id of the guild
- GuildID string `json:"guild_id"`
- // id of the role
- RoleID string `json:"role_id"`
-}
+package events\r
+\r
+// GatewayEventGuildRoleDeletePayload is sent when a guild role is updated.\r
+type GatewayEventGuildRoleDeletePayload struct {\r
+ // the id of the guild\r
+ GuildID string `json:"guild_id"`\r
+ // id of the role\r
+ RoleID string `json:"role_id"`\r
+}\r
-package events
-
-import "github.com/discordnova/nova/common/discord/types/structures"
-
-// GatewayEventGuildRoleUpdatePayload is sent when a guild role is updated.
-type GatewayEventGuildRoleUpdatePayload struct {
- // the id of the guild
- GuildID string `json:"guild_id"`
- // the role updated
- Role structures.Role `json:"role"`
-}
+package events\r
+\r
+import "github.com/discordnova/nova/common/discord/types/structures"\r
+\r
+// GatewayEventGuildRoleUpdatePayload is sent when a guild role is updated.\r
+type GatewayEventGuildRoleUpdatePayload struct {\r
+ // the id of the guild\r
+ GuildID string `json:"guild_id"`\r
+ // the role updated\r
+ Role structures.Role `json:"role"`\r
+}\r
-package events
-
-import "github.com/discordnova/nova/common/discord/types/structures"
-
-// GatewayEventGuildUpdatePayload is sent when a guild is updated. The inner payload is a guild object.
-type GatewayEventGuildUpdatePayload structures.Guild
+package events\r
+\r
+import "github.com/discordnova/nova/common/discord/types/structures"\r
+\r
+// GatewayEventGuildUpdatePayload is sent when a guild is updated. The inner payload is a guild object.\r
+type GatewayEventGuildUpdatePayload structures.Guild\r
-package events
-
-// GatewayEventHelloPayload is sent on connection to the websocket.
-// Defines the heartbeat interval that the client should heartbeat to.
-type GatewayEventHelloPayload struct {
- // HeartbeatInterval is the interval (in milliseconds)
- // the client should heartbeat with
- HeartbeatInterval int `json:"heartbeat_interval"`
-}
+package events\r
+\r
+// GatewayEventHelloPayload is sent on connection to the websocket.\r
+// Defines the heartbeat interval that the client should heartbeat to.\r
+type GatewayEventHelloPayload struct {\r
+ // HeartbeatInterval is the interval (in milliseconds)\r
+ // the client should heartbeat with\r
+ HeartbeatInterval int `json:"heartbeat_interval"`\r
+}\r
-package events
-
-// GatewayEventInvalidSessionPayload is sent to indicate one of at least three different situations:the gateway could
-// not initialize a session after receiving an Opcode 2 Identify the gateway could not resume un anterior session
-// after receiving an Opcode 6 Resume the gateway has invalidated an active session and is requesting client
-// actionThe inner d key is a boolean that indicates whether the session may be resumable.
-// See Connecting and Resuming for more information.
-type GatewayEventInvalidSessionPayload bool
+package events\r
+\r
+// GatewayEventInvalidSessionPayload is sent to indicate one of at least three different situations:the gateway could\r
+// not initialize a session after receiving an Opcode 2 Identify the gateway could not resume un anterior session\r
+// after receiving an Opcode 6 Resume the gateway has invalidated an active session and is requesting client\r
+// actionThe inner d key is a boolean that indicates whether the session may be resumable.\r
+// See Connecting and Resuming for more information.\r
+type GatewayEventInvalidSessionPayload bool\r
-package events
-
-import (
- "github.com/discordnova/nova/common/discord/types/structures"
- "github.com/discordnova/nova/common/discord/types/types"
-)
-
-// GatewayEventInviteCreatePayload is sent when a new invite to a channel is created.
-type GatewayEventInviteCreatePayload struct {
- // the channel the invite is for
- ChannelID string `json:"channel_id"`
- // the unique invite code
- Code string `json:"code"`
- // the time at which the invite was created
- CreatedAt string `json:"created_at"`
- // the guild of the invite
- GuildID string `json:"guild_id,omitempty"`
- // the user that created the invite
- Inviter structures.User `json:"inviter,omitempty"`
- // how long the invite is valid for (in seconds)
- MaxAge int `json:"max_age"`
- // the maximum number of times the invite can be used
- MaxUses int `json:"max_uses"`
- // the target user for this invite
- TargetUser structures.User `json:"target_user,omitempty"`
- // the type of user target for this invite
- TargetUserType types.TargetUserTypes `json:"target_user_type"`
- // whether or not the invite is temporary (invited users will be kicked on disconnect unless they're assigned a role)
- Temporary bool `json:"temporary"`
- // how many times the invite has been used (always will be 0)
- Uses int `json:"uses"`
-}
+package events\r
+\r
+import (\r
+ "github.com/discordnova/nova/common/discord/types/structures"\r
+ "github.com/discordnova/nova/common/discord/types/types"\r
+)\r
+\r
+// GatewayEventInviteCreatePayload is sent when a new invite to a channel is created.\r
+type GatewayEventInviteCreatePayload struct {\r
+ // the channel the invite is for\r
+ ChannelID string `json:"channel_id"`\r
+ // the unique invite code\r
+ Code string `json:"code"`\r
+ // the time at which the invite was created\r
+ CreatedAt string `json:"created_at"`\r
+ // the guild of the invite\r
+ GuildID string `json:"guild_id,omitempty"`\r
+ // the user that created the invite\r
+ Inviter structures.User `json:"inviter,omitempty"`\r
+ // how long the invite is valid for (in seconds)\r
+ MaxAge int `json:"max_age"`\r
+ // the maximum number of times the invite can be used\r
+ MaxUses int `json:"max_uses"`\r
+ // the target user for this invite\r
+ TargetUser structures.User `json:"target_user,omitempty"`\r
+ // the type of user target for this invite\r
+ TargetUserType types.TargetUserTypes `json:"target_user_type"`\r
+ // whether or not the invite is temporary (invited users will be kicked on disconnect unless they're assigned a role)\r
+ Temporary bool `json:"temporary"`\r
+ // how many times the invite has been used (always will be 0)\r
+ Uses int `json:"uses"`\r
+}\r
-package events
-
-// GatewayEventInviteDeletePayload is sent when an invite is deleted.
-type GatewayEventInviteDeletePayload struct {
- // the channel of the invite
- ChannelID string `json:"channel_id"`
- // the guild of the invite
- GuildID string `json:"guild_id"`
- // the unique invite code
- Code string `json:"code"`
-}
+package events\r
+\r
+// GatewayEventInviteDeletePayload is sent when an invite is deleted.\r
+type GatewayEventInviteDeletePayload struct {\r
+ // the channel of the invite\r
+ ChannelID string `json:"channel_id"`\r
+ // the guild of the invite\r
+ GuildID string `json:"guild_id"`\r
+ // the unique invite code\r
+ Code string `json:"code"`\r
+}\r
-package events
-
-// GatewayEventMessageBulkDeletePayload is sent when multiple messages are deleted at once.
-type GatewayEventMessageBulkDeletePayload struct {
- // the ids of the messages
- IDs []string `json:"ids"`
- // the id of the channel
- ChannelID string `json:"channel_id"`
- // the id of the guild
- GuildID string `json:"guild_id,omitempty"`
-}
+package events\r
+\r
+// GatewayEventMessageBulkDeletePayload is sent when multiple messages are deleted at once.\r
+type GatewayEventMessageBulkDeletePayload struct {\r
+ // the ids of the messages\r
+ IDs []string `json:"ids"`\r
+ // the id of the channel\r
+ ChannelID string `json:"channel_id"`\r
+ // the id of the guild\r
+ GuildID string `json:"guild_id,omitempty"`\r
+}\r
-package events
-
-import "github.com/discordnova/nova/common/discord/types/structures"
-
-// GatewayEventMessageCreatePayload is sent when a message is created. The inner payload is a message object.
-type GatewayEventMessageCreatePayload structures.Message
+package events\r
+\r
+import "github.com/discordnova/nova/common/discord/types/structures"\r
+\r
+// GatewayEventMessageCreatePayload is sent when a message is created. The inner payload is a message object.\r
+type GatewayEventMessageCreatePayload structures.Message\r
-package events
-
-// GatewayEventMessageDeletePayload is sent when a message is deleted.
-type GatewayEventMessageDeletePayload struct {
- // the id of the message
- ID string `json:"id"`
- // the id of the channel
- ChannelID string `json:"channel_id"`
- // the id of the guild
- GuildID string `json:"guild_id"`
-}
+package events\r
+\r
+// GatewayEventMessageDeletePayload is sent when a message is deleted.\r
+type GatewayEventMessageDeletePayload struct {\r
+ // the id of the message\r
+ ID string `json:"id"`\r
+ // the id of the channel\r
+ ChannelID string `json:"channel_id"`\r
+ // the id of the guild\r
+ GuildID string `json:"guild_id"`\r
+}\r
-package events
-
-import "github.com/discordnova/nova/common/discord/types/structures"
-
-// GatewayEventMessageReactionAdd is sent when a user adds a reaction to a message.
-type GatewayEventMessageReactionAdd struct {
- // the id of the user
- UserID string `json:"user_id"`
- // the id of the channel
- ChannelID string `json:"channel_id"`
- // the id of the message
- MessageID string `json:"message_id"`
- // the id of the guild
- GuildID string `json:"guild_id,omitempty"`
- // the member who reacted if this happened in a guild
- Member structures.GuildMember `json:"member"`
- // the emoji used to react
- Emoji structures.Emoji `json:"emoji"`
-}
+package events\r
+\r
+import "github.com/discordnova/nova/common/discord/types/structures"\r
+\r
+// GatewayEventMessageReactionAdd is sent when a user adds a reaction to a message.\r
+type GatewayEventMessageReactionAdd struct {\r
+ // the id of the user\r
+ UserID string `json:"user_id"`\r
+ // the id of the channel\r
+ ChannelID string `json:"channel_id"`\r
+ // the id of the message\r
+ MessageID string `json:"message_id"`\r
+ // the id of the guild\r
+ GuildID string `json:"guild_id,omitempty"`\r
+ // the member who reacted if this happened in a guild\r
+ Member structures.GuildMember `json:"member"`\r
+ // the emoji used to react\r
+ Emoji structures.Emoji `json:"emoji"`\r
+}\r
-package events
-
-// GatewayEventMessageReactionRemoveAll is sent when a user explicitly removes all reactions from a message.
-type GatewayEventMessageReactionRemoveAll struct {
- // the id of the channel
- ChannelID string `json:"channel_id"`
- // the id of the message
- MessageID string `json:"message_id"`
- // the id of the guild
- GuildID string `json:"guild_id,omitempty"`
-}
+package events\r
+\r
+// GatewayEventMessageReactionRemoveAll is sent when a user explicitly removes all reactions from a message.\r
+type GatewayEventMessageReactionRemoveAll struct {\r
+ // the id of the channel\r
+ ChannelID string `json:"channel_id"`\r
+ // the id of the message\r
+ MessageID string `json:"message_id"`\r
+ // the id of the guild\r
+ GuildID string `json:"guild_id,omitempty"`\r
+}\r
-package events
-
-import "github.com/discordnova/nova/common/discord/types/structures"
-
-// GatewayEventMessageReactionRemoveEmojiPayload is sent when a bot removes all instances of a given emoji from the
-// reactions of a message.
-type GatewayEventMessageReactionRemoveEmojiPayload struct {
- // the id of the channel
- ChannelID string `json:"channel_id"`
- // the id of the guild
- GuildID string `json:"guild_id,omitempty"`
- // the id of the message
- MessageID string `json:"message_id"`
- // the emoji that was removed
- Emoji structures.Emoji `json:"emoji"`
-}
+package events\r
+\r
+import "github.com/discordnova/nova/common/discord/types/structures"\r
+\r
+// GatewayEventMessageReactionRemoveEmojiPayload is sent when a bot removes all instances of a given emoji from the\r
+// reactions of a message.\r
+type GatewayEventMessageReactionRemoveEmojiPayload struct {\r
+ // the id of the channel\r
+ ChannelID string `json:"channel_id"`\r
+ // the id of the guild\r
+ GuildID string `json:"guild_id,omitempty"`\r
+ // the id of the message\r
+ MessageID string `json:"message_id"`\r
+ // the emoji that was removed\r
+ Emoji structures.Emoji `json:"emoji"`\r
+}\r
-package events
-
-import "github.com/discordnova/nova/common/discord/types/structures"
-
-// GatewayEventMessageReactionRemove is sent when a user removes a reaction from a message.
-type GatewayEventMessageReactionRemove struct {
- // the id of the user
- UserID string `json:"user_id"`
- // the id of the channel
- ChannelID string `json:"channel_id"`
- // the id of the message
- MessageID string `json:"message_id"`
- // the id of the guild
- GuildID string `json:"guild_id,omitempty"`
- // the emoji used to react
- Emoji structures.Emoji `json:"emoji"`
-}
+package events\r
+\r
+import "github.com/discordnova/nova/common/discord/types/structures"\r
+\r
+// GatewayEventMessageReactionRemove is sent when a user removes a reaction from a message.\r
+type GatewayEventMessageReactionRemove struct {\r
+ // the id of the user\r
+ UserID string `json:"user_id"`\r
+ // the id of the channel\r
+ ChannelID string `json:"channel_id"`\r
+ // the id of the message\r
+ MessageID string `json:"message_id"`\r
+ // the id of the guild\r
+ GuildID string `json:"guild_id,omitempty"`\r
+ // the emoji used to react\r
+ Emoji structures.Emoji `json:"emoji"`\r
+}\r
-package events
-
-import "github.com/discordnova/nova/common/discord/types/structures"
-
-// GatewayEventMessageUpdatePayload is sent when a message is updated. The inner payload is a message object.
-// Unlike creates, message updates may contain only a subset of the full message object payload
-// (but will always contain an id and channel_id).
-type GatewayEventMessageUpdatePayload structures.Message
+package events\r
+\r
+import "github.com/discordnova/nova/common/discord/types/structures"\r
+\r
+// GatewayEventMessageUpdatePayload is sent when a message is updated. The inner payload is a message object.\r
+// Unlike creates, message updates may contain only a subset of the full message object payload\r
+// (but will always contain an id and channel_id).\r
+type GatewayEventMessageUpdatePayload structures.Message\r
-package events
-
-import (
- "github.com/discordnova/nova/common/discord/types/structures"
- "github.com/discordnova/nova/common/discord/types/types"
-)
-
-// GatewayEventPresenceUpdatePayload is sent when a user's presence or info, such as name or avatar, is updated.
-// If you are using Gateway Intents, you must specify the GUILD_PRESENCES intent in order to receive
-// Presence Update events
-// The user object within this event can be partial, the only field which must be sent is the id field,
-// everything else is optional. Along with this limitation, no fields are required,
-// and the types of the fields are not validated.
-// Your client should expect any combination of fields and types within this event.
-type GatewayEventPresenceUpdatePayload struct {
- // the user presence is being updated for
- User structures.User `json:"user"`
- // id of the guild
- GuildID string `json:"guild_id"`
- // either "idle", "dnd", "online", or "offline"
- Status types.Statuses `json:"status"`
- // user's current activities
- Activities []structures.Activity `json:"activities"`
- // user's platform-dependent status
- ClientStatus types.ClientStatuses `json:"client_status"`
-}
+package events\r
+\r
+import (\r
+ "github.com/discordnova/nova/common/discord/types/structures"\r
+ "github.com/discordnova/nova/common/discord/types/types"\r
+)\r
+\r
+// GatewayEventPresenceUpdatePayload is sent when a user's presence or info, such as name or avatar, is updated.\r
+// If you are using Gateway Intents, you must specify the GUILD_PRESENCES intent in order to receive\r
+// Presence Update events\r
+// The user object within this event can be partial, the only field which must be sent is the id field,\r
+// everything else is optional. Along with this limitation, no fields are required,\r
+// and the types of the fields are not validated.\r
+// Your client should expect any combination of fields and types within this event.\r
+type GatewayEventPresenceUpdatePayload struct {\r
+ // the user presence is being updated for\r
+ User structures.User `json:"user"`\r
+ // id of the guild\r
+ GuildID string `json:"guild_id"`\r
+ // either "idle", "dnd", "online", or "offline"\r
+ Status types.Statuses `json:"status"`\r
+ // user's current activities\r
+ Activities []structures.Activity `json:"activities"`\r
+ // user's platform-dependent status\r
+ ClientStatus types.ClientStatuses `json:"client_status"`\r
+}\r
-package events
-
-import "github.com/discordnova/nova/common/discord/types/structures"
-
-// GatewayEventReadyPayload is the ready event is dispatched when a client has
-// completed the initial handshake with the gateway (for new sessions).
-// The ready event can be the largest and most complex event the gateway
-// will send, as it contains all the state required for a client
-// to begin interacting with the rest of the platform.
-type GatewayEventReadyPayload struct {
- // V is the gateway version
- V int `json:"v"`
- // User is information about the user including email
- User structures.User `json:"user"`
- // PrivateChannels is an empty array
- PrivateChannels []string `json:"private_channels"`
- // Guilds are the guilds the user is in
- // Note: they are only sent as unavailable guilds
- Guilds []structures.Guild `json:"guilds"`
- // SessionID is used for resuming connections
- SessionID string `json:"session_id"`
- // Shard is the shard information associated with the session, if sent
- // when identifying. This is an array of two integers (shard_id, num_shards)
- Shard []int `json:"shard,omitempty"`
- // contains id and flags
- Application structures.Application `json:"application"`
-}
+package events\r
+\r
+import "github.com/discordnova/nova/common/discord/types/structures"\r
+\r
+// GatewayEventReadyPayload is the ready event is dispatched when a client has\r
+// completed the initial handshake with the gateway (for new sessions).\r
+// The ready event can be the largest and most complex event the gateway\r
+// will send, as it contains all the state required for a client\r
+// to begin interacting with the rest of the platform.\r
+type GatewayEventReadyPayload struct {\r
+ // V is the gateway version\r
+ V int `json:"v"`\r
+ // User is information about the user including email\r
+ User structures.User `json:"user"`\r
+ // PrivateChannels is an empty array\r
+ PrivateChannels []string `json:"private_channels"`\r
+ // Guilds are the guilds the user is in\r
+ // Note: they are only sent as unavailable guilds\r
+ Guilds []structures.Guild `json:"guilds"`\r
+ // SessionID is used for resuming connections\r
+ SessionID string `json:"session_id"`\r
+ // Shard is the shard information associated with the session, if sent\r
+ // when identifying. This is an array of two integers (shard_id, num_shards)\r
+ Shard []int `json:"shard,omitempty"`\r
+ // contains id and flags\r
+ Application structures.Application `json:"application"`\r
+}\r
-package events
-
-// GatewayEventReconnectPayload is the payload sent when receiving a Reconnect event
-// There is nothing...
-type GatewayEventReconnectPayload struct{}
+package events\r
+\r
+// GatewayEventReconnectPayload is the payload sent when receiving a Reconnect event\r
+// There is nothing...\r
+type GatewayEventReconnectPayload struct{}\r
-package events
-
-// GatewayEventResumedPayload is the payload sent when receiving a Resumed event
-// There is nothing...
-type GatewayEventResumedPayload struct{}
+package events\r
+\r
+// GatewayEventResumedPayload is the payload sent when receiving a Resumed event\r
+// There is nothing...\r
+type GatewayEventResumedPayload struct{}\r
-package events
-
-import "github.com/discordnova/nova/common/discord/types/structures"
-
-// GatewayEventTypingStartPayload is sent when a user starts typing in a channel.
-type GatewayEventTypingStartPayload struct {
- // id of the channel
- ChannelID string `json:"channel_id"`
- // id of the guild
- GuildID string `json:"guild_id,omitempty"`
- // id of the user
- UserID string `json:"user_id"`
- // unix time (in seconds) of when the user started typing
- Timestamp int `json:"timestamp"`
- // the member who started typing if this happened in a guild
- Member structures.GuildMember `json:"member,omitempty"`
-}
+package events\r
+\r
+import "github.com/discordnova/nova/common/discord/types/structures"\r
+\r
+// GatewayEventTypingStartPayload is sent when a user starts typing in a channel.\r
+type GatewayEventTypingStartPayload struct {\r
+ // id of the channel\r
+ ChannelID string `json:"channel_id"`\r
+ // id of the guild\r
+ GuildID string `json:"guild_id,omitempty"`\r
+ // id of the user\r
+ UserID string `json:"user_id"`\r
+ // unix time (in seconds) of when the user started typing\r
+ Timestamp int `json:"timestamp"`\r
+ // the member who started typing if this happened in a guild\r
+ Member structures.GuildMember `json:"member,omitempty"`\r
+}\r
-package events
-
-import "github.com/discordnova/nova/common/discord/types/structures"
-
-// GatewayEventUserUpdatePayload is sent when properties about the user change.
-type GatewayEventUserUpdatePayload structures.User
+package events\r
+\r
+import "github.com/discordnova/nova/common/discord/types/structures"\r
+\r
+// GatewayEventUserUpdatePayload is sent when properties about the user change.\r
+type GatewayEventUserUpdatePayload structures.User\r
-package events
-
-// GatewayEventVoiceServerUpdate is sent when a guild's voice server is updated.
-type GatewayEventVoiceServerUpdate struct {
- // voice connection token
- Token string `json:"token"`
- // the guild this voice server update is for
- GuildID string `json:"guild_id"`
- // the voice server host
- Endpoint string `json:"endpoint"`
-}
+package events\r
+\r
+// GatewayEventVoiceServerUpdate is sent when a guild's voice server is updated.\r
+type GatewayEventVoiceServerUpdate struct {\r
+ // voice connection token\r
+ Token string `json:"token"`\r
+ // the guild this voice server update is for\r
+ GuildID string `json:"guild_id"`\r
+ // the voice server host\r
+ Endpoint string `json:"endpoint"`\r
+}\r
-package events
-
-import "github.com/discordnova/nova/common/discord/types/structures"
-
-// GatewayEventVoiceStateUpdatePayload is sent when someone joins/leaves/moves voice channels
-type GatewayEventVoiceStateUpdatePayload structures.VoiceState
+package events\r
+\r
+import "github.com/discordnova/nova/common/discord/types/structures"\r
+\r
+// GatewayEventVoiceStateUpdatePayload is sent when someone joins/leaves/moves voice channels\r
+type GatewayEventVoiceStateUpdatePayload structures.VoiceState\r
-package events
-
-// GatewayEventWebhookUpdatePayload is sent when a guild channel's webhook is created, updated, or deleted.
-type GatewayEventWebhookUpdatePayload struct {
- // id of the guild
- GuildID string `json:"guild_id"`
- // id of the channel
- ChannelID string `json:"channel_id"`
-}
+package events\r
+\r
+// GatewayEventWebhookUpdatePayload is sent when a guild channel's webhook is created, updated, or deleted.\r
+type GatewayEventWebhookUpdatePayload struct {\r
+ // id of the guild\r
+ GuildID string `json:"guild_id"`\r
+ // id of the channel\r
+ ChannelID string `json:"channel_id"`\r
+}\r
-package gateway
-
-import (
- "encoding/json"
-
- "github.com/discordnova/nova/common/discord/types/types"
-)
-
-// Payload is the base of each payload sent to the Gateway, everything
-// else is in the d property.
-type Payload struct {
- // Op is the opcode for the payload
- Op types.GatewayOpCodes `json:"op"`
- // D is the event data
- D json.RawMessage `json:"d"`
- // S is a sequence number used for resuming sessions and heartbeats
- S int64 `json:"s"`
- // T is the event name for this payload
- T string `json:"t"`
-}
+package gateway\r
+\r
+import (\r
+ "encoding/json"\r
+\r
+ "github.com/discordnova/nova/common/discord/types/types"\r
+)\r
+\r
+// Payload is the base of each payload sent to the Gateway, everything\r
+// else is in the d property.\r
+type Payload struct {\r
+ // Op is the opcode for the payload\r
+ Op types.GatewayOpCodes `json:"op"`\r
+ // D is the event data\r
+ D json.RawMessage `json:"d"`\r
+ // S is a sequence number used for resuming sessions and heartbeats\r
+ S int64 `json:"s"`\r
+ // T is the event name for this payload\r
+ T string `json:"t"`\r
+}\r
-package structures
-
-// ActivityAssets is a representation of the assets object sent in an Activity
-type ActivityAssets struct {
- // the id for a large asset of the activity, usually a snowflake
- LargeImage string `json:"large_image,omitempty"`
- // text displayed when hovering over the large image of the activity
- LargeText string `json:"large_text,omitempty"`
- // the id for a small asset of the activity, usually a snowflake
- SmallImage string `json:"small_image,omitempty"`
- // text displayed when hovering over the small image of the activity
- SmallText string `json:"small_text,omitempty"`
-}
+package structures\r
+\r
+// ActivityAssets is a representation of the assets object sent in an Activity\r
+type ActivityAssets struct {\r
+ // the id for a large asset of the activity, usually a snowflake\r
+ LargeImage string `json:"large_image,omitempty"`\r
+ // text displayed when hovering over the large image of the activity\r
+ LargeText string `json:"large_text,omitempty"`\r
+ // the id for a small asset of the activity, usually a snowflake\r
+ SmallImage string `json:"small_image,omitempty"`\r
+ // text displayed when hovering over the small image of the activity\r
+ SmallText string `json:"small_text,omitempty"`\r
+}\r
-package structures
-
-// ActivityEmoji is the representation of an Emoji object sent for Activities
-type ActivityEmoji struct {
- // the name of the emoji
- Name string `json:"name"`
- // the id of the emoji
- ID string `json:"id,omitempty"`
- // whether this emoji is animated
- Animated bool `json:"animated,omitempty"`
-}
+package structures\r
+\r
+// ActivityEmoji is the representation of an Emoji object sent for Activities\r
+type ActivityEmoji struct {\r
+ // the name of the emoji\r
+ Name string `json:"name"`\r
+ // the id of the emoji\r
+ ID string `json:"id,omitempty"`\r
+ // whether this emoji is animated\r
+ Animated bool `json:"animated,omitempty"`\r
+}\r
-package structures
-
-// ActivityParty is a representation of a party sent in an Activity
-type ActivityParty struct {
- // the id of the party
- ID string `json:"id,omitempty"`
- // used to show the party's current and maximum size
- // This is an array of two integers (current_size, max_size)
- Size []int `json:"size,omitempty"`
-}
+package structures\r
+\r
+// ActivityParty is a representation of a party sent in an Activity\r
+type ActivityParty struct {\r
+ // the id of the party\r
+ ID string `json:"id,omitempty"`\r
+ // used to show the party's current and maximum size\r
+ // This is an array of two integers (current_size, max_size)\r
+ Size []int `json:"size,omitempty"`\r
+}\r
-package structures
-
-// ActivitySecrets is a representation of the secrets object sent in an Activity
-type ActivitySecrets struct {
- // the secret for joining a party
- Join string `json:"join,omitempty"`
- // the secret for spectating a game
- Spectate string `json:"spectate,omitempty"`
- // the secret for a specific instanced match
- Match string `json:"match,omitempty"`
-}
+package structures\r
+\r
+// ActivitySecrets is a representation of the secrets object sent in an Activity\r
+type ActivitySecrets struct {\r
+ // the secret for joining a party\r
+ Join string `json:"join,omitempty"`\r
+ // the secret for spectating a game\r
+ Spectate string `json:"spectate,omitempty"`\r
+ // the secret for a specific instanced match\r
+ Match string `json:"match,omitempty"`\r
+}\r
-package structures
-
-// ActivityTimestamps are the timestamps of an activity
-type ActivityTimestamps struct {
- // unix time (in milliseconds) of when the activity started
- Start int `json:"start,omitempty"`
- // unix time (in milliseconds) of when the activity ends
- End int `json:"end,omitempty"`
-}
+package structures\r
+\r
+// ActivityTimestamps are the timestamps of an activity\r
+type ActivityTimestamps struct {\r
+ // unix time (in milliseconds) of when the activity started\r
+ Start int `json:"start,omitempty"`\r
+ // unix time (in milliseconds) of when the activity ends\r
+ End int `json:"end,omitempty"`\r
+}\r
-package structures
-
-import "github.com/discordnova/nova/common/discord/types/types"
-
-// Activity represents a presence's activity
-// Bots are only able to send name, type, and optionally url.
-type Activity struct {
- // the activity's name
- Name string `json:"name"`
- // activity type
- Type int `json:"type"`
- // stream url, is validated when type is 1
- URL string `json:"url,omitempty"`
- // unix timestamp of when the activity was added to the user's session
- CreatedAt int `json:"created_at"`
- // unix timestamps for start and/or end of the game
- Timestamps ActivityTimestamps `json:"timestamps,omitempty"`
- // application id for the game
- ApplicationID string `json:"application_id,omitempty"`
- // what the player is currently doing
- Details string `json:"details,omitempty"`
- // the user's current party status
- State string `json:"state,omitempty"`
- // the emoji used for a custom status
- Emoji ActivityEmoji `json:"emoji,omitempty"`
- // information for the current party of the player
- Party ActivityParty `json:"party,omitempty"`
- // images for the presence and their hover texts
- Assets ActivityAssets `json:"assets,omitempty"`
- // secrets for Rich Presence joining and spectating
- Secrets ActivitySecrets `json:"secrets,omitempty"`
- // whether or not the activity is an instanced game session
- Instance bool `json:"instance,omitempty"`
- // activity flags ORd together, describes what the payload includes
- Flags types.ActivityFlags `json:"flags,omitempty"`
-}
+package structures\r
+\r
+import "github.com/discordnova/nova/common/discord/types/types"\r
+\r
+// Activity represents a presence's activity\r
+// Bots are only able to send name, type, and optionally url.\r
+type Activity struct {\r
+ // the activity's name\r
+ Name string `json:"name"`\r
+ // activity type\r
+ Type int `json:"type"`\r
+ // stream url, is validated when type is 1\r
+ URL string `json:"url,omitempty"`\r
+ // unix timestamp of when the activity was added to the user's session\r
+ CreatedAt int `json:"created_at"`\r
+ // unix timestamps for start and/or end of the game\r
+ Timestamps ActivityTimestamps `json:"timestamps,omitempty"`\r
+ // application id for the game\r
+ ApplicationID string `json:"application_id,omitempty"`\r
+ // what the player is currently doing\r
+ Details string `json:"details,omitempty"`\r
+ // the user's current party status\r
+ State string `json:"state,omitempty"`\r
+ // the emoji used for a custom status\r
+ Emoji ActivityEmoji `json:"emoji,omitempty"`\r
+ // information for the current party of the player\r
+ Party ActivityParty `json:"party,omitempty"`\r
+ // images for the presence and their hover texts\r
+ Assets ActivityAssets `json:"assets,omitempty"`\r
+ // secrets for Rich Presence joining and spectating\r
+ Secrets ActivitySecrets `json:"secrets,omitempty"`\r
+ // whether or not the activity is an instanced game session\r
+ Instance bool `json:"instance,omitempty"`\r
+ // activity flags ORd together, describes what the payload includes\r
+ Flags types.ActivityFlags `json:"flags,omitempty"`\r
+}\r
-package structures
-
-// Application represents a Discord Application
-type Application struct {
- // the id of the app
- ID string `json:"id"`
- // the name of the app
- Name string `json:"name"`
- // the icon hash of the app
- Icon string `json:"icon,omitempty"`
- // the description of the app
- Description string `json:"description"`
- // an array of rpc origin urls, if rpc is enabled
- RPCOrigins []string `json:"rpc_origins,omitempty"`
- // when false only app owner can join the app's bot to guilds
- BotPublic bool `json:"bot_public"`
- // when true the app's bot will only join upon completion of the full oauth2 code grant flow
- BotRequireCodeGrant bool `json:"bot_require_code_grant"`
- // partial user object containing info on the owner of the application
- Owner User `json:"owner"`
- // if this application is a game sold on Discord, this field will be the summary field for the store page of its sku
- Summary string `json:"summary"`
- // the base64 encoded key for the GameSDK's GetTicket
- VerifyKey string `json:"verify_key"`
- // if the application belongs to a team, this will be a list of the members of that team
- Team Team `json:"team"`
- // if this application is a game sold on Discord, this field will be the guild to which it has been linked
- GuildID string `json:"guild_id,omitempty"`
- // if this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created,
- // if exists
- PrimarySKUID string `json:"primary_sku_id,omitempty"`
- // if this application is a game sold on Discord, this field will be the URL slug that links to the store page
- Slug string `json:"slug,omitempty"`
- // if this application is a game sold on Discord, this field will be the hash of the image on store embeds
- CoverImage string `json:"cover_image,omitempty"`
- // the application's public flags
- Flags int `json:"flags"`
-}
+package structures\r
+\r
+// Application represents a Discord Application\r
+type Application struct {\r
+ // the id of the app\r
+ ID string `json:"id"`\r
+ // the name of the app\r
+ Name string `json:"name"`\r
+ // the icon hash of the app\r
+ Icon string `json:"icon,omitempty"`\r
+ // the description of the app\r
+ Description string `json:"description"`\r
+ // an array of rpc origin urls, if rpc is enabled\r
+ RPCOrigins []string `json:"rpc_origins,omitempty"`\r
+ // when false only app owner can join the app's bot to guilds\r
+ BotPublic bool `json:"bot_public"`\r
+ // when true the app's bot will only join upon completion of the full oauth2 code grant flow\r
+ BotRequireCodeGrant bool `json:"bot_require_code_grant"`\r
+ // partial user object containing info on the owner of the application\r
+ Owner User `json:"owner"`\r
+ // if this application is a game sold on Discord, this field will be the summary field for the store page of its sku\r
+ Summary string `json:"summary"`\r
+ // the base64 encoded key for the GameSDK's GetTicket\r
+ VerifyKey string `json:"verify_key"`\r
+ // if the application belongs to a team, this will be a list of the members of that team\r
+ Team Team `json:"team"`\r
+ // if this application is a game sold on Discord, this field will be the guild to which it has been linked\r
+ GuildID string `json:"guild_id,omitempty"`\r
+ // if this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created,\r
+ // if exists\r
+ PrimarySKUID string `json:"primary_sku_id,omitempty"`\r
+ // if this application is a game sold on Discord, this field will be the URL slug that links to the store page\r
+ Slug string `json:"slug,omitempty"`\r
+ // if this application is a game sold on Discord, this field will be the hash of the image on store embeds\r
+ CoverImage string `json:"cover_image,omitempty"`\r
+ // the application's public flags\r
+ Flags int `json:"flags"`\r
+}\r
-package structures
-
-// Attachment is the representation of a message attachment
-type Attachment struct {
- // attachment id
- ID string `json:"id"`
- // name of file attached
- Filename string `json:"filename"`
- // size of file in bytes
- Size int `json:"size"`
- // source url of file
- URL string `json:"url"`
- // a proxied url of file
- ProxyURL string `json:"proxy_url"`
- // height of file (if image)
- Height int `json:"height,omitempty"`
- // width of file (if image)
- Width int `json:"width,omitempty"`
-}
+package structures\r
+\r
+// Attachment is the representation of a message attachment\r
+type Attachment struct {\r
+ // attachment id\r
+ ID string `json:"id"`\r
+ // name of file attached\r
+ Filename string `json:"filename"`\r
+ // size of file in bytes\r
+ Size int `json:"size"`\r
+ // source url of file\r
+ URL string `json:"url"`\r
+ // a proxied url of file\r
+ ProxyURL string `json:"proxy_url"`\r
+ // height of file (if image)\r
+ Height int `json:"height,omitempty"`\r
+ // width of file (if image)\r
+ Width int `json:"width,omitempty"`\r
+}\r
-package structures
-
-import "github.com/discordnova/nova/common/discord/types/types"
-
-// ChannelMention is a representation of a Channel mention
-type ChannelMention struct {
- // id of the channel
- ID string `json:"id"`
- // id of the guild containing the channel
- GuildID string `json:"guild_id"`
- // the type of channel
- Type types.ChannelTypes `json:"type"`
- // the name of the channel
- Name string `json:"name"`
-}
+package structures\r
+\r
+import "github.com/discordnova/nova/common/discord/types/types"\r
+\r
+// ChannelMention is a representation of a Channel mention\r
+type ChannelMention struct {\r
+ // id of the channel\r
+ ID string `json:"id"`\r
+ // id of the guild containing the channel\r
+ GuildID string `json:"guild_id"`\r
+ // the type of channel\r
+ Type types.ChannelTypes `json:"type"`\r
+ // the name of the channel\r
+ Name string `json:"name"`\r
+}\r
-package structures
-
-import "github.com/discordnova/nova/common/discord/types/types"
-
-// Channel represents a guild or DM channel
-type Channel struct {
- // the id of this channel
- ID string `json:"id"`
- // the type of channel
- Type types.ChannelTypes `json:"type"`
- // the id of the guild
- GuildID string `json:"guild_id,omitempty"`
- // sorting position of the channel
- Position int `json:"position,omitempty"`
- // explicit permission overwrites for members and roles
- PermissionOverwrites []Overwrite `json:"permission_overwrites,omitempty"`
- // the name of the channel (2-100 characters)
- Name string `json:"name,omitempty"`
- // the channel topic (0-1024 characters)
- Topic string `json:"topic,omitempty"`
- // whether the channel is nsfw
- NSFW bool `json:"nsfw,omitempty"`
- // the id of the last message sent in this channel (may not point to an existing or valid message)
- LastMessageID string `json:"last_message_id,omitempty"`
- // the bitrate (in bits) of the voice channel
- Bitrate int `json:"bitrate,omitempty"`
- // the user limit of the voice channel
- UserLimit int `json:"user_limit,omitempty"`
- // amount of seconds a user has to wait before sending another message (0-21600);
- // bots, as well as users with the permission manage_messages or manage_channel, are unaffected
- RateLimitPerUser int `json:"rate_limit_per_user,omitempty"`
- // the recipients of the DM
- Recipients []User `json:"recipients,omitempty"`
- // icon hash
- Icon string `json:"icon,omitempty"`
- // id of the DM creator
- OwnerID string `json:"owner_id,omitempty"`
- // application id of the group DM creator if it is bot-created
- ApplicationID string `json:"application_id,omitempty"`
- // id of the parent category for a channel (each parent category can contain up to 50 channels)
- ParentID string `json:"parent_id,omitempty"`
- // when the last pinned message was pinned. This may be null in events such as GUILD_CREATE when a
- // message is not pinned.
- LastPinTimestamp string `json:"last_pin_timestamp,omitempty"`
-}
+package structures\r
+\r
+import "github.com/discordnova/nova/common/discord/types/types"\r
+\r
+// Channel represents a guild or DM channel\r
+type Channel struct {\r
+ // the id of this channel\r
+ ID string `json:"id"`\r
+ // the type of channel\r
+ Type types.ChannelTypes `json:"type"`\r
+ // the id of the guild\r
+ GuildID string `json:"guild_id,omitempty"`\r
+ // sorting position of the channel\r
+ Position int `json:"position,omitempty"`\r
+ // explicit permission overwrites for members and roles\r
+ PermissionOverwrites []Overwrite `json:"permission_overwrites,omitempty"`\r
+ // the name of the channel (2-100 characters)\r
+ Name string `json:"name,omitempty"`\r
+ // the channel topic (0-1024 characters)\r
+ Topic string `json:"topic,omitempty"`\r
+ // whether the channel is nsfw\r
+ NSFW bool `json:"nsfw,omitempty"`\r
+ // the id of the last message sent in this channel (may not point to an existing or valid message)\r
+ LastMessageID string `json:"last_message_id,omitempty"`\r
+ // the bitrate (in bits) of the voice channel\r
+ Bitrate int `json:"bitrate,omitempty"`\r
+ // the user limit of the voice channel\r
+ UserLimit int `json:"user_limit,omitempty"`\r
+ // amount of seconds a user has to wait before sending another message (0-21600);\r
+ // bots, as well as users with the permission manage_messages or manage_channel, are unaffected\r
+ RateLimitPerUser int `json:"rate_limit_per_user,omitempty"`\r
+ // the recipients of the DM\r
+ Recipients []User `json:"recipients,omitempty"`\r
+ // icon hash\r
+ Icon string `json:"icon,omitempty"`\r
+ // id of the DM creator\r
+ OwnerID string `json:"owner_id,omitempty"`\r
+ // application id of the group DM creator if it is bot-created\r
+ ApplicationID string `json:"application_id,omitempty"`\r
+ // id of the parent category for a channel (each parent category can contain up to 50 channels)\r
+ ParentID string `json:"parent_id,omitempty"`\r
+ // when the last pinned message was pinned. This may be null in events such as GUILD_CREATE when a\r
+ // message is not pinned.\r
+ LastPinTimestamp string `json:"last_pin_timestamp,omitempty"`\r
+}\r
-package structures
-
-import "github.com/discordnova/nova/common/discord/types/types"
-
-// ClientStatus is the representation of a Client Status, for sessions indication
-type ClientStatus struct {
- // the user's status set for an active desktop (Windows, Linux, Mac) application session
- Desktop types.ClientStatuses `json:"desktop,omitempty"`
- // the user's status set for an active mobile (iOS, Android) application session
- Mobile types.ClientStatuses `json:"mobile,omitempty"`
- // the user's status set for an active web (browser, bot account) application session
- Web types.ClientStatuses `json:"web,omitempty"`
-}
+package structures\r
+\r
+import "github.com/discordnova/nova/common/discord/types/types"\r
+\r
+// ClientStatus is the representation of a Client Status, for sessions indication\r
+type ClientStatus struct {\r
+ // the user's status set for an active desktop (Windows, Linux, Mac) application session\r
+ Desktop types.ClientStatuses `json:"desktop,omitempty"`\r
+ // the user's status set for an active mobile (iOS, Android) application session\r
+ Mobile types.ClientStatuses `json:"mobile,omitempty"`\r
+ // the user's status set for an active web (browser, bot account) application session\r
+ Web types.ClientStatuses `json:"web,omitempty"`\r
+}\r
-package structures
-
-// EmbedAuthor represents the author object of an embed
-type EmbedAuthor struct {
- // name of author
- Name string `json:"name,omitempty"`
- // url of author
- URL string `json:"url,omitempty"`
- // url of author icon (only supports http(s) and attachments)
- IconURL string `json:"icon_url,omitempty"`
- // a proxied url of author icon
- ProxyIconURL string `json:"proxy_icon_url,omitempty"`
-}
+package structures\r
+\r
+// EmbedAuthor represents the author object of an embed\r
+type EmbedAuthor struct {\r
+ // name of author\r
+ Name string `json:"name,omitempty"`\r
+ // url of author\r
+ URL string `json:"url,omitempty"`\r
+ // url of author icon (only supports http(s) and attachments)\r
+ IconURL string `json:"icon_url,omitempty"`\r
+ // a proxied url of author icon\r
+ ProxyIconURL string `json:"proxy_icon_url,omitempty"`\r
+}\r
-package structures
-
-// EmbedField is the representation of a field in an embed
-type EmbedField struct {
- // name of the field
- Name string `json:"name"`
- // value of the field
- Value string `json:"value"`
- // whether or not this field should display inline
- Inline bool `json:"inline,omitempty"`
-}
+package structures\r
+\r
+// EmbedField is the representation of a field in an embed\r
+type EmbedField struct {\r
+ // name of the field\r
+ Name string `json:"name"`\r
+ // value of the field\r
+ Value string `json:"value"`\r
+ // whether or not this field should display inline\r
+ Inline bool `json:"inline,omitempty"`\r
+}\r
-package structures
-
-// EmbedFooter represents the footer of an embed
-type EmbedFooter struct {
- // footer text
- Text string `json:"text"`
- // url of footer icon (only supports http(s) and attachments)
- IconURL string `json:"icon_url,omitempty"`
- // a proxied url of footer icon
- ProxyIconURL string `json:"proxy_icon_url,omitempty"`
-}
+package structures\r
+\r
+// EmbedFooter represents the footer of an embed\r
+type EmbedFooter struct {\r
+ // footer text\r
+ Text string `json:"text"`\r
+ // url of footer icon (only supports http(s) and attachments)\r
+ IconURL string `json:"icon_url,omitempty"`\r
+ // a proxied url of footer icon\r
+ ProxyIconURL string `json:"proxy_icon_url,omitempty"`\r
+}\r
-package structures
-
-// EmbedImage represents the image object of an embed
-type EmbedImage struct {
- // source url of image (only supports http(s) and attachments)
- URL string `json:"url,omitempty"`
- // a proxied url of the image
- ProxyURL string `json:"proxy_url,omitempty"`
- // height of image
- Height int `json:"height,omitempty"`
- // width of image
- Width int `json:"width,omitempty"`
-}
+package structures\r
+\r
+// EmbedImage represents the image object of an embed\r
+type EmbedImage struct {\r
+ // source url of image (only supports http(s) and attachments)\r
+ URL string `json:"url,omitempty"`\r
+ // a proxied url of the image\r
+ ProxyURL string `json:"proxy_url,omitempty"`\r
+ // height of image\r
+ Height int `json:"height,omitempty"`\r
+ // width of image\r
+ Width int `json:"width,omitempty"`\r
+}\r
-package structures
-
-// EmbedProvider represents the provider object of an embed
-type EmbedProvider struct {
- // name of provider
- Name string `json:"name,omitempty"`
- // url of provider
- URL string `json:"url,omitempty"`
-}
+package structures\r
+\r
+// EmbedProvider represents the provider object of an embed\r
+type EmbedProvider struct {\r
+ // name of provider\r
+ Name string `json:"name,omitempty"`\r
+ // url of provider\r
+ URL string `json:"url,omitempty"`\r
+}\r
-package structures
-
-// EmbedThumbnail represents the thumbnail object of an embed
-type EmbedThumbnail struct {
- // source url of thumbnail (only supports http(s) and attachments)
- URL string `json:"url,omitempty"`
- // a proxied url of the thumbnail
- ProxyURL string `json:"proxy_url,omitempty"`
- // height of thumbnail
- Height int `json:"height,omitempty"`
- // width of thumbnail
- Width int `json:"width,omitempty"`
-}
+package structures\r
+\r
+// EmbedThumbnail represents the thumbnail object of an embed\r
+type EmbedThumbnail struct {\r
+ // source url of thumbnail (only supports http(s) and attachments)\r
+ URL string `json:"url,omitempty"`\r
+ // a proxied url of the thumbnail\r
+ ProxyURL string `json:"proxy_url,omitempty"`\r
+ // height of thumbnail\r
+ Height int `json:"height,omitempty"`\r
+ // width of thumbnail\r
+ Width int `json:"width,omitempty"`\r
+}\r
-package structures
-
-// EmbedVideo represents the video object of an embed
-type EmbedVideo struct {
- // source url of video
- URL string `json:"url,omitempty"`
- // a proxied url of the video
- ProxyURL string `json:"proxy_url,omitempty"`
- // height of video
- Height int `json:"height,omitempty"`
- // width of video
- Width int `json:"width,omitempty"`
-}
+package structures\r
+\r
+// EmbedVideo represents the video object of an embed\r
+type EmbedVideo struct {\r
+ // source url of video\r
+ URL string `json:"url,omitempty"`\r
+ // a proxied url of the video\r
+ ProxyURL string `json:"proxy_url,omitempty"`\r
+ // height of video\r
+ Height int `json:"height,omitempty"`\r
+ // width of video\r
+ Width int `json:"width,omitempty"`\r
+}\r
-package structures
-
-import "github.com/discordnova/nova/common/discord/types/types"
-
-// Embed is the representation of an Embed
-type Embed struct {
- // title of embed
- Title string `json:"title,omitempty"`
- // type of embed (always "rich" for webhook embeds)
- Type types.EmbedTypes `json:"type,omitempty"`
- // description of embed
- Description string `json:"description,omitempty"`
- // url of embed
- URL string `json:"url,omitempty"`
- // timestamp of embed content
- Timestamp string `json:"timestamp,omitempty"`
- // color code of the embed
- Color int `json:"color,omitempty"`
- // footer information
- Footer EmbedFooter `json:"footer,omitempty"`
- // image information
- Image EmbedImage `json:"image,omitempty"`
- // thumbnail information
- Thumbnail EmbedThumbnail `json:"thumbnail,omitempty"`
- // video information
- Video EmbedVideo `json:"video,omitempty"`
- // provider information
- Provider EmbedProvider `json:"provider,omitempty"`
- // author information
- Author EmbedAuthor `json:"author,omitempty"`
- // fields information
- Fields []EmbedField `json:"fields,omitempty"`
-}
+package structures\r
+\r
+import "github.com/discordnova/nova/common/discord/types/types"\r
+\r
+// Embed is the representation of an Embed\r
+type Embed struct {\r
+ // title of embed\r
+ Title string `json:"title,omitempty"`\r
+ // type of embed (always "rich" for webhook embeds)\r
+ Type types.EmbedTypes `json:"type,omitempty"`\r
+ // description of embed\r
+ Description string `json:"description,omitempty"`\r
+ // url of embed\r
+ URL string `json:"url,omitempty"`\r
+ // timestamp of embed content\r
+ Timestamp string `json:"timestamp,omitempty"`\r
+ // color code of the embed\r
+ Color int `json:"color,omitempty"`\r
+ // footer information\r
+ Footer EmbedFooter `json:"footer,omitempty"`\r
+ // image information\r
+ Image EmbedImage `json:"image,omitempty"`\r
+ // thumbnail information\r
+ Thumbnail EmbedThumbnail `json:"thumbnail,omitempty"`\r
+ // video information\r
+ Video EmbedVideo `json:"video,omitempty"`\r
+ // provider information\r
+ Provider EmbedProvider `json:"provider,omitempty"`\r
+ // author information\r
+ Author EmbedAuthor `json:"author,omitempty"`\r
+ // fields information\r
+ Fields []EmbedField `json:"fields,omitempty"`\r
+}\r
-package structures
-
-// Emoji is a representation of a Discord Emoji
-type Emoji struct {
- // ID is the emoji id and can be null for default Discord emojis
- ID string `json:"id,omitempty"`
- // Name is the emoji name and can only be nil in Reaction Emoji objects
- Name string `json:"name,omitempty"`
- // roles this emoji is whitelisted to
- Roles string `json:"roles,omitempty"`
- // user that created this emoji
- User User `json:"user,omitempty"`
- // whether this emoji must be wrapped in colons
- RequireColons bool `json:"require_colons,omitempty"`
- // whether this emoji is managed
- Managed bool `json:"managed,omitempty"`
- // whether this emoji is animated
- Animated bool `json:"animated,omitempty"`
- // whether this emoji can be used, may be false due to loss of Server Boosts
- Available bool `json:"available,omitempty"`
-}
+package structures\r
+\r
+// Emoji is a representation of a Discord Emoji\r
+type Emoji struct {\r
+ // ID is the emoji id and can be null for default Discord emojis\r
+ ID string `json:"id,omitempty"`\r
+ // Name is the emoji name and can only be nil in Reaction Emoji objects\r
+ Name string `json:"name,omitempty"`\r
+ // roles this emoji is whitelisted to\r
+ Roles string `json:"roles,omitempty"`\r
+ // user that created this emoji\r
+ User User `json:"user,omitempty"`\r
+ // whether this emoji must be wrapped in colons\r
+ RequireColons bool `json:"require_colons,omitempty"`\r
+ // whether this emoji is managed\r
+ Managed bool `json:"managed,omitempty"`\r
+ // whether this emoji is animated\r
+ Animated bool `json:"animated,omitempty"`\r
+ // whether this emoji can be used, may be false due to loss of Server Boosts\r
+ Available bool `json:"available,omitempty"`\r
+}\r
-package structures
-
-// GuildMember is the representation of a Guild member
-type GuildMember struct {
- // the user this guild member represents
- // The field user won't be included in the member object attached to MESSAGE_CREATE and MESSAGE_UPDATE gateway
- // events.
- User User `json:"user,omitempty"`
- // this users guild nickname
- Nick string `json:"nick"`
- // array of role object ids
- Roles []string `json:"roles"`
- // when the user joined the guild
- JoinedAt string `json:"joined_at"`
- // when the user started boosting the guild
- PremiumSince string `json:"premium_since,omitempty"`
- // whether the user is deafened in voice channels
- Deaf bool `json:"deaf"`
- // whether the user is muted in voice channels
- Mute bool `json:"mute"`
- // whether the user has not yet passed the guild's Membership Screening requirements
- // In GUILD_ events, pending will always be included as true or false. In non GUILD_ events which can only be
- // triggered by non-pending users, pending will not be included.
- Pending bool `json:"pending,omitempty"`
- // total permissions of the member in the channel, including overrides, returned when in the interaction object
- Permissions string `json:"permissions,omitempty"`
-}
+package structures\r
+\r
+// GuildMember is the representation of a Guild member\r
+type GuildMember struct {\r
+ // the user this guild member represents\r
+ // The field user won't be included in the member object attached to MESSAGE_CREATE and MESSAGE_UPDATE gateway\r
+ // events.\r
+ User User `json:"user,omitempty"`\r
+ // this users guild nickname\r
+ Nick string `json:"nick"`\r
+ // array of role object ids\r
+ Roles []string `json:"roles"`\r
+ // when the user joined the guild\r
+ JoinedAt string `json:"joined_at"`\r
+ // when the user started boosting the guild\r
+ PremiumSince string `json:"premium_since,omitempty"`\r
+ // whether the user is deafened in voice channels\r
+ Deaf bool `json:"deaf"`\r
+ // whether the user is muted in voice channels\r
+ Mute bool `json:"mute"`\r
+ // whether the user has not yet passed the guild's Membership Screening requirements\r
+ // In GUILD_ events, pending will always be included as true or false. In non GUILD_ events which can only be\r
+ // triggered by non-pending users, pending will not be included.\r
+ Pending bool `json:"pending,omitempty"`\r
+ // total permissions of the member in the channel, including overrides, returned when in the interaction object\r
+ Permissions string `json:"permissions,omitempty"`\r
+}\r
-package structures
-
-import "github.com/discordnova/nova/common/discord/types/types"
-
-// Guild is the representation of a Discord Guild, AKA server
-type Guild struct {
- // ID is the guild id
- ID string `json:"id"`
- // Name is the guild name (2-100 characters, excluding trailing and
- // leading whitespace)
- Name string `json:"name"`
- // Icon is the icon hash
- Icon string `json:"icon,omitempty"`
- // IconHash is the icon hash, returned when in the template object
- IconHash string `json:"icon_hash,omitempty"`
- // Splash is the splash hash
- Splash string `json:"splash,omitempty"`
- // DiscoverySplash is discovery splash hash; only present for
- // guilds with the "DISCOVERABLE" feature
- DiscoverySplash string `json:"discovery_splash,omitempty"`
- // Owner is true if the user is the owner of the guild.
- // It is only sent when using the GET Current User Guilds endpoint
- // and is relative to the requested user
- Owner bool `json:"owner,omitempty"`
- // OwnerID is the id of owner
- OwnerID string `json:"owner_id,omitempty"`
- // Permissions are the total permissions for the user in the guild
- // (excludes overrides)
- // It is only sent when using the GET Current User Guilds endpoint
- // and is relative to the requested user
- Permissions string `json:"permissions,omitempty"`
- // Region is the voice region id for the guild
- Region string `json:"region"`
- // AFKChannelID is the id of the afk channel
- AFKChannelID string `json:"afk_channel_id,omitempty"`
- // AFKTimeout is the afk timeout in seconds
- AFKTimeout int `json:"afk_timeout"`
- // true if the server widget is enabled
- WidgetEnabled bool `json:"widget_enabled,omitempty"`
- // the channel id that the widget will generate an invite to, or null if set to no invite
- WidgetChannelID string `json:"widget_channel_id,omitempty"`
- // verification level required for the guild
- VerificationLevel types.VerificationLevels `json:"verification_level"`
- // default message notifications level
- DefaultMessageNotifications types.DefaultMessageNotificationLevels `json:"default_message_notifications"`
- // explicit content filter level
- ExplicitContentFilter types.ExplicitContentFilterLevels `json:"explicit_content_filter"`
- // roles in the guild
- Roles []Role `json:"roles"`
- // custom guild emojis
- Emojis []Emoji `json:"emojis"`
- // enabled guild features
- Features []types.GuildFeatures `json:"features"`
- // required MFA level for the guild
- MFALevel types.MFALevels `json:"mfa_level"`
- // application id of the guild creator if it is bot-created
- ApplicationID string `json:"application_id,omitempty"`
- // the id of the channel where guild notices such as welcome messages and boost events are posted
- SystemChannelID string `json:"system_channel_id,omitempty"`
- // system channel flags
- SystemChannelFlags types.SystemChannelFlags `json:"system_channel_flags,omitempty"`
- // the id of the channel where Community guilds can display rules and/or guidelines
- RulesChannelID string `json:"rules_channel_id,omitempty"`
- // when this guild was joined at
- // This field is only sent within the GUILD_CREATE event
- JoinedAt string `json:"joined_at,omitempty"`
- // true if this is considered a large guild
- // This field is only sent within the GUILD_CREATE event
- Large bool `json:"large,omitempty"`
- // true if this guild is unavailable due to an outage
- // This field is only sent within the GUILD_CREATE event
- Unavailable bool `json:"unavailable,omitempty"`
- // total number of members in this guild
- // This field is only sent within the GUILD_CREATE event
- MemberCount int `json:"member_count,omitempty"`
- // states of members currently in voice channels; lacks the guild_id key
- // This field is only sent within the GUILD_CREATE event
- VoiceStates []VoiceState `json:"voice_states,omitempty"`
- // users in the guild
- // This field is only sent within the GUILD_CREATE event
- Members []GuildMember `json:"members,omitempty"`
- // channels in the guild
- // This field is only sent within the GUILD_CREATE event
- Channels []Channel `json:"channels,omitempty"`
- // presences of the members in the guild, will only include non-offline members if the size is greater than
- // large threshold
- // This field is only sent within the GUILD_CREATE event
- Presences []Presence `json:"presences,omitempty"`
- // the maximum number of presences for the guild (the default value, currently 25000,
- // is in effect when null is returned)
- MaxPresences int `json:"max_presences,omitempty"`
- // the maximum number of members for the guild
- MaxMembers int `json:"max_members,omitempty"`
- // the vanity url code for the guild
- VanityURLCode string `json:"vanity_url_code,omitempty"`
- // the description for the guild, if the guild is discoverable
- Description string `json:"description,omitempty"`
- // banner hash
- Banner string `json:"banner,omitempty"`
- // premium tier (Server Boost level)
- PremiumTier types.PremiumTiers `json:"premium_tier"`
- // the number of boosts this guild currently has
- PremiumSubscriptionCount int `json:"premium_subscription_count,omitempty"`
- // the preferred locale of a Community guild; used in server discovery and notices from Discord; defaults to "en-US"
- PreferredLocale string `json:"preferred_locale"`
- // the id of the channel where admins and moderators of Community guilds receive notices from Discord
- PublicUpdatesChannelID string `json:"public_updates_channel_id,omitempty"`
- // the maximum amount of users in a video channel
- MaxVideoChannelUsers int `json:"max_video_channel_users,omitempty"`
- // approximate number of members in this guild, returned from the GET /guilds/<id> endpoint when with_counts is true
- ApproximateMemberCount int `json:"approximate_member_count,omitempty"`
- // approximate number of non-offline members in this guild, returned from the GET /guilds/<id> endpoint when
- // with_counts is true
- ApproximatePresenceCount int `json:"approximate_presence_count,omitempty"`
- // the welcome screen of a Community guild, shown to new members, returned when in the invite object
- WelcomeScreen WelcomeScreen `json:"welcome_screen,omitempty"`
-}
+package structures\r
+\r
+import "github.com/discordnova/nova/common/discord/types/types"\r
+\r
+// Guild is the representation of a Discord Guild, AKA server\r
+type Guild struct {\r
+ // ID is the guild id\r
+ ID string `json:"id"`\r
+ // Name is the guild name (2-100 characters, excluding trailing and\r
+ // leading whitespace)\r
+ Name string `json:"name"`\r
+ // Icon is the icon hash\r
+ Icon string `json:"icon,omitempty"`\r
+ // IconHash is the icon hash, returned when in the template object\r
+ IconHash string `json:"icon_hash,omitempty"`\r
+ // Splash is the splash hash\r
+ Splash string `json:"splash,omitempty"`\r
+ // DiscoverySplash is discovery splash hash; only present for\r
+ // guilds with the "DISCOVERABLE" feature\r
+ DiscoverySplash string `json:"discovery_splash,omitempty"`\r
+ // Owner is true if the user is the owner of the guild.\r
+ // It is only sent when using the GET Current User Guilds endpoint\r
+ // and is relative to the requested user\r
+ Owner bool `json:"owner,omitempty"`\r
+ // OwnerID is the id of owner\r
+ OwnerID string `json:"owner_id,omitempty"`\r
+ // Permissions are the total permissions for the user in the guild\r
+ // (excludes overrides)\r
+ // It is only sent when using the GET Current User Guilds endpoint\r
+ // and is relative to the requested user\r
+ Permissions string `json:"permissions,omitempty"`\r
+ // Region is the voice region id for the guild\r
+ Region string `json:"region"`\r
+ // AFKChannelID is the id of the afk channel\r
+ AFKChannelID string `json:"afk_channel_id,omitempty"`\r
+ // AFKTimeout is the afk timeout in seconds\r
+ AFKTimeout int `json:"afk_timeout"`\r
+ // true if the server widget is enabled\r
+ WidgetEnabled bool `json:"widget_enabled,omitempty"`\r
+ // the channel id that the widget will generate an invite to, or null if set to no invite\r
+ WidgetChannelID string `json:"widget_channel_id,omitempty"`\r
+ // verification level required for the guild\r
+ VerificationLevel types.VerificationLevels `json:"verification_level"`\r
+ // default message notifications level\r
+ DefaultMessageNotifications types.DefaultMessageNotificationLevels `json:"default_message_notifications"`\r
+ // explicit content filter level\r
+ ExplicitContentFilter types.ExplicitContentFilterLevels `json:"explicit_content_filter"`\r
+ // roles in the guild\r
+ Roles []Role `json:"roles"`\r
+ // custom guild emojis\r
+ Emojis []Emoji `json:"emojis"`\r
+ // enabled guild features\r
+ Features []types.GuildFeatures `json:"features"`\r
+ // required MFA level for the guild\r
+ MFALevel types.MFALevels `json:"mfa_level"`\r
+ // application id of the guild creator if it is bot-created\r
+ ApplicationID string `json:"application_id,omitempty"`\r
+ // the id of the channel where guild notices such as welcome messages and boost events are posted\r
+ SystemChannelID string `json:"system_channel_id,omitempty"`\r
+ // system channel flags\r
+ SystemChannelFlags types.SystemChannelFlags `json:"system_channel_flags,omitempty"`\r
+ // the id of the channel where Community guilds can display rules and/or guidelines\r
+ RulesChannelID string `json:"rules_channel_id,omitempty"`\r
+ // when this guild was joined at\r
+ // This field is only sent within the GUILD_CREATE event\r
+ JoinedAt string `json:"joined_at,omitempty"`\r
+ // true if this is considered a large guild\r
+ // This field is only sent within the GUILD_CREATE event\r
+ Large bool `json:"large,omitempty"`\r
+ // true if this guild is unavailable due to an outage\r
+ // This field is only sent within the GUILD_CREATE event\r
+ Unavailable bool `json:"unavailable,omitempty"`\r
+ // total number of members in this guild\r
+ // This field is only sent within the GUILD_CREATE event\r
+ MemberCount int `json:"member_count,omitempty"`\r
+ // states of members currently in voice channels; lacks the guild_id key\r
+ // This field is only sent within the GUILD_CREATE event\r
+ VoiceStates []VoiceState `json:"voice_states,omitempty"`\r
+ // users in the guild\r
+ // This field is only sent within the GUILD_CREATE event\r
+ Members []GuildMember `json:"members,omitempty"`\r
+ // channels in the guild\r
+ // This field is only sent within the GUILD_CREATE event\r
+ Channels []Channel `json:"channels,omitempty"`\r
+ // presences of the members in the guild, will only include non-offline members if the size is greater than\r
+ // large threshold\r
+ // This field is only sent within the GUILD_CREATE event\r
+ Presences []Presence `json:"presences,omitempty"`\r
+ // the maximum number of presences for the guild (the default value, currently 25000,\r
+ // is in effect when null is returned)\r
+ MaxPresences int `json:"max_presences,omitempty"`\r
+ // the maximum number of members for the guild\r
+ MaxMembers int `json:"max_members,omitempty"`\r
+ // the vanity url code for the guild\r
+ VanityURLCode string `json:"vanity_url_code,omitempty"`\r
+ // the description for the guild, if the guild is discoverable\r
+ Description string `json:"description,omitempty"`\r
+ // banner hash\r
+ Banner string `json:"banner,omitempty"`\r
+ // premium tier (Server Boost level)\r
+ PremiumTier types.PremiumTiers `json:"premium_tier"`\r
+ // the number of boosts this guild currently has\r
+ PremiumSubscriptionCount int `json:"premium_subscription_count,omitempty"`\r
+ // the preferred locale of a Community guild; used in server discovery and notices from Discord; defaults to "en-US"\r
+ PreferredLocale string `json:"preferred_locale"`\r
+ // the id of the channel where admins and moderators of Community guilds receive notices from Discord\r
+ PublicUpdatesChannelID string `json:"public_updates_channel_id,omitempty"`\r
+ // the maximum amount of users in a video channel\r
+ MaxVideoChannelUsers int `json:"max_video_channel_users,omitempty"`\r
+ // approximate number of members in this guild, returned from the GET /guilds/<id> endpoint when with_counts is true\r
+ ApproximateMemberCount int `json:"approximate_member_count,omitempty"`\r
+ // approximate number of non-offline members in this guild, returned from the GET /guilds/<id> endpoint when\r
+ // with_counts is true\r
+ ApproximatePresenceCount int `json:"approximate_presence_count,omitempty"`\r
+ // the welcome screen of a Community guild, shown to new members, returned when in the invite object\r
+ WelcomeScreen WelcomeScreen `json:"welcome_screen,omitempty"`\r
+}\r
-package structures
-
-// IdentifyConnectionProperties is the identify connection properties object of an identify command
-type IdentifyConnectionProperties struct {
- // your operating system
- OS string `json:"$os"`
- // your library name
- Browser string `json:"$browser"`
- // your library name
- Device string `json:"$device"`
-}
+package structures\r
+\r
+// IdentifyConnectionProperties is the identify connection properties object of an identify command\r
+type IdentifyConnectionProperties struct {\r
+ // your operating system\r
+ OS string `json:"$os"`\r
+ // your library name\r
+ Browser string `json:"$browser"`\r
+ // your library name\r
+ Device string `json:"$device"`\r
+}\r
-package structures
-
-import "github.com/discordnova/nova/common/discord/types/types"
-
-// Invite is the representation of a Discord Invite
-type Invite struct {
- // the invite code (unique ID)
- Code string `json:"code"`
- // the guild this invite is for
- Guild Guild `json:"guild,omitempty"`
- // the channel this invite is for
- Channel Channel `json:"channel"`
- // the user who created the invite
- Inviter User `json:"inviter,omitempty"`
- // the target user for this invite
- TargetUser User `json:"target_user,omitempty"`
- // the type of user target for this invite
- TargetUserType types.TargetUserTypes `json:"target_user_type,omitempty"`
- // approximate count of online members (only present when target_user is set)
- ApproximatePresenceCount int `json:"approximate_presence_count,omitempty"`
- // approximate count of total members
- ApproximateMemberCount int `json:"approximate_member_count"`
-}
+package structures\r
+\r
+import "github.com/discordnova/nova/common/discord/types/types"\r
+\r
+// Invite is the representation of a Discord Invite\r
+type Invite struct {\r
+ // the invite code (unique ID)\r
+ Code string `json:"code"`\r
+ // the guild this invite is for\r
+ Guild Guild `json:"guild,omitempty"`\r
+ // the channel this invite is for\r
+ Channel Channel `json:"channel"`\r
+ // the user who created the invite\r
+ Inviter User `json:"inviter,omitempty"`\r
+ // the target user for this invite\r
+ TargetUser User `json:"target_user,omitempty"`\r
+ // the type of user target for this invite\r
+ TargetUserType types.TargetUserTypes `json:"target_user_type,omitempty"`\r
+ // approximate count of online members (only present when target_user is set)\r
+ ApproximatePresenceCount int `json:"approximate_presence_count,omitempty"`\r
+ // approximate count of total members\r
+ ApproximateMemberCount int `json:"approximate_member_count"`\r
+}\r
-package structures
-
-import "github.com/discordnova/nova/common/discord/types/types"
-
-// MessageActivity is the message activity
-type MessageActivity struct {
- // type of message activity
- Type types.MessageActivityTypes `json:"type"`
- // party_id from a Rich Presence event
- PartyID string `json:"party_id"`
-}
+package structures\r
+\r
+import "github.com/discordnova/nova/common/discord/types/types"\r
+\r
+// MessageActivity is the message activity\r
+type MessageActivity struct {\r
+ // type of message activity\r
+ Type types.MessageActivityTypes `json:"type"`\r
+ // party_id from a Rich Presence event\r
+ PartyID string `json:"party_id"`\r
+}\r
-package structures
-
-// MessageApplication is the application object of a message
-type MessageApplication struct {
- // id of the application
- ID string `json:"id"`
- // id of the embed's image asset
- CoverImage string `json:"cover_image,omitempty"`
- // application's description
- Description string `json:"description"`
- // id of the application's icon
- Icon string `json:"icon,omitempty"`
- // name of the application
- Name string `json:"name"`
-}
+package structures\r
+\r
+// MessageApplication is the application object of a message\r
+type MessageApplication struct {\r
+ // id of the application\r
+ ID string `json:"id"`\r
+ // id of the embed's image asset\r
+ CoverImage string `json:"cover_image,omitempty"`\r
+ // application's description\r
+ Description string `json:"description"`\r
+ // id of the application's icon\r
+ Icon string `json:"icon,omitempty"`\r
+ // name of the application\r
+ Name string `json:"name"`\r
+}\r
-package structures
-
-// MessageReference is the reference object of a message
-type MessageReference struct {
- // id of the originating message
- MessageID string `json:"message_id,omitempty"`
- // id of the originating message's channel
- // channel_id is optional when creating a reply, but will always be present when receiving an event/response
- // that includes this data model.
- ChannelID string `json:"channel_id,omitempty"`
- // id of the originating message's guild
- GuildID string `json:"guild_id,omitempty"`
- // when sending, whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply)
- // message, default true
- FailIfNotExists bool `json:"fail_if_not_exists,omitempty"`
-}
+package structures\r
+\r
+// MessageReference is the reference object of a message\r
+type MessageReference struct {\r
+ // id of the originating message\r
+ MessageID string `json:"message_id,omitempty"`\r
+ // id of the originating message's channel\r
+ // channel_id is optional when creating a reply, but will always be present when receiving an event/response\r
+ // that includes this data model.\r
+ ChannelID string `json:"channel_id,omitempty"`\r
+ // id of the originating message's guild\r
+ GuildID string `json:"guild_id,omitempty"`\r
+ // when sending, whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply)\r
+ // message, default true\r
+ FailIfNotExists bool `json:"fail_if_not_exists,omitempty"`\r
+}\r
-package structures
-
-import "github.com/discordnova/nova/common/discord/types/types"
-
-// Message is the representation of a Discord Message
-type Message struct {
- // id of the message
- ID string `json:"id"`
- // id of the channel the message was sent in
- ChannelID string `json:"channel_id"`
- // id of the guild the message was sent in
- GuildID string `json:"guild_id,omitempty"`
- // the author of this message (not guaranteed to be a valid user, see below)
- // The author object follows the structure of the user object,
- // but is only a valid user in the case where the message is generated by a user or bot user.
- // If the message is generated by a webhook, the author object corresponds to the webhook's id, username, and avatar.
- // ou can tell if a message is generated by a webhook by checking for the webhook_id on the message object.
- Author User `json:"author"`
- // member properties for this message's author
- // The member object exists in MESSAGE_CREATE and MESSAGE_UPDATE events from text-based guild channels.
- // This allows bots to obtain real-time member data without requiring bots to store member state in memory.
- Member GuildMember `json:"member,omitempty"`
- // contents of the message
- Content string `json:"content"`
- // when this message was sent
- Timestamp string `json:"timestamp"`
- // when this message was edited (or null if never)
- EditedTimestamp string `json:"edited_timestamp,omitempty"`
- // whether this was a TTS message
- TTS bool `json:"tts"`
- // whether this message mentions everyone
- MentionEveryone bool `json:"mention_everyone"`
- // users specifically mentioned in the message
- // The user objects in the mentions array will only have the partial member field present in MESSAGE_CREATE and
- // MESSAGE_UPDATE events from text-based guild channels.
- Mentions []User `json:"mentions"`
- // roles specifically mentioned in this message
- MentionRoles []string `json:"mention_roles"`
- // channels specifically mentioned in this message
- MentionChannels []ChannelMention `json:"mention_channels"`
- // any attached files
- Attachments []Attachment `json:"attachments"`
- // any embedded content
- Embeds []Embed `json:"embeds"`
- // reactions to the message
- Reactions []Reaction `json:"reactions,omitempty"`
- // used for validating a message was sent
- Nonce string `json:"nonce,omitempty"`
- // whether this message is pinned
- Pinned bool `json:"pinned"`
- // if the message is generated by a webhook, this is the webhook's id
- WebhookID string `json:"webhook_id,omitempty"`
- // type of message
- Type types.MessageTypes `json:"type"`
- // sent with Rich Presence-related chat embeds
- Activity MessageActivity `json:"activity,omitempty"`
- // sent with Rich Presence-related chat embeds
- Application MessageApplication `json:"application,omitempty"`
- // reference data sent with cross posted messages and replies
- MessageReference MessageReference `json:"message_reference,omitempty"`
- // message flags combined as a bitfield
- Flags types.MessageFlags `json:"flags,omitempty"`
- // the stickers sent with the message (bots currently can only receive messages with stickers, not send)
- Stickers []Sticker `json:"stickers"`
- // the message associated with the message_reference
- // This field is only returned for messages with a type of 19 (REPLY).
- // If the message is a reply but the referenced_message field is not present, the backend did not attempt to fetch
- // the message that was being replied to, so its state is unknown.
- // If the field exists but is null, the referenced message was deleted.
- ReferencedMessage *Message `json:"referenced_message,omitempty"`
-}
+package structures\r
+\r
+import "github.com/discordnova/nova/common/discord/types/types"\r
+\r
+// Message is the representation of a Discord Message\r
+type Message struct {\r
+ // id of the message\r
+ ID string `json:"id"`\r
+ // id of the channel the message was sent in\r
+ ChannelID string `json:"channel_id"`\r
+ // id of the guild the message was sent in\r
+ GuildID string `json:"guild_id,omitempty"`\r
+ // the author of this message (not guaranteed to be a valid user, see below)\r
+ // The author object follows the structure of the user object,\r
+ // but is only a valid user in the case where the message is generated by a user or bot user.\r
+ // If the message is generated by a webhook, the author object corresponds to the webhook's id, username, and avatar.\r
+ // ou can tell if a message is generated by a webhook by checking for the webhook_id on the message object.\r
+ Author User `json:"author"`\r
+ // member properties for this message's author\r
+ // The member object exists in MESSAGE_CREATE and MESSAGE_UPDATE events from text-based guild channels.\r
+ // This allows bots to obtain real-time member data without requiring bots to store member state in memory.\r
+ Member GuildMember `json:"member,omitempty"`\r
+ // contents of the message\r
+ Content string `json:"content"`\r
+ // when this message was sent\r
+ Timestamp string `json:"timestamp"`\r
+ // when this message was edited (or null if never)\r
+ EditedTimestamp string `json:"edited_timestamp,omitempty"`\r
+ // whether this was a TTS message\r
+ TTS bool `json:"tts"`\r
+ // whether this message mentions everyone\r
+ MentionEveryone bool `json:"mention_everyone"`\r
+ // users specifically mentioned in the message\r
+ // The user objects in the mentions array will only have the partial member field present in MESSAGE_CREATE and\r
+ // MESSAGE_UPDATE events from text-based guild channels.\r
+ Mentions []User `json:"mentions"`\r
+ // roles specifically mentioned in this message\r
+ MentionRoles []string `json:"mention_roles"`\r
+ // channels specifically mentioned in this message\r
+ MentionChannels []ChannelMention `json:"mention_channels"`\r
+ // any attached files\r
+ Attachments []Attachment `json:"attachments"`\r
+ // any embedded content\r
+ Embeds []Embed `json:"embeds"`\r
+ // reactions to the message\r
+ Reactions []Reaction `json:"reactions,omitempty"`\r
+ // used for validating a message was sent\r
+ Nonce string `json:"nonce,omitempty"`\r
+ // whether this message is pinned\r
+ Pinned bool `json:"pinned"`\r
+ // if the message is generated by a webhook, this is the webhook's id\r
+ WebhookID string `json:"webhook_id,omitempty"`\r
+ // type of message\r
+ Type types.MessageTypes `json:"type"`\r
+ // sent with Rich Presence-related chat embeds\r
+ Activity MessageActivity `json:"activity,omitempty"`\r
+ // sent with Rich Presence-related chat embeds\r
+ Application MessageApplication `json:"application,omitempty"`\r
+ // reference data sent with cross posted messages and replies\r
+ MessageReference MessageReference `json:"message_reference,omitempty"`\r
+ // message flags combined as a bitfield\r
+ Flags types.MessageFlags `json:"flags,omitempty"`\r
+ // the stickers sent with the message (bots currently can only receive messages with stickers, not send)\r
+ Stickers []Sticker `json:"stickers"`\r
+ // the message associated with the message_reference\r
+ // This field is only returned for messages with a type of 19 (REPLY).\r
+ // If the message is a reply but the referenced_message field is not present, the backend did not attempt to fetch\r
+ // the message that was being replied to, so its state is unknown.\r
+ // If the field exists but is null, the referenced message was deleted.\r
+ ReferencedMessage *Message `json:"referenced_message,omitempty"`\r
+}\r
-package structures
-
-// Overwrite is a representation of Overwrite in Discord permissions system
-type Overwrite struct {
- // role or user id
- ID string `json:"id"`
- // either 0 (role) or 1 (member)
- Type int `json:"type"`
- // permission bit set
- Allow string `json:"allow"`
- // permission bit set
- Deny string `json:"deny"`
-}
+package structures\r
+\r
+// Overwrite is a representation of Overwrite in Discord permissions system\r
+type Overwrite struct {\r
+ // role or user id\r
+ ID string `json:"id"`\r
+ // either 0 (role) or 1 (member)\r
+ Type int `json:"type"`\r
+ // permission bit set\r
+ Allow string `json:"allow"`\r
+ // permission bit set\r
+ Deny string `json:"deny"`\r
+}\r
-package structures
-
-import "github.com/discordnova/nova/common/discord/types/types"
-
-// Presence is the representation of a user's presence on a guild.
-type Presence struct {
- // the user presence is being updated for
- User User `json:"user"`
- // id of the guild
- GuildID string `json:"guild_id"`
- // either "idle", "dnd", "online", or "offline"
- Status types.Statuses `json:"status"`
- // user's current activities
- Activities []Activity `json:"activities"`
- // user's platform-dependent status
- ClientStatus ClientStatus `json:"client_status"`
-}
+package structures\r
+\r
+import "github.com/discordnova/nova/common/discord/types/types"\r
+\r
+// Presence is the representation of a user's presence on a guild.\r
+type Presence struct {\r
+ // the user presence is being updated for\r
+ User User `json:"user"`\r
+ // id of the guild\r
+ GuildID string `json:"guild_id"`\r
+ // either "idle", "dnd", "online", or "offline"\r
+ Status types.Statuses `json:"status"`\r
+ // user's current activities\r
+ Activities []Activity `json:"activities"`\r
+ // user's platform-dependent status\r
+ ClientStatus ClientStatus `json:"client_status"`\r
+}\r
-package structures
-
-// Reaction represents a message reaction
-type Reaction struct {
- // times this emoji has been used to react
- Count int `json:"count"`
- // whether the current user reacted using this emoji
- Me bool `json:"me"`
- // emoji information
- Emoji Emoji `json:"emoji"`
-}
+package structures\r
+\r
+// Reaction represents a message reaction\r
+type Reaction struct {\r
+ // times this emoji has been used to react\r
+ Count int `json:"count"`\r
+ // whether the current user reacted using this emoji\r
+ Me bool `json:"me"`\r
+ // emoji information\r
+ Emoji Emoji `json:"emoji"`\r
+}\r
-package structures
-
-// RoleTags is the tag a role has
-type RoleTags struct {
- BotID string `json:"bot_id,omitempty"`
- IntegrationID string `json:"integration_id,omitempty"`
- // ALWAYS NULL YET
- PremiumSubscriber struct{} `json:"premium_subscriber"`
-}
+package structures\r
+\r
+// RoleTags is the tag a role has\r
+type RoleTags struct {\r
+ BotID string `json:"bot_id,omitempty"`\r
+ IntegrationID string `json:"integration_id,omitempty"`\r
+ // ALWAYS NULL YET\r
+ PremiumSubscriber struct{} `json:"premium_subscriber"`\r
+}\r
-package structures
-
-// Role is a Discord Role
-type Role struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Color int `json:"color"`
- Hoist bool `json:"hoist"`
- Position int `json:"position"`
- Permissions string `json:"permissions"`
- Managed bool `json:"managed"`
- Mentionable bool `json:"mentionable"`
- Tags RoleTags `json:"tags,omitempty"`
-}
+package structures\r
+\r
+// Role is a Discord Role\r
+type Role struct {\r
+ ID string `json:"id"`\r
+ Name string `json:"name"`\r
+ Color int `json:"color"`\r
+ Hoist bool `json:"hoist"`\r
+ Position int `json:"position"`\r
+ Permissions string `json:"permissions"`\r
+ Managed bool `json:"managed"`\r
+ Mentionable bool `json:"mentionable"`\r
+ Tags RoleTags `json:"tags,omitempty"`\r
+}\r
-package structures
-
-import "github.com/discordnova/nova/common/discord/types/types"
-
-// Sticker represents a Discord message sticker
-type Sticker struct {
- // id of the sticker
- ID string `json:"id"`
- // id of the pack the sticker is from
- PackID string `json:"pack_id"`
- // name of the sticker
- Name string `json:"name"`
- // description of the sticker
- Description string `json:"description"`
- // a comma-separated list of tags for the sticker
- Tags string `json:"tags,omitempty"`
- // sticker asset hash
- Asset string `json:"asset"`
- // sticker preview asset hash
- PreviewAsset string `json:"preview_asset,omitempty"`
- // type of sticker format
- FormatType types.StickerTypes `json:"format_type"`
-}
+package structures\r
+\r
+import "github.com/discordnova/nova/common/discord/types/types"\r
+\r
+// Sticker represents a Discord message sticker\r
+type Sticker struct {\r
+ // id of the sticker\r
+ ID string `json:"id"`\r
+ // id of the pack the sticker is from\r
+ PackID string `json:"pack_id"`\r
+ // name of the sticker\r
+ Name string `json:"name"`\r
+ // description of the sticker\r
+ Description string `json:"description"`\r
+ // a comma-separated list of tags for the sticker\r
+ Tags string `json:"tags,omitempty"`\r
+ // sticker asset hash\r
+ Asset string `json:"asset"`\r
+ // sticker preview asset hash\r
+ PreviewAsset string `json:"preview_asset,omitempty"`\r
+ // type of sticker format\r
+ FormatType types.StickerTypes `json:"format_type"`\r
+}\r
-package structures
-
-import "github.com/discordnova/nova/common/discord/types/types"
-
-// TeamMember represents a member of a Discord Team
-type TeamMember struct {
- // the user's membership state on the team
- MembershipState types.MembershipStates `json:"membership_state"`
- // will always be ["*"]
- Permissions []string `json:"permissions"`
- // the id of the parent team of which they are a member
- TeamID string `json:"team_id"`
- // the avatar, discriminator, id, and username of the user
- User User `json:"user"`
-}
+package structures\r
+\r
+import "github.com/discordnova/nova/common/discord/types/types"\r
+\r
+// TeamMember represents a member of a Discord Team\r
+type TeamMember struct {\r
+ // the user's membership state on the team\r
+ MembershipState types.MembershipStates `json:"membership_state"`\r
+ // will always be ["*"]\r
+ Permissions []string `json:"permissions"`\r
+ // the id of the parent team of which they are a member\r
+ TeamID string `json:"team_id"`\r
+ // the avatar, discriminator, id, and username of the user\r
+ User User `json:"user"`\r
+}\r
-package structures
-
-// Team represents a Discord Team
-type Team struct {
- // a hash of the image of the team's icon
- Icon string `json:"icon,omitempty"`
- // the unique id of the team
- ID string `json:"id"`
- // the members of the team
- Members []TeamMember `json:"members"`
- // the user id of the current team owner
- OwnerUserID string `json:"owner_user_id"`
-}
+package structures\r
+\r
+// Team represents a Discord Team\r
+type Team struct {\r
+ // a hash of the image of the team's icon\r
+ Icon string `json:"icon,omitempty"`\r
+ // the unique id of the team\r
+ ID string `json:"id"`\r
+ // the members of the team\r
+ Members []TeamMember `json:"members"`\r
+ // the user id of the current team owner\r
+ OwnerUserID string `json:"owner_user_id"`\r
+}\r
-package structures
-
-import "github.com/discordnova/nova/common/discord/types/types"
-
-// User represents the User Structure sent by the Discord API
-type User struct {
- ID string `json:"id"`
- Username string `json:"username"`
- Discriminator string `json:"discriminator"`
- Avatar string `json:"avatar,omitempty"`
- Bot bool `json:"bot,omitempty"`
- System bool `json:"system,omitempty"`
- MFAEnabled bool `json:"mfa_enabled,omitempty"`
- Locale string `json:"locale,omitempty"`
- Verified bool `json:"verified,omitempty"`
- Email string `json:"email,omitempty"`
- Flags types.UserFlags `json:"flags,omitempty"`
- PremiumType types.PremiumTypes `json:"premium_type,omitempty"`
- PublicFlags types.UserFlags `json:"public_flags,omitempty"`
-}
+package structures\r
+\r
+import "github.com/discordnova/nova/common/discord/types/types"\r
+\r
+// User represents the User Structure sent by the Discord API\r
+type User struct {\r
+ ID string `json:"id"`\r
+ Username string `json:"username"`\r
+ Discriminator string `json:"discriminator"`\r
+ Avatar string `json:"avatar,omitempty"`\r
+ Bot bool `json:"bot,omitempty"`\r
+ System bool `json:"system,omitempty"`\r
+ MFAEnabled bool `json:"mfa_enabled,omitempty"`\r
+ Locale string `json:"locale,omitempty"`\r
+ Verified bool `json:"verified,omitempty"`\r
+ Email string `json:"email,omitempty"`\r
+ Flags types.UserFlags `json:"flags,omitempty"`\r
+ PremiumType types.PremiumTypes `json:"premium_type,omitempty"`\r
+ PublicFlags types.UserFlags `json:"public_flags,omitempty"`\r
+}\r
-package structures
-
-// VoiceState is a representation of a user's voice connection status
-type VoiceState struct {
- // the guild id this voice state is for
- GuildID string `json:"guild_id,omitempty"`
- // the channel id this user is connected to
- ChannelID string `json:"channel_id,omitempty"`
- // the user id this voice state is for
- UserID string `json:"user_id,omitempty"`
- // the guild member this voice state is for
- Member GuildMember `json:"member,omitempty"`
- // the session id for this voice state
- SessionID string `json:"session_id"`
- // whether this user is deafened by the server
- Deaf bool `json:"deaf"`
- // whether this user is muted by the server
- Mute bool `json:"mute"`
- // whether this user is locally deafened
- SelfDeaf bool `json:"self_deaf"`
- // whether this user is locally muted
- SelfMute bool `json:"self_mute"`
- // whether this user is streaming using "Go Live"
- SelfStream bool `json:"self_stream,omitempty"`
- // whether this user's camera is enabled
- SelfVideo bool `json:"self_video"`
- // whether this user is muted by the current user
- Suppress bool `json:"suppress"`
-}
+package structures\r
+\r
+// VoiceState is a representation of a user's voice connection status\r
+type VoiceState struct {\r
+ // the guild id this voice state is for\r
+ GuildID string `json:"guild_id,omitempty"`\r
+ // the channel id this user is connected to\r
+ ChannelID string `json:"channel_id,omitempty"`\r
+ // the user id this voice state is for\r
+ UserID string `json:"user_id,omitempty"`\r
+ // the guild member this voice state is for\r
+ Member GuildMember `json:"member,omitempty"`\r
+ // the session id for this voice state\r
+ SessionID string `json:"session_id"`\r
+ // whether this user is deafened by the server\r
+ Deaf bool `json:"deaf"`\r
+ // whether this user is muted by the server\r
+ Mute bool `json:"mute"`\r
+ // whether this user is locally deafened\r
+ SelfDeaf bool `json:"self_deaf"`\r
+ // whether this user is locally muted\r
+ SelfMute bool `json:"self_mute"`\r
+ // whether this user is streaming using "Go Live"\r
+ SelfStream bool `json:"self_stream,omitempty"`\r
+ // whether this user's camera is enabled\r
+ SelfVideo bool `json:"self_video"`\r
+ // whether this user is muted by the current user\r
+ Suppress bool `json:"suppress"`\r
+}\r
-package structures
-
-// WelcomeScreenChannel is a representation of a channel in a welcome screen
-type WelcomeScreenChannel struct {
- // the channel's id
- ChannelID string `json:"channel_id"`
- // the description shown for the channel
- Description string `json:"description"`
- // the emoji id, if the emoji is custom
- EmojiID string `json:"emoji_id,omitempty"`
- // the emoji name if custom, the unicode character if standard, or null if no emoji is set
- EmojiName string `json:"emoji_name,omitempty"`
-}
+package structures\r
+\r
+// WelcomeScreenChannel is a representation of a channel in a welcome screen\r
+type WelcomeScreenChannel struct {\r
+ // the channel's id\r
+ ChannelID string `json:"channel_id"`\r
+ // the description shown for the channel\r
+ Description string `json:"description"`\r
+ // the emoji id, if the emoji is custom\r
+ EmojiID string `json:"emoji_id,omitempty"`\r
+ // the emoji name if custom, the unicode character if standard, or null if no emoji is set\r
+ EmojiName string `json:"emoji_name,omitempty"`\r
+}\r
-package structures
-
-// WelcomeScreen is a representation of a Guild welcome screen
-type WelcomeScreen struct {
- // the server description shown in the welcome screen
- Description string `json:"description,omitempty"`
- // the channels shown in the welcome screen, up to 5
- WelcomeChannels []WelcomeScreenChannel `json:"welcome_channels"`
-}
+package structures\r
+\r
+// WelcomeScreen is a representation of a Guild welcome screen\r
+type WelcomeScreen struct {\r
+ // the server description shown in the welcome screen\r
+ Description string `json:"description,omitempty"`\r
+ // the channels shown in the welcome screen, up to 5\r
+ WelcomeChannels []WelcomeScreenChannel `json:"welcome_channels"`\r
+}\r
-package types
-
-// ActivityFlags are the flags of an activity
-type ActivityFlags int
-
-const (
- // ActivityFlagInstance is the flag for instanced activities
- ActivityFlagInstance ActivityFlags = 1 << 0
- // ActivityFlagJoin is the flag for activities we can join
- ActivityFlagJoin = 1 << 1
- // ActivityFlagSpectate is the flag for activities we can spectate
- ActivityFlagSpectate = 1 << 2
- // ActivityFlagJoinRequest is the flag for activities we can request to join
- ActivityFlagJoinRequest = 1 << 3
- // ActivityFlagSync is the flag for sync activities
- ActivityFlagSync = 1 << 4
- // ActivityFlagPlay is the flag for playable activities
- ActivityFlagPlay = 1 << 5
-)
+package types\r
+\r
+// ActivityFlags are the flags of an activity\r
+type ActivityFlags int\r
+\r
+const (\r
+ // ActivityFlagInstance is the flag for instanced activities\r
+ ActivityFlagInstance ActivityFlags = 1 << 0\r
+ // ActivityFlagJoin is the flag for activities we can join\r
+ ActivityFlagJoin = 1 << 1\r
+ // ActivityFlagSpectate is the flag for activities we can spectate\r
+ ActivityFlagSpectate = 1 << 2\r
+ // ActivityFlagJoinRequest is the flag for activities we can request to join\r
+ ActivityFlagJoinRequest = 1 << 3\r
+ // ActivityFlagSync is the flag for sync activities\r
+ ActivityFlagSync = 1 << 4\r
+ // ActivityFlagPlay is the flag for playable activities\r
+ ActivityFlagPlay = 1 << 5\r
+)\r
-package types
-
-// ActivityTypes are the different types for an activity
-type ActivityTypes int
-
-const (
- // ActivityTypeGame is the "Playing {name}" activity
- ActivityTypeGame ActivityTypes = 0
- // ActivityTypeStreaming is the "Streaming {details}" activity
- // The streaming type currently only supports Twitch and YouTube.
- // Only https://twitch.tv/ and https://youtube.com/ urls will work.
- ActivityTypeStreaming = 1
- // ActivityTypeListening is the "Listening to {name}" activity
- ActivityTypeListening = 2
-
- /* yes, there is no 3 */
-
- // ActivityTypeCustom is the "{emoji} {name}" activity
- ActivityTypeCustom = 4
- // ActivityTypeCompeting is the "Competing in {name}" activity
- ActivityTypeCompeting = 5
-)
+package types\r
+\r
+// ActivityTypes are the different types for an activity\r
+type ActivityTypes int\r
+\r
+const (\r
+ // ActivityTypeGame is the "Playing {name}" activity\r
+ ActivityTypeGame ActivityTypes = 0\r
+ // ActivityTypeStreaming is the "Streaming {details}" activity\r
+ // The streaming type currently only supports Twitch and YouTube.\r
+ // Only https://twitch.tv/ and https://youtube.com/ urls will work.\r
+ ActivityTypeStreaming = 1\r
+ // ActivityTypeListening is the "Listening to {name}" activity\r
+ ActivityTypeListening = 2\r
+\r
+ /* yes, there is no 3 */\r
+\r
+ // ActivityTypeCustom is the "{emoji} {name}" activity\r
+ ActivityTypeCustom = 4\r
+ // ActivityTypeCompeting is the "Competing in {name}" activity\r
+ ActivityTypeCompeting = 5\r
+)\r
-package types
-
-// ChannelTypes are the different types of channel
-type ChannelTypes int
-
-const (
- // ChannelTypeGuildText is a text channel within a server
- ChannelTypeGuildText ChannelTypes = 0
- // ChannelTypeDM is a direct message between users
- ChannelTypeDM = 1
- // ChannelTypeGuildVoice is a voice channel within a server
- ChannelTypeGuildVoice = 2
- // ChannelTypeGroupDM is a direct message between multiple users
- ChannelTypeGroupDM = 3
- // ChannelTypeGuildCategory is an organizational category that contains up to 50 channels
- ChannelTypeGuildCategory = 4
- // ChannelTypeGuildNews is a channel that users can follow and cross post into their own server
- ChannelTypeGuildNews = 5
- // ChannelTypeGuildStore is a channel in which game developers can sell their game on Discord
- ChannelTypeGuildStore = 6
-)
+package types\r
+\r
+// ChannelTypes are the different types of channel\r
+type ChannelTypes int\r
+\r
+const (\r
+ // ChannelTypeGuildText is a text channel within a server\r
+ ChannelTypeGuildText ChannelTypes = 0\r
+ // ChannelTypeDM is a direct message between users\r
+ ChannelTypeDM = 1\r
+ // ChannelTypeGuildVoice is a voice channel within a server\r
+ ChannelTypeGuildVoice = 2\r
+ // ChannelTypeGroupDM is a direct message between multiple users\r
+ ChannelTypeGroupDM = 3\r
+ // ChannelTypeGuildCategory is an organizational category that contains up to 50 channels\r
+ ChannelTypeGuildCategory = 4\r
+ // ChannelTypeGuildNews is a channel that users can follow and cross post into their own server\r
+ ChannelTypeGuildNews = 5\r
+ // ChannelTypeGuildStore is a channel in which game developers can sell their game on Discord\r
+ ChannelTypeGuildStore = 6\r
+)\r
-package types
-
-// ClientStatuses are the different client status for active sessions
-type ClientStatuses string
-
-const (
- // ClientStatusOnline is the status for online users
- ClientStatusOnline ClientStatuses = "online"
- // ClientStatusIdle is the status for idle sessions
- ClientStatusIdle ClientStatuses = "idle"
- // ClientStatusDnD is the status for do not disturb sessions
- ClientStatusDnD ClientStatuses = "dnd"
- /* There is no offline: https://discord.com/developers/docs/topics/gateway#client-status-object */
-)
+package types\r
+\r
+// ClientStatuses are the different client status for active sessions\r
+type ClientStatuses string\r
+\r
+const (\r
+ // ClientStatusOnline is the status for online users\r
+ ClientStatusOnline ClientStatuses = "online"\r
+ // ClientStatusIdle is the status for idle sessions\r
+ ClientStatusIdle ClientStatuses = "idle"\r
+ // ClientStatusDnD is the status for do not disturb sessions\r
+ ClientStatusDnD ClientStatuses = "dnd"\r
+ /* There is no offline: https://discord.com/developers/docs/topics/gateway#client-status-object */\r
+)\r
-package types
-
-// DefaultMessageNotificationLevels is the notification level for a guild
-type DefaultMessageNotificationLevels int
-
-const (
- // DefaultMessageNotificationLevelAllMessages notify on every message
- DefaultMessageNotificationLevelAllMessages DefaultMessageNotificationLevels = 0
- // DefaultMessageNotificationLevelOnlyMentions notify only on mentions
- DefaultMessageNotificationLevelOnlyMentions = 1
-)
+package types\r
+\r
+// DefaultMessageNotificationLevels is the notification level for a guild\r
+type DefaultMessageNotificationLevels int\r
+\r
+const (\r
+ // DefaultMessageNotificationLevelAllMessages notify on every message\r
+ DefaultMessageNotificationLevelAllMessages DefaultMessageNotificationLevels = 0\r
+ // DefaultMessageNotificationLevelOnlyMentions notify only on mentions\r
+ DefaultMessageNotificationLevelOnlyMentions = 1\r
+)\r
-package types
-
-// EmbedTypes are the different types of a Embed
-type EmbedTypes string
-
-const (
- // EmbedTypeRich is a generic embed rendered from embed attributes
- EmbedTypeRich EmbedTypes = "rich"
- // EmbedTypeImage is an image embed
- EmbedTypeImage = "image"
- // EmbedTypeVideo is a video embed
- EmbedTypeVideo = "video"
- // EmbedTypeGIFV is an animated gif image embed rendered as a video embed
- EmbedTypeGIFV = "gifv"
- // EmbedTypeArticle is an article embed
- EmbedTypeArticle = "article"
- // EmbedTypeLink is a link embed
- EmbedTypeLink = "link"
-)
+package types\r
+\r
+// EmbedTypes are the different types of a Embed\r
+type EmbedTypes string\r
+\r
+const (\r
+ // EmbedTypeRich is a generic embed rendered from embed attributes\r
+ EmbedTypeRich EmbedTypes = "rich"\r
+ // EmbedTypeImage is an image embed\r
+ EmbedTypeImage = "image"\r
+ // EmbedTypeVideo is a video embed\r
+ EmbedTypeVideo = "video"\r
+ // EmbedTypeGIFV is an animated gif image embed rendered as a video embed\r
+ EmbedTypeGIFV = "gifv"\r
+ // EmbedTypeArticle is an article embed\r
+ EmbedTypeArticle = "article"\r
+ // EmbedTypeLink is a link embed\r
+ EmbedTypeLink = "link"\r
+)\r
-package types
-
-// ExplicitContentFilterLevels is the level for the Explicit Content
-type ExplicitContentFilterLevels int
-
-const (
- // ExplicitContentFilterLevelDisabled disables the scan
- ExplicitContentFilterLevelDisabled = 0
- // ExplicitContentFilterLevelMembersWithoutRoles scans for members without roles
- ExplicitContentFilterLevelMembersWithoutRoles = 1
- // ExplicitContentFilterLevelAllMembers scans for anyone
- ExplicitContentFilterLevelAllMembers = 2
-)
+package types\r
+\r
+// ExplicitContentFilterLevels is the level for the Explicit Content\r
+type ExplicitContentFilterLevels int\r
+\r
+const (\r
+ // ExplicitContentFilterLevelDisabled disables the scan\r
+ ExplicitContentFilterLevelDisabled = 0\r
+ // ExplicitContentFilterLevelMembersWithoutRoles scans for members without roles\r
+ ExplicitContentFilterLevelMembersWithoutRoles = 1\r
+ // ExplicitContentFilterLevelAllMembers scans for anyone\r
+ ExplicitContentFilterLevelAllMembers = 2\r
+)\r
-package types
-
-// GatewayCloseEventCodes is a code explaining the reason
-// the gateway connection closed
-type GatewayCloseEventCodes int
-
-// GatewayCloseEventCodes values
-const (
- // GatewayCloseEventCodeUnknownError is corresponding to a
- // Discord internal error
- GatewayCloseEventCodeUnknownError GatewayCloseEventCodes = 4000
- // GatewayCloseEventCodeUnknownOpCode is used when an
- // invalid payload for a payload or opcode was sent
- GatewayCloseEventCodeUnknownOpCode = 4001
- // GatewayCloseEventCodeDecodeError is used when an invalid payload was sent
- GatewayCloseEventCodeDecodeError = 4002
- // GatewayCloseEventCodeNotAuthenticated is used when a payload was
- // sent prior to the Identify payload
- GatewayCloseEventCodeNotAuthenticated = 4003
- // GatewayCloseEventCodeAuthenticationFailed is used when the account token
- // in the Identify payload is incorrect
- GatewayCloseEventCodeAuthenticationFailed = 4004
- // GatewayCloseEventCodeAlreadyAuthenticated is used when more than one
- // Identify payload was sent
- GatewayCloseEventCodeAlreadyAuthenticated = 4005
-
- /* There is no 4006... */
-
- // GatewayCloseEventCodeInvalidSeq is used when the sequence of a
- // resuming payload is invalid. Need tro reconnect and start a new session
- GatewayCloseEventCodeInvalidSeq = 4007
- // GatewayCloseEventCodeRateLimited is used when a rate limit applied.
- GatewayCloseEventCodeRateLimited = 4008
- // GatewayCloseEventCodeSessionTimedOut is used when a session expired.
- // Need to reconnect and start a new one
- GatewayCloseEventCodeSessionTimedOut = 4009
- // GatewayCloseEventCodeInvalidShard is used when an invalid shard was sent
- // in the Identify payload
- GatewayCloseEventCodeInvalidShard = 4010
- // GatewayCloseEventCodeShardingRequired is used when a session handle too
- // many guild. The connection needs more shards
- GatewayCloseEventCodeShardingRequired = 4011
- // GatewayCloseEventCodeInvalidAPIVersion is used when an invalid version
- // of the gateway was sent
- GatewayCloseEventCodeInvalidAPIVersion = 4012
- // GatewayCloseEventCodeInvalidIntents is used when invalid intents were
- // provided.
- GatewayCloseEventCodeInvalidIntents = 4013
- // GatewayCloseEventCodeDisallowedIntents is used when a provided intent is
- // not enabled.
- GatewayCloseEventCodeDisallowedIntents = 4014
-)
+package types\r
+\r
+// GatewayCloseEventCodes is a code explaining the reason\r
+// the gateway connection closed\r
+type GatewayCloseEventCodes int\r
+\r
+// GatewayCloseEventCodes values\r
+const (\r
+ // GatewayCloseEventCodeUnknownError is corresponding to a\r
+ // Discord internal error\r
+ GatewayCloseEventCodeUnknownError GatewayCloseEventCodes = 4000\r
+ // GatewayCloseEventCodeUnknownOpCode is used when an\r
+ // invalid payload for a payload or opcode was sent\r
+ GatewayCloseEventCodeUnknownOpCode = 4001\r
+ // GatewayCloseEventCodeDecodeError is used when an invalid payload was sent\r
+ GatewayCloseEventCodeDecodeError = 4002\r
+ // GatewayCloseEventCodeNotAuthenticated is used when a payload was\r
+ // sent prior to the Identify payload\r
+ GatewayCloseEventCodeNotAuthenticated = 4003\r
+ // GatewayCloseEventCodeAuthenticationFailed is used when the account token\r
+ // in the Identify payload is incorrect\r
+ GatewayCloseEventCodeAuthenticationFailed = 4004\r
+ // GatewayCloseEventCodeAlreadyAuthenticated is used when more than one\r
+ // Identify payload was sent\r
+ GatewayCloseEventCodeAlreadyAuthenticated = 4005\r
+\r
+ /* There is no 4006... */\r
+\r
+ // GatewayCloseEventCodeInvalidSeq is used when the sequence of a\r
+ // resuming payload is invalid. Need tro reconnect and start a new session\r
+ GatewayCloseEventCodeInvalidSeq = 4007\r
+ // GatewayCloseEventCodeRateLimited is used when a rate limit applied.\r
+ GatewayCloseEventCodeRateLimited = 4008\r
+ // GatewayCloseEventCodeSessionTimedOut is used when a session expired.\r
+ // Need to reconnect and start a new one\r
+ GatewayCloseEventCodeSessionTimedOut = 4009\r
+ // GatewayCloseEventCodeInvalidShard is used when an invalid shard was sent\r
+ // in the Identify payload\r
+ GatewayCloseEventCodeInvalidShard = 4010\r
+ // GatewayCloseEventCodeShardingRequired is used when a session handle too\r
+ // many guild. The connection needs more shards\r
+ GatewayCloseEventCodeShardingRequired = 4011\r
+ // GatewayCloseEventCodeInvalidAPIVersion is used when an invalid version\r
+ // of the gateway was sent\r
+ GatewayCloseEventCodeInvalidAPIVersion = 4012\r
+ // GatewayCloseEventCodeInvalidIntents is used when invalid intents were\r
+ // provided.\r
+ GatewayCloseEventCodeInvalidIntents = 4013\r
+ // GatewayCloseEventCodeDisallowedIntents is used when a provided intent is\r
+ // not enabled.\r
+ GatewayCloseEventCodeDisallowedIntents = 4014\r
+)\r
-package types
-
-// GatewayIntents are the Intents for the Gateway
-type GatewayIntents int
-
-//
-const (
- GatewayIntentGuilds GatewayIntents = 1 << 0
- GatewayIntentGuildMembers = 1 << 1
- GatewayIntentGuildBans = 1 << 2
- GatewayIntentGuildEmojis = 1 << 2
- GatewayIntentGuildIntegrations = 1 << 4
- GatewayIntentGuildWebhooks = 1 << 5
- GatewayIntentGuildInvites = 1 << 6
- GatewayIntentGuildVoiceStates = 1 << 7
- GatewayIntentGuildPresences = 1 << 8
- GatewayIntentGuildMessages = 1 << 9
- GatewayIntentGuildMessageReactions = 1 << 10
- GatewayIntentGuildMessageTyping = 1 << 11
- GatewayIntentDirectMessages = 1 << 12
- GatewayIntentDirectMessageReactions = 1 << 13
- GatewayIntentDirectMessageTyping = 1 << 14
-)
+package types\r
+\r
+// GatewayIntents are the Intents for the Gateway\r
+type GatewayIntents int\r
+\r
+//\r
+const (\r
+ GatewayIntentGuilds GatewayIntents = 1 << 0\r
+ GatewayIntentGuildMembers = 1 << 1\r
+ GatewayIntentGuildBans = 1 << 2\r
+ GatewayIntentGuildEmojis = 1 << 2\r
+ GatewayIntentGuildIntegrations = 1 << 4\r
+ GatewayIntentGuildWebhooks = 1 << 5\r
+ GatewayIntentGuildInvites = 1 << 6\r
+ GatewayIntentGuildVoiceStates = 1 << 7\r
+ GatewayIntentGuildPresences = 1 << 8\r
+ GatewayIntentGuildMessages = 1 << 9\r
+ GatewayIntentGuildMessageReactions = 1 << 10\r
+ GatewayIntentGuildMessageTyping = 1 << 11\r
+ GatewayIntentDirectMessages = 1 << 12\r
+ GatewayIntentDirectMessageReactions = 1 << 13\r
+ GatewayIntentDirectMessageTyping = 1 << 14\r
+)\r
-package types
-
-// GatewayOpCodes are code tagged by the Discord Gateway to type payloads
-type GatewayOpCodes int
-
-// Valid OpCode values
-const (
- // GatewayOpCodeDispatch is when an event was dispatched.
- GatewayOpCodeDispatch GatewayOpCodes = 0
- // GatewayOpCodeHeartbeat is fired periodically by the client
- // to keep the connection alive.
- GatewayOpCodeHeartbeat = 1
- // GatewayOpCodeIdentify starts a new session during the initial handshake.
- GatewayOpCodeIdentify = 2
- // GatewayOpCodePresenceUpdate updates the client's presence.
- GatewayOpCodePresenceUpdate = 3
- // GatewayOpCodeVoiceStateUpdate is used to join/leave or
- // move between voice channels.
- GatewayOpCodeVoiceStateUpdate = 4
-
- // Yes, there is no 5
-
- // GatewayOpCodeResume resumes a previous session that was disconnected.
- GatewayOpCodeResume = 6
- // GatewayOpCodeReconnect announces that you should attempt to reconnect
- // and resume immediately.
- GatewayOpCodeReconnect = 7
- // GatewayOpCodeRequestGuildMembers requests information about offline guild
- // members in a large guild.
- GatewayOpCodeRequestGuildMembers = 8
- // GatewayOpCodeInvalidSession announces that the session has been invalidated and
- // you should reconnect and identify/resume accordingly.
- GatewayOpCodeInvalidSession = 9
- // GatewayOpCodeHello is sent immediately after connecting and contains
- // the heartbeat_interval to use.
- GatewayOpCodeHello = 10
- // GatewayOpCodeHeartbeatACK is sent in response to receiving a heartbeat
- // to acknowledge that it has been received.
- GatewayOpCodeHeartbeatACK = 11
-)
+package types\r
+\r
+// GatewayOpCodes are code tagged by the Discord Gateway to type payloads\r
+type GatewayOpCodes int\r
+\r
+// Valid OpCode values\r
+const (\r
+ // GatewayOpCodeDispatch is when an event was dispatched.\r
+ GatewayOpCodeDispatch GatewayOpCodes = 0\r
+ // GatewayOpCodeHeartbeat is fired periodically by the client\r
+ // to keep the connection alive.\r
+ GatewayOpCodeHeartbeat = 1\r
+ // GatewayOpCodeIdentify starts a new session during the initial handshake.\r
+ GatewayOpCodeIdentify = 2\r
+ // GatewayOpCodePresenceUpdate updates the client's presence.\r
+ GatewayOpCodePresenceUpdate = 3\r
+ // GatewayOpCodeVoiceStateUpdate is used to join/leave or\r
+ // move between voice channels.\r
+ GatewayOpCodeVoiceStateUpdate = 4\r
+\r
+ // Yes, there is no 5\r
+\r
+ // GatewayOpCodeResume resumes a previous session that was disconnected.\r
+ GatewayOpCodeResume = 6\r
+ // GatewayOpCodeReconnect announces that you should attempt to reconnect\r
+ // and resume immediately.\r
+ GatewayOpCodeReconnect = 7\r
+ // GatewayOpCodeRequestGuildMembers requests information about offline guild\r
+ // members in a large guild.\r
+ GatewayOpCodeRequestGuildMembers = 8\r
+ // GatewayOpCodeInvalidSession announces that the session has been invalidated and\r
+ // you should reconnect and identify/resume accordingly.\r
+ GatewayOpCodeInvalidSession = 9\r
+ // GatewayOpCodeHello is sent immediately after connecting and contains\r
+ // the heartbeat_interval to use.\r
+ GatewayOpCodeHello = 10\r
+ // GatewayOpCodeHeartbeatACK is sent in response to receiving a heartbeat\r
+ // to acknowledge that it has been received.\r
+ GatewayOpCodeHeartbeatACK = 11\r
+)\r
-package types
-
-// GuildFeatures is the features enabled for a Guild
-type GuildFeatures string
-
-const (
- // GuildFeatureInviteSplash is the feature where a guild can set an invite splash background
- GuildFeatureInviteSplash GuildFeatures = "INVITE_SPLASH"
- // GuildFeatureVIPRegions is the feature where a guild has access to set 384kbps bitrate in voice
- // // (previously VIP voice servers)
- GuildFeatureVIPRegions = "VIP_REGIONS"
- // GuildFeatureVanityURL is the feature where a guild has access to set a vanity URL
- GuildFeatureVanityURL = "VANITY_URL"
- // GuildFeatureVerified is the feature where a guild is verified
- GuildFeatureVerified = "VERIFIED"
- // GuildFeaturePartnered is the feature where a guild is partnered
- GuildFeaturePartnered = "PARTNERED"
- // GuildFeatureCommunity is the feature where a guild can enable welcome screen, Membership Screening,
- // and discovery, and receives community updates
- GuildFeatureCommunity = "COMMUNITY"
- // GuildFeatureCommerce is the feature where a guild has access to use commerce features (i.e. create store channels)
- GuildFeatureCommerce = "COMMERCE"
- // GuildFeatureNews is the feature where a guild has access to create news channels
- GuildFeatureNews = "NEWS"
- // GuildFeatureDiscoverable is the feature where a guild is able to be discovered in the directory
- GuildFeatureDiscoverable = "DISCOVERABLE"
- // GuildFeatureFeaturable is the feature where a guild is able to be featured in the directory
- GuildFeatureFeaturable = "FEATURABLE"
- // GuildFeatureAnimatedIcon is the feature where a guild has access to set an animated guild icon
- GuildFeatureAnimatedIcon = "ANIMATED_ICON"
- // GuildFeatureBanner is the feature where a guild has access to set a guild banner image
- GuildFeatureBanner = "BANNER"
- // GuildFeatureWelcomeScreenEnabled is the feature where a guild has enabled the welcome screen
- GuildFeatureWelcomeScreenEnabled = "WELCOME_SCREEN_ENABLED"
- // GuildFeatureMemberMemberVerificationGateEnabled is the feature where a guild has enabled Membership Screening
- GuildFeatureMemberMemberVerificationGateEnabled = "MEMBER_VERIFICATION_GATE_ENABLED"
- // GuildFeaturePreviewEnabled is the feature where a guild can be previewed before joining via
- // Membership Screening or the directory
- GuildFeaturePreviewEnabled = "PREVIEW_ENABLED"
-)
+package types\r
+\r
+// GuildFeatures is the features enabled for a Guild\r
+type GuildFeatures string\r
+\r
+const (\r
+ // GuildFeatureInviteSplash is the feature where a guild can set an invite splash background\r
+ GuildFeatureInviteSplash GuildFeatures = "INVITE_SPLASH"\r
+ // GuildFeatureVIPRegions is the feature where a guild has access to set 384kbps bitrate in voice\r
+ // // (previously VIP voice servers)\r
+ GuildFeatureVIPRegions = "VIP_REGIONS"\r
+ // GuildFeatureVanityURL is the feature where a guild has access to set a vanity URL\r
+ GuildFeatureVanityURL = "VANITY_URL"\r
+ // GuildFeatureVerified is the feature where a guild is verified\r
+ GuildFeatureVerified = "VERIFIED"\r
+ // GuildFeaturePartnered is the feature where a guild is partnered\r
+ GuildFeaturePartnered = "PARTNERED"\r
+ // GuildFeatureCommunity is the feature where a guild can enable welcome screen, Membership Screening,\r
+ // and discovery, and receives community updates\r
+ GuildFeatureCommunity = "COMMUNITY"\r
+ // GuildFeatureCommerce is the feature where a guild has access to use commerce features (i.e. create store channels)\r
+ GuildFeatureCommerce = "COMMERCE"\r
+ // GuildFeatureNews is the feature where a guild has access to create news channels\r
+ GuildFeatureNews = "NEWS"\r
+ // GuildFeatureDiscoverable is the feature where a guild is able to be discovered in the directory\r
+ GuildFeatureDiscoverable = "DISCOVERABLE"\r
+ // GuildFeatureFeaturable is the feature where a guild is able to be featured in the directory\r
+ GuildFeatureFeaturable = "FEATURABLE"\r
+ // GuildFeatureAnimatedIcon is the feature where a guild has access to set an animated guild icon\r
+ GuildFeatureAnimatedIcon = "ANIMATED_ICON"\r
+ // GuildFeatureBanner is the feature where a guild has access to set a guild banner image\r
+ GuildFeatureBanner = "BANNER"\r
+ // GuildFeatureWelcomeScreenEnabled is the feature where a guild has enabled the welcome screen\r
+ GuildFeatureWelcomeScreenEnabled = "WELCOME_SCREEN_ENABLED"\r
+ // GuildFeatureMemberMemberVerificationGateEnabled is the feature where a guild has enabled Membership Screening\r
+ GuildFeatureMemberMemberVerificationGateEnabled = "MEMBER_VERIFICATION_GATE_ENABLED"\r
+ // GuildFeaturePreviewEnabled is the feature where a guild can be previewed before joining via\r
+ // Membership Screening or the directory\r
+ GuildFeaturePreviewEnabled = "PREVIEW_ENABLED"\r
+)\r
-package types
-
-// MembershipStates are the different state of a membership in a Team
-type MembershipStates int
-
-const (
- // MembershipStateInvited is the state of a pending invitation
- MembershipStateInvited MembershipStates = 1
- // MembershipStateAccepted is the state of an accepted invitation
- MembershipStateAccepted = 2
-)
+package types\r
+\r
+// MembershipStates are the different state of a membership in a Team\r
+type MembershipStates int\r
+\r
+const (\r
+ // MembershipStateInvited is the state of a pending invitation\r
+ MembershipStateInvited MembershipStates = 1\r
+ // MembershipStateAccepted is the state of an accepted invitation\r
+ MembershipStateAccepted = 2\r
+)\r
-package types
-
-// MessageActivityTypes are the types of a message activity
-type MessageActivityTypes int
-
-//
-const (
- MessageActivityTypeJoin MessageActivityTypes = 1
- MessageActivityTypeSpectate = 2
- MessageActivityTypeListen = 3
- MessageActivityTypeJoinRequest = 5
-)
+package types\r
+\r
+// MessageActivityTypes are the types of a message activity\r
+type MessageActivityTypes int\r
+\r
+//\r
+const (\r
+ MessageActivityTypeJoin MessageActivityTypes = 1\r
+ MessageActivityTypeSpectate = 2\r
+ MessageActivityTypeListen = 3\r
+ MessageActivityTypeJoinRequest = 5\r
+)\r
-package types
-
-// MessageFlags are the flags of a message
-type MessageFlags int
-
-const (
- // MessageFlagCrossPosted is used when this message has been published to subscribed channels (
- // via Channel Following)
- MessageFlagCrossPosted MessageFlags = 1 << 0
- // MessageFlagIsCrossPost is used when this message originated from a message in another channel (
- // via Channel Following)
- MessageFlagIsCrossPost = 1 << 1
- // MessageFlagSuppressEmbeds is used when not include any embeds when serializing this message
- MessageFlagSuppressEmbeds = 1 << 2
- // MessageFlagSourceMessageDeleted is used when the source message for this cross post has been deleted (
- // via Channel Following)
- MessageFlagSourceMessageDeleted = 1 << 3
- // MessageFlagUrgent is used when this message came from the urgent message system
- MessageFlagUrgent = 1 << 4
-)
+package types\r
+\r
+// MessageFlags are the flags of a message\r
+type MessageFlags int\r
+\r
+const (\r
+ // MessageFlagCrossPosted is used when this message has been published to subscribed channels (\r
+ // via Channel Following)\r
+ MessageFlagCrossPosted MessageFlags = 1 << 0\r
+ // MessageFlagIsCrossPost is used when this message originated from a message in another channel (\r
+ // via Channel Following)\r
+ MessageFlagIsCrossPost = 1 << 1\r
+ // MessageFlagSuppressEmbeds is used when not include any embeds when serializing this message\r
+ MessageFlagSuppressEmbeds = 1 << 2\r
+ // MessageFlagSourceMessageDeleted is used when the source message for this cross post has been deleted (\r
+ // via Channel Following)\r
+ MessageFlagSourceMessageDeleted = 1 << 3\r
+ // MessageFlagUrgent is used when this message came from the urgent message system\r
+ MessageFlagUrgent = 1 << 4\r
+)\r
-package types
-
-// MessageTypes are the types of a message
-type MessageTypes int
-
-//
-const (
- MessageTypeDefault MessageTypes = 0
- MessageTypeRecipientAdd = 1
- MessageTypeRecipientRemove = 2
- MessageTypeCall = 3
- MessageTypeChannelNameChange = 4
- MessageTypeChannelIconChange = 5
- MessageTypeChannelPinnedMessage = 6
- MessageTypeGuildMemberJoin = 7
- MessageTypeUserPremiumGuildSubscription = 8
- MessageTypeUserPremiumGuildSubscriptionTier1 = 9
- MessageTypeUserPremiumGuildSubscriptionTier2 = 10
- MessageTypeUserPremiumGuildSubscriptionTier3 = 11
- MessageTypeChannelFollowAdd = 12
- MessageTypeGuildDiscoveryDisqualified = 14
- MessageTypeGuildDiscoveryRequalified = 15
- MessageTypeReply = 19
- MessageTypeApplicationCommand = 20
-)
+package types\r
+\r
+// MessageTypes are the types of a message\r
+type MessageTypes int\r
+\r
+//\r
+const (\r
+ MessageTypeDefault MessageTypes = 0\r
+ MessageTypeRecipientAdd = 1\r
+ MessageTypeRecipientRemove = 2\r
+ MessageTypeCall = 3\r
+ MessageTypeChannelNameChange = 4\r
+ MessageTypeChannelIconChange = 5\r
+ MessageTypeChannelPinnedMessage = 6\r
+ MessageTypeGuildMemberJoin = 7\r
+ MessageTypeUserPremiumGuildSubscription = 8\r
+ MessageTypeUserPremiumGuildSubscriptionTier1 = 9\r
+ MessageTypeUserPremiumGuildSubscriptionTier2 = 10\r
+ MessageTypeUserPremiumGuildSubscriptionTier3 = 11\r
+ MessageTypeChannelFollowAdd = 12\r
+ MessageTypeGuildDiscoveryDisqualified = 14\r
+ MessageTypeGuildDiscoveryRequalified = 15\r
+ MessageTypeReply = 19\r
+ MessageTypeApplicationCommand = 20\r
+)\r
-package types
-
-// MFALevels are the different level of MFA (a2f)
-type MFALevels int
-
-const (
- // MFALevelNone is the level where MFA is not required
- MFALevelNone MFALevels = 0
- // MFALevelElevated is the level where MFA is required
- MFALevelElevated = 1
-)
+package types\r
+\r
+// MFALevels are the different level of MFA (a2f)\r
+type MFALevels int\r
+\r
+const (\r
+ // MFALevelNone is the level where MFA is not required\r
+ MFALevelNone MFALevels = 0\r
+ // MFALevelElevated is the level where MFA is required\r
+ MFALevelElevated = 1\r
+)\r
-package types
-
-// PremiumTiers are the different tiers of a premium on a guild (aka Boosts)
-type PremiumTiers int
-
-const (
- // PremiumTierNone is the tier with no boosts
- PremiumTierNone PremiumTiers = 0
- // PremiumTierTier1 is the first boosts tier
- PremiumTierTier1 = 1
- // PremiumTierTier2 is the second boosts tier
- PremiumTierTier2 = 2
- // PremiumTierTier3 is the third boosts tier
- PremiumTierTier3 = 3
-)
+package types\r
+\r
+// PremiumTiers are the different tiers of a premium on a guild (aka Boosts)\r
+type PremiumTiers int\r
+\r
+const (\r
+ // PremiumTierNone is the tier with no boosts\r
+ PremiumTierNone PremiumTiers = 0\r
+ // PremiumTierTier1 is the first boosts tier\r
+ PremiumTierTier1 = 1\r
+ // PremiumTierTier2 is the second boosts tier\r
+ PremiumTierTier2 = 2\r
+ // PremiumTierTier3 is the third boosts tier\r
+ PremiumTierTier3 = 3\r
+)\r
-package types
-
-// PremiumTypes is the level of premium a user has.
-type PremiumTypes int
-
-// Values for PremiumTypes
-const (
- PremiumTypeNone PremiumTypes = 0
- PremiumTypeNitroClassic = 1
- PremiumTypeNitro = 2
-)
+package types\r
+\r
+// PremiumTypes is the level of premium a user has.\r
+type PremiumTypes int\r
+\r
+// Values for PremiumTypes\r
+const (\r
+ PremiumTypeNone PremiumTypes = 0\r
+ PremiumTypeNitroClassic = 1\r
+ PremiumTypeNitro = 2\r
+)\r
-package types
-
-// Statuses is a Presence status for a user
-type Statuses string
-
-const (
- // StatusOnline is the status for an online user
- StatusOnline Statuses = "online"
- // StatusIdle is the status for an idle user
- StatusIdle = "idle"
- // StatusDND is the status for a user in Do not Disturb
- StatusDND = "dnd"
- // StatusOffline is the status for an offline or invisible user
- StatusOffline = "offline"
-)
+package types\r
+\r
+// Statuses is a Presence status for a user\r
+type Statuses string\r
+\r
+const (\r
+ // StatusOnline is the status for an online user\r
+ StatusOnline Statuses = "online"\r
+ // StatusIdle is the status for an idle user\r
+ StatusIdle = "idle"\r
+ // StatusDND is the status for a user in Do not Disturb\r
+ StatusDND = "dnd"\r
+ // StatusOffline is the status for an offline or invisible user\r
+ StatusOffline = "offline"\r
+)\r
-package types
-
-// StickerTypes are the types of a sticker
-type StickerTypes int
-
-//
-const (
- StickerTypePNG StickerTypes = 1
- StickerTypeAPNG = 2
- StickerTypeLottie = 3
-)
+package types\r
+\r
+// StickerTypes are the types of a sticker\r
+type StickerTypes int\r
+\r
+//\r
+const (\r
+ StickerTypePNG StickerTypes = 1\r
+ StickerTypeAPNG = 2\r
+ StickerTypeLottie = 3\r
+)\r
-package types
-
-// SystemChannelFlags are the flags of a channel
-type SystemChannelFlags int
-
-const (
- // SystemChannelFlagSuppressJoinNotifications is the flag when a channel suppresses member join notifications
- SystemChannelFlagSuppressJoinNotifications SystemChannelFlags = 1 << 0
- // SystemChannelFlagSuppressPremiumSubscriptions is the flag when a channel suppresses server boost notifications
- SystemChannelFlagSuppressPremiumSubscriptions = 1 << 1
-)
+package types\r
+\r
+// SystemChannelFlags are the flags of a channel\r
+type SystemChannelFlags int\r
+\r
+const (\r
+ // SystemChannelFlagSuppressJoinNotifications is the flag when a channel suppresses member join notifications\r
+ SystemChannelFlagSuppressJoinNotifications SystemChannelFlags = 1 << 0\r
+ // SystemChannelFlagSuppressPremiumSubscriptions is the flag when a channel suppresses server boost notifications\r
+ SystemChannelFlagSuppressPremiumSubscriptions = 1 << 1\r
+)\r
-package types
-
-// TargetUserTypes are the types of invite target
-type TargetUserTypes int
-
-const (
- // TargetUserTypeStream is a stream target
- TargetUserTypeStream TargetUserTypes = 1
-)
+package types\r
+\r
+// TargetUserTypes are the types of invite target\r
+type TargetUserTypes int\r
+\r
+const (\r
+ // TargetUserTypeStream is a stream target\r
+ TargetUserTypeStream TargetUserTypes = 1\r
+)\r
-package types
-
-// UpdateStatusStatuses are the statuses used in a Update Status gateway command
-type UpdateStatusStatuses string
-
-//
-const (
- // UpdateStatusStatusOnline is the online status
- UpdateStatusStatusOnline UpdateStatusStatuses = "online"
- // UpdateStatusStatusDoNotDisturb is the Do Not Disturb status
- UpdateStatusStatusDoNotDisturb = "dnd"
- // UpdateStatusStatusIdle is the AFK status
- UpdateStatusStatusIdle = "idle"
- // UpdateStatusStatusInvisible is the Invisible status, shown as offline
- UpdateStatusStatusInvisible = "invisible"
- // UpdateStatusStatusOffline is the offline status
- UpdateStatusStatusOffline = "offline"
-)
+package types\r
+\r
+// UpdateStatusStatuses are the statuses used in a Update Status gateway command\r
+type UpdateStatusStatuses string\r
+\r
+//\r
+const (\r
+ // UpdateStatusStatusOnline is the online status\r
+ UpdateStatusStatusOnline UpdateStatusStatuses = "online"\r
+ // UpdateStatusStatusDoNotDisturb is the Do Not Disturb status\r
+ UpdateStatusStatusDoNotDisturb = "dnd"\r
+ // UpdateStatusStatusIdle is the AFK status\r
+ UpdateStatusStatusIdle = "idle"\r
+ // UpdateStatusStatusInvisible is the Invisible status, shown as offline\r
+ UpdateStatusStatusInvisible = "invisible"\r
+ // UpdateStatusStatusOffline is the offline status\r
+ UpdateStatusStatusOffline = "offline"\r
+)\r
-package types
-
-// UserFlags is the flags of a User
-type UserFlags int
-
-// Valid UserFlags
-const (
- UserFlagNone UserFlags = 0
- UserFlagDiscordEmployee = 1 << 0
- UserFlagPartneredServerOwner = 1 << 1
- UserFlagHypeSquadEvents = 1 << 2
- UserFlagBugHunterLevel1 = 1 << 3
- UserFlagHouseBravery = 1 << 6
- UserFlagHouseBrilliance = 1 << 7
- UserFlagHouseBalance = 1 << 8
- UserFlagEarlySupporter = 1 << 9
- UserFlagTeamUser = 1 << 10
- UserFlagSystem = 1 << 12
- UserFlagBugHunterLevel2 = 1 << 14
- UserFlagVerifiedBot = 1 << 16
- UserFlagEarlyVerifiedBotDeveloper = 1 << 17
-)
+package types\r
+\r
+// UserFlags is the flags of a User\r
+type UserFlags int\r
+\r
+// Valid UserFlags\r
+const (\r
+ UserFlagNone UserFlags = 0\r
+ UserFlagDiscordEmployee = 1 << 0\r
+ UserFlagPartneredServerOwner = 1 << 1\r
+ UserFlagHypeSquadEvents = 1 << 2\r
+ UserFlagBugHunterLevel1 = 1 << 3\r
+ UserFlagHouseBravery = 1 << 6\r
+ UserFlagHouseBrilliance = 1 << 7\r
+ UserFlagHouseBalance = 1 << 8\r
+ UserFlagEarlySupporter = 1 << 9\r
+ UserFlagTeamUser = 1 << 10\r
+ UserFlagSystem = 1 << 12\r
+ UserFlagBugHunterLevel2 = 1 << 14\r
+ UserFlagVerifiedBot = 1 << 16\r
+ UserFlagEarlyVerifiedBotDeveloper = 1 << 17\r
+)\r
-package types
-
-// VerificationLevels is the verification level of a guild
-type VerificationLevels int
-
-const (
- // VerificationLevelNone needs nothing
- VerificationLevelNone VerificationLevels = 0
- // VerificationLevelLow needs members to have a verified email
- VerificationLevelLow = 1
- // VerificationLevelMedium needs members to be registered on Discord for
- // longer than 5 minutes
- VerificationLevelMedium = 2
- // VerificationLevelHigh needs members to be a member of the server for
- // longer than 10 minutes
- VerificationLevelHigh = 3
- // VerificationLevelVeryHigh needs members to have a verified phone number
- VerificationLevelVeryHigh = 4
-)
+package types\r
+\r
+// VerificationLevels is the verification level of a guild\r
+type VerificationLevels int\r
+\r
+const (\r
+ // VerificationLevelNone needs nothing\r
+ VerificationLevelNone VerificationLevels = 0\r
+ // VerificationLevelLow needs members to have a verified email\r
+ VerificationLevelLow = 1\r
+ // VerificationLevelMedium needs members to be registered on Discord for\r
+ // longer than 5 minutes\r
+ VerificationLevelMedium = 2\r
+ // VerificationLevelHigh needs members to be a member of the server for\r
+ // longer than 10 minutes\r
+ VerificationLevelHigh = 3\r
+ // VerificationLevelVeryHigh needs members to have a verified phone number\r
+ VerificationLevelVeryHigh = 4\r
+)\r
-package types
-
-// VoiceGatewayCloseEventCodes is a code explaining the close of a connection
-// to the Voice gateway
-type VoiceGatewayCloseEventCodes int
-
-// Valid codes
-const (
- // VoiceGatewayCloseEventCodeUnknownOpcode is used after sending an
- // invalid Opcode
- VoiceGatewayCloseEventCodeUnknownOpcode VoiceGatewayCloseEventCodes = 4001
- // VoiceGatewayCloseEventCodeFailedToDecodePayload is used after sending an
- // invalid payload
- VoiceGatewayCloseEventCodeFailedToDecodePayload = 4002
- // VoiceGatewayCloseEventCodeNotAuthenticated is used after sending a payload
- // prior to the Identifying one.
- VoiceGatewayCloseEventCodeNotAuthenticated = 4003
- // VoiceGatewayCloseEventCodeAuthenticationFailed is used after sending an
- // invalid Identify payload
- VoiceGatewayCloseEventCodeAuthenticationFailed = 4004
- // VoiceGatewayCloseEventCodeAlreadyAuthenticated is used when sending more
- // than ono Identify payload
- VoiceGatewayCloseEventCodeAlreadyAuthenticated = 4005
- // VoiceGatewayCloseEventCodeSessionNoLongerValid is used when a session is
- // no longer valid
- VoiceGatewayCloseEventCodeSessionNoLongerValid = 4006
-
- /* there is no 4007 and 4008 */
-
- // VoiceGatewayCloseEventCodeSessionTimeout is used when a session timed out
- VoiceGatewayCloseEventCodeSessionTimeout = 4009
-
- /* no 4010 :angry_face: */
-
- // VoiceGatewayCloseEventCodeServerNotFound is used after asking for an
- // invalid voice server
- VoiceGatewayCloseEventCodeServerNotFound = 4011
- // VoiceGatewayCloseEventCodeUnknownProtocol is used after sending an
- // unrecognized protocol
- VoiceGatewayCloseEventCodeUnknownProtocol = 4012
-
- /* There is no 1043!!!! */
-
- // VoiceGatewayCloseEventCodeDisconnected is used when the client has
- // been disconnected and should not reconnect (deleted channel, kicked...)
- VoiceGatewayCloseEventCodeDisconnected = 4014
- // VoiceGatewayCloseEventCodeVoiceServerCrashed is used after a voice
- // server crashed. Need to resume the connection...
- VoiceGatewayCloseEventCodeVoiceServerCrashed = 4015
- // VoiceGatewayCloseEventCodeUnknownEncryptionMode is used after sending a
- // payload with an unrecognized encryption
- VoiceGatewayCloseEventCodeUnknownEncryptionMode = 4016
-)
+package types\r
+\r
+// VoiceGatewayCloseEventCodes is a code explaining the close of a connection\r
+// to the Voice gateway\r
+type VoiceGatewayCloseEventCodes int\r
+\r
+// Valid codes\r
+const (\r
+ // VoiceGatewayCloseEventCodeUnknownOpcode is used after sending an\r
+ // invalid Opcode\r
+ VoiceGatewayCloseEventCodeUnknownOpcode VoiceGatewayCloseEventCodes = 4001\r
+ // VoiceGatewayCloseEventCodeFailedToDecodePayload is used after sending an\r
+ // invalid payload\r
+ VoiceGatewayCloseEventCodeFailedToDecodePayload = 4002\r
+ // VoiceGatewayCloseEventCodeNotAuthenticated is used after sending a payload\r
+ // prior to the Identifying one.\r
+ VoiceGatewayCloseEventCodeNotAuthenticated = 4003\r
+ // VoiceGatewayCloseEventCodeAuthenticationFailed is used after sending an\r
+ // invalid Identify payload\r
+ VoiceGatewayCloseEventCodeAuthenticationFailed = 4004\r
+ // VoiceGatewayCloseEventCodeAlreadyAuthenticated is used when sending more\r
+ // than ono Identify payload\r
+ VoiceGatewayCloseEventCodeAlreadyAuthenticated = 4005\r
+ // VoiceGatewayCloseEventCodeSessionNoLongerValid is used when a session is\r
+ // no longer valid\r
+ VoiceGatewayCloseEventCodeSessionNoLongerValid = 4006\r
+\r
+ /* there is no 4007 and 4008 */\r
+\r
+ // VoiceGatewayCloseEventCodeSessionTimeout is used when a session timed out\r
+ VoiceGatewayCloseEventCodeSessionTimeout = 4009\r
+\r
+ /* no 4010 :angry_face: */\r
+\r
+ // VoiceGatewayCloseEventCodeServerNotFound is used after asking for an\r
+ // invalid voice server\r
+ VoiceGatewayCloseEventCodeServerNotFound = 4011\r
+ // VoiceGatewayCloseEventCodeUnknownProtocol is used after sending an\r
+ // unrecognized protocol\r
+ VoiceGatewayCloseEventCodeUnknownProtocol = 4012\r
+\r
+ /* There is no 1043!!!! */\r
+\r
+ // VoiceGatewayCloseEventCodeDisconnected is used when the client has\r
+ // been disconnected and should not reconnect (deleted channel, kicked...)\r
+ VoiceGatewayCloseEventCodeDisconnected = 4014\r
+ // VoiceGatewayCloseEventCodeVoiceServerCrashed is used after a voice\r
+ // server crashed. Need to resume the connection...\r
+ VoiceGatewayCloseEventCodeVoiceServerCrashed = 4015\r
+ // VoiceGatewayCloseEventCodeUnknownEncryptionMode is used after sending a\r
+ // payload with an unrecognized encryption\r
+ VoiceGatewayCloseEventCodeUnknownEncryptionMode = 4016\r
+)\r
-package types
-
-// VoiceGatewayOpCodes are code tagged by the Discord Gateway to type payloads
-type VoiceGatewayOpCodes int
-
-// Valid OpCode values
-const (
- // VoiceGatewayOpCodeIdentify is used to begin a voice websocket connection
- VoiceGatewayOpCodeIdentify VoiceGatewayOpCodes = 0
- // VoiceGatewayOpCodeSelectProtocol is used to select the voice protocol
- VoiceGatewayOpCodeSelectProtocol = 1
- // VoiceGatewayOpCodeReady is used to complete the websocket handshake
- VoiceGatewayOpCodeReady = 2
- // VoiceGatewayOpCodeHeartbeat is used to keep the connection alive
- VoiceGatewayOpCodeHeartbeat = 3
- // VoiceGatewayOpCodeSessionDescription is used to describe the session
- VoiceGatewayOpCodeSessionDescription = 4
- // VoiceGatewayOpCodeSpeaking is used to indicate which users are speaking
- VoiceGatewayOpCodeSpeaking = 5
- // VoiceGatewayOpCodeHeartbeatACK is used to acknowledge a
- // received heartbeat
- VoiceGatewayOpCodeHeartbeatACK = 6
- // VoiceGatewayOpCodeResume is used to resume a connection
- VoiceGatewayOpCodeResume = 7
- // VoiceGatewayOpCodeHello is used to give the time to wait between sending
- // heartbeats in milliseconds
- VoiceGatewayOpCodeHello = 8
- // VoiceGatewayOpCodeResumed is used to acknowledge a successful
- // session resume
- VoiceGatewayOpCodeResumed = 9
-
- /* there is no 10, 11 and 12 :/ */
-
- // VoiceGatewayOpCodeClientDisconnect is used to announce the client
- // has disconnected from the voice channel
- VoiceGatewayOpCodeClientDisconnect = 13
-)
+package types\r
+\r
+// VoiceGatewayOpCodes are code tagged by the Discord Gateway to type payloads\r
+type VoiceGatewayOpCodes int\r
+\r
+// Valid OpCode values\r
+const (\r
+ // VoiceGatewayOpCodeIdentify is used to begin a voice websocket connection\r
+ VoiceGatewayOpCodeIdentify VoiceGatewayOpCodes = 0\r
+ // VoiceGatewayOpCodeSelectProtocol is used to select the voice protocol\r
+ VoiceGatewayOpCodeSelectProtocol = 1\r
+ // VoiceGatewayOpCodeReady is used to complete the websocket handshake\r
+ VoiceGatewayOpCodeReady = 2\r
+ // VoiceGatewayOpCodeHeartbeat is used to keep the connection alive\r
+ VoiceGatewayOpCodeHeartbeat = 3\r
+ // VoiceGatewayOpCodeSessionDescription is used to describe the session\r
+ VoiceGatewayOpCodeSessionDescription = 4\r
+ // VoiceGatewayOpCodeSpeaking is used to indicate which users are speaking\r
+ VoiceGatewayOpCodeSpeaking = 5\r
+ // VoiceGatewayOpCodeHeartbeatACK is used to acknowledge a\r
+ // received heartbeat\r
+ VoiceGatewayOpCodeHeartbeatACK = 6\r
+ // VoiceGatewayOpCodeResume is used to resume a connection\r
+ VoiceGatewayOpCodeResume = 7\r
+ // VoiceGatewayOpCodeHello is used to give the time to wait between sending\r
+ // heartbeats in milliseconds\r
+ VoiceGatewayOpCodeHello = 8\r
+ // VoiceGatewayOpCodeResumed is used to acknowledge a successful\r
+ // session resume\r
+ VoiceGatewayOpCodeResumed = 9\r
+\r
+ /* there is no 10, 11 and 12 :/ */\r
+\r
+ // VoiceGatewayOpCodeClientDisconnect is used to announce the client\r
+ // has disconnected from the voice channel\r
+ VoiceGatewayOpCodeClientDisconnect = 13\r
+)\r
-package gateway
-
-import "github.com/discordnova/nova/common/discord/types/payloads/gateway"
-
-// GatewayConnectionOptions is the options given to gateway when the connector is passed to it.
-type GatewayConnectionOptions struct {
- Encoding string
- TransportCompression string
-}
-
-// Compression is the interface that needs to be implemented by a generic compressor.
-type Compression interface {
- GetConnectionOptions() GatewayConnectionOptions
- DecodeMessage(data []byte) (*gateway.Payload, error)
- Reset() error
-}
+package gateway\r
+\r
+import "github.com/discordnova/nova/common/discord/types/payloads/gateway"\r
+\r
+// GatewayConnectionOptions is the options given to gateway when the connector is passed to it.\r
+type GatewayConnectionOptions struct {\r
+ Encoding string\r
+ TransportCompression string\r
+}\r
+\r
+// Compression is the interface that needs to be implemented by a generic compressor.\r
+type Compression interface {\r
+ GetConnectionOptions() GatewayConnectionOptions\r
+ DecodeMessage(data []byte) (*gateway.Payload, error)\r
+ Reset() error\r
+}\r
-package gateway
-
-// This is used to map the discord dispatch events
-// to internal names used by the event broker.
-
-// TODO: Update the types of events for the gateway v9
-var EventNames = map[string]string{
- "READY": "gateway.ready",
- "RESUMED": "gateway.resumed",
- "RECONNECT": "gateway.reconnect",
-
- "CHANNEL_CREATE": "channel.create",
- "CHANNEL_UPDATE": "channel.update",
- "CHANNEL_DELETE": "channel.delete",
-
- "GUILD_CREATE": "guild.create",
- "GUILD_UPDATE": "guild.update",
- "GUILD_DELETE": "guild.delete",
-
- "GUILD_BAN_ADD": "guild.ban.add",
- "GUILD_BAN_REMOVE": "guild.ban.remove",
-
- "GUILD_EMOJIS_UPDATE": "guild.emojis_update",
- "GUILD_INTEGRATIONS_UPDATE": "guild.integrations_update",
-
- "GUILD_MEMBER_ADD": "guild.member.add",
- "GUILD_MEMBER_REMOVE": "guild.member.remove",
- "GUILD_MEMBERS_UPDATE": "guild.member.update",
-
- "GUILD_MEMBERS_CHUNK": "guild_members_chunk",
-
- "GUILD_ROLE_CREATE": "guild.role.create",
- "GUILD_ROLE_UPDATE": "guild.role.update",
- "GUILD_ROLE_DELETE": "guild.role.delete",
-
- "INVITE_CREATE": "guild.invite.create",
- "INVITE_DELETE": "guild.invite.guild",
-
- "MESSAGE_CREATE": "message.create",
- "MESSAGE_UPDATE": "message.update",
- "MESSAGE_DELETE_BULK": "message.delete_bulk",
- "MESSAGE_REACTION_ADD": "message.reactions.add",
- "MESSAGE_REACTION_REMOVE": "message.reactions.remove",
- "MESSAGE_REACTION_REMOVE_ALL": "message.reactions.remove_all",
- "MESSAGE_REACTION_REMOVE_EMOJI": "message.reactions.remove_emoji",
- "PRESENCE_UPDATE": "users.presence_update",
- "TYPING_START": "message.typing_start",
- "USER_UPDATE": "users.update",
- "VOICE_STATE_UPDATE": "voice.state_update",
- "VOICE_SERVER_UPDATE": "voice.server_update",
- "WEBHOOKS_UPDATE": "guild.webhooks.update",
-}
+package gateway\r
+\r
+// This is used to map the discord dispatch events\r
+// to internal names used by the event broker.\r
+\r
+// TODO: Update the types of events for the gateway v9\r
+var EventNames = map[string]string{\r
+ "READY": "gateway.ready",\r
+ "RESUMED": "gateway.resumed",\r
+ "RECONNECT": "gateway.reconnect",\r
+\r
+ "CHANNEL_CREATE": "channel.create",\r
+ "CHANNEL_UPDATE": "channel.update",\r
+ "CHANNEL_DELETE": "channel.delete",\r
+\r
+ "GUILD_CREATE": "guild.create",\r
+ "GUILD_UPDATE": "guild.update",\r
+ "GUILD_DELETE": "guild.delete",\r
+\r
+ "GUILD_BAN_ADD": "guild.ban.add",\r
+ "GUILD_BAN_REMOVE": "guild.ban.remove",\r
+\r
+ "GUILD_EMOJIS_UPDATE": "guild.emojis_update",\r
+ "GUILD_INTEGRATIONS_UPDATE": "guild.integrations_update",\r
+\r
+ "GUILD_MEMBER_ADD": "guild.member.add",\r
+ "GUILD_MEMBER_REMOVE": "guild.member.remove",\r
+ "GUILD_MEMBERS_UPDATE": "guild.member.update",\r
+\r
+ "GUILD_MEMBERS_CHUNK": "guild_members_chunk",\r
+\r
+ "GUILD_ROLE_CREATE": "guild.role.create",\r
+ "GUILD_ROLE_UPDATE": "guild.role.update",\r
+ "GUILD_ROLE_DELETE": "guild.role.delete",\r
+\r
+ "INVITE_CREATE": "guild.invite.create",\r
+ "INVITE_DELETE": "guild.invite.guild",\r
+\r
+ "MESSAGE_CREATE": "message.create",\r
+ "MESSAGE_UPDATE": "message.update",\r
+ "MESSAGE_DELETE_BULK": "message.delete_bulk",\r
+ "MESSAGE_REACTION_ADD": "message.reactions.add",\r
+ "MESSAGE_REACTION_REMOVE": "message.reactions.remove",\r
+ "MESSAGE_REACTION_REMOVE_ALL": "message.reactions.remove_all",\r
+ "MESSAGE_REACTION_REMOVE_EMOJI": "message.reactions.remove_emoji",\r
+ "PRESENCE_UPDATE": "users.presence_update",\r
+ "TYPING_START": "message.typing_start",\r
+ "USER_UPDATE": "users.update",\r
+ "VOICE_STATE_UPDATE": "voice.state_update",\r
+ "VOICE_SERVER_UPDATE": "voice.server_update",\r
+ "WEBHOOKS_UPDATE": "guild.webhooks.update",\r
+}\r
-package gateway
-
-type PushData struct {
- Data []byte
- Name string
-}
-
-// Transporter is the base interface for the transportation layer of Nova
-type Transporter interface {
- PushChannel() chan PushData
- PullChannel() chan []byte
-}
+package gateway\r
+\r
+type PushData struct {\r
+ Data []byte\r
+ Name string\r
+}\r
+\r
+// Transporter is the base interface for the transportation layer of Nova\r
+type Transporter interface {\r
+ PushChannel() chan PushData\r
+ PullChannel() chan []byte\r
+}\r
-package common
-
-import (
- "flag"
- "os"
-
- "github.com/rs/zerolog"
- "github.com/rs/zerolog/log"
-)
-
-var (
- debug *bool = flag.Bool("debug", false, "enables the debug mode")
- pretty *bool = flag.Bool("pretty", false, "enables the pretty log messages")
-)
-
-func SetupLogger() {
- if *pretty {
- log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr})
- }
- zerolog.TimeFieldFormat = zerolog.TimeFormatUnix
- zerolog.SetGlobalLevel(zerolog.InfoLevel)
- if *debug {
- zerolog.SetGlobalLevel(zerolog.DebugLevel)
- }
-}
+package common\r
+\r
+import (\r
+ "flag"\r
+ "os"\r
+\r
+ "github.com/rs/zerolog"\r
+ "github.com/rs/zerolog/log"\r
+)\r
+\r
+var (\r
+ debug *bool = flag.Bool("debug", false, "enables the debug mode")\r
+ pretty *bool = flag.Bool("pretty", false, "enables the pretty log messages")\r
+)\r
+\r
+func SetupLogger() {\r
+ if *pretty {\r
+ log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr})\r
+ }\r
+ zerolog.TimeFieldFormat = zerolog.TimeFormatUnix\r
+ zerolog.SetGlobalLevel(zerolog.InfoLevel)\r
+ if *debug {\r
+ zerolog.SetGlobalLevel(zerolog.DebugLevel)\r
+ }\r
+}\r
-package common
-
-import (
- "fmt"
- "net/http"
-
- "github.com/prometheus/client_golang/prometheus/promhttp"
- "github.com/rs/zerolog/log"
-)
-
-// CreatePrometheus creates a webserver instance that returns the metrics of the
-// current program reported using promauto.
-func CreatePrometheus(port int) {
- http.Handle("/metrics", promhttp.Handler())
- err := http.ListenAndServe(fmt.Sprintf(":%d", port), nil)
-
- if err != nil {
- log.Err(err).Msgf("failed to start the prometheus reporting on the port :%d", port)
- }
-}
+package common\r
+\r
+import (\r
+ "fmt"\r
+ "net/http"\r
+\r
+ "github.com/prometheus/client_golang/prometheus/promhttp"\r
+ "github.com/rs/zerolog/log"\r
+)\r
+\r
+// CreatePrometheus creates a webserver instance that returns the metrics of the\r
+// current program reported using promauto.\r
+func CreatePrometheus(port int) {\r
+ http.Handle("/metrics", promhttp.Handler())\r
+ err := http.ListenAndServe(fmt.Sprintf(":%d", port), nil)\r
+\r
+ if err != nil {\r
+ log.Err(err).Msgf("failed to start the prometheus reporting on the port :%d", port)\r
+ }\r
+}\r
+++ /dev/null
-load("@bazel_gazelle//:deps.bzl", "go_repository")
-
-def go_dependencies():
- go_repository(
- name = "co_honnef_go_tools",
- importpath = "honnef.co/go/tools",
- sum = "h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM=",
- version = "v0.0.1-2019.2.3",
- )
- go_repository(
- name = "com_github_acomagu_bufpipe",
- importpath = "github.com/acomagu/bufpipe",
- sum = "h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk=",
- version = "v1.0.3",
- )
-
- go_repository(
- name = "com_github_afex_hystrix_go",
- importpath = "github.com/afex/hystrix-go",
- sum = "h1:rFw4nCn9iMW+Vajsk51NtYIcwSTkXr+JGrMd36kTDJw=",
- version = "v0.0.0-20180502004556-fa1af6a1f4f5",
- )
- go_repository(
- name = "com_github_alecthomas_template",
- importpath = "github.com/alecthomas/template",
- sum = "h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM=",
- version = "v0.0.0-20190718012654-fb15b899a751",
- )
- go_repository(
- name = "com_github_alecthomas_units",
- importpath = "github.com/alecthomas/units",
- sum = "h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E=",
- version = "v0.0.0-20190924025748-f65c72e2690d",
- )
- go_repository(
- name = "com_github_anmitsu_go_shlex",
- importpath = "github.com/anmitsu/go-shlex",
- sum = "h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA=",
- version = "v0.0.0-20161002113705-648efa622239",
- )
- go_repository(
- name = "com_github_antihax_optional",
- importpath = "github.com/antihax/optional",
- sum = "h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg=",
- version = "v1.0.0",
- )
-
- go_repository(
- name = "com_github_apache_thrift",
- importpath = "github.com/apache/thrift",
- sum = "h1:5hryIiq9gtn+MiLVn0wP37kb/uTeRZgN08WoCsAhIhI=",
- version = "v0.13.0",
- )
- go_repository(
- name = "com_github_armon_circbuf",
- importpath = "github.com/armon/circbuf",
- sum = "h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA=",
- version = "v0.0.0-20150827004946-bbbad097214e",
- )
- go_repository(
- name = "com_github_armon_go_metrics",
- importpath = "github.com/armon/go-metrics",
- sum = "h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I=",
- version = "v0.0.0-20180917152333-f0300d1749da",
- )
- go_repository(
- name = "com_github_armon_go_radix",
- importpath = "github.com/armon/go-radix",
- sum = "h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to=",
- version = "v0.0.0-20180808171621-7fddfc383310",
- )
- go_repository(
- name = "com_github_armon_go_socks5",
- importpath = "github.com/armon/go-socks5",
- sum = "h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=",
- version = "v0.0.0-20160902184237-e75332964ef5",
- )
-
- go_repository(
- name = "com_github_aryann_difflib",
- importpath = "github.com/aryann/difflib",
- sum = "h1:pv34s756C4pEXnjgPfGYgdhg/ZdajGhyOvzx8k+23nw=",
- version = "v0.0.0-20170710044230-e206f873d14a",
- )
- go_repository(
- name = "com_github_aws_aws_lambda_go",
- importpath = "github.com/aws/aws-lambda-go",
- sum = "h1:SuCy7H3NLyp+1Mrfp+m80jcbi9KYWAs9/BXwppwRDzY=",
- version = "v1.13.3",
- )
- go_repository(
- name = "com_github_aws_aws_sdk_go",
- importpath = "github.com/aws/aws-sdk-go",
- sum = "h1:0xphMHGMLBrPMfxR2AmVjZKcMEESEgWF8Kru94BNByk=",
- version = "v1.27.0",
- )
- go_repository(
- name = "com_github_aws_aws_sdk_go_v2",
- importpath = "github.com/aws/aws-sdk-go-v2",
- sum = "h1:qZ+woO4SamnH/eEbjM2IDLhRNwIwND/RQyVlBLp3Jqg=",
- version = "v0.18.0",
- )
- go_repository(
- name = "com_github_beorn7_perks",
- importpath = "github.com/beorn7/perks",
- sum = "h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=",
- version = "v1.0.1",
- )
- go_repository(
- name = "com_github_bgentry_speakeasy",
- importpath = "github.com/bgentry/speakeasy",
- sum = "h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY=",
- version = "v0.1.0",
- )
- go_repository(
- name = "com_github_boz_go_throttle",
- importpath = "github.com/boz/go-throttle",
- sum = "h1:1fx+RA5lk1ZkzPAUP7DEgZnVHYxEcHO77vQO/V8z/2Q=",
- version = "v0.0.0-20160922054636-fdc4eab740c1",
- )
- go_repository(
- name = "com_github_burntsushi_toml",
- importpath = "github.com/BurntSushi/toml",
- sum = "h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=",
- version = "v0.3.1",
- )
- go_repository(
- name = "com_github_casbin_casbin_v2",
- importpath = "github.com/casbin/casbin/v2",
- sum = "h1:bTwon/ECRx9dwBy2ewRVr5OiqjeXSGiTUY74sDPQi/g=",
- version = "v2.1.2",
- )
- go_repository(
- name = "com_github_cenkalti_backoff",
- importpath = "github.com/cenkalti/backoff",
- sum = "h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4=",
- version = "v2.2.1+incompatible",
- )
- go_repository(
- name = "com_github_census_instrumentation_opencensus_proto",
- importpath = "github.com/census-instrumentation/opencensus-proto",
- sum = "h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk=",
- version = "v0.2.1",
- )
- go_repository(
- name = "com_github_cespare_xxhash",
- importpath = "github.com/cespare/xxhash",
- sum = "h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=",
- version = "v1.1.0",
- )
-
- go_repository(
- name = "com_github_cespare_xxhash_v2",
- importpath = "github.com/cespare/xxhash/v2",
- sum = "h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=",
- version = "v2.1.1",
- )
- go_repository(
- name = "com_github_clbanning_x2j",
- importpath = "github.com/clbanning/x2j",
- sum = "h1:EdRZT3IeKQmfCSrgo8SZ8V3MEnskuJP0wCYNpe+aiXo=",
- version = "v0.0.0-20191024224557-825249438eec",
- )
- go_repository(
- name = "com_github_client9_misspell",
- importpath = "github.com/client9/misspell",
- sum = "h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI=",
- version = "v0.3.4",
- )
- go_repository(
- name = "com_github_cncf_udpa_go",
- importpath = "github.com/cncf/udpa/go",
- sum = "h1:cqQfy1jclcSy/FwLjemeg3SR1yaINm74aQyupQ0Bl8M=",
- version = "v0.0.0-20201120205902-5459f2c99403",
- )
- go_repository(
- name = "com_github_cncf_xds_go",
- importpath = "github.com/cncf/xds/go",
- sum = "h1:OZmjad4L3H8ncOIR8rnb5MREYqG8ixi5+WbeUsquF0c=",
- version = "v0.0.0-20210312221358-fbca930ec8ed",
- )
-
- go_repository(
- name = "com_github_cockroachdb_datadriven",
- importpath = "github.com/cockroachdb/datadriven",
- sum = "h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y=",
- version = "v0.0.0-20190809214429-80d97fb3cbaa",
- )
- go_repository(
- name = "com_github_codahale_hdrhistogram",
- importpath = "github.com/codahale/hdrhistogram",
- sum = "h1:qMd81Ts1T2OTKmB4acZcyKaMtRnY5Y44NuXGX2GFJ1w=",
- version = "v0.0.0-20161010025455-3a0bb77429bd",
- )
- go_repository(
- name = "com_github_coreos_go_semver",
- importpath = "github.com/coreos/go-semver",
- sum = "h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazuY=",
- version = "v0.2.0",
- )
- go_repository(
- name = "com_github_coreos_go_systemd",
- importpath = "github.com/coreos/go-systemd",
- sum = "h1:u9SHYsPQNyt5tgDm3YN7+9dYrpK96E5wFilTFWIDZOM=",
- version = "v0.0.0-20180511133405-39ca1b05acc7",
- )
- go_repository(
- name = "com_github_coreos_go_systemd_v22",
- importpath = "github.com/coreos/go-systemd/v22",
- sum = "h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI=",
- version = "v22.3.2",
- )
- go_repository(
- name = "com_github_coreos_pkg",
- importpath = "github.com/coreos/pkg",
- sum = "h1:CAKfRE2YtTUIjjh1bkBtyYFaUT/WmOqsJjgtihT0vMI=",
- version = "v0.0.0-20160727233714-3ac0863d7acf",
- )
- go_repository(
- name = "com_github_cpuguy83_go_md2man_v2",
- importpath = "github.com/cpuguy83/go-md2man/v2",
- sum = "h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=",
- version = "v2.0.0-20190314233015-f79a8a8ca69d",
- )
- go_repository(
- name = "com_github_creack_pty",
- importpath = "github.com/creack/pty",
- sum = "h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w=",
- version = "v1.1.9",
- )
- go_repository(
- name = "com_github_davecgh_go_spew",
- importpath = "github.com/davecgh/go-spew",
- sum = "h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=",
- version = "v1.1.1",
- )
- go_repository(
- name = "com_github_dgrijalva_jwt_go",
- importpath = "github.com/dgrijalva/jwt-go",
- sum = "h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=",
- version = "v3.2.0+incompatible",
- )
- go_repository(
- name = "com_github_dustin_go_humanize",
- importpath = "github.com/dustin/go-humanize",
- sum = "h1:qk/FSDDxo05wdJH28W+p5yivv7LuLYLRXPPD8KQCtZs=",
- version = "v0.0.0-20171111073723-bb3d318650d4",
- )
- go_repository(
- name = "com_github_eapache_go_resiliency",
- importpath = "github.com/eapache/go-resiliency",
- sum = "h1:1NtRmCAqadE2FN4ZcN6g90TP3uk8cg9rn9eNK2197aU=",
- version = "v1.1.0",
- )
- go_repository(
- name = "com_github_eapache_go_xerial_snappy",
- importpath = "github.com/eapache/go-xerial-snappy",
- sum = "h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw=",
- version = "v0.0.0-20180814174437-776d5712da21",
- )
- go_repository(
- name = "com_github_eapache_queue",
- importpath = "github.com/eapache/queue",
- sum = "h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc=",
- version = "v1.1.0",
- )
- go_repository(
- name = "com_github_edsrzf_mmap_go",
- importpath = "github.com/edsrzf/mmap-go",
- sum = "h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw=",
- version = "v1.0.0",
- )
- go_repository(
- name = "com_github_emirpasic_gods",
- importpath = "github.com/emirpasic/gods",
- sum = "h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg=",
- version = "v1.12.0",
- )
-
- go_repository(
- name = "com_github_envoyproxy_go_control_plane",
- importpath = "github.com/envoyproxy/go-control-plane",
- sum = "h1:4cmBvAEBNJaGARUEs3/suWRyfyBfhf7I60WBZq+bv2w=",
- version = "v0.9.1-0.20191026205805-5f8ba28d4473",
- )
- go_repository(
- name = "com_github_envoyproxy_protoc_gen_validate",
- importpath = "github.com/envoyproxy/protoc-gen-validate",
- sum = "h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A=",
- version = "v0.1.0",
- )
- go_repository(
- name = "com_github_fatih_color",
- importpath = "github.com/fatih/color",
- sum = "h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=",
- version = "v1.7.0",
- )
- go_repository(
- name = "com_github_flynn_go_shlex",
- importpath = "github.com/flynn/go-shlex",
- sum = "h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ=",
- version = "v0.0.0-20150515145356-3f9db97f8568",
- )
-
- go_repository(
- name = "com_github_franela_goblin",
- importpath = "github.com/franela/goblin",
- sum = "h1:gb2Z18BhTPJPpLQWj4T+rfKHYCHxRHCtRxhKKjRidVw=",
- version = "v0.0.0-20200105215937-c9ffbefa60db",
- )
- go_repository(
- name = "com_github_franela_goreq",
- importpath = "github.com/franela/goreq",
- sum = "h1:a9ENSRDFBUPkJ5lCgVZh26+ZbGyoVJG7yb5SSzF5H54=",
- version = "v0.0.0-20171204163338-bcd34c9993f8",
- )
- go_repository(
- name = "com_github_fsnotify_fsnotify",
- importpath = "github.com/fsnotify/fsnotify",
- sum = "h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=",
- version = "v1.4.7",
- )
- go_repository(
- name = "com_github_ghodss_yaml",
- importpath = "github.com/ghodss/yaml",
- sum = "h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=",
- version = "v1.0.0",
- )
- go_repository(
- name = "com_github_gliderlabs_ssh",
- importpath = "github.com/gliderlabs/ssh",
- sum = "h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0=",
- version = "v0.2.2",
- )
- go_repository(
- name = "com_github_go_git_gcfg",
- importpath = "github.com/go-git/gcfg",
- sum = "h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4=",
- version = "v1.5.0",
- )
- go_repository(
- name = "com_github_go_git_go_billy_v5",
- importpath = "github.com/go-git/go-billy/v5",
- sum = "h1:CPiOUAzKtMRvolEKw+bG1PLRpT7D3LIs3/3ey4Aiu34=",
- version = "v5.3.1",
- )
- go_repository(
- name = "com_github_go_git_go_git_fixtures_v4",
- importpath = "github.com/go-git/go-git-fixtures/v4",
- sum = "h1:n9gGL1Ct/yIw+nfsfr8s4+sbhT+Ncu2SubfXjIWgci8=",
- version = "v4.2.1",
- )
- go_repository(
- name = "com_github_go_git_go_git_v5",
- importpath = "github.com/go-git/go-git/v5",
- sum = "h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4=",
- version = "v5.4.2",
- )
-
- go_repository(
- name = "com_github_go_kit_kit",
- importpath = "github.com/go-kit/kit",
- sum = "h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo=",
- version = "v0.10.0",
- )
- go_repository(
- name = "com_github_go_logfmt_logfmt",
- importpath = "github.com/go-logfmt/logfmt",
- sum = "h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4=",
- version = "v0.5.0",
- )
- go_repository(
- name = "com_github_go_sql_driver_mysql",
- importpath = "github.com/go-sql-driver/mysql",
- sum = "h1:7LxgVwFb2hIQtMm87NdgAVfXjnt4OePseqT1tKx+opk=",
- version = "v1.4.0",
- )
- go_repository(
- name = "com_github_go_stack_stack",
- importpath = "github.com/go-stack/stack",
- sum = "h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=",
- version = "v1.8.0",
- )
- go_repository(
- name = "com_github_godbus_dbus_v5",
- importpath = "github.com/godbus/dbus/v5",
- sum = "h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA=",
- version = "v5.0.4",
- )
- go_repository(
- name = "com_github_gogo_googleapis",
- importpath = "github.com/gogo/googleapis",
- sum = "h1:kFkMAZBNAn4j7K0GiZr8cRYzejq68VbheufiV3YuyFI=",
- version = "v1.1.0",
- )
- go_repository(
- name = "com_github_gogo_protobuf",
- importpath = "github.com/gogo/protobuf",
- sum = "h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE=",
- version = "v1.2.1",
- )
- go_repository(
- name = "com_github_golang_glog",
- importpath = "github.com/golang/glog",
- sum = "h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=",
- version = "v0.0.0-20160126235308-23def4e6c14b",
- )
- go_repository(
- name = "com_github_golang_groupcache",
- importpath = "github.com/golang/groupcache",
- sum = "h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I=",
- version = "v0.0.0-20190702054246-869f871628b6",
- )
- go_repository(
- name = "com_github_golang_mock",
- importpath = "github.com/golang/mock",
- sum = "h1:G5FRp8JnTd7RQH5kemVNlMeyXQAztQ3mOWV95KxsXH8=",
- version = "v1.1.1",
- )
- go_repository(
- name = "com_github_golang_protobuf",
- importpath = "github.com/golang/protobuf",
- sum = "h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=",
- version = "v1.5.2",
- )
- go_repository(
- name = "com_github_golang_snappy",
- importpath = "github.com/golang/snappy",
- sum = "h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w=",
- version = "v0.0.0-20180518054509-2e65f85255db",
- )
- go_repository(
- name = "com_github_google_btree",
- importpath = "github.com/google/btree",
- sum = "h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=",
- version = "v1.0.0",
- )
- go_repository(
- name = "com_github_google_go_cmp",
- importpath = "github.com/google/go-cmp",
- sum = "h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=",
- version = "v0.5.5",
- )
- go_repository(
- name = "com_github_google_gofuzz",
- importpath = "github.com/google/gofuzz",
- sum = "h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw=",
- version = "v1.0.0",
- )
- go_repository(
- name = "com_github_google_renameio",
- importpath = "github.com/google/renameio",
- sum = "h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA=",
- version = "v0.1.0",
- )
- go_repository(
- name = "com_github_google_shlex",
- importpath = "github.com/google/shlex",
- sum = "h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=",
- version = "v0.0.0-20191202100458-e7afc7fbc510",
- )
-
- go_repository(
- name = "com_github_google_uuid",
- importpath = "github.com/google/uuid",
- sum = "h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA=",
- version = "v1.0.0",
- )
- go_repository(
- name = "com_github_gopherjs_gopherjs",
- importpath = "github.com/gopherjs/gopherjs",
- sum = "h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=",
- version = "v0.0.0-20181017120253-0766667cb4d1",
- )
- go_repository(
- name = "com_github_gorilla_context",
- importpath = "github.com/gorilla/context",
- sum = "h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8=",
- version = "v1.1.1",
- )
- go_repository(
- name = "com_github_gorilla_mux",
- importpath = "github.com/gorilla/mux",
- sum = "h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw=",
- version = "v1.7.3",
- )
- go_repository(
- name = "com_github_gorilla_websocket",
- importpath = "github.com/gorilla/websocket",
- sum = "h1:Lh2aW+HnU2Nbe1gqD9SOJLJxW1jBMmQOktN2acDyJk8=",
- version = "v0.0.0-20170926233335-4201258b820c",
- )
- go_repository(
- name = "com_github_grpc_ecosystem_go_grpc_middleware",
- importpath = "github.com/grpc-ecosystem/go-grpc-middleware",
- sum = "h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg=",
- version = "v1.0.1-0.20190118093823-f849b5445de4",
- )
- go_repository(
- name = "com_github_grpc_ecosystem_go_grpc_prometheus",
- importpath = "github.com/grpc-ecosystem/go-grpc-prometheus",
- sum = "h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=",
- version = "v1.2.0",
- )
- go_repository(
- name = "com_github_grpc_ecosystem_grpc_gateway",
- importpath = "github.com/grpc-ecosystem/grpc-gateway",
- sum = "h1:UImYN5qQ8tuGpGE16ZmjvcTtTw24zw1QAp/SlnNrZhI=",
- version = "v1.9.5",
- )
- go_repository(
- name = "com_github_hashicorp_consul_api",
- importpath = "github.com/hashicorp/consul/api",
- sum = "h1:HXNYlRkkM/t+Y/Yhxtwcy02dlYwIaoxzvxPnS+cqy78=",
- version = "v1.3.0",
- )
- go_repository(
- name = "com_github_hashicorp_consul_sdk",
- importpath = "github.com/hashicorp/consul/sdk",
- sum = "h1:UOxjlb4xVNF93jak1mzzoBatyFju9nrkxpVwIp/QqxQ=",
- version = "v0.3.0",
- )
- go_repository(
- name = "com_github_hashicorp_errwrap",
- importpath = "github.com/hashicorp/errwrap",
- sum = "h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=",
- version = "v1.0.0",
- )
- go_repository(
- name = "com_github_hashicorp_go_cleanhttp",
- importpath = "github.com/hashicorp/go-cleanhttp",
- sum = "h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM=",
- version = "v0.5.1",
- )
- go_repository(
- name = "com_github_hashicorp_go_immutable_radix",
- importpath = "github.com/hashicorp/go-immutable-radix",
- sum = "h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0=",
- version = "v1.0.0",
- )
- go_repository(
- name = "com_github_hashicorp_go_msgpack",
- importpath = "github.com/hashicorp/go-msgpack",
- sum = "h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4=",
- version = "v0.5.3",
- )
- go_repository(
- name = "com_github_hashicorp_go_multierror",
- importpath = "github.com/hashicorp/go-multierror",
- sum = "h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o=",
- version = "v1.0.0",
- )
- go_repository(
- name = "com_github_hashicorp_go_net",
- importpath = "github.com/hashicorp/go.net",
- sum = "h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw=",
- version = "v0.0.1",
- )
- go_repository(
- name = "com_github_hashicorp_go_rootcerts",
- importpath = "github.com/hashicorp/go-rootcerts",
- sum = "h1:Rqb66Oo1X/eSV1x66xbDccZjhJigjg0+e82kpwzSwCI=",
- version = "v1.0.0",
- )
- go_repository(
- name = "com_github_hashicorp_go_sockaddr",
- importpath = "github.com/hashicorp/go-sockaddr",
- sum = "h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs=",
- version = "v1.0.0",
- )
- go_repository(
- name = "com_github_hashicorp_go_syslog",
- importpath = "github.com/hashicorp/go-syslog",
- sum = "h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE=",
- version = "v1.0.0",
- )
- go_repository(
- name = "com_github_hashicorp_go_uuid",
- importpath = "github.com/hashicorp/go-uuid",
- sum = "h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE=",
- version = "v1.0.1",
- )
- go_repository(
- name = "com_github_hashicorp_go_version",
- importpath = "github.com/hashicorp/go-version",
- sum = "h1:3vNe/fWF5CBgRIguda1meWhsZHy3m8gCJ5wx+dIzX/E=",
- version = "v1.2.0",
- )
- go_repository(
- name = "com_github_hashicorp_golang_lru",
- importpath = "github.com/hashicorp/golang-lru",
- sum = "h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU=",
- version = "v0.5.1",
- )
- go_repository(
- name = "com_github_hashicorp_logutils",
- importpath = "github.com/hashicorp/logutils",
- sum = "h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y=",
- version = "v1.0.0",
- )
- go_repository(
- name = "com_github_hashicorp_mdns",
- importpath = "github.com/hashicorp/mdns",
- sum = "h1:WhIgCr5a7AaVH6jPUwjtRuuE7/RDufnUvzIr48smyxs=",
- version = "v1.0.0",
- )
- go_repository(
- name = "com_github_hashicorp_memberlist",
- importpath = "github.com/hashicorp/memberlist",
- sum = "h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M=",
- version = "v0.1.3",
- )
- go_repository(
- name = "com_github_hashicorp_serf",
- importpath = "github.com/hashicorp/serf",
- sum = "h1:YZ7UKsJv+hKjqGVUUbtE3HNj79Eln2oQ75tniF6iPt0=",
- version = "v0.8.2",
- )
- go_repository(
- name = "com_github_hpcloud_tail",
- importpath = "github.com/hpcloud/tail",
- sum = "h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=",
- version = "v1.0.0",
- )
- go_repository(
- name = "com_github_hudl_fargo",
- importpath = "github.com/hudl/fargo",
- sum = "h1:0U6+BtN6LhaYuTnIJq4Wyq5cpn6O2kWrxAtcqBmYY6w=",
- version = "v1.3.0",
- )
- go_repository(
- name = "com_github_imdario_mergo",
- importpath = "github.com/imdario/mergo",
- sum = "h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=",
- version = "v0.3.12",
- )
-
- go_repository(
- name = "com_github_inconshreveable_mousetrap",
- importpath = "github.com/inconshreveable/mousetrap",
- sum = "h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=",
- version = "v1.0.0",
- )
- go_repository(
- name = "com_github_influxdata_influxdb1_client",
- importpath = "github.com/influxdata/influxdb1-client",
- sum = "h1:/WZQPMZNsjZ7IlCpsLGdQBINg5bxKQ1K1sh6awxLtkA=",
- version = "v0.0.0-20191209144304-8bf82d3c094d",
- )
- go_repository(
- name = "com_github_jbenet_go_context",
- importpath = "github.com/jbenet/go-context",
- sum = "h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=",
- version = "v0.0.0-20150711004518-d14ea06fba99",
- )
- go_repository(
- name = "com_github_jessevdk_go_flags",
- importpath = "github.com/jessevdk/go-flags",
- sum = "h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc=",
- version = "v1.5.0",
- )
-
- go_repository(
- name = "com_github_jmespath_go_jmespath",
- importpath = "github.com/jmespath/go-jmespath",
- sum = "h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM=",
- version = "v0.0.0-20180206201540-c2b33e8439af",
- )
- go_repository(
- name = "com_github_jonboulle_clockwork",
- importpath = "github.com/jonboulle/clockwork",
- sum = "h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=",
- version = "v0.1.0",
- )
- go_repository(
- name = "com_github_jpillora_backoff",
- importpath = "github.com/jpillora/backoff",
- sum = "h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=",
- version = "v1.0.0",
- )
- go_repository(
- name = "com_github_json_iterator_go",
- importpath = "github.com/json-iterator/go",
- sum = "h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68=",
- version = "v1.1.10",
- )
- go_repository(
- name = "com_github_jtolds_gls",
- importpath = "github.com/jtolds/gls",
- sum = "h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=",
- version = "v4.20.0+incompatible",
- )
- go_repository(
- name = "com_github_julienschmidt_httprouter",
- importpath = "github.com/julienschmidt/httprouter",
- sum = "h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U=",
- version = "v1.3.0",
- )
- go_repository(
- name = "com_github_kevinburke_ssh_config",
- importpath = "github.com/kevinburke/ssh_config",
- sum = "h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck=",
- version = "v0.0.0-20201106050909-4977a11b4351",
- )
-
- go_repository(
- name = "com_github_kisielk_errcheck",
- importpath = "github.com/kisielk/errcheck",
- sum = "h1:ZqfnKyx9KGpRcW04j5nnPDgRgoXUeLh2YFBeFzphcA0=",
- version = "v1.1.0",
- )
- go_repository(
- name = "com_github_kisielk_gotool",
- importpath = "github.com/kisielk/gotool",
- sum = "h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg=",
- version = "v1.0.0",
- )
- go_repository(
- name = "com_github_knetic_govaluate",
- importpath = "github.com/Knetic/govaluate",
- sum = "h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw=",
- version = "v3.0.1-0.20171022003610-9aa49832a739+incompatible",
- )
- go_repository(
- name = "com_github_konsorten_go_windows_terminal_sequences",
- importpath = "github.com/konsorten/go-windows-terminal-sequences",
- sum = "h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8=",
- version = "v1.0.3",
- )
- go_repository(
- name = "com_github_kr_logfmt",
- importpath = "github.com/kr/logfmt",
- sum = "h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY=",
- version = "v0.0.0-20140226030751-b84e30acd515",
- )
- go_repository(
- name = "com_github_kr_pretty",
- importpath = "github.com/kr/pretty",
- sum = "h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=",
- version = "v0.2.1",
- )
- go_repository(
- name = "com_github_kr_pty",
- importpath = "github.com/kr/pty",
- sum = "h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw=",
- version = "v1.1.1",
- )
- go_repository(
- name = "com_github_kr_text",
- importpath = "github.com/kr/text",
- sum = "h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=",
- version = "v0.2.0",
- )
- go_repository(
- name = "com_github_libgit2_git2go_v31",
- importpath = "github.com/libgit2/git2go/v31",
- sum = "h1:6GOd3965D9e/+gjxCwZF4eQ+vB9kKB4yKFqdQr6XZ2E=",
- version = "v31.4.14",
- )
-
- go_repository(
- name = "com_github_lightstep_lightstep_tracer_common_golang_gogo",
- importpath = "github.com/lightstep/lightstep-tracer-common/golang/gogo",
- sum = "h1:143Bb8f8DuGWck/xpNUOckBVYfFbBTnLevfRZ1aVVqo=",
- version = "v0.0.0-20190605223551-bc2310a04743",
- )
- go_repository(
- name = "com_github_lightstep_lightstep_tracer_go",
- importpath = "github.com/lightstep/lightstep-tracer-go",
- sum = "h1:vi1F1IQ8N7hNWytK9DpJsUfQhGuNSc19z330K6vl4zk=",
- version = "v0.18.1",
- )
- go_repository(
- name = "com_github_lyft_protoc_gen_validate",
- importpath = "github.com/lyft/protoc-gen-validate",
- sum = "h1:KNt/RhmQTOLr7Aj8PsJ7mTronaFyx80mRTT9qF261dA=",
- version = "v0.0.13",
- )
- go_repository(
- name = "com_github_matryer_is",
- importpath = "github.com/matryer/is",
- sum = "h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A=",
- version = "v1.2.0",
- )
-
- go_repository(
- name = "com_github_mattn_go_colorable",
- importpath = "github.com/mattn/go-colorable",
- sum = "h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4=",
- version = "v0.0.9",
- )
- go_repository(
- name = "com_github_mattn_go_isatty",
- importpath = "github.com/mattn/go-isatty",
- sum = "h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs=",
- version = "v0.0.4",
- )
- go_repository(
- name = "com_github_mattn_go_runewidth",
- importpath = "github.com/mattn/go-runewidth",
- sum = "h1:UnlwIPBGaTZfPQ6T1IGzPI0EkYAQmT9fAEJ/poFC63o=",
- version = "v0.0.2",
- )
- go_repository(
- name = "com_github_matttproud_golang_protobuf_extensions",
- importpath = "github.com/matttproud/golang_protobuf_extensions",
- sum = "h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=",
- version = "v1.0.1",
- )
- go_repository(
- name = "com_github_microsoft_go_winio",
- importpath = "github.com/Microsoft/go-winio",
- sum = "h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk=",
- version = "v0.4.16",
- )
-
- go_repository(
- name = "com_github_miekg_dns",
- importpath = "github.com/miekg/dns",
- sum = "h1:9jZdLNd/P4+SfEJ0TNyxYpsK8N4GtfylBLqtbYN1sbA=",
- version = "v1.0.14",
- )
- go_repository(
- name = "com_github_mitchellh_cli",
- importpath = "github.com/mitchellh/cli",
- sum = "h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y=",
- version = "v1.0.0",
- )
- go_repository(
- name = "com_github_mitchellh_go_homedir",
- importpath = "github.com/mitchellh/go-homedir",
- sum = "h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=",
- version = "v1.1.0",
- )
- go_repository(
- name = "com_github_mitchellh_go_testing_interface",
- importpath = "github.com/mitchellh/go-testing-interface",
- sum = "h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0=",
- version = "v1.0.0",
- )
- go_repository(
- name = "com_github_mitchellh_gox",
- importpath = "github.com/mitchellh/gox",
- sum = "h1:lfGJxY7ToLJQjHHwi0EX6uYBdK78egf954SQl13PQJc=",
- version = "v0.4.0",
- )
- go_repository(
- name = "com_github_mitchellh_iochan",
- importpath = "github.com/mitchellh/iochan",
- sum = "h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY=",
- version = "v1.0.0",
- )
- go_repository(
- name = "com_github_mitchellh_mapstructure",
- importpath = "github.com/mitchellh/mapstructure",
- sum = "h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=",
- version = "v1.1.2",
- )
- go_repository(
- name = "com_github_modern_go_concurrent",
- importpath = "github.com/modern-go/concurrent",
- sum = "h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=",
- version = "v0.0.0-20180306012644-bacd9c7ef1dd",
- )
- go_repository(
- name = "com_github_modern_go_reflect2",
- importpath = "github.com/modern-go/reflect2",
- sum = "h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=",
- version = "v1.0.1",
- )
- go_repository(
- name = "com_github_mwitkow_go_conntrack",
- importpath = "github.com/mwitkow/go-conntrack",
- sum = "h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=",
- version = "v0.0.0-20190716064945-2f068394615f",
- )
- go_repository(
- name = "com_github_nats_io_jwt",
- importpath = "github.com/nats-io/jwt",
- sum = "h1:+RB5hMpXUUA2dfxuhBTEkMOrYmM+gKIZYS1KjSostMI=",
- version = "v0.3.2",
- )
- go_repository(
- name = "com_github_nats_io_nats_go",
- importpath = "github.com/nats-io/nats.go",
- sum = "h1:ik3HbLhZ0YABLto7iX80pZLPw/6dx3T+++MZJwLnMrQ=",
- version = "v1.9.1",
- )
- go_repository(
- name = "com_github_nats_io_nats_server_v2",
- importpath = "github.com/nats-io/nats-server/v2",
- sum = "h1:i2Ly0B+1+rzNZHHWtD4ZwKi+OU5l+uQo1iDHZ2PmiIc=",
- version = "v2.1.2",
- )
- go_repository(
- name = "com_github_nats_io_nkeys",
- importpath = "github.com/nats-io/nkeys",
- sum = "h1:6JrEfig+HzTH85yxzhSVbjHRJv9cn0p6n3IngIcM5/k=",
- version = "v0.1.3",
- )
- go_repository(
- name = "com_github_nats_io_nuid",
- importpath = "github.com/nats-io/nuid",
- sum = "h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=",
- version = "v1.0.1",
- )
- go_repository(
- name = "com_github_niemeyer_pretty",
- importpath = "github.com/niemeyer/pretty",
- sum = "h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=",
- version = "v0.0.0-20200227124842-a10e7caefd8e",
- )
-
- go_repository(
- name = "com_github_oklog_oklog",
- importpath = "github.com/oklog/oklog",
- sum = "h1:wVfs8F+in6nTBMkA7CbRw+zZMIB7nNM825cM1wuzoTk=",
- version = "v0.3.2",
- )
- go_repository(
- name = "com_github_oklog_run",
- importpath = "github.com/oklog/run",
- sum = "h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw=",
- version = "v1.0.0",
- )
- go_repository(
- name = "com_github_olekukonko_tablewriter",
- importpath = "github.com/olekukonko/tablewriter",
- sum = "h1:58+kh9C6jJVXYjt8IE48G2eWl6BjwU5Gj0gqY84fy78=",
- version = "v0.0.0-20170122224234-a0225b3f23b5",
- )
- go_repository(
- name = "com_github_oneofone_xxhash",
- importpath = "github.com/OneOfOne/xxhash",
- sum = "h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE=",
- version = "v1.2.2",
- )
-
- go_repository(
- name = "com_github_onsi_ginkgo",
- importpath = "github.com/onsi/ginkgo",
- sum = "h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs=",
- version = "v1.7.0",
- )
- go_repository(
- name = "com_github_onsi_gomega",
- importpath = "github.com/onsi/gomega",
- sum = "h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU=",
- version = "v1.4.3",
- )
- go_repository(
- name = "com_github_op_go_logging",
- importpath = "github.com/op/go-logging",
- sum = "h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88=",
- version = "v0.0.0-20160315200505-970db520ece7",
- )
- go_repository(
- name = "com_github_opentracing_basictracer_go",
- importpath = "github.com/opentracing/basictracer-go",
- sum = "h1:YyUAhaEfjoWXclZVJ9sGoNct7j4TVk7lZWlQw5UXuoo=",
- version = "v1.0.0",
- )
- go_repository(
- name = "com_github_opentracing_contrib_go_observer",
- importpath = "github.com/opentracing-contrib/go-observer",
- sum = "h1:lM6RxxfUMrYL/f8bWEUqdXrANWtrL7Nndbm9iFN0DlU=",
- version = "v0.0.0-20170622124052-a52f23424492",
- )
- go_repository(
- name = "com_github_opentracing_opentracing_go",
- importpath = "github.com/opentracing/opentracing-go",
- sum = "h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU=",
- version = "v1.1.0",
- )
- go_repository(
- name = "com_github_openzipkin_contrib_zipkin_go_opentracing",
- importpath = "github.com/openzipkin-contrib/zipkin-go-opentracing",
- sum = "h1:ZCnq+JUrvXcDVhX/xRolRBZifmabN1HcS1wrPSvxhrU=",
- version = "v0.4.5",
- )
- go_repository(
- name = "com_github_openzipkin_zipkin_go",
- importpath = "github.com/openzipkin/zipkin-go",
- sum = "h1:nY8Hti+WKaP0cRsSeQ026wU03QsM762XBeCXBb9NAWI=",
- version = "v0.2.2",
- )
- go_repository(
- name = "com_github_pact_foundation_pact_go",
- importpath = "github.com/pact-foundation/pact-go",
- sum = "h1:OYkFijGHoZAYbOIb1LWXrwKQbMMRUv1oQ89blD2Mh2Q=",
- version = "v1.0.4",
- )
- go_repository(
- name = "com_github_pascaldekloe_goe",
- importpath = "github.com/pascaldekloe/goe",
- sum = "h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs=",
- version = "v0.0.0-20180627143212-57f6aae5913c",
- )
- go_repository(
- name = "com_github_pborman_uuid",
- importpath = "github.com/pborman/uuid",
- sum = "h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g=",
- version = "v1.2.0",
- )
- go_repository(
- name = "com_github_performancecopilot_speed",
- importpath = "github.com/performancecopilot/speed",
- sum = "h1:2WnRzIquHa5QxaJKShDkLM+sc0JPuwhXzK8OYOyt3Vg=",
- version = "v3.0.0+incompatible",
- )
- go_repository(
- name = "com_github_pierrec_lz4",
- importpath = "github.com/pierrec/lz4",
- sum = "h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I=",
- version = "v2.0.5+incompatible",
- )
- go_repository(
- name = "com_github_pkg_errors",
- importpath = "github.com/pkg/errors",
- sum = "h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=",
- version = "v0.9.1",
- )
- go_repository(
- name = "com_github_pkg_profile",
- importpath = "github.com/pkg/profile",
- sum = "h1:F++O52m40owAmADcojzM+9gyjmMOY/T4oYJkgFDH8RE=",
- version = "v1.2.1",
- )
- go_repository(
- name = "com_github_pmezard_go_difflib",
- importpath = "github.com/pmezard/go-difflib",
- sum = "h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=",
- version = "v1.0.0",
- )
- go_repository(
- name = "com_github_posener_complete",
- importpath = "github.com/posener/complete",
- sum = "h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w=",
- version = "v1.1.1",
- )
- go_repository(
- name = "com_github_prometheus_client_golang",
- importpath = "github.com/prometheus/client_golang",
- sum = "h1:Rrch9mh17XcxvEu9D9DEpb4isxjGBtcevQjKvxPRQIU=",
- version = "v1.9.0",
- )
- go_repository(
- name = "com_github_prometheus_client_model",
- importpath = "github.com/prometheus/client_model",
- sum = "h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=",
- version = "v0.2.0",
- )
- go_repository(
- name = "com_github_prometheus_common",
- importpath = "github.com/prometheus/common",
- sum = "h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM=",
- version = "v0.15.0",
- )
- go_repository(
- name = "com_github_prometheus_procfs",
- importpath = "github.com/prometheus/procfs",
- sum = "h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4=",
- version = "v0.2.0",
- )
- go_repository(
- name = "com_github_protonmail_go_crypto",
- importpath = "github.com/ProtonMail/go-crypto",
- sum = "h1:YoJbenK9C67SkzkDfmQuVln04ygHj3vjZfd9FL+GmQQ=",
- version = "v0.0.0-20210428141323-04723f9f07d7",
- )
-
- go_repository(
- name = "com_github_rcrowley_go_metrics",
- importpath = "github.com/rcrowley/go-metrics",
- sum = "h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ=",
- version = "v0.0.0-20181016184325-3113b8401b8a",
- )
- go_repository(
- name = "com_github_rogpeppe_fastuuid",
- importpath = "github.com/rogpeppe/fastuuid",
- sum = "h1:gu+uRPtBe88sKxUCEXRoeCvVG90TJmwhiqRpvdhQFng=",
- version = "v0.0.0-20150106093220-6724a57986af",
- )
- go_repository(
- name = "com_github_rogpeppe_go_internal",
- importpath = "github.com/rogpeppe/go-internal",
- sum = "h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk=",
- version = "v1.3.0",
- )
- go_repository(
- name = "com_github_rs_xid",
- importpath = "github.com/rs/xid",
- sum = "h1:mhH9Nq+C1fY2l1XIpgxIiUOfNpRBYH1kKcr+qfKgjRc=",
- version = "v1.2.1",
- )
- go_repository(
- name = "com_github_rs_zerolog",
- importpath = "github.com/rs/zerolog",
- sum = "h1:UskrK+saS9P9Y789yNNulYKdARjPZuS35B8gJF2x60g=",
- version = "v1.23.0",
- )
- go_repository(
- name = "com_github_russross_blackfriday_v2",
- importpath = "github.com/russross/blackfriday/v2",
- sum = "h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=",
- version = "v2.0.1",
- )
- go_repository(
- name = "com_github_ryanuber_columnize",
- importpath = "github.com/ryanuber/columnize",
- sum = "h1:UFr9zpz4xgTnIE5yIMtWAMngCdZ9p/+q6lTbgelo80M=",
- version = "v0.0.0-20160712163229-9b3edd62028f",
- )
- go_repository(
- name = "com_github_samuel_go_zookeeper",
- importpath = "github.com/samuel/go-zookeeper",
- sum = "h1:p3Vo3i64TCLY7gIfzeQaUJ+kppEO5WQG3cL8iE8tGHU=",
- version = "v0.0.0-20190923202752-2cc03de413da",
- )
- go_repository(
- name = "com_github_sean_seed",
- importpath = "github.com/sean-/seed",
- sum = "h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I=",
- version = "v0.0.0-20170313163322-e2103e2c3529",
- )
- go_repository(
- name = "com_github_sergi_go_diff",
- importpath = "github.com/sergi/go-diff",
- sum = "h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=",
- version = "v1.1.0",
- )
-
- go_repository(
- name = "com_github_shopify_sarama",
- importpath = "github.com/Shopify/sarama",
- sum = "h1:9oksLxC6uxVPHPVYUmq6xhr1BOF/hHobWH2UzO67z1s=",
- version = "v1.19.0",
- )
- go_repository(
- name = "com_github_shopify_toxiproxy",
- importpath = "github.com/Shopify/toxiproxy",
- sum = "h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc=",
- version = "v2.1.4+incompatible",
- )
- go_repository(
- name = "com_github_shurcool_sanitized_anchor_name",
- importpath = "github.com/shurcooL/sanitized_anchor_name",
- sum = "h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=",
- version = "v1.0.0",
- )
- go_repository(
- name = "com_github_sirupsen_logrus",
- importpath = "github.com/sirupsen/logrus",
- sum = "h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I=",
- version = "v1.6.0",
- )
- go_repository(
- name = "com_github_smartystreets_assertions",
- importpath = "github.com/smartystreets/assertions",
- sum = "h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=",
- version = "v0.0.0-20180927180507-b2de0cb4f26d",
- )
- go_repository(
- name = "com_github_smartystreets_goconvey",
- importpath = "github.com/smartystreets/goconvey",
- sum = "h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=",
- version = "v1.6.4",
- )
- go_repository(
- name = "com_github_soheilhy_cmux",
- importpath = "github.com/soheilhy/cmux",
- sum = "h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E=",
- version = "v0.1.4",
- )
- go_repository(
- name = "com_github_sony_gobreaker",
- importpath = "github.com/sony/gobreaker",
- sum = "h1:oMnRNZXX5j85zso6xCPRNPtmAycat+WcoKbklScLDgQ=",
- version = "v0.4.1",
- )
- go_repository(
- name = "com_github_spaolacci_murmur3",
- importpath = "github.com/spaolacci/murmur3",
- sum = "h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ=",
- version = "v0.0.0-20180118202830-f09979ecbc72",
- )
-
- go_repository(
- name = "com_github_spf13_cobra",
- importpath = "github.com/spf13/cobra",
- sum = "h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8=",
- version = "v0.0.3",
- )
- go_repository(
- name = "com_github_spf13_pflag",
- importpath = "github.com/spf13/pflag",
- sum = "h1:aCvUg6QPl3ibpQUxyLkrEkCHtPqYJL4x9AuhqVqFis4=",
- version = "v1.0.1",
- )
- go_repository(
- name = "com_github_streadway_amqp",
- importpath = "github.com/streadway/amqp",
- sum = "h1:WhxRHzgeVGETMlmVfqhRn8RIeeNoPr2Czh33I4Zdccw=",
- version = "v0.0.0-20190827072141-edfb9018d271",
- )
- go_repository(
- name = "com_github_streadway_handy",
- importpath = "github.com/streadway/handy",
- sum = "h1:AhmOdSHeswKHBjhsLs/7+1voOxT+LLrSk/Nxvk35fug=",
- version = "v0.0.0-20190108123426-d5acb3125c2a",
- )
- go_repository(
- name = "com_github_stretchr_objx",
- importpath = "github.com/stretchr/objx",
- sum = "h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A=",
- version = "v0.1.1",
- )
- go_repository(
- name = "com_github_stretchr_testify",
- importpath = "github.com/stretchr/testify",
- sum = "h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=",
- version = "v1.7.0",
- )
- go_repository(
- name = "com_github_tmc_grpc_websocket_proxy",
- importpath = "github.com/tmc/grpc-websocket-proxy",
- sum = "h1:ndzgwNDnKIqyCvHTXaCqh9KlOWKvBry6nuXMJmonVsE=",
- version = "v0.0.0-20170815181823-89b8d40f7ca8",
- )
- go_repository(
- name = "com_github_twinproduction_go_color",
- importpath = "github.com/TwinProduction/go-color",
- sum = "h1:8n59tqmLmt8jyRsY44RPy2ixPDDw0FcVoAhlYeyz3Jw=",
- version = "v1.0.0",
- )
-
- go_repository(
- name = "com_github_urfave_cli",
- importpath = "github.com/urfave/cli",
- sum = "h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY=",
- version = "v1.22.1",
- )
- go_repository(
- name = "com_github_vividcortex_gohistogram",
- importpath = "github.com/VividCortex/gohistogram",
- sum = "h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE=",
- version = "v1.0.0",
- )
- go_repository(
- name = "com_github_xanzy_ssh_agent",
- importpath = "github.com/xanzy/ssh-agent",
- sum = "h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI=",
- version = "v0.3.0",
- )
-
- go_repository(
- name = "com_github_xiang90_probing",
- importpath = "github.com/xiang90/probing",
- sum = "h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=",
- version = "v0.0.0-20190116061207-43a291ad63a2",
- )
- go_repository(
- name = "com_github_yuin_goldmark",
- importpath = "github.com/yuin/goldmark",
- sum = "h1:ruQGxdhGHe7FWOJPT0mKs5+pD2Xs1Bm/kdGlHO04FmM=",
- version = "v1.2.1",
- )
- go_repository(
- name = "com_google_cloud_go",
- importpath = "cloud.google.com/go",
- sum = "h1:eOI3/cP2VTU6uZLDYAoic+eyzzB9YyGmJ7eIjl8rOPg=",
- version = "v0.34.0",
- )
- go_repository(
- name = "com_sourcegraph_sourcegraph_appdash",
- importpath = "sourcegraph.com/sourcegraph/appdash",
- sum = "h1:ucqkfpjg9WzSUubAO62csmucvxl4/JeW3F4I4909XkM=",
- version = "v0.0.0-20190731080439-ebfcffb1b5c0",
- )
- go_repository(
- name = "in_gopkg_alecthomas_kingpin_v2",
- importpath = "gopkg.in/alecthomas/kingpin.v2",
- sum = "h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=",
- version = "v2.2.6",
- )
- go_repository(
- name = "in_gopkg_check_v1",
- importpath = "gopkg.in/check.v1",
- sum = "h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=",
- version = "v1.0.0-20201130134442-10cb98267c6c",
- )
- go_repository(
- name = "in_gopkg_cheggaaa_pb_v1",
- importpath = "gopkg.in/cheggaaa/pb.v1",
- sum = "h1:Ev7yu1/f6+d+b3pi5vPdRPc6nNtP1umSfcWiEfRqv6I=",
- version = "v1.0.25",
- )
- go_repository(
- name = "in_gopkg_errgo_v2",
- importpath = "gopkg.in/errgo.v2",
- sum = "h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8=",
- version = "v2.1.0",
- )
- go_repository(
- name = "in_gopkg_fsnotify_v1",
- importpath = "gopkg.in/fsnotify.v1",
- sum = "h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=",
- version = "v1.4.7",
- )
- go_repository(
- name = "in_gopkg_gcfg_v1",
- importpath = "gopkg.in/gcfg.v1",
- sum = "h1:m8OOJ4ccYHnx2f4gQwpno8nAX5OGOh7RLaaz0pj3Ogs=",
- version = "v1.2.3",
- )
- go_repository(
- name = "in_gopkg_resty_v1",
- importpath = "gopkg.in/resty.v1",
- sum = "h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI=",
- version = "v1.12.0",
- )
- go_repository(
- name = "in_gopkg_tomb_v1",
- importpath = "gopkg.in/tomb.v1",
- sum = "h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=",
- version = "v1.0.0-20141024135613-dd632973f1e7",
- )
- go_repository(
- name = "in_gopkg_warnings_v0",
- importpath = "gopkg.in/warnings.v0",
- sum = "h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=",
- version = "v0.1.2",
- )
- go_repository(
- name = "in_gopkg_yaml_v2",
- importpath = "gopkg.in/yaml.v2",
- sum = "h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=",
- version = "v2.3.0",
- )
- go_repository(
- name = "in_gopkg_yaml_v3",
- importpath = "gopkg.in/yaml.v3",
- sum = "h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=",
- version = "v3.0.0-20200313102051-9f266ea9e77c",
- )
-
- go_repository(
- name = "io_etcd_go_bbolt",
- importpath = "go.etcd.io/bbolt",
- sum = "h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk=",
- version = "v1.3.3",
- )
- go_repository(
- name = "io_etcd_go_etcd",
- importpath = "go.etcd.io/etcd",
- sum = "h1:VcrIfasaLFkyjk6KNlXQSzO+B0fZcnECiDrKJsfxka0=",
- version = "v0.0.0-20191023171146-3cf2f69b5738",
- )
- go_repository(
- name = "io_k8s_sigs_yaml",
- importpath = "sigs.k8s.io/yaml",
- sum = "h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=",
- version = "v1.1.0",
- )
- go_repository(
- name = "io_opencensus_go",
- importpath = "go.opencensus.io",
- sum = "h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs=",
- version = "v0.22.2",
- )
- go_repository(
- name = "io_opentelemetry_go_proto_otlp",
- importpath = "go.opentelemetry.io/proto/otlp",
- sum = "h1:rwOQPCuKAKmwGKq2aVNnYIibI6wnV7EvzgfTCzcdGg8=",
- version = "v0.7.0",
- )
-
- go_repository(
- name = "org_golang_google_api",
- importpath = "google.golang.org/api",
- sum = "h1:oJra/lMfmtm13/rgY/8i3MzjFWYXvQIAKjQ3HqofMk8=",
- version = "v0.3.1",
- )
- go_repository(
- name = "org_golang_google_appengine",
- importpath = "google.golang.org/appengine",
- sum = "h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508=",
- version = "v1.4.0",
- )
- go_repository(
- name = "org_golang_google_genproto",
- importpath = "google.golang.org/genproto",
- sum = "h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE=",
- version = "v0.0.0-20190819201941-24fa4b261c55",
- )
- go_repository(
- name = "org_golang_google_protobuf",
- importpath = "google.golang.org/protobuf",
- sum = "h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=",
- version = "v1.27.1",
- )
- go_repository(
- name = "org_golang_x_crypto",
- importpath = "golang.org/x/crypto",
- sum = "h1:7mWr3k41Qtv8XlltBkDkl8LoP3mpSgBW8BUoxtEdbXg=",
- version = "v0.0.0-20210421170649-83a5a9bb288b",
- )
- go_repository(
- name = "org_golang_x_exp",
- importpath = "golang.org/x/exp",
- sum = "h1:c2HOrn5iMezYjSlGPncknSEr/8x5LELb/ilJbXi9DEA=",
- version = "v0.0.0-20190121172915-509febef88a4",
- )
- go_repository(
- name = "org_golang_x_lint",
- importpath = "golang.org/x/lint",
- sum = "h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs=",
- version = "v0.0.0-20190930215403-16217165b5de",
- )
- go_repository(
- name = "org_golang_x_mod",
- importpath = "golang.org/x/mod",
- sum = "h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=",
- version = "v0.3.0",
- )
- go_repository(
- name = "org_golang_x_net",
- importpath = "golang.org/x/net",
- sum = "h1:KrsHThm5nFk34YtATK1LsThyGhGbGe1olrte/HInHvs=",
- version = "v0.0.0-20210326060303-6b1517762897",
- )
- go_repository(
- name = "org_golang_x_oauth2",
- importpath = "golang.org/x/oauth2",
- sum = "h1:Wo7BWFiOk0QRFMLYMqJGFMd9CgUAcGx7V+qEg/h5IBI=",
- version = "v0.0.0-20190226205417-e64efc72b421",
- )
- go_repository(
- name = "org_golang_x_sync",
- importpath = "golang.org/x/sync",
- sum = "h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck=",
- version = "v0.0.0-20201020160332-67f06af15bc9",
- )
- go_repository(
- name = "org_golang_x_sys",
- importpath = "golang.org/x/sys",
- sum = "h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=",
- version = "v0.0.0-20210510120138-977fb7262007",
- )
- go_repository(
- name = "org_golang_x_term",
- importpath = "golang.org/x/term",
- sum = "h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=",
- version = "v0.0.0-20201126162022-7de9c90e9dd1",
- )
-
- go_repository(
- name = "org_golang_x_text",
- importpath = "golang.org/x/text",
- sum = "h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=",
- version = "v0.3.3",
- )
- go_repository(
- name = "org_golang_x_time",
- importpath = "golang.org/x/time",
- sum = "h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs=",
- version = "v0.0.0-20191024005414-555d28b269f0",
- )
- go_repository(
- name = "org_golang_x_tools",
- importpath = "golang.org/x/tools",
- sum = "h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY=",
- version = "v0.1.0",
- )
- go_repository(
- name = "org_golang_x_xerrors",
- importpath = "golang.org/x/xerrors",
- sum = "h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=",
- version = "v0.0.0-20200804184101-5ec99f83aff1",
- )
- go_repository(
- name = "org_uber_go_atomic",
- importpath = "go.uber.org/atomic",
- sum = "h1:OI5t8sDa1Or+q8AeE+yKeB/SDYioSHAgcVljj9JIETY=",
- version = "v1.5.0",
- )
- go_repository(
- name = "org_uber_go_multierr",
- importpath = "go.uber.org/multierr",
- sum = "h1:sFPn2GLc3poCkfrpIXGhBD2X0CMIo4Q/zSULXrj/+uc=",
- version = "v1.3.0",
- )
- go_repository(
- name = "org_uber_go_tools",
- importpath = "go.uber.org/tools",
- sum = "h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4=",
- version = "v0.0.0-20190618225709-2cfd321de3ee",
- )
- go_repository(
- name = "org_uber_go_zap",
- importpath = "go.uber.org/zap",
- sum = "h1:nR6NoDBgAf67s68NhaXbsojM+2gxp3S1hWkHDl27pVU=",
- version = "v1.13.0",
- )
ports:
- "8222:8222"
- "4222:4222"
- hostname: nats-server
\ No newline at end of file
+ hostname: nats-server
+ registry:
+ restart: always
+ image: registry:2
+ ports:
+ - 5000:5000
\ No newline at end of file
load("@rules_rust//rust:rust.bzl", "rust_binary")
load("//cargo:crates.bzl", "all_crate_deps", "crate_deps")
+load("@io_bazel_rules_docker//container:container.bzl", "container_image")
load("@io_bazel_rules_docker//rust:image.bzl", "rust_image")
+load("@io_bazel_rules_docker//docker/package_managers:download_pkgs.bzl", "download_pkgs")
+load("@io_bazel_rules_docker//docker/package_managers:install_pkgs.bzl", "install_pkgs")
exports_files(["Cargo.toml"])
rust_image(
name = "image",
- srcs = glob(["src/**/*.rs"]),
- proc_macro_deps = crate_deps(["serde_repr"]),
- deps = all_crate_deps(),
+ binary = ":gateway",
visibility = ["//visibility:public"],
- base = "@io_docker_index_library_debian_stable_slim//image",
+ base = "@ubuntu1604//image",
)
\ No newline at end of file
-# Gateway
-
+# Gateway\r
+\r
The gateway component managed the connexion with the Discord event gateway using a websocket connexion.
\ No newline at end of file
-# Novactl
-
+# Novactl\r
+\r
Novactl is a simple command-line utility used to interact with your nova projects, and the nova infrastructure.
\ No newline at end of file
-package cmd
-
-import (
- "fmt"
- "io/fs"
- "io/ioutil"
- "os"
- "path/filepath"
- "strings"
-
- "github.com/TwinProduction/go-color"
- "github.com/go-git/go-git/v5"
- "github.com/spf13/cobra"
-)
-
-var (
- InitializeCommand = &cobra.Command{
- Use: "init",
- Short: "Initialize a newnova based project",
- Run: initNovaRepo,
- }
-)
-
-func initNovaRepo(cmd *cobra.Command, args []string) {
- url := "https://github.com/libgit2/git2go.git"
- path := ""
- name := "test"
-
- if name == "" {
- fmt.Print(
- color.Ize(color.Red, "A name must be specified"),
- )
- return
- }
-
- if path == "" {
- path = fmt.Sprintf("./%s", name)
- }
- cw, err := os.Getwd()
- if err != nil {
- return
- }
- path = filepath.Join(cw, path)
-
- fmt.Println(
- color.Ize(color.Green, fmt.Sprintf("Initializing a new nova project at %s", path)),
- )
- fmt.Println(
- color.Ize(color.Gray, fmt.Sprintf("Using the %s template", url)),
- )
-
- // clone the repo
- _, err = git.PlainClone(path, false, &git.CloneOptions{
- URL: url,
- Progress: os.Stdout,
- })
-
- if err != nil {
- fmt.Println(
- color.Ize(color.Red, fmt.Sprintf("Failed to initialize the repository: %s", err.Error())),
- )
- return
- }
-
- fmt.Println(
- color.Ize(color.Green, "Cloned the repository..."),
- )
-
- filepath.WalkDir(path, func(path string, d fs.DirEntry, err error) error {
- if d.IsDir() || err != nil {
- return nil
- }
-
- read, err := ioutil.ReadFile(path)
- if err != nil {
-
- }
- content := strings.ReplaceAll(string(read), "%PROJECT%", name)
-
- err = ioutil.WriteFile(path, []byte(content), 0)
-
- if err != nil {
- return err
- }
- return nil
- })
-
- err = os.RemoveAll(filepath.Join(path, ".git"))
-}
+package cmd\r
+\r
+import (\r
+ "fmt"\r
+ "io/fs"\r
+ "io/ioutil"\r
+ "os"\r
+ "path/filepath"\r
+ "strings"\r
+\r
+ "github.com/TwinProduction/go-color"\r
+ "github.com/go-git/go-git/v5"\r
+ "github.com/spf13/cobra"\r
+)\r
+\r
+var (\r
+ InitializeCommand = &cobra.Command{\r
+ Use: "init",\r
+ Short: "Initialize a newnova based project",\r
+ Run: initNovaRepo,\r
+ }\r
+)\r
+\r
+func initNovaRepo(cmd *cobra.Command, args []string) {\r
+ url := "https://github.com/libgit2/git2go.git"\r
+ path := ""\r
+ name := "test"\r
+\r
+ if name == "" {\r
+ fmt.Print(\r
+ color.Ize(color.Red, "A name must be specified"),\r
+ )\r
+ return\r
+ }\r
+\r
+ if path == "" {\r
+ path = fmt.Sprintf("./%s", name)\r
+ }\r
+ cw, err := os.Getwd()\r
+ if err != nil {\r
+ return\r
+ }\r
+ path = filepath.Join(cw, path)\r
+\r
+ fmt.Println(\r
+ color.Ize(color.Green, fmt.Sprintf("Initializing a new nova project at %s", path)),\r
+ )\r
+ fmt.Println(\r
+ color.Ize(color.Gray, fmt.Sprintf("Using the %s template", url)),\r
+ )\r
+\r
+ // clone the repo\r
+ _, err = git.PlainClone(path, false, &git.CloneOptions{\r
+ URL: url,\r
+ Progress: os.Stdout,\r
+ })\r
+\r
+ if err != nil {\r
+ fmt.Println(\r
+ color.Ize(color.Red, fmt.Sprintf("Failed to initialize the repository: %s", err.Error())),\r
+ )\r
+ return\r
+ }\r
+\r
+ fmt.Println(\r
+ color.Ize(color.Green, "Cloned the repository..."),\r
+ )\r
+\r
+ filepath.WalkDir(path, func(path string, d fs.DirEntry, err error) error {\r
+ if d.IsDir() || err != nil {\r
+ return nil\r
+ }\r
+\r
+ read, err := ioutil.ReadFile(path)\r
+ if err != nil {\r
+\r
+ }\r
+ content := strings.ReplaceAll(string(read), "%PROJECT%", name)\r
+\r
+ err = ioutil.WriteFile(path, []byte(content), 0)\r
+\r
+ if err != nil {\r
+ return err\r
+ }\r
+ return nil\r
+ })\r
+\r
+ err = os.RemoveAll(filepath.Join(path, ".git"))\r
+}\r
-package cmd
-
-import (
- "fmt"
-
- "github.com/discordnova/nova/novactl/lib"
- "github.com/spf13/cobra"
-)
-
-var (
- VersionCommand = &cobra.Command{
- Use: "version",
- Short: "Returns the version of the CLI",
- Run: version,
- }
-)
-
-func version(cmd *cobra.Command, args []string) {
- fmt.Println(fmt.Sprintf("Nova version: %s", lib.VERSION))
-}
+package cmd\r
+\r
+import (\r
+ "fmt"\r
+\r
+ "github.com/discordnova/nova/novactl/lib"\r
+ "github.com/spf13/cobra"\r
+)\r
+\r
+var (\r
+ VersionCommand = &cobra.Command{\r
+ Use: "version",\r
+ Short: "Returns the version of the CLI",\r
+ Run: version,\r
+ }\r
+)\r
+\r
+func version(cmd *cobra.Command, args []string) {\r
+ fmt.Println(fmt.Sprintf("Nova version: %s", lib.VERSION))\r
+}\r
-package lib_test
-
-import (
- "github.com/discordnova/nova/novactl/lib"
- "testing"
-)
-
-func TestVersion(t *testing.T) {
- if lib.VERSION != "0.0.1" {
- t.Fatalf("Version number do not match %s", lib.VERSION)
- }
+package lib_test\r
+\r
+import (\r
+ "github.com/discordnova/nova/novactl/lib"\r
+ "testing"\r
+)\r
+\r
+func TestVersion(t *testing.T) {\r
+ if lib.VERSION != "0.0.1" {\r
+ t.Fatalf("Version number do not match %s", lib.VERSION)\r
+ }\r
}
\ No newline at end of file
-package lib
-
-const (
- VERSION = "0.0.1"
-)
+package lib\r
+\r
+const (\r
+ VERSION = "0.0.1"\r
+)\r
-package main
-
-import (
- "github.com/discordnova/nova/novactl/cmd"
- "github.com/spf13/cobra"
-)
-
-func main() {
- rootCommand := &cobra.Command{Use: "app"}
- rootCommand.AddCommand(cmd.VersionCommand)
- rootCommand.AddCommand(cmd.InitializeCommand)
- rootCommand.Execute()
-}
+package main\r
+\r
+import (\r
+ "github.com/discordnova/nova/novactl/cmd"\r
+ "github.com/spf13/cobra"\r
+)\r
+\r
+func main() {\r
+ rootCommand := &cobra.Command{Use: "app"}\r
+ rootCommand.AddCommand(cmd.VersionCommand)\r
+ rootCommand.AddCommand(cmd.InitializeCommand)\r
+ rootCommand.Execute()\r
+}\r
-[package]
-name = "rest-ratelimiter"
-version = "0.1.0"
-edition = "2018"
-
-[dependencies]
-tonic = "0.5"
-prost = "0.8"
-tokio = { version = "1", features = ["full"] }
-
-[[bin]]
-name = "rest-ratelimiter"
-path = "src/main.rs"
-
-[build-dependencies]
-tonic-build = { version = "0.5", features = ["transport", "prost"], default-features = false }
-
-[dev-dependencies]
-tonic-build = { version = "0.5", features = ["transport", "prost"], default-features = false }
-
+[package]\r
+name = "rest-ratelimiter"\r
+version = "0.1.0"\r
+edition = "2018"\r
+\r
+[dependencies]\r
+tonic = "0.5"\r
+prost = "0.8"\r
+tokio = { version = "1", features = ["full"] }\r
+\r
+[[bin]]\r
+name = "rest-ratelimiter"\r
+path = "src/main.rs"\r
+\r
+[build-dependencies]\r
+tonic-build = { version = "0.5", features = ["transport", "prost"], default-features = false }\r
+\r
+[dev-dependencies]\r
+tonic-build = { version = "0.5", features = ["transport", "prost"], default-features = false }\r
+\r
-# Ratelimiter
-
-This is an implementation of the ratelimiting service described in the `proto/nova.ratelimit.v1.proto`.
-The library is divied in two part, a Rust library, built as a static library, and a rust executable that implements
+# Ratelimiter\r
+\r
+This is an implementation of the ratelimiting service described in the `proto/nova.ratelimit.v1.proto`.\r
+The library is divied in two part, a Rust library, built as a static library, and a rust executable that implements\r
the rate limiting algorithm. A FFI interface is exposed by the Rust static library for use in the nova-lite component.
\ No newline at end of file
-fn main() -> Result<(), Box<dyn std::error::Error>> {
- tonic_build::compile_protos("proto/nova.ratelimit.v1.proto").unwrap();
- Ok(())
+fn main() -> Result<(), Box<dyn std::error::Error>> {\r
+ tonic_build::compile_protos("proto/nova.ratelimit.v1.proto").unwrap();\r
+ Ok(())\r
}
\ No newline at end of file
-// How does this works ?
-// Every request, the proxy (envoy) requests the rate-limiting service if
-// the requested route bucket or global rate-limit is hit.
-
-syntax = "proto3";
-package nova.ratelimit.v1;
-
-// The reponse of a RatelimitRequest, it includes the status of the reponse and
-// the bucket informations.
-message RatelimitResponse {
- enum Status {
- OK = 0;
- RATELIMITED = 1;
- GLOBAL_RATELIMITED = 2;
- }
- Status status = 1;
- bool updateAsked = 2;
-}
-
-// Requests the ratelimit status of a route request, it also takes the
-// indentifiables of the request in question.
-message RatelimitRequest {
- string routeName = 1;
- repeated string indentifiables = 2;
-}
-
-// Used when "updateAsked" is sed to true
-// this means the bucket is unknown to the ratelimit server.
-message CreateBucketData {
- RatelimitRequest request = 1;
- int32 limit = 2;
- int32 remaining = 3;
- int32 reset = 4;
-}
-
-service RatelimitService {
- rpc GetRatelimitStatus (RatelimitRequest) returns (RatelimitResponse);
- rpc CreateBucket (CreateBucketData) returns (CreateBucketData);
+// How does this works ?\r
+// Every request, the proxy (envoy) requests the rate-limiting service if\r
+// the requested route bucket or global rate-limit is hit.\r
+\r
+syntax = "proto3";\r
+package nova.ratelimit.v1;\r
+\r
+// The reponse of a RatelimitRequest, it includes the status of the reponse and\r
+// the bucket informations.\r
+message RatelimitResponse {\r
+ enum Status {\r
+ OK = 0;\r
+ RATELIMITED = 1;\r
+ GLOBAL_RATELIMITED = 2;\r
+ }\r
+ Status status = 1;\r
+ bool updateAsked = 2;\r
+}\r
+\r
+// Requests the ratelimit status of a route request, it also takes the \r
+// indentifiables of the request in question.\r
+message RatelimitRequest {\r
+ string routeName = 1;\r
+ repeated string indentifiables = 2;\r
+}\r
+\r
+// Used when "updateAsked" is sed to true\r
+// this means the bucket is unknown to the ratelimit server.\r
+message CreateBucketData {\r
+ RatelimitRequest request = 1;\r
+ int32 limit = 2;\r
+ int32 remaining = 3;\r
+ int32 reset = 4;\r
+}\r
+\r
+service RatelimitService {\r
+ rpc GetRatelimitStatus (RatelimitRequest) returns (RatelimitResponse);\r
+ rpc CreateBucket (CreateBucketData) returns (CreateBucketData);\r
}
\ No newline at end of file
-// Some implementation of the gRPC service using the shared library.
-
-pub mod ratelimit_pb {
- tonic::include_proto!("nova.ratelimit.v1");
-}
-
-use ratelimit_pb::ratelimit_service_server::{RatelimitService, RatelimitServiceServer};
-use ratelimit_pb::{CreateBucketData, RatelimitResponse, RatelimitRequest};
-use tonic::{Request, Status, Response};
-use tonic::transport::Server;
-use std::error::Error;
-
-#[derive(Default)]
-pub struct MyRatelimitService {}
-
-#[tonic::async_trait]
-impl RatelimitService for MyRatelimitService {
- async fn get_ratelimit_status(
- &self,
- _request: Request<RatelimitRequest>
- ) -> Result<Response<RatelimitResponse>, Status> {
- return Err(Status::not_found("Not implmented"))
- }
- async fn create_bucket(
- &self,
- _request: Request<CreateBucketData>
- ) ->Result<Response<CreateBucketData>, Status> {
- return Err(tonic::Status::not_found("Not implmented"))
- }
-}
-
-#[tokio::main]
-async fn main() -> Result<(), Box<dyn Error>> {
- let addr = "[::1]:50051".parse().unwrap();
- let service = MyRatelimitService::default();
-
- println!("GreeterServer listening on {}", addr);
-
- Server::builder()
- .add_service(RatelimitServiceServer::new(service))
- .serve(addr)
- .await?;
-
- Ok(())
+// Some implementation of the gRPC service using the shared library.\r
+\r
+pub mod ratelimit_pb {\r
+ tonic::include_proto!("nova.ratelimit.v1");\r
+}\r
+\r
+use ratelimit_pb::ratelimit_service_server::{RatelimitService, RatelimitServiceServer};\r
+use ratelimit_pb::{CreateBucketData, RatelimitResponse, RatelimitRequest};\r
+use tonic::{Request, Status, Response};\r
+use tonic::transport::Server;\r
+use std::error::Error;\r
+\r
+#[derive(Default)]\r
+pub struct MyRatelimitService {}\r
+\r
+#[tonic::async_trait]\r
+impl RatelimitService for MyRatelimitService {\r
+ async fn get_ratelimit_status(\r
+ &self,\r
+ _request: Request<RatelimitRequest>\r
+ ) -> Result<Response<RatelimitResponse>, Status> {\r
+ return Err(Status::not_found("Not implmented"))\r
+ }\r
+ async fn create_bucket(\r
+ &self,\r
+ _request: Request<CreateBucketData>\r
+ ) ->Result<Response<CreateBucketData>, Status> {\r
+ return Err(tonic::Status::not_found("Not implmented"))\r
+ }\r
+}\r
+\r
+#[tokio::main]\r
+async fn main() -> Result<(), Box<dyn Error>> {\r
+ let addr = "[::1]:50051".parse().unwrap();\r
+ let service = MyRatelimitService::default();\r
+\r
+ println!("GreeterServer listening on {}", addr);\r
+\r
+ Server::builder()\r
+ .add_service(RatelimitServiceServer::new(service))\r
+ .serve(addr)\r
+ .await?;\r
+\r
+ Ok(())\r
}
\ No newline at end of file
-config/local*
-target/
+config/local*\r
+target/\r
nacl_test/
\ No newline at end of file
-server:
- address: "0.0.0.0"
+server:\r
+ address: "0.0.0.0"\r
port: 8000
\ No newline at end of file
-use hyper::service::Service;
-use hyper::{body::to_bytes, HeaderMap};
-use hyper::{Body, Method, Request, Response, StatusCode};
-use libsodium_sys::crypto_sign_ed25519_verify_detached;
-use log::info;
-use serde_json::Value;
-use std::future;
-use std::future::Future;
-use std::pin::Pin;
-use std::str::from_utf8;
-use std::task::{Context, Poll};
-use serde::{Deserialize, Serialize};
-
-use super::utils::Settings;
-
-pub fn validate_signature(b64_public_key: &str, data: &Vec<u8>, b64_signature: &str) -> bool {
- // First, we need to check if the signature & private key is valid base64.
- let signature_result = hex::decode(b64_signature);
- let public_key_result = hex::decode(b64_public_key);
-
- if signature_result.is_ok() && public_key_result.is_ok() {
- // Since we now have the signatures in u8 vectors. We will initialize all the
- // parameters for the ffi call to sodium.
- let signature_pointer = signature_result.unwrap();
- let private_key_pointer = public_key_result.unwrap();
-
- let data_pointer = data.as_ptr();
- let data_len = data.len() as u64;
-
- // A ffi call is considered unsafe by the Rust compiler
- // we assume all the parameters are correct for the call
- unsafe {
- // If the signature is valid, sodium will return 0
- return crypto_sign_ed25519_verify_detached(
- signature_pointer.as_ptr(),
- data_pointer,
- data_len,
- private_key_pointer.as_ptr(),
- ) == 0;
- }
- }
- false
-}
-
-fn get_signature(headers: &HeaderMap) -> Option<(&str, &str)> {
- let signature = headers.get("X-Signature-Ed25519");
- let timestamp = headers.get("X-Signature-Timestamp");
-
- if signature.is_some() && timestamp.is_some() {
- return Some((
- signature.unwrap().to_str().unwrap(),
- timestamp.unwrap().to_str().unwrap(),
- ));
- }
- None
-}
-
-pub struct HandlerService {
- pub config: Settings,
-}
-
-#[derive(Debug, Serialize, Deserialize)]
-pub struct Ping {
- #[serde(rename = "type")]
- t: i32
-}
-
-impl Service<Request<Body>> for HandlerService {
- type Response = Response<Body>;
- type Error = hyper::Error;
- type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send>>;
-
- fn poll_ready(&mut self, _: &mut Context) -> Poll<Result<(), Self::Error>> {
- Poll::Ready(Ok(()))
- }
-
- fn call(&mut self, req: Request<Body>) -> Self::Future {
- if req.method() == Method::POST {
- let public_key = self.config.discord.public_key.clone();
- return Box::pin(async move {
- let headers = req.headers().clone();
- if let Some((signature, timestamp)) = get_signature(&headers) {
- if let Ok(data) = to_bytes(req.into_body()).await {
- let contatenated_data = [timestamp.as_bytes().to_vec(), data.to_vec()].concat();
-
- if validate_signature(public_key.as_str(), &contatenated_data, signature) {
- let data: Value = serde_json::from_str(from_utf8(&data).unwrap()).unwrap();
- let t = data.get("type").unwrap().as_i64().unwrap();
-
- if t == 1 {
- info!("success!");
-
- return Ok(Response::builder().header("Content-Type", "application/json").body(serde_json::to_string(&Ping {
- t: 1
- }).unwrap().into()).unwrap());
-
- } else {
- Ok(Response::builder().status(StatusCode::UNAUTHORIZED).body("invalid operation".into()).unwrap())
- }
- } else {
- Ok(Response::builder().status(StatusCode::UNAUTHORIZED).body("signature verification failed".into()).unwrap())
- }
- } else {
- Ok(Response::builder().status(StatusCode::UNAUTHORIZED).body("failed to read body".into()).unwrap())
- }
- } else {
- Ok(Response::builder().status(StatusCode::UNAUTHORIZED).body("no signature specified".into()).unwrap())
- }
- });
- } else {
- return Box::pin(async {
- Ok(Response::builder().status(StatusCode::UNAUTHORIZED).body("bad method".into()).unwrap())
- });
- }
- }
-}
-
-pub struct MakeSvc {
- pub settings: Settings,
-}
-
-impl<T> Service<T> for MakeSvc {
- type Response = HandlerService;
- type Error = std::io::Error;
- type Future = future::Ready<Result<Self::Response, Self::Error>>;
-
- fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
- Ok(()).into()
- }
-
- fn call(&mut self, _: T) -> Self::Future {
- future::ready(Ok(HandlerService {
- config: self.settings.clone(),
- }))
- }
-}
-
-#[cfg(test)]
-mod test {
- use crate::handle::validate_signature;
-
- #[test]
- fn validate_signature_test() {
- let signature = "543ec3547d57f9ddb1ec4c5c36503ebf288ffda3da3d510764c9a49c2abb57690ef974c63d174771bdd2481de1066966f57abbec12a3ec171b9f6e2373837002";
- let public_key = "eefe0c24473737cb2035232e3b4eb91c206f0a14684168f3503f7d8316058d6f";
- let content = "message de test incroyable".as_bytes().to_vec();
- assert!(validate_signature(public_key, &content, signature))
- }
-
- #[test]
- fn validate_signature_reverse_test() {
- let signature = "543ec3547d57f9ddb1ec4c5c36503ebf288ffda3da3d510764c9a49c2abb57690ef974c63d174771bdd2481de1066966f57abbec12a3ec171b9f6e2373837002";
- let public_key = "c029eea18437292c87c62aec34e7d1bd4e38fe6126f3f7c446de6375dc666044";
- let content = "ceci est un test qui ne fonctionnera pas!"
- .as_bytes()
- .to_vec();
- assert!(!validate_signature(public_key, &content, signature))
- }
-
- #[test]
- fn invalid_hex() {
- let signature = "zzz";
- let public_key = "zzz";
- let content = "ceci est un test qui ne fonctionnera pas!"
- .as_bytes()
- .to_vec();
- assert!(!validate_signature(public_key, &content, signature))
- }
-}
+use hyper::service::Service;\r
+use hyper::{body::to_bytes, HeaderMap};\r
+use hyper::{Body, Method, Request, Response, StatusCode};\r
+use libsodium_sys::crypto_sign_ed25519_verify_detached;\r
+use log::info;\r
+use serde_json::Value;\r
+use std::future;\r
+use std::future::Future;\r
+use std::pin::Pin;\r
+use std::str::from_utf8;\r
+use std::task::{Context, Poll};\r
+use serde::{Deserialize, Serialize};\r
+\r
+use super::utils::Settings;\r
+\r
+pub fn validate_signature(b64_public_key: &str, data: &Vec<u8>, b64_signature: &str) -> bool {\r
+ // First, we need to check if the signature & private key is valid base64.\r
+ let signature_result = hex::decode(b64_signature);\r
+ let public_key_result = hex::decode(b64_public_key);\r
+\r
+ if signature_result.is_ok() && public_key_result.is_ok() {\r
+ // Since we now have the signatures in u8 vectors. We will initialize all the\r
+ // parameters for the ffi call to sodium.\r
+ let signature_pointer = signature_result.unwrap();\r
+ let private_key_pointer = public_key_result.unwrap();\r
+\r
+ let data_pointer = data.as_ptr();\r
+ let data_len = data.len() as u64;\r
+\r
+ // A ffi call is considered unsafe by the Rust compiler\r
+ // we assume all the parameters are correct for the call\r
+ unsafe {\r
+ // If the signature is valid, sodium will return 0\r
+ return crypto_sign_ed25519_verify_detached(\r
+ signature_pointer.as_ptr(),\r
+ data_pointer,\r
+ data_len,\r
+ private_key_pointer.as_ptr(),\r
+ ) == 0;\r
+ }\r
+ }\r
+ false\r
+}\r
+\r
+fn get_signature(headers: &HeaderMap) -> Option<(&str, &str)> {\r
+ let signature = headers.get("X-Signature-Ed25519");\r
+ let timestamp = headers.get("X-Signature-Timestamp");\r
+\r
+ if signature.is_some() && timestamp.is_some() {\r
+ return Some((\r
+ signature.unwrap().to_str().unwrap(),\r
+ timestamp.unwrap().to_str().unwrap(),\r
+ ));\r
+ }\r
+ None\r
+}\r
+\r
+pub struct HandlerService {\r
+ pub config: Settings,\r
+}\r
+\r
+#[derive(Debug, Serialize, Deserialize)]\r
+pub struct Ping {\r
+ #[serde(rename = "type")]\r
+ t: i32\r
+}\r
+\r
+impl Service<Request<Body>> for HandlerService {\r
+ type Response = Response<Body>;\r
+ type Error = hyper::Error;\r
+ type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send>>;\r
+\r
+ fn poll_ready(&mut self, _: &mut Context) -> Poll<Result<(), Self::Error>> {\r
+ Poll::Ready(Ok(()))\r
+ }\r
+\r
+ fn call(&mut self, req: Request<Body>) -> Self::Future {\r
+ if req.method() == Method::POST {\r
+ let public_key = self.config.discord.public_key.clone();\r
+ return Box::pin(async move {\r
+ let headers = req.headers().clone();\r
+ if let Some((signature, timestamp)) = get_signature(&headers) {\r
+ if let Ok(data) = to_bytes(req.into_body()).await {\r
+ let contatenated_data = [timestamp.as_bytes().to_vec(), data.to_vec()].concat();\r
+\r
+ if validate_signature(public_key.as_str(), &contatenated_data, signature) {\r
+ let data: Value = serde_json::from_str(from_utf8(&data).unwrap()).unwrap();\r
+ let t = data.get("type").unwrap().as_i64().unwrap();\r
+\r
+ if t == 1 {\r
+ info!("success!");\r
+\r
+ return Ok(Response::builder().header("Content-Type", "application/json").body(serde_json::to_string(&Ping {\r
+ t: 1\r
+ }).unwrap().into()).unwrap());\r
+ \r
+ } else {\r
+ Ok(Response::builder().status(StatusCode::UNAUTHORIZED).body("invalid operation".into()).unwrap())\r
+ }\r
+ } else {\r
+ Ok(Response::builder().status(StatusCode::UNAUTHORIZED).body("signature verification failed".into()).unwrap())\r
+ }\r
+ } else {\r
+ Ok(Response::builder().status(StatusCode::UNAUTHORIZED).body("failed to read body".into()).unwrap())\r
+ }\r
+ } else {\r
+ Ok(Response::builder().status(StatusCode::UNAUTHORIZED).body("no signature specified".into()).unwrap())\r
+ }\r
+ });\r
+ } else {\r
+ return Box::pin(async {\r
+ Ok(Response::builder().status(StatusCode::UNAUTHORIZED).body("bad method".into()).unwrap())\r
+ });\r
+ }\r
+ }\r
+}\r
+\r
+pub struct MakeSvc {\r
+ pub settings: Settings,\r
+}\r
+\r
+impl<T> Service<T> for MakeSvc {\r
+ type Response = HandlerService;\r
+ type Error = std::io::Error;\r
+ type Future = future::Ready<Result<Self::Response, Self::Error>>;\r
+\r
+ fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {\r
+ Ok(()).into()\r
+ }\r
+\r
+ fn call(&mut self, _: T) -> Self::Future {\r
+ future::ready(Ok(HandlerService {\r
+ config: self.settings.clone(),\r
+ }))\r
+ }\r
+}\r
+\r
+#[cfg(test)]\r
+mod test {\r
+ use crate::handle::validate_signature;\r
+\r
+ #[test]\r
+ fn validate_signature_test() {\r
+ let signature = "543ec3547d57f9ddb1ec4c5c36503ebf288ffda3da3d510764c9a49c2abb57690ef974c63d174771bdd2481de1066966f57abbec12a3ec171b9f6e2373837002";\r
+ let public_key = "eefe0c24473737cb2035232e3b4eb91c206f0a14684168f3503f7d8316058d6f";\r
+ let content = "message de test incroyable".as_bytes().to_vec();\r
+ assert!(validate_signature(public_key, &content, signature))\r
+ }\r
+\r
+ #[test]\r
+ fn validate_signature_reverse_test() {\r
+ let signature = "543ec3547d57f9ddb1ec4c5c36503ebf288ffda3da3d510764c9a49c2abb57690ef974c63d174771bdd2481de1066966f57abbec12a3ec171b9f6e2373837002";\r
+ let public_key = "c029eea18437292c87c62aec34e7d1bd4e38fe6126f3f7c446de6375dc666044";\r
+ let content = "ceci est un test qui ne fonctionnera pas!"\r
+ .as_bytes()\r
+ .to_vec();\r
+ assert!(!validate_signature(public_key, &content, signature))\r
+ }\r
+\r
+ #[test]\r
+ fn invalid_hex() {\r
+ let signature = "zzz";\r
+ let public_key = "zzz";\r
+ let content = "ceci est un test qui ne fonctionnera pas!"\r
+ .as_bytes()\r
+ .to_vec();\r
+ assert!(!validate_signature(public_key, &content, signature))\r
+ }\r
+}\r
-use std::net::ToSocketAddrs;
-
-use hyper::Server;
-use log::info;
-
-extern crate log;
-pub mod handle;
-pub mod utils;
-
-use handle::MakeSvc;
-use utils::{setup_program, Settings};
-
-#[tokio::main]
-async fn main() {
- setup_program("webhook");
- let config = Settings::new().unwrap();
-
- let addr = format!("{}:{}", config.server.address, config.server.port)
- .to_socket_addrs()
- .unwrap()
- .next()
- .unwrap();
-
- info!(
- "Starting server on {}:{}",
- config.server.address, config.server.port
- );
- let server = Server::bind(&addr).serve(MakeSvc {
- settings: config.clone(),
- });
-
- if let Err(e) = server.await {
- eprintln!("server error: {}", e);
- }
-}
+use std::net::ToSocketAddrs;\r
+\r
+use hyper::Server;\r
+use log::info;\r
+\r
+extern crate log;\r
+pub mod handle;\r
+pub mod utils;\r
+\r
+use handle::MakeSvc;\r
+use utils::{setup_program, Settings};\r
+\r
+#[tokio::main]\r
+async fn main() {\r
+ setup_program("webhook");\r
+ let config = Settings::new().unwrap();\r
+\r
+ let addr = format!("{}:{}", config.server.address, config.server.port)\r
+ .to_socket_addrs()\r
+ .unwrap()\r
+ .next()\r
+ .unwrap();\r
+\r
+ info!(\r
+ "Starting server on {}:{}",\r
+ config.server.address, config.server.port\r
+ );\r
+ let server = Server::bind(&addr).serve(MakeSvc {\r
+ settings: config.clone(),\r
+ });\r
+\r
+ if let Err(e) = server.await {\r
+ eprintln!("server error: {}", e);\r
+ }\r
+}\r
-use std::env;
-
-use config::{Config, ConfigError, Environment, File};
-use log::info;
-use serde::Deserialize;
-
-/// Executes the required configuration steps for the program,
-/// excluding build information, Sentry and logging.
-pub fn setup_program(_name: &str) {
- pretty_env_logger::init();
-}
-
-#[derive(Debug, Deserialize, Clone)]
-pub struct Server {
- pub port: u16,
- pub address: String,
-}
-
-#[derive(Debug, Deserialize, Clone)]
-pub struct Discord {
- pub public_key: String,
- pub client_id: u32,
-}
-
-#[derive(Debug, Deserialize, Clone)]
-pub struct Settings {
- pub server: Server,
- pub discord: Discord,
-}
-
-impl Settings {
- pub fn new() -> Result<Self, ConfigError> {
- let mut default = Config::default();
- default.merge(File::with_name("config/default"))?;
- let mode = env::var("ENV").unwrap_or_else(|_| "development".into());
- info!("Configuration Environment: {}", mode);
-
- default.merge(File::with_name(&format!("config/{}", mode)).required(false))?;
- default.merge(File::with_name("config/local").required(false))?;
- default.merge(Environment::with_prefix("NOVA_GATEWAY"))?;
-
- println!("Debug mode: {:?}", default.get_bool("debug"));
-
- let config: Self = default.try_into().unwrap();
-
- Ok(config)
- }
-}
+use std::env;\r
+\r
+use config::{Config, ConfigError, Environment, File};\r
+use log::info;\r
+use serde::Deserialize;\r
+\r
+/// Executes the required configuration steps for the program,\r
+/// excluding build information, Sentry and logging.\r
+pub fn setup_program(_name: &str) {\r
+ pretty_env_logger::init();\r
+}\r
+\r
+#[derive(Debug, Deserialize, Clone)]\r
+pub struct Server {\r
+ pub port: u16,\r
+ pub address: String,\r
+}\r
+\r
+#[derive(Debug, Deserialize, Clone)]\r
+pub struct Discord {\r
+ pub public_key: String,\r
+ pub client_id: u32,\r
+}\r
+\r
+#[derive(Debug, Deserialize, Clone)]\r
+pub struct Settings {\r
+ pub server: Server,\r
+ pub discord: Discord,\r
+}\r
+\r
+impl Settings {\r
+ pub fn new() -> Result<Self, ConfigError> {\r
+ let mut default = Config::default();\r
+ default.merge(File::with_name("config/default"))?;\r
+ let mode = env::var("ENV").unwrap_or_else(|_| "development".into());\r
+ info!("Configuration Environment: {}", mode);\r
+\r
+ default.merge(File::with_name(&format!("config/{}", mode)).required(false))?;\r
+ default.merge(File::with_name("config/local").required(false))?;\r
+ default.merge(Environment::with_prefix("NOVA_GATEWAY"))?;\r
+\r
+ println!("Debug mode: {:?}", default.get_bool("debug"));\r
+\r
+ let config: Self = default.try_into().unwrap();\r
+\r
+ Ok(config)\r
+ }\r
+}\r