├── .github ├── dependabot.yml └── workflows │ └── test.yml ├── LICENSE ├── Makefile ├── README.md ├── go-hello-lm.go ├── go-hello.go ├── go-log-lm.go ├── go-log.go ├── go.mod └── go.sum /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Basic set up for three package managers 2 | 3 | version: 2 4 | updates: 5 | 6 | # Maintain dependencies for GitHub Actions 7 | - package-ecosystem: "github-actions" 8 | directory: "/" 9 | schedule: 10 | interval: "daily" 11 | 12 | # Maintain dependencies for gomod 13 | - package-ecosystem: "gomod" 14 | directory: "/" 15 | schedule: 16 | interval: "daily" 17 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Tests 2 | 3 | on: 4 | push: 5 | paths-ignore: 6 | - "*.md" 7 | pull_request: 8 | paths-ignore: 9 | - "*.md" 10 | 11 | jobs: 12 | tests: 13 | name: Tests 14 | runs-on: ubuntu-20.04 15 | 16 | strategy: 17 | matrix: 18 | include: 19 | - golang: '^1.18' 20 | 21 | steps: 22 | - uses: actions/checkout@v3 23 | - uses: actions/setup-go@v3 24 | with: 25 | go-version: "${{ matrix.golang }}" 26 | cache: true 27 | - run: go version 28 | 29 | - name: Build 30 | run: make 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright 2019-2020 Kong Inc. 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all 2 | 3 | all: go-hello go-hello-lm.so go-log go-log-lm.so 4 | 5 | go-hello: go-hello.go 6 | go build go-hello.go 7 | 8 | go-hello-lm.so: go-hello-lm.go 9 | go build -buildmode=plugin go-hello-lm.go 10 | 11 | go-log: go-log.go 12 | go build go-log.go 13 | 14 | go-log-lm.so: go-log-lm.go 15 | go build -buildmode=plugin go-log-lm.go 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # :warning: This repository is no longer maintained. Examples are now in the go-pdk [repo](https://github.com/Kong/go-pdk/tree/master/examples) 2 | 3 | ## Kong Go Plugins 4 | 5 | Example code of [Kong](https://konghq.com) plugins written in Go. 6 | These are not plugins intended for production use, but rather 7 | small examples to get you started writing your own: 8 | 9 | * **go-hello**: a "hello world" plugin, which reads a request header 10 | and sets a response header. 11 | * **go-hello-lm**: same as the previous as a loadble module to use 12 | with the go-pluginserver. 13 | * **go-log**: a reimplementation of Kong's `file-log` plugin in Go. 14 | shows the use of go I/O, goroutines and long-lived globals. 15 | * **go-log-lm**: same as **go-log** but built as a loadable module to 16 | use with the go-pluginserver. 17 | -------------------------------------------------------------------------------- /go-hello-lm.go: -------------------------------------------------------------------------------- 1 | /* 2 | A "hello world" plugin in Go, 3 | which reads a request header and sets a response header. 4 | */ 5 | 6 | package main 7 | 8 | import ( 9 | "fmt" 10 | "log" 11 | 12 | "github.com/Kong/go-pdk" 13 | ) 14 | 15 | var Version = "0.2" 16 | var Priority = 1 17 | 18 | type Config struct { 19 | Message string 20 | } 21 | 22 | func New() interface{} { 23 | return &Config{} 24 | } 25 | 26 | func (conf Config) Access(kong *pdk.PDK) { 27 | host, err := kong.Request.GetHeader("host") 28 | if err != nil { 29 | log.Printf("Error reading 'host' header: %s", err.Error()) 30 | } 31 | 32 | message := conf.Message 33 | if message == "" { 34 | message = "hello" 35 | } 36 | kong.Response.SetHeader("x-hello-from-go", fmt.Sprintf("Go says %s to %s", message, host)) 37 | } 38 | -------------------------------------------------------------------------------- /go-hello.go: -------------------------------------------------------------------------------- 1 | /* 2 | A "hello world" plugin in Go, 3 | which reads a request header and sets a response header. 4 | */ 5 | 6 | package main 7 | 8 | import ( 9 | "fmt" 10 | "log" 11 | 12 | "github.com/Kong/go-pdk" 13 | "github.com/Kong/go-pdk/server" 14 | ) 15 | 16 | func main() { 17 | server.StartServer(New, Version, Priority) 18 | } 19 | 20 | var Version = "0.2" 21 | var Priority = 1 22 | 23 | type Config struct { 24 | Message string 25 | } 26 | 27 | func New() interface{} { 28 | return &Config{} 29 | } 30 | 31 | func (conf Config) Access(kong *pdk.PDK) { 32 | host, err := kong.Request.GetHeader("host") 33 | if err != nil { 34 | log.Printf("Error reading 'host' header: %s", err.Error()) 35 | } 36 | 37 | message := conf.Message 38 | if message == "" { 39 | message = "hello" 40 | } 41 | kong.Response.SetHeader("x-hello-from-go", fmt.Sprintf("Go says %s to %s", message, host)) 42 | } 43 | -------------------------------------------------------------------------------- /go-log-lm.go: -------------------------------------------------------------------------------- 1 | /* 2 | A reimplementation of Kong's file-log plugin in Go. 3 | */ 4 | package main 5 | 6 | import ( 7 | "github.com/Kong/go-pdk" 8 | "os" 9 | ) 10 | 11 | type Config struct { 12 | Path string 13 | Reopen bool 14 | } 15 | 16 | var fileDescriptors map[string]*os.File 17 | var channels map[string]chan []byte 18 | 19 | func New() interface{} { 20 | return &Config{} 21 | } 22 | 23 | func (conf Config) Log(kong *pdk.PDK) { 24 | if channels == nil { 25 | channels = make(map[string]chan []byte) 26 | } 27 | 28 | ch, ok := channels[conf.Path] 29 | if !ok { 30 | channels[conf.Path] = make(chan []byte) 31 | ch = channels[conf.Path] 32 | 33 | go func() { 34 | for { 35 | b := <-ch 36 | 37 | if fileDescriptors == nil { 38 | fileDescriptors = make(map[string]*os.File) 39 | } 40 | 41 | fd, ok := fileDescriptors[conf.Path] 42 | if ok { 43 | if conf.Reopen { 44 | fd.Close() 45 | delete(fileDescriptors, conf.Path) 46 | ok = false 47 | } 48 | } 49 | 50 | if !ok { 51 | var err error 52 | fd, err = os.OpenFile(conf.Path, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0644) 53 | if err != nil { 54 | kong.Log.Err("failed to open the file: ", err.Error()) 55 | return 56 | } 57 | fileDescriptors[conf.Path] = fd 58 | } 59 | 60 | fd.Write(b) 61 | fd.Write([]byte("\n")) 62 | } 63 | }() 64 | 65 | } 66 | 67 | log, err := kong.Log.Serialize() 68 | if err != nil { 69 | kong.Log.Err(err.Error()) 70 | } 71 | 72 | ch <- []byte(log) 73 | } 74 | -------------------------------------------------------------------------------- /go-log.go: -------------------------------------------------------------------------------- 1 | /* 2 | A reimplementation of Kong's file-log plugin in Go. 3 | 4 | Here we use goroutines to detach execution from the 5 | request/response cycle. 6 | 7 | Global variables are also long-lived, and use Mutex 8 | locks to protect maps from being modified by 9 | concurrent execution. 10 | */ 11 | 12 | package main 13 | 14 | import ( 15 | "log" 16 | "os" 17 | "sync" 18 | 19 | "github.com/Kong/go-pdk" 20 | "github.com/Kong/go-pdk/server" 21 | ) 22 | 23 | // Start the embedded server 24 | // Note that the parameters are just values, there's no 25 | // need to give them exported names as required by 26 | // the go-pluginserver. Even the `New()` constructor 27 | // function can be written inline. (if it's more readable 28 | // or not is up for debate) 29 | func main() { 30 | server.StartServer(func() interface{} { 31 | return &Config{} 32 | }, "0.3", 2) 33 | } 34 | 35 | type Config struct { 36 | Path string 37 | Reopen bool 38 | } 39 | 40 | // Global variables have the same lifespan 41 | // as the service process. No need 42 | // to use any persistence to pass them 43 | // from one event to another. 44 | // Still, note that the service can be 45 | // killed and respawned at any moment. 46 | // Use some kind of external storage 47 | // to save any state that must survive. 48 | var fileDescriptors map[string]*os.File 49 | var channels map[string]chan []byte 50 | 51 | // multiple events can be handled concurrently 52 | // global mutable maps (like those above) should 53 | // be protected with locks 54 | var fdmap_lock sync.Mutex 55 | var chmap_lock sync.Mutex 56 | 57 | func (conf Config) Log(kong *pdk.PDK) { 58 | ch, is_new := getChannel(conf.Path) 59 | if is_new { 60 | // this is where it "escapes" the event cycle 61 | go conf.collect(ch) 62 | } 63 | 64 | msg, err := kong.Log.Serialize() 65 | if err != nil { 66 | log.Print(err.Error()) 67 | return 68 | } 69 | 70 | ch <- []byte(msg) 71 | } 72 | 73 | // get the channel associated with 74 | // the file in the config. 75 | func getChannel(path string) (chan []byte, bool) { 76 | chmap_lock.Lock() 77 | defer chmap_lock.Unlock() 78 | 79 | var is_new = false 80 | 81 | if channels == nil { 82 | channels = make(map[string]chan []byte) 83 | } 84 | 85 | ch, ok := channels[path] 86 | if !ok { 87 | channels[path] = make(chan []byte) 88 | is_new = true 89 | ch = channels[path] 90 | } 91 | 92 | return ch, is_new 93 | } 94 | 95 | // 96 | // code below this line works "outside" Kong events and should not use the PDK 97 | // -------------------------------- 98 | // 99 | 100 | // Log collection 101 | // 102 | // Note that the goroutine that calls this function will 103 | // persist for several Kong events so it can't use 104 | // any PDK function. The easiest way to enforce this 105 | // is to factor the 'long lived' code in a function 106 | // like this and *not* pass the `kong` variable. 107 | // 108 | // Here the `conf` object is the one passed from 109 | // the event that spawned the goroutine. It will 110 | // not be updated on new events. 111 | func (conf Config) collect(ch chan []byte) { 112 | for { 113 | b := <-ch 114 | 115 | fd, ok := conf.getFileDesc() 116 | if !ok { 117 | return 118 | } 119 | 120 | fd.Write(b) 121 | fd.Write([]byte("\n")) 122 | } 123 | } 124 | 125 | // get an open descriptor for the logfile. 126 | // 127 | // this is called on each new event to give 128 | // the opportunity to close and reopen if 129 | // requested by the configuration. 130 | func (conf Config) getFileDesc() (*os.File, bool) { 131 | fdmap_lock.Lock() 132 | defer fdmap_lock.Unlock() 133 | 134 | if fileDescriptors == nil { 135 | fileDescriptors = make(map[string]*os.File) 136 | } 137 | 138 | fd, ok := fileDescriptors[conf.Path] 139 | if ok { 140 | if conf.Reopen { 141 | fd.Close() 142 | delete(fileDescriptors, conf.Path) 143 | ok = false 144 | } 145 | } 146 | 147 | if !ok { 148 | var err error 149 | fd, err = os.OpenFile(conf.Path, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0644) 150 | if err != nil { 151 | log.Printf("failed to open the file: %s", err.Error()) 152 | return nil, false 153 | } 154 | fileDescriptors[conf.Path] = fd 155 | } 156 | 157 | return fd, true 158 | } 159 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/Kong/go-plugins 2 | 3 | go 1.18 4 | 5 | require github.com/Kong/go-pdk v0.8.0 6 | 7 | require ( 8 | github.com/ugorji/go/codec v1.2.1 // indirect 9 | google.golang.org/protobuf v1.25.0 // indirect 10 | ) 11 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 2 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 3 | github.com/Kong/go-pdk v0.8.0 h1:5HvFuADux2KUOxoEEESie0s1wlFJdNzTl3IQ+UKokyo= 4 | github.com/Kong/go-pdk v0.8.0/go.mod h1:D6tpamZZ1hZp3PEksGCbvlS+g0J2RhGTw7eZW3D7v5I= 5 | github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= 6 | github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 7 | github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= 8 | github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= 9 | github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= 10 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= 11 | github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 12 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 13 | github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 14 | github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= 15 | github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= 16 | github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= 17 | github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= 18 | github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= 19 | github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= 20 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= 21 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 22 | github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 23 | github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 24 | github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= 25 | github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 26 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 27 | github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 28 | github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= 29 | github.com/ugorji/go v1.2.1/go.mod h1:cSVypSfTLm2o9fKxXvQgn3rMmkPXovcWor6Qn5tbFmI= 30 | github.com/ugorji/go/codec v1.2.1 h1:/TRfW3XKkvWvmAYyCUaQlhoCDGjcvNR8xVVA/l5p/jQ= 31 | github.com/ugorji/go/codec v1.2.1/go.mod h1:s/WxCRi46t8rA+fowL40EnmD7ec0XhR7ZypxeBNdzsM= 32 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 33 | golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 34 | golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 35 | golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= 36 | golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 37 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 38 | golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 39 | golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 40 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 41 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 42 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 43 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 44 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 45 | golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 46 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 47 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 48 | golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 49 | golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= 50 | golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 51 | golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 52 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= 53 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 54 | google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= 55 | google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 56 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= 57 | google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 58 | google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= 59 | google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= 60 | google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= 61 | google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= 62 | google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= 63 | google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= 64 | google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= 65 | google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= 66 | google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= 67 | google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 68 | google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 69 | google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= 70 | google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= 71 | gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= 72 | honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 73 | honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 74 | --------------------------------------------------------------------------------