├── .github └── workflows │ ├── draft-release.yaml │ ├── go-build.yaml │ ├── go-format.yaml │ ├── go-lint.yaml │ ├── go-unit-test.yaml │ └── inclusive.yaml ├── .gitignore ├── .golangci.yaml ├── LICENSE ├── README.md ├── cmd └── cloudevents │ └── main.go ├── features ├── http-protocol-binding.feature └── kafka-protocol-binding.feature ├── go.mod ├── go.sum ├── hack ├── build-test.sh └── unit-test.sh ├── pkg ├── commands │ ├── commands.go │ ├── diff.go │ ├── invoke.go │ ├── listen.go │ ├── options │ │ ├── delivery.go │ │ ├── diff.go │ │ ├── event.go │ │ ├── filename.go │ │ ├── history.go │ │ ├── host.go │ │ ├── path.go │ │ ├── port.go │ │ ├── tee.go │ │ ├── verbose.go │ │ └── yaml.go │ ├── raw.go │ └── send.go ├── diff │ ├── diff.go │ ├── diff_test.go │ └── testdata │ │ ├── sample1_a.yaml │ │ ├── sample1_b.yaml │ │ ├── sample2_a │ │ ├── sample2_a_part1.yaml │ │ └── sample2_a_part2.yaml │ │ ├── sample2_b.yaml │ │ ├── sample3_a.yaml │ │ ├── sample3_b.yaml │ │ ├── sample4_a.yaml │ │ ├── sample4_b.yaml │ │ ├── sample5 │ │ ├── got │ │ │ └── got.yaml │ │ └── want │ │ │ ├── a.yaml │ │ │ ├── b.yaml │ │ │ └── c.yaml │ │ ├── sample6 │ │ ├── got │ │ │ └── got.yaml │ │ └── want │ │ │ ├── a.yaml │ │ │ ├── b.yaml │ │ │ └── c.yaml │ │ ├── sample7_a.yaml │ │ ├── sample7_b.yaml │ │ ├── sample8_a.yaml │ │ └── sample8_b.yaml ├── event │ ├── event.go │ ├── read.go │ └── write.go ├── http │ ├── http.go │ ├── http_yaml_test.go │ └── raw.go ├── invoker │ └── invoker.go ├── listener │ ├── buffer.go │ ├── buffer_test.go │ └── listener.go └── sender │ └── sender.go ├── test └── diff_test.go └── yaml ├── v0.3 └── v03_minimum.yaml ├── v03.yaml ├── v1.0 └── v1_minimum.yaml └── v1.yaml /.github/workflows/draft-release.yaml: -------------------------------------------------------------------------------- 1 | on: 2 | push: 3 | # Sequence of patterns matched against refs/tags 4 | tags: 5 | - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 6 | 7 | name: Create Draft Releases 8 | 9 | jobs: 10 | 11 | release-tags: 12 | name: draft-release 13 | 14 | runs-on: ubuntu-latest 15 | 16 | steps: 17 | 18 | - name: Create Draft Release 19 | id: create_draft_release 20 | uses: actions/create-release@v1 21 | env: 22 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 23 | with: 24 | tag_name: ${{ github.ref }} 25 | release_name: Release ${{ github.ref }} 26 | draft: true 27 | prerelease: false 28 | -------------------------------------------------------------------------------- /.github/workflows/go-build.yaml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: 4 | push: 5 | branches: [ 'master', 'main', 'release-*' ] 6 | pull_request: 7 | branches: [ 'master', 'main', 'release-*' ] 8 | 9 | jobs: 10 | 11 | build: 12 | name: Build 13 | strategy: 14 | matrix: 15 | go-version: [1.16.x, 1.17.x] 16 | platform: [ubuntu-latest] 17 | 18 | runs-on: ${{ matrix.platform }} 19 | 20 | steps: 21 | 22 | - name: Set up Go ${{ matrix.go-version }} 23 | uses: actions/setup-go@v2 24 | with: 25 | go-version: ${{ matrix.go-version }} 26 | 27 | - name: Checkout code 28 | uses: actions/checkout@v2 29 | 30 | - name: Build 31 | run: ./hack/build-test.sh 32 | -------------------------------------------------------------------------------- /.github/workflows/go-format.yaml: -------------------------------------------------------------------------------- 1 | name: Go Format 2 | 3 | on: 4 | push: 5 | branches: [ 'master', 'main', 'release-*' ] 6 | pull_request: 7 | branches: [ 'master', 'main', 'release-*' ] 8 | 9 | jobs: 10 | 11 | format: 12 | name: Format 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | 17 | - name: Setup Go 1.17.x 18 | uses: actions/setup-go@v2 19 | with: 20 | go-version: 1.17.x 21 | 22 | - name: Checkout code 23 | uses: actions/checkout@v2 24 | 25 | - name: Go Format 26 | shell: bash 27 | run: | 28 | gofmt -s -w $(find -type f -name '*.go' -print) 29 | 30 | - name: Verify 31 | shell: bash 32 | run: | 33 | if [[ $(git diff-index --name-only HEAD --) ]]; then 34 | echo "Found diffs in:" 35 | git diff-index --name-only HEAD -- 36 | echo "${{ github.repository }} is out of style. Please run go fmt." 37 | exit 1 38 | fi 39 | echo "${{ github.repository }} is formatted correctly." 40 | -------------------------------------------------------------------------------- /.github/workflows/go-lint.yaml: -------------------------------------------------------------------------------- 1 | name: Code Style 2 | 3 | on: 4 | push: 5 | branches: [ 'master', 'main', 'release-*' ] 6 | pull_request: 7 | branches: [ 'master', 'main', 'release-*' ] 8 | 9 | jobs: 10 | 11 | lint: 12 | name: Lint 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | 17 | - name: Setup Go 1.17.x 18 | uses: actions/setup-go@v2 19 | with: 20 | go-version: 1.17.x 21 | 22 | - name: Checkout code 23 | uses: actions/checkout@v2 24 | 25 | - id: golangci_configuration 26 | uses: andstor/file-existence-action@v1 27 | with: 28 | files: .golangci.yaml 29 | 30 | - name: Go Lint 31 | if: steps.golangci_configuration.outputs.files_exists == 'true' 32 | uses: golangci/golangci-lint-action@v2 33 | with: 34 | version: v1.29 35 | -------------------------------------------------------------------------------- /.github/workflows/go-unit-test.yaml: -------------------------------------------------------------------------------- 1 | name: Unit Test 2 | 3 | on: 4 | push: 5 | branches: [ 'master', 'main', 'release-*' ] 6 | pull_request: 7 | branches: [ 'master', 'main', 'release-*' ] 8 | 9 | jobs: 10 | 11 | test: 12 | name: Unit Test 13 | strategy: 14 | matrix: 15 | go-version: [1.16.x, 1.17.x] 16 | platform: [ubuntu-latest] 17 | 18 | runs-on: ${{ matrix.platform }} 19 | 20 | steps: 21 | 22 | - name: Setup Go ${{ matrix.go-version }} 23 | uses: actions/setup-go@v2 24 | with: 25 | go-version: ${{ matrix.go-version }} 26 | 27 | - name: Checkout code 28 | uses: actions/checkout@v2 29 | 30 | - name: Test 31 | run: ./hack/unit-test.sh 32 | -------------------------------------------------------------------------------- /.github/workflows/inclusive.yaml: -------------------------------------------------------------------------------- 1 | name: Inclusive 2 | 3 | on: 4 | pull_request: 5 | branches: [ 'master', 'main', 'release-*' ] 6 | 7 | jobs: 8 | 9 | language: 10 | name: Language 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | 15 | - name: Checkout code 16 | uses: actions/checkout@v2 17 | 18 | - name: Woke 19 | uses: get-woke/woke-action-reviewdog@v0 20 | with: 21 | github-token: ${{ secrets.GITHUB_TOKEN }} 22 | reporter: github-pr-review 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Operating system temporary files 2 | .DS_Store 3 | 4 | # Editor/IDE specific settings 5 | .idea 6 | .vscode/ 7 | 8 | # Temporary output of build tools 9 | bazel-* 10 | 11 | # Binaries for programs and plugins 12 | *.exe 13 | *.exe~ 14 | *.dll 15 | *.so 16 | *.dylib 17 | 18 | # Test binary, build with `go test -c` 19 | *.test 20 | 21 | # Output of the go coverage tool 22 | *.out 23 | coverage.txt 24 | 25 | # Others 26 | ## IDE-specific 27 | *.iml 28 | -------------------------------------------------------------------------------- /.golangci.yaml: -------------------------------------------------------------------------------- 1 | run: 2 | timeout: 5m 3 | 4 | build-tags: 5 | - conformance 6 | 7 | linters: 8 | enable: 9 | - unconvert 10 | - prealloc 11 | disable: 12 | - errcheck 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CloudEvents Conformance Testing 2 | 3 | `cloudevents` is a tool for testing CloudEvents receivers. 4 | 5 | [![GoDoc](https://godoc.org/github.com/cloudevents/conformance?status.svg)](https://godoc.org/github.com/cloudevents/conformance) 6 | [![Go Report Card](https://goreportcard.com/badge/cloudevents/conformance)](https://goreportcard.com/report/cloudevents/conformance) 7 | 8 | _Work in progress._ 9 | 10 | ## Installation 11 | 12 | `cloudevents` can be installed via: 13 | 14 | ```shell 15 | go get github.com/cloudevents/conformance/cmd/cloudevents 16 | ``` 17 | 18 | To update your installation: 19 | 20 | ```shell 21 | go get -u github.com/cloudevents/conformance/cmd/cloudevents 22 | ``` 23 | 24 | ## Usage 25 | 26 | `cloudevents` has three commands at the moment: `send`, `invoke` and `listen`. 27 | 28 | ### Send 29 | 30 | `send` will do a one-off creation of a cloudevent and send to a given target. 31 | 32 | ```shell script 33 | cloudevents send http://localhost:8080 --id abc-123 --source cloudevents.conformance.tool --type foo.bar 34 | ``` 35 | 36 | ### Invoke 37 | 38 | `invoke` will read yaml files, convert them to http and send them to the given 39 | target. 40 | 41 | ```shell script 42 | cloudevents invoke http://localhost:8080 -f ./yaml/v0.3 43 | ``` 44 | 45 | ### Listen 46 | 47 | `listen` will accept http request and write the converted yaml to stdout. 48 | 49 | ```shell script 50 | cloudevents listen -v > got.yaml 51 | ``` 52 | 53 | Optionally, you can forward the incoming request to a target. 54 | 55 | ```shell script 56 | cloudevents listen -v -t http://localhost:8181 > got.yaml 57 | ``` 58 | 59 | ### Diff 60 | 61 | `diff` compares two yaml event files. 62 | 63 | ```shell script 64 | cloudevents diff ./want.yaml ./got.yaml 65 | ``` 66 | 67 | `want.yaml` could have fewer fields specified to allow for fuzzy matching. 68 | 69 | Example, if you only wanted to compare on `type` and ignore additional fields: 70 | 71 | ```shell script 72 | $ cat ./want.yaml 73 | ContextAttributes: 74 | type: com.example.someevent 75 | $ cat ./got.yaml 76 | Mode: structured 77 | ContextAttributes: 78 | specversion: 1.0 79 | type: com.example.someevent 80 | time: 2018-04-05T03:56:24Z 81 | id: 4321-4321-4321-a 82 | source: /mycontext/subcontext 83 | Extensions: 84 | comexampleextension1 : "value" 85 | comexampleextension2 : | 86 | {"othervalue": 5} 87 | TransportExtensions: 88 | user-agent: "foo" 89 | Data: | 90 | {"world":"hello"} 91 | 92 | $ cloudevents diff ./want.yaml ./got.yaml --match type --ignore-additions 93 | ``` 94 | 95 | This validates that at least one event of type `com.example.someevent` is present in the `got.yaml` file. 96 | 97 | ## Advanced Usage 98 | 99 | If you would like to produce a pre-produced event yaml file, you can use 100 | `listen` to collect requests. This works with both running event producers that 101 | can be directed at the `listen` port or directly with `send`. 102 | -------------------------------------------------------------------------------- /cmd/cloudevents/main.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package main 7 | 8 | import ( 9 | "log" 10 | 11 | "github.com/spf13/cobra" 12 | 13 | "github.com/cloudevents/conformance/pkg/commands" 14 | ) 15 | 16 | func main() { 17 | cmds := &cobra.Command{ 18 | Use: "cloudevents", 19 | Short: "A tool to aid in CloudEvents conformance testing.", 20 | Run: func(cmd *cobra.Command, args []string) { 21 | _ = cmd.Help() 22 | }, 23 | SilenceUsage: true, 24 | } 25 | commands.AddConformanceCommands(cmds) 26 | 27 | if err := cmds.Execute(); err != nil { 28 | log.Fatalf("error during command execution: %v", err) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /features/http-protocol-binding.feature: -------------------------------------------------------------------------------- 1 | @http 2 | Feature: HTTP protocol binding 3 | 4 | The HTTP Protocol Binding for CloudEvents defines how events are mapped to HTTP 1.1 request and response messages. 5 | 6 | Background: 7 | Given HTTP Protocol Binding is supported 8 | 9 | Scenario Outline: Binary content mode () 10 | Given an HTTP request 11 | """ 12 | POST /someresource HTTP/1.1 13 | Host: example.com 14 | ce-specversion: 1.0 15 | ce-type: com.example.someevent 16 | ce-time: 2018-04-05T03:56:24Z 17 | ce-id: 1234-1234-1234 18 | ce-source: /mycontext/subcontext 19 | Content-Type: 20 | Content-Length: 33 21 | 22 | { 23 | "message": "Hello World!" 24 | } 25 | """ 26 | When parsed as HTTP request 27 | Then the attributes are: 28 | | key | value | 29 | | id | 1234-1234-1234 | 30 | | specversion | 1.0 | 31 | | type | com.example.someevent | 32 | | source | /mycontext/subcontext | 33 | | time | 2018-04-05T03:56:24Z | 34 | | datacontenttype | | 35 | And the data is equal to the following JSON: 36 | """ 37 | {"message": "Hello World!"} 38 | """ 39 | Examples: 40 | | contentType | 41 | | application/json | 42 | | application/json; charset=utf-8 | 43 | 44 | Scenario Outline: Structured content mode () 45 | Given an HTTP request 46 | """ 47 | POST /someresource HTTP/1.1 48 | Host: example.com 49 | Content-Type: 50 | Content-Length: 266 51 | 52 | { 53 | "specversion": "1.0", 54 | "type": "com.example.someevent", 55 | "time": "2018-04-05T03:56:24Z", 56 | "id": "1234-1234-1234", 57 | "source": "/mycontext/subcontext", 58 | "datacontenttype": "application/json", 59 | "data": { 60 | "message": "Hello World!" 61 | } 62 | } 63 | """ 64 | When parsed as HTTP request 65 | Then the attributes are: 66 | | key | value | 67 | | id | 1234-1234-1234 | 68 | | specversion | 1.0 | 69 | | type | com.example.someevent | 70 | | source | /mycontext/subcontext | 71 | | time | 2018-04-05T03:56:24Z | 72 | | datacontenttype | application/json | 73 | And the data is equal to the following JSON: 74 | """ 75 | {"message": "Hello World!"} 76 | """ 77 | Examples: 78 | | contentType | 79 | | application/cloudevents+json | 80 | | application/cloudevents+json; charset=utf-8 | -------------------------------------------------------------------------------- /features/kafka-protocol-binding.feature: -------------------------------------------------------------------------------- 1 | Feature: Kafka Protocol Binding 2 | 3 | The Kafka Protocol Binding for CloudEvents defines how events are mapped to Kafka messages. 4 | 5 | Background: 6 | Given Kafka Protocol Binding is supported 7 | 8 | Scenario: Binary content mode 9 | Given a Kafka message with payload: 10 | """ 11 | {"message": "Hello World!"} 12 | """ 13 | And Kafka headers: 14 | | key | value | 15 | | ce_specversion | 1.0 | 16 | | ce_id | 1234-1234-1234 | 17 | | ce_type | com.example.someevent | 18 | | ce_source | /mycontext/subcontext | 19 | | ce_time | 2018-04-05T03:56:24Z | 20 | | content-type | application/json | 21 | When parsed as Kafka message 22 | Then the attributes are: 23 | | key | value | 24 | | id | 1234-1234-1234 | 25 | | specversion | 1.0 | 26 | | type | com.example.someevent | 27 | | source | /mycontext/subcontext | 28 | | time | 2018-04-05T03:56:24Z | 29 | | datacontenttype | application/json | 30 | And the data is equal to the following JSON: 31 | """ 32 | {"message": "Hello World!"} 33 | """ 34 | 35 | Scenario Outline: Structured content mode () 36 | Given a Kafka message with payload: 37 | """ 38 | { 39 | "specversion": "1.0", 40 | "type": "com.example.someevent", 41 | "time": "2018-04-05T03:56:24Z", 42 | "id": "1234-1234-1234", 43 | "source": "/mycontext/subcontext", 44 | "datacontenttype": "application/json", 45 | "data": { 46 | "message": "Hello World!" 47 | } 48 | } 49 | """ 50 | And Kafka headers: 51 | | key | value | 52 | | content-type | | 53 | When parsed as Kafka message 54 | Then the attributes are: 55 | | key | value | 56 | | id | 1234-1234-1234 | 57 | | specversion | 1.0 | 58 | | type | com.example.someevent | 59 | | source | /mycontext/subcontext | 60 | | time | 2018-04-05T03:56:24Z | 61 | | datacontenttype | application/json | 62 | And the data is equal to the following JSON: 63 | """ 64 | {"message": "Hello World!"} 65 | """ 66 | Examples: 67 | | contentType | 68 | | application/cloudevents+json | 69 | | application/cloudevents+json; charset=utf-8 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/cloudevents/conformance 2 | 3 | go 1.16 4 | 5 | require ( 6 | github.com/google/go-cmp v0.5.7 7 | github.com/kylelemons/godebug v1.1.0 8 | github.com/spf13/cobra v1.3.0 9 | gopkg.in/yaml.v2 v2.4.0 10 | ) 11 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 2 | cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 3 | cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= 4 | cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= 5 | cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= 6 | cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= 7 | cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= 8 | cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= 9 | cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= 10 | cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= 11 | cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= 12 | cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= 13 | cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= 14 | cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= 15 | cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= 16 | cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= 17 | cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= 18 | cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= 19 | cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= 20 | cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= 21 | cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= 22 | cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= 23 | cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= 24 | cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= 25 | cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= 26 | cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= 27 | cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= 28 | cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM= 29 | cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= 30 | cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= 31 | cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= 32 | cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= 33 | cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= 34 | cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= 35 | cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= 36 | cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= 37 | cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= 38 | cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= 39 | cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= 40 | cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= 41 | cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= 42 | cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= 43 | cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= 44 | cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= 45 | cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= 46 | cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= 47 | cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= 48 | dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= 49 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 50 | github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= 51 | github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= 52 | github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= 53 | github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= 54 | github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= 55 | github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= 56 | github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= 57 | github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= 58 | github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= 59 | github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= 60 | github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= 61 | github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= 62 | github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= 63 | github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= 64 | github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 65 | github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= 66 | github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= 67 | github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= 68 | github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= 69 | github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= 70 | github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 71 | github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 72 | github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= 73 | github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= 74 | github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= 75 | github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= 76 | github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= 77 | github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 78 | github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= 79 | github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= 80 | github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= 81 | github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= 82 | github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= 83 | github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= 84 | github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= 85 | github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= 86 | github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= 87 | github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= 88 | github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= 89 | github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= 90 | github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= 91 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 92 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 93 | github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= 94 | github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= 95 | github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= 96 | github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= 97 | github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= 98 | github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= 99 | github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= 100 | github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= 101 | github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= 102 | github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= 103 | github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= 104 | github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= 105 | github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= 106 | github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= 107 | github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= 108 | github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= 109 | github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= 110 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= 111 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= 112 | github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= 113 | github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= 114 | github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= 115 | github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= 116 | github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= 117 | github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= 118 | github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= 119 | github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= 120 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= 121 | github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 122 | github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 123 | github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 124 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 125 | github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 126 | github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 127 | github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= 128 | github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= 129 | github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= 130 | github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= 131 | github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= 132 | github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= 133 | github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= 134 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 135 | github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 136 | github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 137 | github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= 138 | github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= 139 | github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= 140 | github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= 141 | github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= 142 | github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= 143 | github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= 144 | github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= 145 | github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= 146 | github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 147 | github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 148 | github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= 149 | github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= 150 | github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= 151 | github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 152 | github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 153 | github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 154 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= 155 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 156 | github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 157 | github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 158 | github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 159 | github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 160 | github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 161 | github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 162 | github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 163 | github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 164 | github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 165 | github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 166 | github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= 167 | github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= 168 | github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 169 | github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= 170 | github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= 171 | github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= 172 | github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= 173 | github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= 174 | github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= 175 | github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 176 | github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 177 | github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 178 | github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 179 | github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 180 | github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 181 | github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 182 | github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 183 | github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 184 | github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 185 | github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 186 | github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 187 | github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= 188 | github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 189 | github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= 190 | github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= 191 | github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= 192 | github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= 193 | github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= 194 | github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= 195 | github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= 196 | github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= 197 | github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= 198 | github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= 199 | github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= 200 | github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= 201 | github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= 202 | github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= 203 | github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= 204 | github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= 205 | github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= 206 | github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= 207 | github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= 208 | github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= 209 | github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= 210 | github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= 211 | github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= 212 | github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= 213 | github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 214 | github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 215 | github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= 216 | github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= 217 | github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= 218 | github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= 219 | github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= 220 | github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= 221 | github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= 222 | github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= 223 | github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= 224 | github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= 225 | github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= 226 | github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= 227 | github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= 228 | github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= 229 | github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= 230 | github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 231 | github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 232 | github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= 233 | github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= 234 | github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= 235 | github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= 236 | github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= 237 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 238 | github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= 239 | github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= 240 | github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= 241 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= 242 | github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= 243 | github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= 244 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 245 | github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= 246 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 247 | github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= 248 | github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= 249 | github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= 250 | github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= 251 | github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= 252 | github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= 253 | github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= 254 | github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= 255 | github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= 256 | github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= 257 | github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= 258 | github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= 259 | github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= 260 | github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= 261 | github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= 262 | github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= 263 | github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= 264 | github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= 265 | github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= 266 | github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= 267 | github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= 268 | github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= 269 | github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= 270 | github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= 271 | github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= 272 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 273 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 274 | github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= 275 | github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= 276 | github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 277 | github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= 278 | github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= 279 | github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= 280 | github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= 281 | github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 282 | github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 283 | github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= 284 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 285 | github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= 286 | github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= 287 | github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= 288 | github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= 289 | github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= 290 | github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= 291 | github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 292 | github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 293 | github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 294 | github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= 295 | github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= 296 | github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= 297 | github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= 298 | github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= 299 | github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= 300 | github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= 301 | github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= 302 | github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= 303 | github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= 304 | github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= 305 | github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= 306 | github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= 307 | github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= 308 | github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= 309 | github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= 310 | github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= 311 | github.com/spf13/cobra v1.3.0 h1:R7cSvGu+Vv+qX0gW5R/85dx2kmmJT5z5NM8ifdYjdn0= 312 | github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= 313 | github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= 314 | github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= 315 | github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= 316 | github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= 317 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 318 | github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 319 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 320 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 321 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 322 | github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= 323 | github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 324 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 325 | github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= 326 | github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= 327 | github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 328 | github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 329 | github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 330 | github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 331 | github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 332 | go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= 333 | go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= 334 | go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= 335 | go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= 336 | go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= 337 | go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= 338 | go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= 339 | go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= 340 | go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= 341 | go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= 342 | go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= 343 | go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= 344 | go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= 345 | go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= 346 | golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= 347 | golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= 348 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 349 | golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 350 | golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 351 | golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 352 | golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= 353 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 354 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 355 | golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 356 | golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 357 | golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 358 | golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= 359 | golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= 360 | golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= 361 | golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= 362 | golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= 363 | golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= 364 | golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= 365 | golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= 366 | golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= 367 | golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= 368 | golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 369 | golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= 370 | golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 371 | golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 372 | golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 373 | golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 374 | golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 375 | golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= 376 | golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 377 | golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 378 | golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 379 | golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 380 | golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= 381 | golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= 382 | golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= 383 | golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= 384 | golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 385 | golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 386 | golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 387 | golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 388 | golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 389 | golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 390 | golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 391 | golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= 392 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 393 | golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 394 | golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 395 | golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 396 | golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 397 | golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 398 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 399 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 400 | golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 401 | golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 402 | golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= 403 | golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 404 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 405 | golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 406 | golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 407 | golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 408 | golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 409 | golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 410 | golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 411 | golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 412 | golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 413 | golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 414 | golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 415 | golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 416 | golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 417 | golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 418 | golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 419 | golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 420 | golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 421 | golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 422 | golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 423 | golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 424 | golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 425 | golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 426 | golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 427 | golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 428 | golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= 429 | golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= 430 | golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= 431 | golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 432 | golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 433 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 434 | golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 435 | golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 436 | golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 437 | golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 438 | golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 439 | golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 440 | golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 441 | golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 442 | golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 443 | golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 444 | golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 445 | golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 446 | golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 447 | golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 448 | golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 449 | golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 450 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 451 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 452 | golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 453 | golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 454 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 455 | golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 456 | golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 457 | golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 458 | golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 459 | golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 460 | golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 461 | golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 462 | golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 463 | golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 464 | golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 465 | golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 466 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 467 | golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 468 | golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 469 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 470 | golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 471 | golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 472 | golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 473 | golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 474 | golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 475 | golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 476 | golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 477 | golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 478 | golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 479 | golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 480 | golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 481 | golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 482 | golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 483 | golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 484 | golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 485 | golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 486 | golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 487 | golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 488 | golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 489 | golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 490 | golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 491 | golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 492 | golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 493 | golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 494 | golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 495 | golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 496 | golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 497 | golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 498 | golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 499 | golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 500 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 501 | golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 502 | golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 503 | golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 504 | golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 505 | golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 506 | golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 507 | golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 508 | golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 509 | golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 510 | golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 511 | golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 512 | golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 513 | golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 514 | golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 515 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 516 | golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 517 | golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 518 | golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 519 | golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 520 | golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 521 | golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 522 | golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 523 | golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 524 | golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 525 | golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 526 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 527 | golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 528 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 529 | golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 530 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= 531 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 532 | golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 533 | golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 534 | golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 535 | golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= 536 | golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 537 | golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 538 | golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 539 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 540 | golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 541 | golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= 542 | golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 543 | golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 544 | golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 545 | golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 546 | golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 547 | golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 548 | golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 549 | golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 550 | golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 551 | golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 552 | golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 553 | golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 554 | golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 555 | golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 556 | golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 557 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 558 | golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 559 | golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 560 | golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 561 | golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 562 | golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 563 | golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 564 | golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 565 | golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 566 | golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 567 | golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 568 | golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 569 | golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 570 | golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= 571 | golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= 572 | golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= 573 | golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 574 | golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 575 | golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 576 | golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 577 | golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 578 | golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= 579 | golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= 580 | golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= 581 | golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= 582 | golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 583 | golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 584 | golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 585 | golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 586 | golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 587 | golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= 588 | golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= 589 | golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= 590 | golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= 591 | golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= 592 | golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= 593 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 594 | golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 595 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 596 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= 597 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 598 | google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= 599 | google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= 600 | google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= 601 | google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= 602 | google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= 603 | google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= 604 | google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= 605 | google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 606 | google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 607 | google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 608 | google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 609 | google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 610 | google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= 611 | google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= 612 | google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= 613 | google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= 614 | google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= 615 | google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= 616 | google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= 617 | google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= 618 | google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= 619 | google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= 620 | google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= 621 | google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= 622 | google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= 623 | google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= 624 | google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= 625 | google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= 626 | google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= 627 | google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= 628 | google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= 629 | google.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw= 630 | google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= 631 | google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 632 | google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 633 | google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= 634 | google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= 635 | google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= 636 | google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= 637 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= 638 | google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 639 | google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 640 | google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 641 | google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 642 | google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 643 | google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 644 | google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= 645 | google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 646 | google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 647 | google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 648 | google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 649 | google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 650 | google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 651 | google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= 652 | google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 653 | google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 654 | google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 655 | google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 656 | google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 657 | google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 658 | google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 659 | google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 660 | google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 661 | google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= 662 | google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= 663 | google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= 664 | google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 665 | google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 666 | google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 667 | google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 668 | google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 669 | google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 670 | google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 671 | google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 672 | google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 673 | google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 674 | google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 675 | google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 676 | google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= 677 | google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= 678 | google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= 679 | google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= 680 | google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= 681 | google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= 682 | google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= 683 | google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= 684 | google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= 685 | google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= 686 | google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= 687 | google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= 688 | google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= 689 | google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= 690 | google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= 691 | google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= 692 | google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= 693 | google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= 694 | google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= 695 | google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= 696 | google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= 697 | google.golang.org/genproto v0.0.0-20211203200212-54befc351ae9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= 698 | google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= 699 | google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= 700 | google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= 701 | google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= 702 | google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= 703 | google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= 704 | google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= 705 | google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= 706 | google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= 707 | google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= 708 | google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= 709 | google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= 710 | google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= 711 | google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= 712 | google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= 713 | google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= 714 | google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= 715 | google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= 716 | google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= 717 | google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= 718 | google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= 719 | google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= 720 | google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= 721 | google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= 722 | google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= 723 | google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= 724 | google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= 725 | google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= 726 | google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= 727 | google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= 728 | google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= 729 | google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= 730 | google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= 731 | google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= 732 | google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= 733 | google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 734 | google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 735 | google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 736 | google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= 737 | google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= 738 | google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= 739 | google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= 740 | google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= 741 | gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 742 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 743 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 744 | gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= 745 | gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 746 | gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= 747 | gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= 748 | gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 749 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 750 | gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 751 | gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 752 | gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 753 | gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 754 | gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= 755 | gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 756 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 757 | gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 758 | honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 759 | honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 760 | honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 761 | honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 762 | honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= 763 | honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= 764 | honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= 765 | rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= 766 | rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= 767 | rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= 768 | -------------------------------------------------------------------------------- /hack/build-test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -o errexit 4 | set -o nounset 5 | 6 | for gomodule in $(find . | grep "go\.mod" | awk '{gsub(/\/go.mod/,""); print $0}' | grep -v "./test") 7 | do 8 | echo 9 | echo --- Building $gomodule --- 10 | echo 11 | pushd $gomodule 12 | 13 | 14 | tags="$(grep -I -r '// +build' . | cut -f3 -d' ' | sort | uniq | grep -v '^!' | tr '\n' ' ')" 15 | 16 | echo "Building with tags: ${tags}" 17 | go test -vet=off -tags "${tags}" -run=^$ ./... | grep -v "no test" || true 18 | 19 | popd 20 | done 21 | -------------------------------------------------------------------------------- /hack/unit-test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -o errexit 4 | set -o nounset 5 | set -o pipefail 6 | 7 | COVERAGE="`pwd`/coverage.txt" 8 | echo 'mode: atomic' > $COVERAGE 9 | 10 | for gomodule in $(find . | grep "go\.mod" | awk '{gsub(/\/go.mod/,""); print $0}' | grep -v "./test") 11 | do 12 | echo 13 | echo --- Testing $gomodule --- 14 | echo 15 | 16 | pushd $gomodule 17 | touch ./coverage.tmp 18 | COVERPKG=$(go list ./... | grep -v /vendor | grep -v /test | tr "\n" ",") 19 | 20 | go test -v -timeout 30s -race -covermode=atomic -coverprofile=coverage.tmp -coverpkg "$COVERPKG" ./... 2>&1 | sed 's/ of statements in.*//; /warning: no packages being tested depend on matches for pattern /d' 21 | tail -n +2 coverage.tmp >> $COVERAGE 22 | 23 | rm coverage.tmp 24 | # Remove test only deps. 25 | go mod tidy 26 | popd 27 | done 28 | -------------------------------------------------------------------------------- /pkg/commands/commands.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package commands 7 | 8 | import ( 9 | "github.com/spf13/cobra" 10 | ) 11 | 12 | func AddConformanceCommands(topLevel *cobra.Command) { 13 | addSend(topLevel) 14 | addInvoke(topLevel) 15 | addListener(topLevel) 16 | addRaw(topLevel) 17 | addDiff(topLevel) 18 | } 19 | -------------------------------------------------------------------------------- /pkg/commands/diff.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package commands 7 | 8 | import ( 9 | "os" 10 | "strings" 11 | 12 | "github.com/spf13/cobra" 13 | 14 | "github.com/cloudevents/conformance/pkg/commands/options" 15 | "github.com/cloudevents/conformance/pkg/diff" 16 | ) 17 | 18 | func addDiff(topLevel *cobra.Command) { 19 | do := &options.DiffOptions{} 20 | 21 | cmd := &cobra.Command{ 22 | Use: "diff file_a file_b", 23 | Short: "Compare differences between two sets of event data.", 24 | Example: ` 25 | cloudevents diff ./want.yaml ./got.yaml 26 | `, 27 | Args: cobra.ExactArgs(2), 28 | PreRun: func(cmd *cobra.Command, args []string) { 29 | var findBy []string 30 | for _, fb := range do.FindBy { 31 | if strings.Contains(fb, ",") { 32 | findBy = append(findBy, strings.Split(fb, ",")...) 33 | } else { 34 | findBy = append(findBy, fb) 35 | } 36 | } 37 | do.FindBy = findBy 38 | }, 39 | Run: func(cmd *cobra.Command, args []string) { 40 | r := diff.Diff{ 41 | Out: cmd.OutOrStdout(), 42 | FileA: args[0], 43 | FileB: args[1], 44 | FindBy: do.FindBy, 45 | FullDiff: do.FullDiff, 46 | IgnoreAdditions: do.IgnoreAdditions, 47 | } 48 | if err := r.Do(); err != nil { 49 | os.Exit(1) 50 | } 51 | }, 52 | } 53 | 54 | do.AddFlags(cmd) 55 | 56 | topLevel.AddCommand(cmd) 57 | } 58 | -------------------------------------------------------------------------------- /pkg/commands/invoke.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package commands 7 | 8 | import ( 9 | "errors" 10 | "net/url" 11 | "time" 12 | 13 | "github.com/cloudevents/conformance/pkg/commands/options" 14 | "github.com/cloudevents/conformance/pkg/invoker" 15 | "github.com/spf13/cobra" 16 | ) 17 | 18 | func addInvoke(topLevel *cobra.Command) { 19 | ho := &options.HostOptions{} 20 | fo := &options.FilenameOptions{} 21 | do := &options.DeliveryOptions{} 22 | vo := &options.VerboseOptions{} 23 | invoke := &cobra.Command{ 24 | Use: "invoke", 25 | Short: "Invoke the host with the example input files.", 26 | Example: ` 27 | cloudevents invoke http://localhost:8008/ -f ./yaml/v1.0 28 | `, 29 | Args: func(cmd *cobra.Command, args []string) error { 30 | if len(args) < 1 { 31 | return errors.New("requires a host argument") 32 | } 33 | u, err := url.Parse(args[0]) 34 | if err != nil { 35 | return err 36 | } 37 | ho.URL = u 38 | return nil 39 | }, 40 | RunE: func(cmd *cobra.Command, args []string) error { 41 | // Build up command. 42 | i := &invoker.Invoker{ 43 | URL: ho.URL, 44 | Files: fo.Filenames, 45 | Recursive: fo.Recursive, 46 | Verbose: vo.Verbose, 47 | } 48 | 49 | // Add delay, if specified. 50 | if len(do.Delay) > 0 { 51 | d, err := time.ParseDuration(do.Delay) 52 | if err != nil { 53 | return err 54 | } 55 | i.Delay = &d 56 | } 57 | 58 | // Run it. 59 | return i.Do() 60 | }, 61 | } 62 | fo.AddFlags(invoke) 63 | do.AddFlags(invoke) 64 | vo.AddFlags(invoke) 65 | 66 | topLevel.AddCommand(invoke) 67 | } 68 | -------------------------------------------------------------------------------- /pkg/commands/listen.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package commands 7 | 8 | import ( 9 | "log" 10 | "net/url" 11 | 12 | "github.com/spf13/cobra" 13 | 14 | "github.com/cloudevents/conformance/pkg/commands/options" 15 | "github.com/cloudevents/conformance/pkg/listener" 16 | ) 17 | 18 | func addListener(topLevel *cobra.Command) { 19 | po := &options.PortOptions{} 20 | pa := &options.PathOptions{} 21 | to := &options.TeeOptions{} 22 | ho := &options.HistoryOptions{} 23 | vo := &options.VerboseOptions{} 24 | listen := &cobra.Command{ 25 | Use: "listen", 26 | Short: "Listen to incoming http CloudEvents requests and write out the yaml representation to stdout.", 27 | Example: ` 28 | cloudevents listen -P 8080 -p incoming -v > got.yaml 29 | `, 30 | Args: cobra.NoArgs, 31 | PreRunE: func(cmd *cobra.Command, args []string) error { 32 | if to.URLString != "" { 33 | u, err := url.Parse(to.URLString) 34 | if err != nil { 35 | return err 36 | } 37 | to.URL = u 38 | } 39 | return nil 40 | }, 41 | Run: func(cmd *cobra.Command, args []string) { 42 | // Build up command. 43 | i := &listener.Listener{ 44 | Port: po.Port, 45 | Path: pa.Path, 46 | Tee: to.URL, 47 | History: ho.Length, 48 | Retain: ho.Retain, 49 | Verbose: vo.Verbose, 50 | } 51 | 52 | // Run it. 53 | if err := i.Do(cmd.Context()); err != nil { 54 | log.Fatalf("error listening: %v", err) 55 | } 56 | }, 57 | } 58 | po.AddFlags(listen) 59 | pa.AddFlags(listen) 60 | vo.AddFlags(listen) 61 | ho.AddFlags(listen) 62 | to.AddFlags(listen) 63 | 64 | topLevel.AddCommand(listen) 65 | } 66 | -------------------------------------------------------------------------------- /pkg/commands/options/delivery.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package options 7 | 8 | import "github.com/spf13/cobra" 9 | 10 | // DeliveryOptions 11 | type DeliveryOptions struct { 12 | Delay string 13 | } 14 | 15 | func (o *DeliveryOptions) AddFlags(cmd *cobra.Command) { 16 | cmd.Flags().StringVar(&o.Delay, "delay", "", 17 | "Delay between sending events such as `300ms`. Valid time units are `ns`, `us`, `ms`, `s`, `m`, `h`.") 18 | } 19 | -------------------------------------------------------------------------------- /pkg/commands/options/diff.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package options 7 | 8 | import "github.com/spf13/cobra" 9 | 10 | // DiffOptions 11 | type DiffOptions struct { 12 | FindBy []string 13 | 14 | FullDiff bool 15 | IgnoreAdditions bool 16 | } 17 | 18 | func (o *DiffOptions) AddFlags(cmd *cobra.Command) { 19 | cmd.Flags().StringArrayVar(&o.FindBy, "match", []string{"id"}, 20 | "Find by keys to compare each event set.") 21 | 22 | cmd.Flags().BoolVar(&o.FullDiff, "full", false, 23 | "Print the full diff.") 24 | 25 | cmd.Flags().BoolVar(&o.IgnoreAdditions, "ignore-additions", false, 26 | "Ignore additions between file_a and file_b.") 27 | } 28 | -------------------------------------------------------------------------------- /pkg/commands/options/event.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package options 7 | 8 | import ( 9 | "strings" 10 | 11 | "github.com/spf13/cobra" 12 | 13 | "github.com/cloudevents/conformance/pkg/event" 14 | ) 15 | 16 | // EventOptions 17 | type EventOptions struct { 18 | Event event.Event 19 | Extensions []string // in the form key=value 20 | Now bool 21 | } 22 | 23 | func wrap80(text string) string { 24 | return wrap(text, 80) 25 | } 26 | 27 | func wrap(text string, width int) string { 28 | words := strings.Fields(strings.TrimSpace(text)) 29 | if len(words) == 0 { 30 | return text 31 | } 32 | wrapped := words[0] 33 | count := width - len(wrapped) 34 | for _, word := range words[1:] { 35 | if len(word)+1 > count { 36 | wrapped += "\n" + word 37 | count = width - len(word) 38 | } else { 39 | wrapped += " " + word 40 | count -= 1 + len(word) 41 | } 42 | } 43 | return wrapped 44 | } 45 | 46 | const ( 47 | httpSpecMode = `Mode of the outbound event. In the binary content mode, the value of the event data is placed into the HTTP request. In the structured content mode, event metadata attributes and event data are placed into the HTTP request body as JSON. [binary, structured]` 48 | // Required 49 | specTextID = "Identifies the event. Producers MUST ensure that source + id is unique for each distinct event. If a duplicate event is re-sent (e.g. due to a network error) it MAY have the same id. Consumers MAY assume that Events with identical source and id are duplicates." 50 | specTextSource = "Identifies the context in which an event happened. Often this will include information such as the type of the event source, the organization publishing the event or the process that produced the event. The exact syntax and semantics behind the data encoded in the URI is defined by the event producer." 51 | specTextType = "This attribute contains a value describing the type of event related to the originating occurrence. Often this attribute is used for routing, observability, policy enforcement, etc. SHOULD be prefixed with a reverse-DNS name. The prefixed domain dictates the organization which defines the semantics of this event type." 52 | // Optional 53 | specTextDataContentType = "Content type of data value. This attribute enables data to carry any type of content, whereby format and encoding might differ from that of the chosen event format." 54 | specTextDataSchema = "Identifies the schema that data adheres to. Incompatible changes to the schema SHOULD be reflected by a different URI." 55 | specTextSubject = "Describes the subject of the event in the context of the event producer (identified by source). In publish-subscribe scenarios, a subscriber will typically subscribe to events emitted by a source, but the source identifier alone might not be sufficient as a qualifier for any specific event if the source context has internal sub-structure." 56 | specTextTime = "Timestamp of when the occurrence happened. MUST adhere to the format specified in RFC 3339." 57 | specTextExtensions = "A CloudEvent MAY include any number of additional context attributes with distinct names, known as 'extension attributes'. Extension attributes MUST follow the same naming convention and use the same type system as standard attributes. Extension attributes have no defined meaning in this specification, they allow external systems to attach metadata to an event, much like HTTP custom headers." 58 | specTextData = "The event payload. This specification does not place any restriction on the type of this information. It is encoded into a media format which is specified by the datacontenttype attribute (e.g. application/json), and adheres to the dataschema format when those respective attributes are present." 59 | ) 60 | 61 | func (o *EventOptions) AddFlags(cmd *cobra.Command) { 62 | 63 | // Content 64 | cmd.Flags().StringVar(&o.Event.Mode, "mode", "", wrap80(httpSpecMode)) 65 | 66 | // Required fields. 67 | 68 | // Lock to cloudevents 1.0 for now. 69 | o.Event.Attributes.SpecVersion = "1.0" 70 | 71 | cmd.Flags().StringVar(&o.Event.Attributes.ID, "id", "", wrap80(specTextID)) 72 | _ = cmd.MarkFlagRequired("id") 73 | 74 | cmd.Flags().StringVar(&o.Event.Attributes.Type, "type", "", wrap80(specTextType)) 75 | _ = cmd.MarkFlagRequired("type") 76 | 77 | cmd.Flags().StringVar(&o.Event.Attributes.Source, "source", "", wrap80(specTextSource)) 78 | _ = cmd.MarkFlagRequired("source") 79 | 80 | // Optional Fields. 81 | cmd.Flags().StringVar(&o.Event.Attributes.DataContentType, "datacontenttype", "", wrap80(specTextDataContentType)) 82 | 83 | cmd.Flags().StringVar(&o.Event.Attributes.DataSchema, "dataschema", "", wrap80(specTextDataSchema)) 84 | 85 | cmd.Flags().StringVar(&o.Event.Attributes.Subject, "subject", "", wrap80(specTextSubject)) 86 | 87 | cmd.Flags().StringVar(&o.Event.Attributes.Time, "time", "", wrap80(specTextTime)) 88 | 89 | cmd.Flags().BoolVar(&o.Now, "timenow", false, "Set time to now.") 90 | 91 | // Extensions Fields. 92 | cmd.Flags().StringSliceVar(&o.Extensions, "extension", nil, wrap80(specTextExtensions+" Example: key=value.")) 93 | 94 | // Data. 95 | cmd.Flags().StringVar(&o.Event.Data, "data", "", wrap80(specTextData)) 96 | } 97 | -------------------------------------------------------------------------------- /pkg/commands/options/filename.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package options 7 | 8 | import ( 9 | "github.com/spf13/cobra" 10 | ) 11 | 12 | // FilenameOptions 13 | type FilenameOptions struct { 14 | Filenames []string 15 | Recursive bool 16 | } 17 | 18 | func (o *FilenameOptions) AddFlags(cmd *cobra.Command) { 19 | cmd.Flags().StringSliceVarP(&o.Filenames, "filename", "f", o.Filenames, 20 | "Filename or directory to use") 21 | cmd.Flags().BoolVarP(&o.Recursive, "recursive", "R", o.Recursive, 22 | "Process the directory used in -f, --filename recursively.") 23 | } 24 | -------------------------------------------------------------------------------- /pkg/commands/options/history.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package options 7 | 8 | import "github.com/spf13/cobra" 9 | 10 | // HistoryOptions 11 | type HistoryOptions struct { 12 | Length int 13 | Retain bool 14 | } 15 | 16 | func (o *HistoryOptions) AddFlags(cmd *cobra.Command) { 17 | cmd.Flags().IntVar(&o.Length, "history", 50, 18 | "How many past events to store.") 19 | 20 | cmd.Flags().BoolVar(&o.Retain, "retain", true, 21 | "Events are retained in history if history is collected.") 22 | } 23 | -------------------------------------------------------------------------------- /pkg/commands/options/host.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package options 7 | 8 | import ( 9 | "net/url" 10 | ) 11 | 12 | // HostOptions 13 | type HostOptions struct { 14 | URL *url.URL 15 | } 16 | -------------------------------------------------------------------------------- /pkg/commands/options/path.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package options 7 | 8 | import "github.com/spf13/cobra" 9 | 10 | // PathOptions 11 | type PathOptions struct { 12 | Path string 13 | } 14 | 15 | func (o *PathOptions) AddFlags(cmd *cobra.Command) { 16 | cmd.Flags().StringVarP(&o.Path, "path", "p", "/", 17 | "Path to use") 18 | } 19 | -------------------------------------------------------------------------------- /pkg/commands/options/port.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package options 7 | 8 | import "github.com/spf13/cobra" 9 | 10 | // PortOptions 11 | type PortOptions struct { 12 | Port int 13 | } 14 | 15 | func (o *PortOptions) AddFlags(cmd *cobra.Command) { 16 | cmd.Flags().IntVarP(&o.Port, "port", "P", 8080, 17 | "Port to use") 18 | } 19 | -------------------------------------------------------------------------------- /pkg/commands/options/tee.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package options 7 | 8 | import ( 9 | "net/url" 10 | 11 | "github.com/spf13/cobra" 12 | ) 13 | 14 | // TeeOptions 15 | type TeeOptions struct { 16 | URLString string 17 | URL *url.URL 18 | } 19 | 20 | func (o *TeeOptions) AddFlags(cmd *cobra.Command) { 21 | cmd.Flags().StringVarP(&o.URLString, "tee", "t", "", 22 | "Tee to a host url") 23 | } 24 | -------------------------------------------------------------------------------- /pkg/commands/options/verbose.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package options 7 | 8 | import "github.com/spf13/cobra" 9 | 10 | // VerboseOptions 11 | type VerboseOptions struct { 12 | Verbose bool 13 | } 14 | 15 | func (o *VerboseOptions) AddFlags(cmd *cobra.Command) { 16 | cmd.Flags().BoolVarP(&o.Verbose, "verbose", "v", false, 17 | "Output more debug info to stderr") 18 | } 19 | -------------------------------------------------------------------------------- /pkg/commands/options/yaml.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package options 7 | 8 | import "github.com/spf13/cobra" 9 | 10 | // YAMLOptions 11 | type YAMLOptions struct { 12 | YAML bool 13 | } 14 | 15 | func (o *YAMLOptions) AddFlags(cmd *cobra.Command) { 16 | cmd.Flags().BoolVar(&o.YAML, "yaml", false, 17 | "Output as YAML.") 18 | } 19 | -------------------------------------------------------------------------------- /pkg/commands/raw.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package commands 7 | 8 | import ( 9 | "github.com/spf13/cobra" 10 | 11 | "github.com/cloudevents/conformance/pkg/commands/options" 12 | "github.com/cloudevents/conformance/pkg/http" 13 | ) 14 | 15 | func addRaw(topLevel *cobra.Command) { 16 | po := &options.PortOptions{} 17 | raw := &cobra.Command{ 18 | Use: "raw", 19 | Short: "Dump the raw HTTP request to stdout. (For debugging HTTP requests.)", 20 | Example: ` 21 | cloudevents raw -P 8181 22 | `, 23 | Args: cobra.NoArgs, 24 | RunE: func(cmd *cobra.Command, args []string) error { 25 | r := http.Raw{ 26 | Out: cmd.OutOrStdout(), 27 | Port: po.Port, 28 | } 29 | return r.Do() 30 | }, 31 | } 32 | po.AddFlags(raw) 33 | 34 | topLevel.AddCommand(raw) 35 | } 36 | -------------------------------------------------------------------------------- /pkg/commands/send.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package commands 7 | 8 | import ( 9 | "errors" 10 | "net/url" 11 | "strings" 12 | "time" 13 | 14 | "github.com/spf13/cobra" 15 | 16 | "github.com/cloudevents/conformance/pkg/commands/options" 17 | "github.com/cloudevents/conformance/pkg/sender" 18 | ) 19 | 20 | func addSend(topLevel *cobra.Command) { 21 | ho := &options.HostOptions{} 22 | eo := &options.EventOptions{} 23 | do := &options.DeliveryOptions{} 24 | yo := &options.YAMLOptions{} 25 | vo := &options.VerboseOptions{} 26 | 27 | invoke := &cobra.Command{ 28 | Use: "send", 29 | Short: "Send a cloudevent.", 30 | Example: ` 31 | cloudevents send http://localhost:8080/ --id abc-123 --source cloudevents.conformance.tool --type foo.bar 32 | cloudevents send http://localhost:8080/ --id 321-cba --source cloudevents.conformance.tool --type foo.json --mode structured 33 | `, 34 | Args: func(cmd *cobra.Command, args []string) error { 35 | if len(args) < 1 { 36 | return errors.New("requires a host argument") 37 | } 38 | u, err := url.Parse(args[0]) 39 | if err != nil { 40 | return err 41 | } 42 | ho.URL = u 43 | return nil 44 | }, 45 | RunE: func(cmd *cobra.Command, args []string) error { 46 | // Process time now. 47 | if eo.Now { 48 | eo.Event.Attributes.Time = time.Now().UTC().Format(time.RFC3339Nano) 49 | } 50 | 51 | // Process extensions. 52 | if len(eo.Extensions) > 0 { 53 | eo.Event.Attributes.Extensions = make(map[string]string) 54 | for _, ext := range eo.Extensions { 55 | kv := strings.SplitN(ext, "=", 2) 56 | if len(kv) == 2 { 57 | eo.Event.Attributes.Extensions[kv[0]] = kv[1] 58 | } 59 | } 60 | } 61 | 62 | // Build up command. 63 | i := &sender.Sender{ 64 | URL: ho.URL, 65 | Event: eo.Event, 66 | YAML: yo.YAML, 67 | Verbose: vo.Verbose, 68 | } 69 | 70 | // Add delay, if specified. 71 | if len(do.Delay) > 0 { 72 | d, err := time.ParseDuration(do.Delay) 73 | if err != nil { 74 | return err 75 | } 76 | i.Delay = &d 77 | } 78 | 79 | // Run it. 80 | return i.Do() 81 | }, 82 | } 83 | eo.AddFlags(invoke) 84 | yo.AddFlags(invoke) 85 | vo.AddFlags(invoke) 86 | do.AddFlags(invoke) 87 | 88 | topLevel.AddCommand(invoke) 89 | } 90 | -------------------------------------------------------------------------------- /pkg/diff/diff.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package diff 7 | 8 | import ( 9 | "errors" 10 | "fmt" 11 | cmpdiff "github.com/kylelemons/godebug/diff" 12 | "io" 13 | "math" 14 | "strings" 15 | 16 | "github.com/cloudevents/conformance/pkg/event" 17 | "github.com/google/go-cmp/cmp" 18 | "github.com/google/go-cmp/cmp/cmpopts" 19 | ) 20 | 21 | // Diff compares two CloudEvents yaml files (or directories) for differences, 22 | // ignoring `Mode` and `TransportExtensions`. 23 | type Diff struct { 24 | Out io.Writer 25 | 26 | FindBy []string 27 | FullDiff bool 28 | IgnoreAdditions bool 29 | 30 | FileA string 31 | FileB string 32 | } 33 | 34 | var ignoreOpts = cmpopts.IgnoreFields(event.Event{}, "Mode", "TransportExtensions") 35 | 36 | func newTracker(findBy []string, all []event.Event) *tracker { 37 | return &tracker{ 38 | findBy: findBy, 39 | all: all, 40 | used: make(map[int]bool, len(all)), 41 | } 42 | } 43 | 44 | type tracker struct { 45 | findBy []string 46 | all []event.Event 47 | used map[int]bool 48 | } 49 | 50 | type trackerFn func(string, event.Event) 51 | 52 | func (t *tracker) findBest(like event.Event, fn trackerFn) (string, error) { 53 | // Make the label. 54 | label := "" 55 | for _, b := range t.findBy { 56 | if len(label) == 0 { 57 | label = fmt.Sprintf("%s[%s]", b, like.Get(b)) 58 | } else { 59 | label = fmt.Sprintf("%s %s[%s]", label, b, like.Get(b)) 60 | } 61 | } 62 | 63 | best := -1 64 | bestDiff := math.MaxInt 65 | 66 | // Look for like. 67 | for i, b := range t.all { 68 | if t.used[i] { 69 | continue 70 | } 71 | 72 | // Test for a match. 73 | match := true 74 | for _, key := range t.findBy { 75 | if like.Get(key) != b.Get(key) { 76 | match = false 77 | break 78 | } 79 | } 80 | if !match { 81 | continue 82 | } 83 | // Simple compute the "delta" between line and b, just the length of the diff. 84 | diff := len(cmp.Diff(like, b, ignoreOpts)) 85 | if diff < bestDiff { 86 | best = i 87 | bestDiff = diff 88 | } 89 | } 90 | if best >= 0 { 91 | fn(label, t.all[best]) 92 | t.used[best] = true 93 | return label, nil 94 | } 95 | return label, io.EOF 96 | } 97 | 98 | func (i *Diff) Do() error { 99 | // Read and parse FileA 100 | eventsA, err := event.FromYaml(i.FileA, true) 101 | if err != nil { 102 | return err 103 | } 104 | 105 | // Read and parse FileB 106 | eventsB, err := event.FromYaml(i.FileB, true) 107 | if err != nil { 108 | return err 109 | } 110 | 111 | var diffs []string 112 | 113 | // Tracker helps manage selecting events based on findBy and the current event to compare. 114 | t := newTracker(i.FindBy, eventsB) 115 | 116 | for _, a := range eventsA { 117 | 118 | if label, err := t.findBest(a, func(label string, b event.Event) { 119 | if diff := cmp.Diff(a, b, ignoreOpts); diff != "" { 120 | // Clear out Mode and Transport Extensions. 121 | a.Mode = "" 122 | b.Mode = "" 123 | a.TransportExtensions = nil 124 | b.TransportExtensions = nil 125 | 126 | ab, err := event.ToYaml(a) 127 | if err != nil { 128 | return 129 | } 130 | bb, err := event.ToYaml(b) 131 | if err != nil { 132 | return 133 | } 134 | 135 | ignore := true 136 | sb := &strings.Builder{} 137 | if len(diffs) >= 1 { 138 | sb.WriteString("---\n") 139 | } 140 | sb.WriteString(fmt.Sprintf("%s diffs (-a, +b):\n", label)) 141 | 142 | chunks := cmpdiff.DiffChunks(strings.Split(string(ab), "\n"), strings.Split(string(bb), "\n")) 143 | changed := map[string]bool{} 144 | for _, c := range chunks { 145 | if len(c.Added) != 0 { 146 | for _, a := range c.Added { 147 | if _, found := changed[strings.Split(a, ":")[0]]; found || !i.IgnoreAdditions { 148 | ignore = false 149 | sb.WriteString(fmt.Sprintf("+ %s\n", a)) 150 | } 151 | } 152 | } 153 | if len(c.Deleted) != 0 { 154 | ignore = false 155 | for _, d := range c.Deleted { 156 | sb.WriteString(fmt.Sprintf("- %s\n", d)) 157 | changed[strings.Split(d, ":")[0]] = true 158 | } 159 | } 160 | } 161 | 162 | if i.FullDiff { 163 | _, _ = fmt.Fprintf(i.Out, "%s\n", cmpdiff.Diff(string(ab), string(bb))) 164 | } else if !ignore { 165 | _, _ = fmt.Fprint(i.Out, sb.String()) 166 | if len(diffs) > 0 { 167 | diffs = append(diffs, "---") 168 | } 169 | diffs = append(diffs, cmpdiff.Diff(string(ab), string(bb))) 170 | } 171 | } 172 | }); err != nil { 173 | _, _ = fmt.Fprintf(i.Out, "missing: %s\n", label) 174 | diffs = append(diffs, fmt.Sprintf("missing: %s\n", label)) 175 | continue 176 | } 177 | 178 | } 179 | 180 | if len(diffs) > 0 { 181 | return errors.New(strings.Join(diffs, "\n")) 182 | } 183 | 184 | return nil 185 | } 186 | -------------------------------------------------------------------------------- /pkg/diff/diff_test.go: -------------------------------------------------------------------------------- 1 | package diff 2 | 3 | import ( 4 | "bytes" 5 | "github.com/google/go-cmp/cmp" 6 | "testing" 7 | ) 8 | 9 | func TestDiff_Do(t *testing.T) { 10 | tests := []struct { 11 | name string 12 | a string 13 | b string 14 | findBy []string 15 | ignoreAdditions bool 16 | wantErr bool 17 | wantDiff string 18 | }{{ 19 | name: "sample1: two files", 20 | a: "./testdata/sample1_a.yaml", 21 | b: "./testdata/sample1_b.yaml", 22 | findBy: []string{"id", "source"}, 23 | wantErr: false, 24 | }, { 25 | name: "sample2: one folder, one file", 26 | a: "./testdata/sample2_a/", 27 | b: "./testdata/sample2_b.yaml", 28 | findBy: []string{"id", "source"}, 29 | wantErr: false, 30 | }, { 31 | name: "sample3: has diff", 32 | a: "./testdata/sample3_a.yaml", 33 | b: "./testdata/sample3_b.yaml", 34 | findBy: []string{"id", "source"}, 35 | wantErr: true, 36 | wantDiff: `id[4321-4321-4321-a] source[/mycontext/subcontext] diffs (-a, +b): 37 | - type: com.example.someevent 38 | + type: com.example.some.other.event 39 | `, 40 | }, { 41 | name: "sample4: just look at type", 42 | a: "./testdata/sample4_a.yaml", 43 | b: "./testdata/sample4_b.yaml", 44 | findBy: []string{"type"}, 45 | ignoreAdditions: true, 46 | wantErr: false, 47 | }, { 48 | name: "sample5: just type, from a dir", 49 | a: "./testdata/sample5/want", 50 | b: "./testdata/sample5/got", 51 | findBy: []string{"type"}, 52 | ignoreAdditions: true, 53 | wantErr: false, 54 | }, { 55 | name: "sample6: from a dir with diffs", 56 | a: "./testdata/sample6/want", 57 | b: "./testdata/sample6/got", 58 | findBy: []string{"type"}, 59 | ignoreAdditions: true, 60 | wantErr: true, 61 | wantDiff: `missing: type[com.example.someevent.b] 62 | --- 63 | type[com.example.someevent.c] diffs (-a, +b): 64 | - source: /mycontext/subcontext 65 | + source: /mycontext/subcontext2 66 | `, 67 | }, { 68 | name: "sample7: two similar events, match second", 69 | a: "./testdata/sample7_a.yaml", 70 | b: "./testdata/sample7_b.yaml", 71 | findBy: []string{"type", "subject"}, 72 | ignoreAdditions: true, 73 | wantErr: false, 74 | }, { 75 | name: "sample7: two similar events, two matches out of order, search just by type", 76 | a: "./testdata/sample7_a.yaml", 77 | b: "./testdata/sample7_b.yaml", 78 | findBy: []string{"type"}, 79 | ignoreAdditions: true, 80 | wantErr: false, 81 | }} 82 | for _, tt := range tests { 83 | t.Run(tt.name, func(t *testing.T) { 84 | out := new(bytes.Buffer) 85 | i := &Diff{ 86 | Out: out, 87 | FindBy: tt.findBy, 88 | IgnoreAdditions: tt.ignoreAdditions, 89 | FileA: tt.a, 90 | FileB: tt.b, 91 | } 92 | if err := i.Do(); (err != nil) != tt.wantErr { 93 | t.Errorf("Do() error = %v, wantErr %v", err, tt.wantErr) 94 | return 95 | } 96 | 97 | got := out.String() 98 | t.Logf(got) 99 | if want := tt.wantDiff; want != got { 100 | t.Fatalf("Found diffs (-want, +got): %s", cmp.Diff(want, got)) 101 | } 102 | }) 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /pkg/diff/testdata/sample1_a.yaml: -------------------------------------------------------------------------------- 1 | ContextAttributes: 2 | specversion: 1.0 3 | type: com.example.someevent 4 | time: 2018-04-05T03:56:24Z 5 | id: 4321-4321-4321-a 6 | source: /mycontext/subcontext 7 | Extensions: 8 | comexampleextension1 : "value" 9 | comexampleextension2 : | 10 | {"othervalue": 5} 11 | Data: | 12 | {"world":"hello"} 13 | --- 14 | ContextAttributes: 15 | specversion: 1.0 16 | type: com.example.someevent 17 | time: 2018-04-05T03:56:24Z 18 | id: 4321-4321-4321-b 19 | source: /mycontext/subcontext 20 | Extensions: 21 | comexampleextension1 : "value" 22 | comexampleextension2 : | 23 | {"othervalue": 5} 24 | Data: | 25 | {"world":"hello"} 26 | -------------------------------------------------------------------------------- /pkg/diff/testdata/sample1_b.yaml: -------------------------------------------------------------------------------- 1 | Mode: structured 2 | ContextAttributes: 3 | specversion: 1.0 4 | type: com.example.someevent 5 | time: 2018-04-05T03:56:24Z 6 | id: 4321-4321-4321-b 7 | source: /mycontext/subcontext 8 | Extensions: 9 | comexampleextension1 : "value" 10 | comexampleextension2 : | 11 | {"othervalue": 5} 12 | TransportExtensions: 13 | user-agent: "foo" 14 | Data: | 15 | {"world":"hello"} 16 | --- 17 | Mode: binary 18 | ContextAttributes: 19 | specversion: 1.0 20 | type: com.example.someevent 21 | time: 2018-04-05T03:56:24Z 22 | id: 4321-4321-4321-a 23 | source: /mycontext/subcontext 24 | Extensions: 25 | comexampleextension1 : "value" 26 | comexampleextension2 : | 27 | {"othervalue": 5} 28 | TransportExtensions: 29 | user-agent: "foo" 30 | Data: | 31 | {"world":"hello"} 32 | -------------------------------------------------------------------------------- /pkg/diff/testdata/sample2_a/sample2_a_part1.yaml: -------------------------------------------------------------------------------- 1 | ContextAttributes: 2 | specversion: 1.0 3 | type: com.example.someevent 4 | time: 2018-04-05T03:56:24Z 5 | id: 4321-4321-4321-a 6 | source: /mycontext/subcontext 7 | Extensions: 8 | comexampleextension1 : "value" 9 | comexampleextension2 : | 10 | {"othervalue": 5} 11 | Data: | 12 | {"world":"hello"} 13 | -------------------------------------------------------------------------------- /pkg/diff/testdata/sample2_a/sample2_a_part2.yaml: -------------------------------------------------------------------------------- 1 | ContextAttributes: 2 | specversion: 1.0 3 | type: com.example.someevent 4 | time: 2018-04-05T03:56:24Z 5 | id: 4321-4321-4321-b 6 | source: /mycontext/subcontext 7 | Extensions: 8 | comexampleextension1 : "value" 9 | comexampleextension2 : | 10 | {"othervalue": 5} 11 | Data: | 12 | {"world":"hello"} 13 | -------------------------------------------------------------------------------- /pkg/diff/testdata/sample2_b.yaml: -------------------------------------------------------------------------------- 1 | Mode: structured 2 | ContextAttributes: 3 | specversion: 1.0 4 | type: com.example.someevent 5 | time: 2018-04-05T03:56:24Z 6 | id: 4321-4321-4321-b 7 | source: /mycontext/subcontext 8 | Extensions: 9 | comexampleextension1 : "value" 10 | comexampleextension2 : | 11 | {"othervalue": 5} 12 | TransportExtensions: 13 | user-agent: "foo" 14 | Data: | 15 | {"world":"hello"} 16 | --- 17 | Mode: binary 18 | ContextAttributes: 19 | specversion: 1.0 20 | type: com.example.someevent 21 | time: 2018-04-05T03:56:24Z 22 | id: 4321-4321-4321-a 23 | source: /mycontext/subcontext 24 | Extensions: 25 | comexampleextension1 : "value" 26 | comexampleextension2 : | 27 | {"othervalue": 5} 28 | TransportExtensions: 29 | user-agent: "foo" 30 | Data: | 31 | {"world":"hello"} 32 | -------------------------------------------------------------------------------- /pkg/diff/testdata/sample3_a.yaml: -------------------------------------------------------------------------------- 1 | ContextAttributes: 2 | specversion: 1.0 3 | type: com.example.someevent 4 | time: 2018-04-05T03:56:24Z 5 | id: 4321-4321-4321-a 6 | source: /mycontext/subcontext 7 | Extensions: 8 | comexampleextension1 : "value" 9 | comexampleextension2 : | 10 | {"othervalue": 5} 11 | Data: | 12 | {"world":"hello"} 13 | -------------------------------------------------------------------------------- /pkg/diff/testdata/sample3_b.yaml: -------------------------------------------------------------------------------- 1 | Mode: structured 2 | ContextAttributes: 3 | specversion: 1.0 4 | type: com.example.some.other.event 5 | time: 2018-04-05T03:56:24Z 6 | id: 4321-4321-4321-a 7 | source: /mycontext/subcontext 8 | Extensions: 9 | comexampleextension1 : "value" 10 | comexampleextension2 : | 11 | {"othervalue": 5} 12 | TransportExtensions: 13 | user-agent: "foo" 14 | Data: | 15 | {"world":"hello"} 16 | -------------------------------------------------------------------------------- /pkg/diff/testdata/sample4_a.yaml: -------------------------------------------------------------------------------- 1 | ContextAttributes: 2 | type: com.example.someevent 3 | -------------------------------------------------------------------------------- /pkg/diff/testdata/sample4_b.yaml: -------------------------------------------------------------------------------- 1 | Mode: structured 2 | ContextAttributes: 3 | specversion: 1.0 4 | type: com.example.someevent 5 | time: 2018-04-05T03:56:24Z 6 | id: 4321-4321-4321-a 7 | source: /mycontext/subcontext 8 | Extensions: 9 | comexampleextension1 : "value" 10 | comexampleextension2 : | 11 | {"othervalue": 5} 12 | TransportExtensions: 13 | user-agent: "foo" 14 | Data: | 15 | {"world":"hello"} 16 | -------------------------------------------------------------------------------- /pkg/diff/testdata/sample5/got/got.yaml: -------------------------------------------------------------------------------- 1 | Mode: structured 2 | ContextAttributes: 3 | specversion: 1.0 4 | type: com.example.someevent.c 5 | time: 2018-04-05T03:56:24Z 6 | id: 4321-4321-4321-c 7 | source: /mycontext/subcontext 8 | Extensions: 9 | comexampleextension1 : "value" 10 | comexampleextension2 : | 11 | {"othervalue": 5} 12 | TransportExtensions: 13 | user-agent: "foo" 14 | Data: | 15 | {"world":"hello"} 16 | --- 17 | Mode: structured 18 | ContextAttributes: 19 | specversion: 1.0 20 | type: com.example.someevent.b 21 | time: 2018-04-05T03:56:24Z 22 | id: 4321-4321-4321-b 23 | source: /mycontext/subcontext 24 | Extensions: 25 | comexampleextension1 : "value" 26 | comexampleextension2 : | 27 | {"othervalue": 5} 28 | TransportExtensions: 29 | user-agent: "foo" 30 | Data: | 31 | {"world":"hello"} 32 | --- 33 | Mode: structured 34 | ContextAttributes: 35 | specversion: 1.0 36 | type: com.example.someevent.a 37 | time: 2018-04-05T03:56:24Z 38 | id: 4321-4321-4321-a 39 | source: /mycontext/subcontext 40 | Extensions: 41 | comexampleextension1 : "value" 42 | comexampleextension2 : | 43 | {"othervalue": 5} 44 | TransportExtensions: 45 | user-agent: "foo" 46 | Data: | 47 | {"world":"hello"} 48 | -------------------------------------------------------------------------------- /pkg/diff/testdata/sample5/want/a.yaml: -------------------------------------------------------------------------------- 1 | ContextAttributes: 2 | type: com.example.someevent.a 3 | -------------------------------------------------------------------------------- /pkg/diff/testdata/sample5/want/b.yaml: -------------------------------------------------------------------------------- 1 | ContextAttributes: 2 | type: com.example.someevent.b 3 | -------------------------------------------------------------------------------- /pkg/diff/testdata/sample5/want/c.yaml: -------------------------------------------------------------------------------- 1 | ContextAttributes: 2 | type: com.example.someevent.c 3 | -------------------------------------------------------------------------------- /pkg/diff/testdata/sample6/got/got.yaml: -------------------------------------------------------------------------------- 1 | Mode: structured 2 | ContextAttributes: 3 | specversion: 1.0 4 | type: com.example.someevent.c 5 | time: 2018-04-05T03:56:24Z 6 | id: 4321-4321-4321-c 7 | source: /mycontext/subcontext2 8 | Extensions: 9 | comexampleextension1 : "value" 10 | comexampleextension2 : | 11 | {"othervalue": 5} 12 | TransportExtensions: 13 | user-agent: "foo" 14 | Data: | 15 | {"world":"hello"} 16 | --- 17 | Mode: structured 18 | ContextAttributes: 19 | specversion: 1.0 20 | type: com.example.someevent.a 21 | time: 2018-04-05T03:56:24Z 22 | id: 4321-4321-4321-a 23 | source: /mycontext/subcontext 24 | Extensions: 25 | comexampleextension1 : "value" 26 | comexampleextension2 : | 27 | {"othervalue": 5} 28 | TransportExtensions: 29 | user-agent: "foo" 30 | Data: | 31 | {"world":"hello"} 32 | -------------------------------------------------------------------------------- /pkg/diff/testdata/sample6/want/a.yaml: -------------------------------------------------------------------------------- 1 | ContextAttributes: 2 | type: com.example.someevent.a 3 | -------------------------------------------------------------------------------- /pkg/diff/testdata/sample6/want/b.yaml: -------------------------------------------------------------------------------- 1 | ContextAttributes: 2 | type: com.example.someevent.b 3 | -------------------------------------------------------------------------------- /pkg/diff/testdata/sample6/want/c.yaml: -------------------------------------------------------------------------------- 1 | ContextAttributes: 2 | type: com.example.someevent.c 3 | source: /mycontext/subcontext 4 | -------------------------------------------------------------------------------- /pkg/diff/testdata/sample7_a.yaml: -------------------------------------------------------------------------------- 1 | ContextAttributes: 2 | type: com.example.someevent 3 | subject: second-subject 4 | -------------------------------------------------------------------------------- /pkg/diff/testdata/sample7_b.yaml: -------------------------------------------------------------------------------- 1 | Mode: structured 2 | ContextAttributes: 3 | specversion: 1.0 4 | type: com.example.someevent 5 | time: 2018-04-05T03:56:14Z 6 | id: 4321-4321-4321-a 7 | source: /mycontext/subcontext 8 | subject: first-subject 9 | Extensions: 10 | comexampleextension1 : "value" 11 | comexampleextension2 : | 12 | {"othervalue": 5} 13 | TransportExtensions: 14 | user-agent: "foo" 15 | Data: | 16 | {"world":"hello"} 17 | --- 18 | Mode: structured 19 | ContextAttributes: 20 | specversion: 1.0 21 | type: com.example.someevent 22 | time: 2018-04-05T03:56:24Z 23 | id: 4321-4321-4321-b 24 | source: /mycontext/subcontext 25 | subject: second-subject 26 | Extensions: 27 | comexampleextension1 : "value" 28 | comexampleextension2 : | 29 | {"othervalue": 5} 30 | TransportExtensions: 31 | user-agent: "foo" 32 | Data: | 33 | {"world":"hello"} 34 | -------------------------------------------------------------------------------- /pkg/diff/testdata/sample8_a.yaml: -------------------------------------------------------------------------------- 1 | ContextAttributes: 2 | type: com.example.someevent 3 | subject: second-subject 4 | --- 5 | ContextAttributes: 6 | type: com.example.someevent 7 | subject: first-subject 8 | -------------------------------------------------------------------------------- /pkg/diff/testdata/sample8_b.yaml: -------------------------------------------------------------------------------- 1 | Mode: structured 2 | ContextAttributes: 3 | specversion: 1.0 4 | type: com.example.someevent 5 | time: 2018-04-05T03:56:14Z 6 | id: 4321-4321-4321-a 7 | source: /mycontext/subcontext 8 | Extensions: 9 | comexampleextension1 : "this one has no subject" 10 | comexampleextension2 : | 11 | {"othervalue": 5} 12 | TransportExtensions: 13 | user-agent: "foo" 14 | Data: | 15 | {"world":"hello"} 16 | --- 17 | Mode: structured 18 | ContextAttributes: 19 | specversion: 1.0 20 | type: com.example.someevent 21 | time: 2018-04-05T03:56:14Z 22 | id: 4321-4321-4321-b 23 | source: /mycontext/subcontext 24 | subject: first-subject 25 | Extensions: 26 | comexampleextension1 : "value" 27 | comexampleextension2 : | 28 | {"othervalue": 5} 29 | TransportExtensions: 30 | user-agent: "foo" 31 | Data: | 32 | {"world":"hello"} 33 | --- 34 | Mode: structured 35 | ContextAttributes: 36 | specversion: 1.0 37 | type: com.example.someevent 38 | time: 2018-04-05T03:56:24Z 39 | id: 4321-4321-4321-c 40 | subject: second-subject 41 | Extensions: 42 | comexampleextension1 : "this one has no subject" 43 | comexampleextension2 : | 44 | {"othervalue": 5} 45 | TransportExtensions: 46 | user-agent: "foo" 47 | Data: | 48 | {"world":"hello"} 49 | --- 50 | Mode: structured 51 | ContextAttributes: 52 | specversion: 1.0 53 | type: com.example.someevent 54 | time: 2018-04-05T03:56:24Z 55 | id: 4321-4321-4321-d 56 | source: /mycontext/subcontext 57 | subject: second-subject 58 | Extensions: 59 | comexampleextension1 : "value" 60 | comexampleextension2 : | 61 | {"othervalue": 5} 62 | TransportExtensions: 63 | user-agent: "foo" 64 | Data: | 65 | {"world":"hello"} 66 | -------------------------------------------------------------------------------- /pkg/event/event.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package event 7 | 8 | type MutationFn func(Event) (Event, error) 9 | 10 | // Mode of encoding. 11 | const ( 12 | DefaultMode = "" 13 | BinaryMode = "binary" 14 | StructuredMode = "structured" 15 | ) 16 | 17 | type Event struct { 18 | Mode string `yaml:"Mode,omitempty"` 19 | Attributes ContextAttributes `yaml:"ContextAttributes,omitempty"` 20 | TransportExtensions Extensions `yaml:"TransportExtensions,omitempty"` 21 | Data string `yaml:"Data,omitempty"` 22 | // TODO: add support for data_base64 23 | } 24 | 25 | // Get returns the value of the attribute or extension named `key`. 26 | func (e *Event) Get(key string) string { 27 | switch key { 28 | case "specversion": 29 | return e.Attributes.SpecVersion 30 | case "type": 31 | return e.Attributes.Type 32 | case "time": 33 | return e.Attributes.Time 34 | case "id": 35 | return e.Attributes.ID 36 | case "source": 37 | return e.Attributes.Source 38 | case "subject": 39 | return e.Attributes.Subject 40 | case "schemaurl": 41 | return e.Attributes.SchemaURL 42 | case "dataschema": 43 | return e.Attributes.DataSchema 44 | case "dataecontentncoding": 45 | return e.Attributes.DataContentEncoding 46 | case "datacontenttype": 47 | return e.Attributes.DataContentType 48 | default: 49 | return e.Attributes.Extensions[key] 50 | } 51 | } 52 | 53 | type ContextAttributes struct { 54 | SpecVersion string `yaml:"specversion,omitempty"` 55 | Type string `yaml:"type,omitempty"` 56 | Time string `yaml:"time,omitempty"` 57 | ID string `yaml:"id,omitempty"` 58 | Source string `yaml:"source,omitempty"` 59 | Subject string `yaml:"subject,omitempty"` 60 | // SchemaURL replaced by DataSchema in 1.0 61 | SchemaURL string `yaml:"schemaurl,omitempty"` 62 | DataSchema string `yaml:"dataschema,omitempty"` 63 | // DataContentEncoding removed in 1.0 64 | DataContentEncoding string `yaml:"dataecontentncoding,omitempty"` 65 | DataContentType string `yaml:"datacontenttype,omitempty"` 66 | Extensions Extensions `yaml:"Extensions,omitempty"` 67 | } 68 | 69 | type Extensions map[string]string 70 | -------------------------------------------------------------------------------- /pkg/event/read.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package event 7 | 8 | import ( 9 | "gopkg.in/yaml.v2" 10 | "io" 11 | "io/ioutil" 12 | "net/http" 13 | "net/url" 14 | "os" 15 | "path" 16 | "strings" 17 | ) 18 | 19 | func FromYaml(files string, recursive bool) ([]Event, error) { 20 | pathNames := strings.Split(files, ",") 21 | events := make([]Event, 0) 22 | for _, pathName := range pathNames { 23 | var event []Event 24 | var err error 25 | 26 | switch { 27 | case pathName == "-": 28 | event, err = decode(os.Stdin) 29 | case isURL(pathName): 30 | event, err = readURL(pathName) 31 | default: 32 | event, err = readPath(pathName, recursive) 33 | } 34 | 35 | if err != nil { 36 | return nil, err 37 | } 38 | events = append(events, event...) 39 | } 40 | return events, nil 41 | } 42 | 43 | func isURL(pathname string) bool { 44 | if _, err := os.Lstat(pathname); err == nil { 45 | return false 46 | } 47 | uri, err := url.ParseRequestURI(pathname) 48 | return err == nil && uri.Scheme != "" 49 | } 50 | 51 | func readURL(uri string) ([]Event, error) { 52 | resp, err := http.Get(uri) 53 | if err != nil { 54 | return nil, err 55 | } 56 | defer resp.Body.Close() 57 | 58 | return decode(resp.Body) 59 | } 60 | 61 | func readPath(pathName string, recursive bool) ([]Event, error) { 62 | info, err := os.Stat(pathName) 63 | if err != nil { 64 | return nil, err 65 | } 66 | 67 | if info.IsDir() { 68 | return readDir(pathName, recursive) 69 | } 70 | return readFile(pathName) 71 | } 72 | 73 | func readFile(pathName string) ([]Event, error) { 74 | file, err := os.Open(pathName) 75 | if err != nil { 76 | return nil, err 77 | } 78 | defer func() { 79 | if err := file.Close(); err != nil { 80 | panic(err) 81 | } 82 | }() 83 | 84 | return decode(file) 85 | } 86 | 87 | func readDir(pathName string, recursive bool) ([]Event, error) { 88 | list, err := ioutil.ReadDir(pathName) 89 | if err != nil { 90 | return nil, err 91 | } 92 | 93 | events := make([]Event, 0) 94 | for _, f := range list { 95 | name := path.Join(pathName, f.Name()) 96 | var evs []Event 97 | 98 | switch { 99 | case f.IsDir() && recursive: 100 | evs, err = readDir(name, recursive) 101 | case !f.IsDir(): 102 | evs, err = readFile(name) 103 | } 104 | 105 | if err != nil { 106 | return nil, err 107 | } 108 | events = append(events, evs...) 109 | } 110 | return events, nil 111 | } 112 | 113 | func decode(reader io.Reader) ([]Event, error) { 114 | decoder := yaml.NewDecoder(reader) 115 | events := make([]Event, 0) 116 | var err error 117 | for { 118 | out := Event{} 119 | err = decoder.Decode(&out) 120 | if err != nil { 121 | break 122 | } 123 | events = append(events, out) 124 | } 125 | if err != io.EOF { 126 | return nil, err 127 | } 128 | return events, nil 129 | } 130 | -------------------------------------------------------------------------------- /pkg/event/write.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package event 7 | 8 | import ( 9 | "gopkg.in/yaml.v2" 10 | ) 11 | 12 | func ToYaml(event Event) ([]byte, error) { 13 | return yaml.Marshal(event) 14 | } 15 | -------------------------------------------------------------------------------- /pkg/http/http.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package http 7 | 8 | import ( 9 | "bytes" 10 | "encoding/json" 11 | "fmt" 12 | "io/ioutil" 13 | "net/http" 14 | "strings" 15 | 16 | "github.com/cloudevents/conformance/pkg/event" 17 | ) 18 | 19 | type ResultsFn func(*http.Request, *http.Response, error) 20 | 21 | func addHeader(req *http.Request, key, value string) { 22 | value = strings.TrimSpace(value) 23 | if value != "" { 24 | req.Header.Add(key, value) 25 | } 26 | } 27 | 28 | func addStructured(env map[string]interface{}, key, value string) { 29 | value = strings.TrimSpace(value) 30 | if value != "" { 31 | env[key] = value 32 | } 33 | } 34 | 35 | func EventToRequest(url string, in event.Event) (*http.Request, error) { 36 | switch in.Mode { 37 | case event.StructuredMode: 38 | return structuredEventToRequest(url, in) 39 | case event.DefaultMode, event.BinaryMode: 40 | return binaryEventToRequest(url, in) 41 | } 42 | return nil, fmt.Errorf("unknown content mode: %q", in.Mode) 43 | } 44 | 45 | func structuredEventToRequest(url string, event event.Event) (*http.Request, error) { 46 | env := make(map[string]interface{}) 47 | 48 | // CloudEvents attributes. 49 | addStructured(env, "specversion", event.Attributes.SpecVersion) 50 | addStructured(env, "type", event.Attributes.Type) 51 | addStructured(env, "time", event.Attributes.Time) 52 | addStructured(env, "id", event.Attributes.ID) 53 | addStructured(env, "source", event.Attributes.Source) 54 | addStructured(env, "subject", event.Attributes.Subject) 55 | addStructured(env, "schemaurl", event.Attributes.SchemaURL) 56 | addStructured(env, "datacontenttype", event.Attributes.DataContentType) 57 | addStructured(env, "datacontentencoding", event.Attributes.DataContentEncoding) 58 | 59 | // CloudEvents attribute extensions. 60 | for k, v := range event.Attributes.Extensions { 61 | addStructured(env, k, v) 62 | } 63 | 64 | // TODO: based on datacontenttype, we should parse data and then set the result in the envelope. 65 | if len(event.Data) > 0 { 66 | data := json.RawMessage{} 67 | if err := json.Unmarshal([]byte(event.Data), &data); err != nil { 68 | return nil, err 69 | } 70 | env["data"] = data 71 | } 72 | 73 | // To JSON. 74 | body, err := json.Marshal(env) 75 | if err != nil { 76 | return nil, err 77 | } 78 | 79 | req, err := http.NewRequest("POST", url, bytes.NewBuffer(body)) 80 | if err != nil { 81 | return nil, err 82 | } 83 | 84 | // Transport extensions. 85 | hasContentType := false 86 | for k, v := range event.TransportExtensions { 87 | if strings.EqualFold(v, "Content-Type") { 88 | hasContentType = true 89 | } 90 | addHeader(req, k, v) 91 | } 92 | 93 | if !hasContentType { 94 | addHeader(req, "Content-Type", "application/cloudevents+json; charset=UTF-8") 95 | } 96 | 97 | return req, nil 98 | } 99 | 100 | func binaryEventToRequest(url string, event event.Event) (*http.Request, error) { 101 | req, err := http.NewRequest("POST", url, bytes.NewBuffer([]byte(event.Data))) 102 | if err != nil { 103 | return nil, err 104 | } 105 | 106 | // CloudEvents attributes. 107 | addHeader(req, "ce-specversion", event.Attributes.SpecVersion) 108 | addHeader(req, "ce-type", event.Attributes.Type) 109 | addHeader(req, "ce-time", event.Attributes.Time) 110 | addHeader(req, "ce-id", event.Attributes.ID) 111 | addHeader(req, "ce-source", event.Attributes.Source) 112 | addHeader(req, "ce-subject", event.Attributes.Subject) 113 | addHeader(req, "ce-schemaurl", event.Attributes.SchemaURL) 114 | addHeader(req, "Content-Type", event.Attributes.DataContentType) 115 | addHeader(req, "ce-datacontentencoding", event.Attributes.DataContentEncoding) 116 | 117 | // CloudEvents attribute extensions. 118 | for k, v := range event.Attributes.Extensions { 119 | addHeader(req, "ce-"+k, v) 120 | } 121 | 122 | // Transport extensions. 123 | for k, v := range event.TransportExtensions { 124 | addHeader(req, k, v) 125 | } 126 | 127 | return req, nil 128 | } 129 | 130 | func RequestToEvent(req *http.Request) (*event.Event, error) { 131 | if strings.HasPrefix(req.Header.Get("Content-Type"), "application/cloudevents+json") { 132 | req.Header.Del("Content-Type") 133 | return structuredRequestToEvent(req) 134 | } 135 | return binaryRequestToEvent(req) 136 | } 137 | 138 | func structuredRequestToEvent(req *http.Request) (*event.Event, error) { 139 | out := &event.Event{ 140 | Mode: event.StructuredMode, 141 | } 142 | 143 | body, err := ioutil.ReadAll(req.Body) 144 | if err != nil { 145 | return nil, err 146 | } 147 | _ = body 148 | 149 | env := make(map[string]json.RawMessage) 150 | if err := json.Unmarshal(body, &env); err != nil { 151 | return nil, err 152 | } 153 | 154 | insert := func(key string, into *string) { 155 | if _, found := env[key]; found { 156 | if err := json.Unmarshal(env[key], into); err != nil { 157 | *into = err.Error() 158 | } 159 | delete(env, key) 160 | } 161 | } 162 | 163 | // CloudEvents attributes. 164 | insert("specversion", &out.Attributes.SpecVersion) 165 | insert("type", &out.Attributes.Type) 166 | insert("time", &out.Attributes.Time) 167 | insert("id", &out.Attributes.ID) 168 | insert("source", &out.Attributes.Source) 169 | insert("subject", &out.Attributes.Subject) 170 | insert("schemaurl", &out.Attributes.SchemaURL) 171 | insert("datacontenttype", &out.Attributes.DataContentType) 172 | insert("datacontentencoding", &out.Attributes.DataContentEncoding) 173 | 174 | // CloudEvents Data. 175 | if _, found := env["data"]; found { 176 | out.Data = string(env["data"]) + "\n" 177 | delete(env, "data") 178 | } 179 | 180 | // CloudEvents attribute extensions. 181 | out.Attributes.Extensions = make(map[string]string) 182 | for key, b := range env { 183 | var into string 184 | if err := json.Unmarshal(b, &into); err != nil { 185 | into = err.Error() 186 | } 187 | out.Attributes.Extensions[key] = into 188 | delete(env, key) 189 | } 190 | 191 | // Transport extensions. 192 | out.TransportExtensions = make(map[string]string) 193 | for k := range req.Header { 194 | if k == "Accept-Encoding" || k == "Content-Length" { 195 | continue 196 | } 197 | out.TransportExtensions[k] = req.Header.Get(k) 198 | req.Header.Del(k) 199 | } 200 | 201 | return out, nil 202 | } 203 | 204 | func binaryRequestToEvent(req *http.Request) (*event.Event, error) { 205 | body, err := ioutil.ReadAll(req.Body) 206 | if err != nil { 207 | return nil, err 208 | } 209 | _ = body 210 | 211 | out := &event.Event{ 212 | Mode: event.BinaryMode, 213 | Data: string(body), 214 | } 215 | 216 | // CloudEvents attributes. 217 | out.Attributes.SpecVersion = req.Header.Get("ce-specversion") 218 | req.Header.Del("ce-specversion") 219 | out.Attributes.Type = req.Header.Get("ce-type") 220 | req.Header.Del("ce-type") 221 | out.Attributes.Time = req.Header.Get("ce-time") 222 | req.Header.Del("ce-time") 223 | out.Attributes.ID = req.Header.Get("ce-id") 224 | req.Header.Del("ce-id") 225 | out.Attributes.Source = req.Header.Get("ce-source") 226 | req.Header.Del("ce-source") 227 | out.Attributes.Subject = req.Header.Get("ce-subject") 228 | req.Header.Del("ce-subject") 229 | out.Attributes.SchemaURL = req.Header.Get("ce-schemaurl") 230 | req.Header.Del("ce-schemaurl") 231 | out.Attributes.DataContentType = req.Header.Get("Content-Type") 232 | req.Header.Del("Content-Type") 233 | out.Attributes.DataContentEncoding = req.Header.Get("ce-datacontentencoding") 234 | req.Header.Del("ce-datacontentencoding") 235 | 236 | // CloudEvents attribute extensions. 237 | out.Attributes.Extensions = make(map[string]string) 238 | for k := range req.Header { 239 | if strings.HasPrefix(strings.ToLower(k), "ce-") { 240 | out.Attributes.Extensions[k[len("ce-"):]] = req.Header.Get(k) 241 | req.Header.Del(k) 242 | } 243 | } 244 | 245 | // Transport extensions. 246 | out.TransportExtensions = make(map[string]string) 247 | for k := range req.Header { 248 | if k == "Accept-Encoding" || k == "Content-Length" { 249 | continue 250 | } 251 | out.TransportExtensions[k] = req.Header.Get(k) 252 | req.Header.Del(k) 253 | } 254 | 255 | return out, nil 256 | } 257 | 258 | func Do(req *http.Request, hook ResultsFn) error { 259 | resp, err := http.DefaultClient.Do(req) 260 | 261 | if hook != nil { 262 | // Non-blocking. 263 | go hook(req, resp, err) 264 | } 265 | 266 | if err != nil { 267 | return err 268 | } 269 | 270 | if resp.StatusCode < 200 || resp.StatusCode > 299 { 271 | return fmt.Errorf("expected 200 level response, got %s", resp.Status) 272 | } 273 | 274 | // TODO might want something from resp. 275 | return nil 276 | } 277 | -------------------------------------------------------------------------------- /pkg/http/http_yaml_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package http 7 | 8 | import ( 9 | "io/ioutil" 10 | "log" 11 | "net/http" 12 | "net/http/httptest" 13 | "net/http/httputil" 14 | "os" 15 | "testing" 16 | 17 | "github.com/cloudevents/conformance/pkg/event" 18 | ) 19 | 20 | var helloWorldV03 = ` 21 | ContextAttributes: 22 | specversion: 0.3 23 | type: io.cloudevents.unittest 24 | id: unit-test-0001 25 | source: //github.com/cloudevents/conformance/pkg/http/unittest 26 | datacontenttype: application/json; charset=utf-8 27 | Data: | 28 | {"msg":"Hello, World!"} 29 | ` 30 | 31 | func makeUnitTestYaml() (string, func()) { 32 | file, err := ioutil.TempFile("", "unit_test_*.yaml") 33 | if err != nil { 34 | log.Fatal(err) 35 | } 36 | _, _ = file.WriteString(helloWorldV03) 37 | return file.Name(), func() { 38 | _ = os.Remove(file.Name()) 39 | } 40 | } 41 | 42 | func TestHTTP_Binary_v3_yaml(t *testing.T) { 43 | tmp, done := makeUnitTestYaml() 44 | defer done() 45 | 46 | server := httptest.NewServer(&dump{t: t}) 47 | events, err := event.FromYaml(tmp, true) 48 | if err != nil { 49 | t.Error(err) 50 | } 51 | testServer := server.URL 52 | 53 | for _, e := range events { 54 | req, err := EventToRequest(testServer, e) 55 | if err != nil { 56 | t.Fatal(err) 57 | } 58 | 59 | if err := Do(req, nil); err != nil { 60 | t.Fatal(err) 61 | } 62 | } 63 | } 64 | 65 | type dump struct { 66 | t *testing.T 67 | } 68 | 69 | func (d *dump) ServeHTTP(w http.ResponseWriter, r *http.Request) { 70 | w.WriteHeader(http.StatusOK) 71 | if reqBytes, err := httputil.DumpRequest(r, true); err == nil { 72 | d.t.Logf("Received a message: %+v", string(reqBytes)) 73 | _, _ = w.Write(reqBytes) 74 | } else { 75 | d.t.Logf("Error: %+v :: %+v", err, r) 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /pkg/http/raw.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package http 7 | 8 | import ( 9 | "fmt" 10 | "io" 11 | "net/http" 12 | "net/http/httputil" 13 | ) 14 | 15 | type Raw struct { 16 | Out io.Writer 17 | Port int `envconfig:"PORT" default:"8080"` 18 | } 19 | 20 | func (raw *Raw) Do() error { 21 | _, _ = fmt.Fprintf(raw.Out, "listening on :%d\n", raw.Port) 22 | return http.ListenAndServe(fmt.Sprintf(":%d", raw.Port), raw) 23 | } 24 | func (raw *Raw) ServeHTTP(w http.ResponseWriter, r *http.Request) { 25 | w.WriteHeader(http.StatusOK) 26 | if reqBytes, err := httputil.DumpRequest(r, true); err == nil { 27 | _, _ = fmt.Fprintf(raw.Out, "%+v\n", string(reqBytes)) 28 | } else { 29 | _, _ = fmt.Fprintf(raw.Out, "Failed to call DumpRequest: %s\n", err) 30 | } 31 | _, _ = fmt.Fprintln(raw.Out, "================") 32 | } 33 | -------------------------------------------------------------------------------- /pkg/invoker/invoker.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package invoker 7 | 8 | import ( 9 | "errors" 10 | "fmt" 11 | "net/http/httputil" 12 | "net/url" 13 | "strings" 14 | "time" 15 | 16 | "github.com/cloudevents/conformance/pkg/event" 17 | "github.com/cloudevents/conformance/pkg/http" 18 | ) 19 | 20 | type Invoker struct { 21 | URL *url.URL 22 | Files []string 23 | Delay *time.Duration 24 | Recursive bool 25 | Verbose bool 26 | 27 | // PreHook allows for mutation of the outbound event before translation to 28 | // a to HTTP request. 29 | PreHook event.MutationFn 30 | // PostHook allows for recording of the outbound HTTP request and resulting 31 | // response and/or error. 32 | PostHook http.ResultsFn 33 | } 34 | 35 | func (i *Invoker) Do() error { 36 | events, err := event.FromYaml(strings.Join(i.Files, ","), i.Recursive) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | var errs = make([]string, 0) 42 | 43 | for _, e := range events { 44 | if i.PreHook != nil { 45 | e, err = i.PreHook(e) 46 | if err != nil { 47 | errs = append(errs, err.Error()) 48 | continue 49 | } 50 | } 51 | 52 | req, err := http.EventToRequest(i.URL.String(), e) 53 | if err != nil { 54 | errs = append(errs, err.Error()) 55 | continue 56 | } 57 | if i.Verbose { 58 | b, err := httputil.DumpRequestOut(req, true) 59 | if err != nil { 60 | fmt.Printf("Failed to dump request: %+v\n", err) 61 | } else { 62 | fmt.Println(string(b)) 63 | } 64 | } 65 | 66 | if i.URL.Host == "-" { 67 | // Use "-" as a special hostname to indicate that actual requests should be skipped. 68 | continue 69 | } 70 | 71 | if err := http.Do(req, i.PostHook); err != nil { 72 | errs = append(errs, err.Error()) 73 | continue 74 | } 75 | 76 | if i.Delay != nil { 77 | time.Sleep(*i.Delay) 78 | } 79 | } 80 | if len(errs) > 0 { 81 | return errors.New(strings.Join(errs, "\n")) 82 | } 83 | return nil 84 | } 85 | -------------------------------------------------------------------------------- /pkg/listener/buffer.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package listener 7 | 8 | import ( 9 | "sync" 10 | 11 | "github.com/cloudevents/conformance/pkg/event" 12 | ) 13 | 14 | func newRingBuffer(size int, retain bool) *ringBuffer { 15 | return &ringBuffer{ 16 | out: make(chan event.Event, size), 17 | retain: retain, 18 | } 19 | } 20 | 21 | type ringBuffer struct { 22 | count int 23 | retain bool 24 | out chan event.Event 25 | mux sync.Mutex 26 | } 27 | 28 | func (r *ringBuffer) Add(ce event.Event) { 29 | r.mux.Lock() 30 | defer r.mux.Unlock() 31 | 32 | select { 33 | // If we can, write to out. 34 | case r.out <- ce: 35 | r.count++ 36 | // Done. 37 | default: 38 | // If we got blocked, read one from out and write the new event. 39 | <-r.out 40 | r.out <- ce 41 | } 42 | } 43 | 44 | func (r *ringBuffer) Len() int { 45 | return r.count 46 | } 47 | 48 | func (r *ringBuffer) All() []event.Event { 49 | r.mux.Lock() 50 | defer r.mux.Unlock() 51 | 52 | // All captures the expected length of the ring. 53 | all := make([]event.Event, 0, r.count) 54 | for i := 0; i < cap(all); i++ { 55 | ce := <-r.out 56 | all = append(all, ce) 57 | if r.retain { 58 | // Add ce back to the channel. 59 | r.out <- ce 60 | } else { 61 | r.count-- 62 | } 63 | } 64 | return all 65 | } 66 | -------------------------------------------------------------------------------- /pkg/listener/buffer_test.go: -------------------------------------------------------------------------------- 1 | package listener 2 | 3 | import ( 4 | "fmt" 5 | "github.com/cloudevents/conformance/pkg/event" 6 | "reflect" 7 | "testing" 8 | ) 9 | 10 | func Test_ringBuffer_Add_All(t *testing.T) { 11 | tests := []struct { 12 | name string 13 | count int 14 | add []event.Event 15 | want []event.Event 16 | }{{ 17 | name: "add 1", 18 | count: 5, 19 | add: []event.Event{{ 20 | Mode: "UnitTest1", 21 | }}, 22 | want: []event.Event{{ 23 | Mode: "UnitTest1", 24 | }}, 25 | }, { 26 | name: "add 5", 27 | count: 5, 28 | add: []event.Event{{ 29 | Mode: "UnitTest1", 30 | }, { 31 | Mode: "UnitTest2", 32 | }, { 33 | Mode: "UnitTest3", 34 | }, { 35 | Mode: "UnitTest4", 36 | }, { 37 | Mode: "UnitTest5", 38 | }}, 39 | want: []event.Event{{ 40 | Mode: "UnitTest1", 41 | }, { 42 | Mode: "UnitTest2", 43 | }, { 44 | Mode: "UnitTest3", 45 | }, { 46 | Mode: "UnitTest4", 47 | }, { 48 | Mode: "UnitTest5", 49 | }}, 50 | }, { 51 | name: "overflow ring", 52 | count: 2, 53 | add: []event.Event{{ 54 | Mode: "UnitTest1", 55 | }, { 56 | Mode: "UnitTest2", 57 | }, { 58 | Mode: "UnitTest3", 59 | }, { 60 | Mode: "UnitTest4", 61 | }, { 62 | Mode: "UnitTest5", 63 | }}, 64 | want: []event.Event{{ 65 | Mode: "UnitTest4", 66 | }, { 67 | Mode: "UnitTest5", 68 | }}, 69 | }} 70 | for _, tt := range tests { 71 | for _, retain := range []bool{true, false} { 72 | t.Run(tt.name+fmt.Sprintf(" retain %v", retain), func(t *testing.T) { 73 | // Setup 74 | r := newRingBuffer(tt.count, retain) 75 | 76 | // Add all to ring 77 | for _, ce := range tt.add { 78 | r.Add(ce) 79 | } 80 | 81 | // Test All 82 | if got := r.All(); !reflect.DeepEqual(got, tt.want) { 83 | t.Errorf("All() = %v, want %v", got, tt.want) 84 | return 85 | } 86 | 87 | // Test retain 88 | if retain { 89 | if got := r.All(); !reflect.DeepEqual(got, tt.want) { 90 | t.Errorf("second time, All() = %v, want %v", got, tt.want) 91 | } 92 | } else { 93 | if got := r.All(); !reflect.DeepEqual(got, []event.Event{}) { 94 | t.Errorf("second time, All() = %v, want %v", got, []event.Event{}) 95 | } 96 | } 97 | }) 98 | } 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /pkg/listener/listener.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package listener 7 | 8 | import ( 9 | "context" 10 | "fmt" 11 | "net" 12 | "net/http" 13 | "net/url" 14 | "os" 15 | "strconv" 16 | "time" 17 | 18 | "github.com/cloudevents/conformance/pkg/event" 19 | cfhttp "github.com/cloudevents/conformance/pkg/http" 20 | ) 21 | 22 | type Listener struct { 23 | Port int 24 | Path string 25 | Verbose bool 26 | Tee *url.URL 27 | 28 | History int 29 | Retain bool 30 | ring *ringBuffer 31 | } 32 | 33 | func (l *Listener) Do(ctx context.Context) (serveErr error) { 34 | addr := fmt.Sprintf(":%d", l.Port) 35 | tcp, err := net.Listen("tcp", addr) 36 | if err != nil { 37 | return err 38 | } 39 | 40 | if l.Port == 0 { 41 | l.Port = tcp.Addr().(*net.TCPAddr).Port 42 | addr = fmt.Sprintf(":%d", l.Port) 43 | } 44 | 45 | l.ring = newRingBuffer(l.History, l.Retain) 46 | 47 | _, _ = fmt.Fprintf(os.Stderr, "listening on %s\n", addr) 48 | 49 | server := &http.Server{Handler: l} 50 | 51 | ctxl, cancel := context.WithCancel(context.Background()) 52 | 53 | // Thread for HTTP Server. 54 | go func() { 55 | // This is returned. 56 | serveErr = server.Serve(tcp) 57 | cancel() 58 | }() 59 | 60 | for { 61 | select { 62 | // Block until context is canceled. 63 | case <-ctx.Done(): 64 | _ = server.Close() 65 | _ = tcp.Close() 66 | 67 | // Block until server is closed. 68 | case <-ctxl.Done(): 69 | return 70 | } 71 | } 72 | } 73 | 74 | func (l *Listener) ServeHTTP(w http.ResponseWriter, req *http.Request) { 75 | if l.Verbose { 76 | _, _ = fmt.Fprintf(os.Stderr, "incoming request from %s\n", req.URL.String()) 77 | } 78 | 79 | if req.Method == http.MethodGet && req.URL.Path == "/history" { 80 | l.ServeHistory(w, req) 81 | return 82 | } 83 | 84 | ce, err := cfhttp.RequestToEvent(req) 85 | if err != nil { 86 | _, _ = fmt.Fprintf(os.Stderr, "error converting reqest to event: %s\n", err.Error()) 87 | w.WriteHeader(http.StatusBadRequest) 88 | return 89 | } 90 | 91 | if l.History > 0 && ce != nil { 92 | l.ring.Add(*ce) 93 | } 94 | 95 | yaml, err := event.ToYaml(*ce) 96 | if err != nil { 97 | _, _ = fmt.Fprintf(os.Stderr, "error converting event to yaml: %s\n", err.Error()) 98 | w.WriteHeader(http.StatusInternalServerError) 99 | return 100 | } 101 | _, _ = fmt.Fprint(os.Stdout, string(yaml)) 102 | _, _ = fmt.Fprint(os.Stdout, "---\n") 103 | 104 | if l.Verbose { 105 | _, _ = fmt.Fprint(os.Stderr, string(yaml)) 106 | _, _ = fmt.Fprint(os.Stderr, "---\n") 107 | } 108 | 109 | if l.Tee != nil { 110 | if req, err := cfhttp.EventToRequest(l.Tee.String(), *ce); err != nil { 111 | _, _ = fmt.Fprintf(os.Stderr, "error converting event to request: %s\n", err.Error()) 112 | } else if err := cfhttp.Do(req, nil); err != nil { 113 | _, _ = fmt.Fprintf(os.Stderr, "error sending event to tee: %s\n", err.Error()) 114 | } 115 | } 116 | 117 | w.WriteHeader(http.StatusOK) 118 | } 119 | 120 | func (l *Listener) ServeHistory(w http.ResponseWriter, req *http.Request) { 121 | waitFor := 0 122 | waitValues, ok := req.URL.Query()["wait"] 123 | if ok && len(waitValues) == 1 { 124 | i, err := strconv.Atoi(waitValues[0]) 125 | if err != nil { 126 | _, _ = fmt.Fprintf(os.Stderr, "error converting wait value to int: %s\n", err.Error()) 127 | w.WriteHeader(http.StatusInternalServerError) 128 | return 129 | } 130 | waitFor = i 131 | } 132 | if waitFor > l.History { 133 | w.WriteHeader(http.StatusBadRequest) 134 | return 135 | } 136 | 137 | // This will hold the request open until there are at least n events in the ring. 138 | if waitFor != 0 { 139 | ticker := time.NewTicker(5 * time.Millisecond) 140 | wait := true 141 | for wait { 142 | select { 143 | case <-ticker.C: 144 | if l.ring.Len() >= waitFor { 145 | wait = false 146 | } 147 | case <-req.Context().Done(): 148 | return 149 | } 150 | } 151 | } 152 | 153 | for i, ce := range l.ring.All() { 154 | yaml, err := event.ToYaml(ce) 155 | if err != nil { 156 | _, _ = fmt.Fprintf(os.Stderr, "error converting event to yaml: %s\n", err.Error()) 157 | w.WriteHeader(http.StatusInternalServerError) 158 | return 159 | } 160 | if i > 0 { 161 | _, _ = w.Write([]byte("---\n")) 162 | } 163 | _, _ = w.Write(yaml) 164 | } 165 | } 166 | -------------------------------------------------------------------------------- /pkg/sender/sender.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package sender 7 | 8 | import ( 9 | "fmt" 10 | "net/http/httputil" 11 | "net/url" 12 | "os" 13 | "time" 14 | 15 | "github.com/cloudevents/conformance/pkg/event" 16 | "github.com/cloudevents/conformance/pkg/http" 17 | ) 18 | 19 | type Sender struct { 20 | URL *url.URL 21 | Event event.Event 22 | YAML bool 23 | Delay *time.Duration 24 | Verbose bool 25 | 26 | // PreHook allows for mutation of the outbound event before translation to 27 | // a to HTTP request. 28 | PreHook event.MutationFn 29 | // PostHook allows for recording of the outbound HTTP request and resulting 30 | // response and/or error. 31 | PostHook http.ResultsFn 32 | } 33 | 34 | func (s *Sender) Do() error { 35 | if s.Delay != nil { 36 | time.Sleep(*s.Delay) 37 | } 38 | 39 | var err error 40 | e := s.Event 41 | if s.PreHook != nil { 42 | e, err = s.PreHook(e) 43 | if err != nil { 44 | return err 45 | } 46 | } 47 | 48 | req, err := http.EventToRequest(s.URL.String(), e) 49 | if err != nil { 50 | return err 51 | } 52 | if s.Verbose { 53 | b, err := httputil.DumpRequestOut(req, true) 54 | if err != nil { 55 | _, _ = fmt.Fprintf(os.Stderr, "Failed to dump request: %+v\n", err) 56 | } else { 57 | _, _ = fmt.Fprint(os.Stderr, string(b)) 58 | } 59 | } 60 | 61 | yaml, err := event.ToYaml(e) 62 | if err != nil { 63 | _, _ = fmt.Fprintf(os.Stderr, "error converting event to yaml: %s\n", err.Error()) 64 | } else if s.YAML { 65 | _, _ = fmt.Fprint(os.Stdout, string(yaml)) 66 | _, _ = fmt.Fprint(os.Stdout, "---\n") 67 | } 68 | 69 | if s.URL.Host == "-" { 70 | // Use "-" as a special hostname to indicate that actual requests should be skipped. 71 | return nil 72 | } 73 | 74 | if err := http.Do(req, s.PostHook); err != nil { 75 | return err 76 | } 77 | return nil 78 | } 79 | -------------------------------------------------------------------------------- /test/diff_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The CloudEvents Authors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package test 7 | 8 | import ( 9 | "context" 10 | "errors" 11 | "fmt" 12 | "io/ioutil" 13 | "log" 14 | "net/http" 15 | "net/url" 16 | "os" 17 | "testing" 18 | "time" 19 | 20 | "github.com/cloudevents/conformance/pkg/diff" 21 | "github.com/cloudevents/conformance/pkg/event" 22 | "github.com/cloudevents/conformance/pkg/listener" 23 | "github.com/cloudevents/conformance/pkg/sender" 24 | ) 25 | 26 | // TestDiff produces several events and then compares what was collected with 27 | // what is expected. 28 | func TestDiff(t *testing.T) { 29 | ctx, cancel := context.WithCancel(context.Background()) 30 | 31 | port := 52318 // could be 0, but this causes a race in testing. 32 | 33 | // Stand up a listener. 34 | l := &listener.Listener{ 35 | Port: port, 36 | Path: "/", 37 | Verbose: false, 38 | History: 10, 39 | Retain: false, 40 | } 41 | go func() { 42 | if err := l.Do(ctx); !errors.Is(err, http.ErrServerClosed) { 43 | t.Errorf("listerer failed to close cleanly, %v", err) 44 | } 45 | }() 46 | 47 | // Let server start. 48 | time.Sleep(time.Millisecond * 10) 49 | 50 | expectFile, err := os.CreateTemp(os.TempDir(), "ce*") 51 | if err != nil { 52 | log.Fatal(err) 53 | } 54 | fmt.Println("expect file:", expectFile.Name()) 55 | defer os.Remove(expectFile.Name()) 56 | 57 | collectFile, err := os.CreateTemp(os.TempDir(), "ce*") 58 | if err != nil { 59 | log.Fatal(err) 60 | } 61 | fmt.Println("collect file:", expectFile.Name()) 62 | defer os.Remove(collectFile.Name()) 63 | 64 | // Send n events. 65 | for n := 0; n < 5; n++ { 66 | s := &sender.Sender{ 67 | URL: &url.URL{ 68 | Scheme: "http", Host: fmt.Sprintf("localhost:%d", port), 69 | }, 70 | Event: event.Event{ 71 | Mode: "binary", 72 | Attributes: event.ContextAttributes{ 73 | SpecVersion: "1.0", 74 | Type: fmt.Sprintf("unit.test.%d", n), 75 | ID: fmt.Sprintf("abc.123.%d", n), 76 | Source: "http://unit.test", 77 | }, 78 | }, 79 | YAML: true, 80 | } 81 | if err := s.Do(); err != nil { 82 | t.Errorf("sender failed to Do(), %s", err) 83 | } 84 | 85 | expect, err := event.ToYaml(event.Event{ 86 | // We are only going to diff on source and type for the test. 87 | Attributes: event.ContextAttributes{ 88 | Type: fmt.Sprintf("unit.test.%d", n), 89 | Source: "http://unit.test", 90 | }, 91 | }) 92 | if err != nil { 93 | t.Errorf("failed to convert expected event to yaml, %v", err) 94 | } 95 | if n > 0 { 96 | _, _ = expectFile.WriteString("---\n") 97 | } 98 | // Store each sent event structure as yaml. 99 | _, _ = expectFile.Write(expect) 100 | } 101 | _ = expectFile.Close() 102 | 103 | // Collect and store history from listener. 104 | target := &url.URL{ 105 | Scheme: "http", Host: fmt.Sprintf("localhost:%d", l.Port), Path: "/history", 106 | } 107 | history, err := curl(target.String()) 108 | if err != nil { 109 | t.Errorf("failed to curl listener history, %v", err) 110 | } 111 | _, _ = collectFile.Write(history) 112 | _ = collectFile.Close() 113 | 114 | fmt.Println("got history: ", string(history)) 115 | 116 | // Compute diff between what was sent and what was collected. 117 | d := &diff.Diff{ 118 | Out: os.Stdout, 119 | FindBy: []string{"type"}, 120 | FullDiff: false, 121 | IgnoreAdditions: true, 122 | FileA: expectFile.Name(), 123 | FileB: collectFile.Name(), 124 | } 125 | 126 | if err := d.Do(); err != nil { 127 | t.Errorf("failed do diff, %v", err) 128 | } 129 | 130 | cancel() 131 | } 132 | 133 | func curl(target string) ([]byte, error) { 134 | resp, err := http.Get(target) 135 | if err != nil { 136 | return nil, err 137 | } 138 | defer resp.Body.Close() 139 | body, err := ioutil.ReadAll(resp.Body) 140 | if err != nil { 141 | return nil, err 142 | } 143 | return body, nil 144 | } 145 | -------------------------------------------------------------------------------- /yaml/v0.3/v03_minimum.yaml: -------------------------------------------------------------------------------- 1 | # Minimum plain/text; charset=us-ascii 2 | ContextAttributes: 3 | specversion: 0.3 4 | type: io.cloudevents.minimum 5 | id: conformance-0001 6 | source: //github.com/cloudevents/cloudeventsconformance/yaml/v03.yaml 7 | datacontenttype: text/plain; charset=us-ascii 8 | Data: | 9 | Hello, World! 10 | --- 11 | # Minimum plain/text; charset=utf-8 12 | ContextAttributes: 13 | specversion: 0.3 14 | type: io.cloudevents.minimum 15 | id: conformance-0002 16 | source: //github.com/cloudevents/cloudeventsconformance/yaml/v03.yaml 17 | datacontenttype: text/plain; charset=utf-8 18 | Data: | 19 | Hello, 🌎! 20 | --- 21 | # Minimum application/json; charset=utf-8 22 | ContextAttributes: 23 | specversion: 0.3 24 | type: io.cloudevents.minimum 25 | id: conformance-0003 26 | source: //github.com/cloudevents/cloudeventsconformance/yaml/v03.yaml 27 | datacontenttype: application/json; charset=utf-8 28 | Data: | 29 | "Hello, 🌎!" 30 | --- 31 | # Minimum application/json; charset=utf-8 32 | ContextAttributes: 33 | specversion: 0.3 34 | type: io.cloudevents.minimum 35 | id: conformance-0004 36 | source: //github.com/cloudevents/cloudeventsconformance/yaml/v03.yaml 37 | datacontenttype: application/json; charset=utf-8 38 | Data: | 39 | {"msg":"Hello, 🌎!"} 40 | --- 41 | # Minimum application/json; charset=utf-8 42 | ContextAttributes: 43 | specversion: 0.3 44 | type: io.cloudevents.minimum 45 | id: conformance-0005 46 | source: //github.com/cloudevents/cloudeventsconformance/yaml/v03.yaml 47 | datacontenttype: application/json; charset=utf-8 48 | Data: | 49 | ["Hello","🌎!"] 50 | --- 51 | # Minimum application/xml; charset=utf-8 52 | ContextAttributes: 53 | specversion: 0.3 54 | type: io.cloudevents.minimum 55 | id: conformance-0006 56 | source: //github.com/cloudevents/cloudeventsconformance/yaml/v03.yaml 57 | datacontenttype: application/xml; charset=utf-8 58 | Data: | 59 | Hello, 🌎! 60 | -------------------------------------------------------------------------------- /yaml/v03.yaml: -------------------------------------------------------------------------------- 1 | ContextAttributes: 2 | specversion: 0.3 3 | type: com.example.someevent 4 | time: 2018-04-05T03:56:24Z 5 | id: 4321-4321-4321 6 | source: /mycontext/subcontext 7 | Extensions: 8 | comexampleextension1 : "value" 9 | comexampleextension2 : | 10 | {"othervalue": 5} 11 | TransportExtensions: 12 | user-agent: "foo" 13 | Data: | 14 | {"world":"hello"} 15 | -------------------------------------------------------------------------------- /yaml/v1.0/v1_minimum.yaml: -------------------------------------------------------------------------------- 1 | # Minimum plain/text; charset=us-ascii 2 | ContextAttributes: 3 | specversion: 1.0 4 | type: io.cloudevents.minimum 5 | id: conformance-0001 6 | source: //github.com/cloudevents/cloudeventsconformance/yaml/v1.yaml 7 | datacontenttype: text/plain; charset=us-ascii 8 | Data: | 9 | Hello, World! 10 | --- 11 | # Minimum plain/text; charset=utf-8 12 | ContextAttributes: 13 | specversion: 1.0 14 | type: io.cloudevents.minimum 15 | id: conformance-0002 16 | source: //github.com/cloudevents/cloudeventsconformance/yaml/v1.yaml 17 | datacontenttype: text/plain; charset=utf-8 18 | Data: | 19 | Hello, 🌎! 20 | --- 21 | # Minimum application/json; charset=utf-8 22 | ContextAttributes: 23 | specversion: 1.0 24 | type: io.cloudevents.minimum 25 | id: conformance-0003 26 | source: //github.com/cloudevents/cloudeventsconformance/yaml/v1.yaml 27 | datacontenttype: application/json; charset=utf-8 28 | Data: | 29 | "Hello, 🌎!" 30 | --- 31 | # Minimum application/json; charset=utf-8 32 | ContextAttributes: 33 | specversion: 1.0 34 | type: io.cloudevents.minimum 35 | id: conformance-0004 36 | source: //github.com/cloudevents/cloudeventsconformance/yaml/v1.yaml 37 | datacontenttype: application/json; charset=utf-8 38 | Data: | 39 | {"msg":"Hello, 🌎!"} 40 | --- 41 | # Minimum application/json; charset=utf-8 42 | ContextAttributes: 43 | specversion: 1.0 44 | type: io.cloudevents.minimum 45 | id: conformance-0005 46 | source: //github.com/cloudevents/cloudeventsconformance/yaml/v1.yaml 47 | datacontenttype: application/json; charset=utf-8 48 | Data: | 49 | ["Hello","🌎!"] 50 | --- 51 | # Minimum application/xml; charset=utf-8 52 | ContextAttributes: 53 | specversion: 1.0 54 | type: io.cloudevents.minimum 55 | id: conformance-0006 56 | source: //github.com/cloudevents/cloudeventsconformance/yaml/v1.yaml 57 | datacontenttype: application/xml; charset=utf-8 58 | Data: | 59 | Hello, 🌎! 60 | -------------------------------------------------------------------------------- /yaml/v1.yaml: -------------------------------------------------------------------------------- 1 | Mode: binary 2 | ContextAttributes: 3 | specversion: 1.0 4 | type: com.example.someevent 5 | time: 2018-04-05T03:56:24Z 6 | id: 4321-4321-4321 7 | source: /mycontext/subcontext 8 | Extensions: 9 | comexampleextension1 : "value" 10 | comexampleextension2 : | 11 | {"othervalue": 5} 12 | TransportExtensions: 13 | user-agent: "foo" 14 | Data: | 15 | {"world":"hello"} 16 | --- 17 | Mode: structured 18 | ContextAttributes: 19 | specversion: 1.0 20 | type: com.example.someevent 21 | time: 2018-04-05T03:56:24Z 22 | id: 4321-4321-4321 23 | source: /mycontext/subcontext 24 | Extensions: 25 | comexampleextension1 : "value" 26 | comexampleextension2 : | 27 | {"othervalue": 5} 28 | TransportExtensions: 29 | user-agent: "foo" 30 | Data: | 31 | {"world":"hello"} 32 | --------------------------------------------------------------------------------