From 4d9808b584644ae1eee165b7d63cba3f0d0da86f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=A5=E6=B5=B7?= Date: Sun, 17 Dec 2023 13:16:15 +0800 Subject: [PATCH] Add go http client --- clients/gohttp/README.md | 53 + clients/gohttp/args/args.go | 46 + clients/gohttp/args/koanf.go | 72 ++ clients/gohttp/args/unmarshal.go | 45 + clients/gohttp/build.sh | 37 + clients/gohttp/config.yml | 12 + clients/gohttp/go.mod | 57 ++ clients/gohttp/go.sum | 497 +++++++++ clients/gohttp/httpd/midware/guard.go | 26 + clients/gohttp/httpd/midware/helper.go | 69 ++ clients/gohttp/httpd/midware/output.go | 41 + clients/gohttp/httpd/server.go | 36 + clients/gohttp/httpd/wcfrest/controller.go | 581 +++++++++++ clients/gohttp/httpd/wcfrest/router.go | 49 + clients/gohttp/httpd/wcfrest/types.go | 47 + clients/gohttp/main.go | 22 + clients/gohttp/public/assets/icon.png | 0 clients/gohttp/public/index.html | 34 + clients/gohttp/public/swagger.json | 1068 ++++++++++++++++++++ 19 files changed, 2792 insertions(+) create mode 100644 clients/gohttp/README.md create mode 100644 clients/gohttp/args/args.go create mode 100644 clients/gohttp/args/koanf.go create mode 100644 clients/gohttp/args/unmarshal.go create mode 100644 clients/gohttp/build.sh create mode 100644 clients/gohttp/config.yml create mode 100644 clients/gohttp/go.mod create mode 100644 clients/gohttp/go.sum create mode 100644 clients/gohttp/httpd/midware/guard.go create mode 100644 clients/gohttp/httpd/midware/helper.go create mode 100644 clients/gohttp/httpd/midware/output.go create mode 100644 clients/gohttp/httpd/server.go create mode 100644 clients/gohttp/httpd/wcfrest/controller.go create mode 100644 clients/gohttp/httpd/wcfrest/router.go create mode 100644 clients/gohttp/httpd/wcfrest/types.go create mode 100644 clients/gohttp/main.go create mode 100644 clients/gohttp/public/assets/icon.png create mode 100644 clients/gohttp/public/index.html create mode 100644 clients/gohttp/public/swagger.json diff --git a/clients/gohttp/README.md b/clients/gohttp/README.md new file mode 100644 index 0000000..b09be95 --- /dev/null +++ b/clients/gohttp/README.md @@ -0,0 +1,53 @@ +# 微信 REST API + +基于 [WeChatFerry RPC](https://github.com/lich0821/WeChatFerry/tree/master/WeChatFerry) 实现的电脑版微信 REST API,使用 Go 语言编写,无第三方运行时依赖。基于 HTTP 提供操作接口,轻松对接任意编程语言。 + +## 使用方法 + +1、下载 [WeChatSetup-3.9.2.23](https://github.com/opentdp/wechat-rest/releases/download/v0.0.1/WeChatSetup-3.9.2.23.exe) 和 [Wechat-rest](https://github.com/opentdp/wechat-rest/releases) + +2、在一台 Windows 系统电脑上安装刚刚下载的微信 + +3、同一台电脑上,解压 `Wechat-rest` ,双击 `wrest.exe` 启动接口服务 + +4、浏览器打开 `http://localhost:7600` 查看支持的接口 + +## 功能清单 + +- 检查登录状态 +- 获取登录账号 wxid +- 获取登录账号个人信息 +- 获取所有消息类型 +- 获取完整通讯录 +- 获取好友列表 +- 获取所有数据库 +- 获取数据库中所有表 +- 执行 SQL 查询 +- 发送文本消息(可 @) +- 发送图片 +- 发送文件 +- 发送卡片消息 +- 保存图片 +- 保存语音 +- 图片 OCR +- 接受好友申请 +- 接收转账 +- 刷新朋友圈 +- 添加群成员 +- 删除群成员 +- 获取群列表 +- 获取群成员列表 +- 获取群成员昵称 +- 邀请群成员 +- 拍一拍群友 +- 开启消息转发 +- 停止消息转发 + +## 生成 OpenApi 文档 + +```shell +go get github.com/swaggo/swag/cmd/swag +go install github.com/swaggo/swag/cmd/swag + +swag init --parseDependency -g httpd/server.go -o public -ot json +``` diff --git a/clients/gohttp/args/args.go b/clients/gohttp/args/args.go new file mode 100644 index 0000000..cf2462a --- /dev/null +++ b/clients/gohttp/args/args.go @@ -0,0 +1,46 @@ +package args + +import ( + "embed" +) + +// 调试模式 + +var Debug bool + +// 嵌入目录 + +var Efs *embed.FS + +// 日志参数 + +var Logger = struct { + Dir string + Level string + Target string +}{ + Dir: "logs", + Level: "info", + Target: "stdout", +} + +// Http 服务参数 + +var Httpd = struct { + Address string + Token string +}{ + Address: "127.0.0.1:7600", +} + +// Wcf 服务参数 + +var Wcf = struct { + Address string + SdkLibrary string + WeChatAuto bool + MsgPrint bool +}{ + Address: "127.0.0.1:10080", + SdkLibrary: "sdk.dll", +} diff --git a/clients/gohttp/args/koanf.go b/clients/gohttp/args/koanf.go new file mode 100644 index 0000000..67d8aa1 --- /dev/null +++ b/clients/gohttp/args/koanf.go @@ -0,0 +1,72 @@ +package args + +import ( + "os" + + "github.com/knadh/koanf/parsers/yaml" + "github.com/knadh/koanf/providers/file" + "github.com/knadh/koanf/v2" + "github.com/opentdp/go-helper/filer" + "github.com/opentdp/go-helper/logman" +) + +// 配置信息操作类 + +type Config struct { + Koanf *koanf.Koanf + Parser *yaml.YAML + File string +} + +func (c *Config) Init() *Config { + + debug := os.Getenv("TDP_DEBUG") + Debug = debug == "1" || debug == "true" + + c.Koanf = koanf.NewWithConf(koanf.Conf{ + StrictMerge: true, + Delim: ".", + }) + c.Parser = yaml.Parser() + c.File = "config.yml" + + return c + +} + +func (c *Config) ReadYaml() { + + // 配置不存在则忽略 + _, err := os.Stat(c.File) + if os.IsNotExist(err) { + return + } + + // 从配置文件读取参数 + err = c.Koanf.Load(file.Provider(c.File), c.Parser) + if err != nil { + logman.Fatal("read config error", "error", err) + } + +} + +func (c *Config) WriteYaml() { + + // 是否强制覆盖 + if filer.Exists(c.File) { + return + } + + // 序列化参数信息 + buf, err := c.Koanf.Marshal(c.Parser) + if err != nil { + logman.Fatal("write config error", "error", err) + } + + // 将参数写入配置文件 + err = os.WriteFile(c.File, buf, 0644) + if err != nil { + logman.Fatal("write config error", "error", err) + } + +} diff --git a/clients/gohttp/args/unmarshal.go b/clients/gohttp/args/unmarshal.go new file mode 100644 index 0000000..9b30ef5 --- /dev/null +++ b/clients/gohttp/args/unmarshal.go @@ -0,0 +1,45 @@ +package args + +import ( + "os" + + "github.com/knadh/koanf/providers/confmap" + "github.com/opentdp/go-helper/logman" +) + +func (c *Config) Unmarshal() { + + // 读取默认配置 + + mp := map[string]any{ + "logger": &Logger, + "httpd": &Httpd, + "wcf": &Wcf, + } + c.Koanf.Load(confmap.Provider(mp, "."), nil) + + // 读取配置文件 + + c.ReadYaml() + for k, v := range mp { + c.Koanf.Unmarshal(k, v) + } + + // 初始化日志 + + if Logger.Dir != "" && Logger.Dir != "." { + os.MkdirAll(Logger.Dir, 0755) + } + + logman.SetDefault(&logman.Config{ + Level: Logger.Level, + Target: Logger.Target, + Storage: Logger.Dir, + Filename: "rest", + }) + + // 写入配置文件 + + c.WriteYaml() + +} diff --git a/clients/gohttp/build.sh b/clients/gohttp/build.sh new file mode 100644 index 0000000..e0719fd --- /dev/null +++ b/clients/gohttp/build.sh @@ -0,0 +1,37 @@ +#!/bin/sh +# + +set -e +set -o noglob + +########################################### + +export CGO_ENABLED=0 +export GO111MODULE=on + +export GOOS=windows +export GOARCH=386 + +#################################################################### + +RUN_NUMBER=${GITHUB_RUN_NUMBER:-0} + +last_tag=`git tag | sort -V | tail -n 1` +prev_tag=`git tag | sort -V | tail -n 2 | head -n 1` +git log $prev_tag..$last_tag --pretty=format:"%s" | grep -v "^release" | sed 's/^/- /' | sort > RELEASE.md + +#################################################################### + +echo building for $GOOS/$GOARCH + +target=build/wrest.exe +go build -ldflags="-s -w" -o $target main.go + +#################################################################### + +cp README.md build/ +cp wcferry/libs/sdk.dll build/ +cp wcferry/libs/spy.dll build/ + +mv build wechat-rest +zip -r wechat-rest.zip wechat-rest/ diff --git a/clients/gohttp/config.yml b/clients/gohttp/config.yml new file mode 100644 index 0000000..8304935 --- /dev/null +++ b/clients/gohttp/config.yml @@ -0,0 +1,12 @@ +httpd: + address: 127.0.0.1:7600 + token: "" +logger: + dir: logs + level: info + target: stdout +wcf: + address: 127.0.0.1:10080 + sdklibrary: sdk.dll + wechatauto: true + msgprint: true diff --git a/clients/gohttp/go.mod b/clients/gohttp/go.mod new file mode 100644 index 0000000..e991c0a --- /dev/null +++ b/clients/gohttp/go.mod @@ -0,0 +1,57 @@ +module github.com/opentdp/wechat-rest + +go 1.21 + +require ( + github.com/gin-gonic/gin v1.9.1 + github.com/opentdp/go-helper v0.5.2 + go.nanomsg.org/mangos/v3 v3.4.2 + google.golang.org/protobuf v1.31.0 +) + +require ( + github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/VividCortex/ewma v1.2.0 // indirect + github.com/bytedance/sonic v1.10.2 // indirect + github.com/cheggaaa/pb/v3 v3.1.4 // indirect + github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect + github.com/chenzhuoyu/iasm v0.9.1 // indirect + github.com/fatih/color v1.16.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/gabriel-vasile/mimetype v1.4.3 // indirect + github.com/gin-contrib/sse v0.1.0 // indirect + github.com/go-playground/locales v0.14.1 // indirect + github.com/go-playground/universal-translator v0.18.1 // indirect + github.com/go-playground/validator/v10 v10.16.0 // indirect + github.com/goccy/go-json v0.10.2 // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/gorilla/websocket v1.5.1 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/cpuid/v2 v2.2.6 // indirect + github.com/knadh/koanf v1.5.0 + github.com/knadh/koanf/v2 v2.0.1 + github.com/leodido/go-urn v1.2.4 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mattn/go-runewidth v0.0.15 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/pelletier/go-toml/v2 v2.1.0 // indirect + github.com/rivo/uniseg v0.4.4 // indirect + github.com/twitchyliquid64/golang-asm v0.15.1 // indirect + github.com/ugorji/go/codec v1.2.12 // indirect + go.nanomsg.org/mangos v2.0.0+incompatible + golang.org/x/arch v0.6.0 // indirect + golang.org/x/crypto v0.16.0 // indirect + golang.org/x/mod v0.14.0 // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect + golang.org/x/tools v0.16.0 // indirect + gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + nanomsg.org/go/mangos/v2 v2.0.8 // indirect +) diff --git a/clients/gohttp/go.sum b/clients/gohttp/go.sum new file mode 100644 index 0000000..ddd7997 --- /dev/null +++ b/clients/gohttp/go.sum @@ -0,0 +1,497 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow= +github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aws/aws-sdk-go-v2 v1.9.2/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= +github.com/aws/aws-sdk-go-v2/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= +github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.6.0/go.mod h1:gqlclDEZp4aqJOancXK6TN24aKhT0W0Ae9MHk3wzTMM= +github.com/aws/aws-sdk-go-v2/internal/ini v1.2.4/go.mod h1:ZcBrrI3zBKlhGFNYWvju0I3TR93I7YIgAfy82Fh4lcQ= +github.com/aws/aws-sdk-go-v2/service/appconfig v1.4.2/go.mod h1:FZ3HkCe+b10uFZZkFdvf98LHW21k49W8o8J366lqVKY= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.2/go.mod h1:72HRZDLMtmVQiLG2tLfQcaWLCssELvGl+Zf2WVxMmR8= +github.com/aws/aws-sdk-go-v2/service/sso v1.4.2/go.mod h1:NBvT9R1MEF+Ud6ApJKM0G+IkPchKS7p7c2YPKwHmBOk= +github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21TfrhJ8AEMzVybRNSb/b4g= +github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= +github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= +github.com/bytedance/sonic v1.10.2 h1:GQebETVBxYB7JGWJtLBi07OVzWwt+8dWA00gEVW2ZFE= +github.com/bytedance/sonic v1.10.2/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cheggaaa/pb/v3 v3.1.4 h1:DN8j4TVVdKu3WxVwcRKu0sG00IIU6FewoABZzXbRQeo= +github.com/cheggaaa/pb/v3 v3.1.4/go.mod h1:6wVjILNBaXMs8c21qRiaUM8BR82erfgau1DQ4iUXmSA= +github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= +github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= +github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA= +github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= +github.com/chenzhuoyu/iasm v0.9.1 h1:tUHQJXo3NhBqw6s33wkGn9SP3bvrWLdlVIJ3hQBL7P0= +github.com/chenzhuoyu/iasm v0.9.1/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0= +github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk= +github.com/gdamore/optopia v0.2.0/go.mod h1:YKYEwo5C1Pa617H7NlPcmQXl+vG6YnSSNB44n8dNL0Q= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= +github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= +github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= +github.com/go-playground/validator/v10 v10.16.0 h1:x+plE831WK4vaKHO/jpgUGsvLKIqRRkz6M78GuJAfGE= +github.com/go-playground/validator/v10 v10.16.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= +github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/consul/api v1.13.0/go.mod h1:ZlVrynguJKcYr54zGaDbaL3fOvKC9m72FhPvA8T35KQ= +github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= +github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= +github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= +github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoIospckxBxk6Q= +github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= +github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hjson/hjson-go/v4 v4.0.0/go.mod h1:KaYt3bTw3zhBjYqnXkYywcYctk0A2nxeEFTse3rH13E= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc= +github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/knadh/koanf v1.5.0 h1:q2TSd/3Pyc/5yP9ldIrSdIz26MCcyNQzW0pEAugLPNs= +github.com/knadh/koanf v1.5.0/go.mod h1:Hgyjp4y8v44hpZtPzs7JZfRAW5AhN7KfZcwv1RYggDs= +github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= +github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= +github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= +github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= +github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/opentdp/go-helper v0.5.2 h1:eta16BJS7Ew8mo8faITFF9vXzoIZN9snIbss2C2q0fQ= +github.com/opentdp/go-helper v0.5.2/go.mod h1:H3qhSAcclbDAQd3XlR4k109vAdypJL3thcW8XkMLhoQ= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= +github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= +github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= +github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= +go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= +go.nanomsg.org/mangos v2.0.0+incompatible h1:Ll6GIzeGGld6/bFrVgBB8CjwibhHXZtF5jon+GoH1bE= +go.nanomsg.org/mangos v2.0.0+incompatible/go.mod h1:gf+avvdfHf8ziBBaiglErv4Pds81OMC1zYvfYyLyjpg= +go.nanomsg.org/mangos/v3 v3.4.2 h1:gHlopxjWvJcVCcUilQIsRQk9jdj6/HB7wrTiUN8Ki7Q= +go.nanomsg.org/mangos/v3 v3.4.2/go.mod h1:8+hjBMQub6HvXmuGvIq6hf19uxGQIjCofmc62lbedLA= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.6.0 h1:S0JTfE48HbRj80+4tbvZDYsJ3tGv6BUU3XxyZ7CirAc= +golang.org/x/arch v0.6.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181128092732-4ed8d59d0b35/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= +golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= +gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= +gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +nanomsg.org/go/mangos/v2 v2.0.8 h1:Nnc5gCNPd8sSyxgfMTdlKK020p4nxLAxcQrhLVnjGQ8= +nanomsg.org/go/mangos/v2 v2.0.8/go.mod h1:gngxudWUZkxqHN+8n/2y9gWZPcwmSbliFYJsYG8mbKs= +nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/clients/gohttp/httpd/midware/guard.go b/clients/gohttp/httpd/midware/guard.go new file mode 100644 index 0000000..0f88b18 --- /dev/null +++ b/clients/gohttp/httpd/midware/guard.go @@ -0,0 +1,26 @@ +package midware + +import ( + "strings" + + "github.com/gin-gonic/gin" + "github.com/opentdp/wechat-rest/args" +) + +func AuthGuard(c *gin.Context) { + + token := "" + + authcode := c.GetHeader("Authorization") + parts := strings.SplitN(authcode, " ", 2) + if len(parts) == 2 && parts[0] == "Bearer" { + token = parts[1] + } + + if token != args.Httpd.Token { + c.Set("Error", gin.H{"Code": 401, "Message": "未授权的操作"}) + c.Set("ExitCode", 401) + c.Abort() + } + +} diff --git a/clients/gohttp/httpd/midware/helper.go b/clients/gohttp/httpd/midware/helper.go new file mode 100644 index 0000000..9d26ac3 --- /dev/null +++ b/clients/gohttp/httpd/midware/helper.go @@ -0,0 +1,69 @@ +package midware + +import ( + "errors" + + "github.com/gin-gonic/gin" +) + +// 获取错误代码 + +func exitCode(c *gin.Context, code int) int { + + if code := c.GetInt("ExitCode"); code > 100 { + return code + } + + return code + +} + +// 创建错误实例 + +func newError(data any) error { + + if err, ok := data.(error); ok { + return err + } + + if err, ok := data.(string); ok { + return errors.New(err) + } + + return errors.New("未知错误") + +} + +// 构造错误信息 + +func newErrorMessage(data any) gin.H { + + if err, ok := data.(error); ok { + return gin.H{"Error": gin.H{"Message": err.Error()}} + } + + if err, ok := data.(string); ok { + return gin.H{"Error": gin.H{"Message": err}} + } + + return gin.H{"Error": data} + +} + +// 构造结构数据 + +func newPayload(data any, msg, token string) gin.H { + + payload := gin.H{"Payload": data} + + if msg != "" { + payload["Message"] = msg + } + + if token != "" { + payload["Token"] = token + } + + return payload + +} diff --git a/clients/gohttp/httpd/midware/output.go b/clients/gohttp/httpd/midware/output.go new file mode 100644 index 0000000..4d531e9 --- /dev/null +++ b/clients/gohttp/httpd/midware/output.go @@ -0,0 +1,41 @@ +package midware + +import ( + "github.com/gin-gonic/gin" +) + +func OutputHandle(c *gin.Context) { + + c.Next() + + // 输出错误信息 + + if err, exists := c.Get("Error"); exists { + c.AbortWithStatusJSON(exitCode(c, 400), newErrorMessage(err)) + return + } + + // 输出请求结果 + + msg := c.GetString("Message") + + if res, exists := c.Get("Payload"); exists || msg != "" { + data := newPayload(res, msg, c.GetString("JwtToken")) + c.AbortWithStatusJSON(exitCode(c, 200), data) + return + } + + // 输出HTML内容 + + if htm := c.GetString("HTML"); htm != "" { + c.Header("Content-Type", "text/html; charset=utf-8") + c.String(200, htm) + c.Abort() + return + } + + // 捕获异常返回 + + c.AbortWithStatusJSON(500, newErrorMessage("内部错误")) + +} diff --git a/clients/gohttp/httpd/server.go b/clients/gohttp/httpd/server.go new file mode 100644 index 0000000..a3dad47 --- /dev/null +++ b/clients/gohttp/httpd/server.go @@ -0,0 +1,36 @@ +package httpd + +import ( + "github.com/opentdp/go-helper/httpd" + + "github.com/opentdp/wechat-rest/args" + "github.com/opentdp/wechat-rest/httpd/midware" + "github.com/opentdp/wechat-rest/httpd/wcfrest" +) + +// @title Wechat Rest API +// @version v0.4.2 +// @description 基于 WeChatFerry RPC 实现的电脑版微信 REST-API,使用 Go 语言编写,无第三方运行时依赖。基于 HTTP 提供操作接口,轻松对接任意编程语言。 +// @contact.name WeChatRest +// @contact.url https://github.com/opentdp/wechat-rest +// @license.name Apache 2.0 +// @license.url http://www.apache.org/licenses/LICENSE-2.0.html +// @BasePath /api + +func Server() { + + httpd.Engine(args.Debug) + + api := httpd.Group("/api") + api.Use(midware.OutputHandle, midware.AuthGuard) + + // 注册 WCF + wcfrest.Route(api) + + // 前端文件路由 + httpd.StaticEmbed("/", "public", args.Efs) + + // 启动 HTTP 服务 + httpd.Server(args.Httpd.Address) + +} diff --git a/clients/gohttp/httpd/wcfrest/controller.go b/clients/gohttp/httpd/wcfrest/controller.go new file mode 100644 index 0000000..54407a8 --- /dev/null +++ b/clients/gohttp/httpd/wcfrest/controller.go @@ -0,0 +1,581 @@ +package wcfrest + +import ( + "strings" + + "github.com/gin-gonic/gin" + "github.com/opentdp/go-helper/logman" + "github.com/opentdp/go-helper/request" + "github.com/opentdp/go-helper/strutil" + + "github.com/opentdp/wechat-rest/args" + "github.com/opentdp/wechat-rest/wcferry" +) + +var wc *wcferry.Client + +func initService() { + + parts := strings.Split(args.Wcf.Address, ":") + + wc = &wcferry.Client{ + ListenAddr: parts[0], + ListenPort: strutil.ToInt(parts[1]), + SdkLibrary: args.Wcf.SdkLibrary, + WeChatAuto: args.Wcf.WeChatAuto, + } + + logman.Info("wcf starting ...") + if err := wc.Connect(); err != nil { + logman.Fatal("failed to start wcf", "error", err) + } + + // 打印收到的消息 + if args.Wcf.MsgPrint { + wc.EnrollReceiver(true, wcferry.MsgPrinter) + } + +} + +// @Summary 检查登录状态 +// @Produce json +// @Success 200 {object} bool +// @Router /is_login [get] +func isLogin(c *gin.Context) { + + c.Set("Payload", wc.CmdClient.IsLogin()) + +} + +// @Summary 获取登录账号wxid +// @Produce json +// @Success 200 {object} string +// @Router /self_wxid [get] +func getSelfWxid(c *gin.Context) { + + c.Set("Payload", wc.CmdClient.GetSelfWxid()) + +} + +// @Summary 获取登录账号个人信息 +// @Produce json +// @Success 200 {object} wcferry.UserInfo +// @Router /user_info [get] +func getUserInfo(c *gin.Context) { + + c.Set("Payload", wc.CmdClient.GetUserInfo()) + +} + +// @Summary 获取完整通讯录 +// @Produce json +// @Success 200 {object} []wcferry.RpcContact +// @Router /contacts [get] +func getContacts(c *gin.Context) { + + c.Set("Payload", wc.CmdClient.GetContacts()) + +} + +// @Summary 获取好友列表 +// @Produce json +// @Success 200 {object} []wcferry.RpcContact +// @Router /friends [get] +func getFriends(c *gin.Context) { + + c.Set("Payload", wc.CmdClient.GetFriends()) + +} + +// @Summary 根据wxid获取个人信息 +// @Produce json +// @Param wxid path string true "wxid" +// @Success 200 {object} wcferry.RpcContact +// @Router /user_info/{wxid} [get] +func getUserInfoByWxid(c *gin.Context) { + + wxid := c.Param("wxid") + c.Set("Payload", wc.CmdClient.GetInfoByWxid(wxid)) + +} + +// @Summary 获取数据库列表 +// @Produce json +// @Success 200 {object} []string +// @Router /db_names [get] +func getDbNames(c *gin.Context) { + + c.Set("Payload", wc.CmdClient.GetDbNames()) + +} + +// @Summary 获取数据库表列表 +// @Produce json +// @Param db path string true "数据库名" +// @Success 200 {object} []wcferry.DbTable +// @Router /db_tables/{db} [get] +func getDbTables(c *gin.Context) { + + db := c.Param("db") + c.Set("Payload", wc.CmdClient.GetDbTables(db)) + +} + +// @Summary 执行数据库查询 +// @Produce json +// @Param body body DbSqlQueryRequest true "数据库查询请求参数" +// @Success 200 {object} map[string]any +// @Router /db_query_sql [post] +func dbSqlQuery(c *gin.Context) { + + var req DbSqlQueryRequest + if err := c.ShouldBindJSON(&req); err != nil { + c.Set("Error", err) + return + } + + c.Set("Payload", wc.CmdClient.DbSqlQueryMap(req.Db, req.Sql)) + +} + +// @Summary 获取所有消息类型 +// @Produce json +// @Success 200 {object} map[int32]string +// @Router /msg_types [get] +func getMsgTypes(c *gin.Context) { + + c.Set("Payload", wc.CmdClient.GetMsgTypes()) + +} + +// @Summary 刷新朋友圈 +// @Produce json +// @Param id path int true "朋友圈id" +// @Success 200 {object} RespPayload +// @Router /refresh_pyq/{id} [get] +func refreshPyq(c *gin.Context) { + + id := c.Param("id") + pyqid := uint64(strutil.ToUint(id)) + + status := wc.CmdClient.RefreshPyq(pyqid) + + c.Set("Payload", RespPayload{ + Success: status == 1, + }) + +} + +// @Summary 获取群列表 +// @Produce json +// @Success 200 {object} []wcferry.RpcContact +// @Router /chatrooms [get] +func getChatRooms(c *gin.Context) { + + c.Set("Payload", wc.CmdClient.GetChatRooms()) + +} + +// @Summary 获取群成员列表 +// @Produce json +// @Param roomid path string true "群id" +// @Success 200 {object} []wcferry.RpcContact +// @Router /chatroom_members/{roomid} [get] +func getChatRoomMembers(c *gin.Context) { + + roomid := c.Param("roomid") + c.Set("Payload", wc.CmdClient.GetChatRoomMembers(roomid)) + +} + +// @Summary 获取群成员昵称 +// @Produce json +// @Param wxid path string true "wxid" +// @Param roomid path string true "群id" +// @Success 200 {object} string +// @Router /alias_in_chatroom/{wxid}/{roomid} [get] +func getAliasInChatRoom(c *gin.Context) { + + wxid := c.Param("wxid") + roomid := c.Param("roomid") + c.Set("Payload", wc.CmdClient.GetAliasInChatRoom(wxid, roomid)) + +} + +// @Summary 邀请群成员 +// @Produce json +// @Param body body wcferry.MemberMgmt true "增删群成员请求参数" +// @Success 200 {object} RespPayload +// @Router /invite_chatroom_members [post] +func inviteChatroomMembers(c *gin.Context) { + + var req wcferry.MemberMgmt + if err := c.ShouldBindJSON(&req); err != nil { + c.Set("Error", err) + return + } + + status := wc.CmdClient.InviteChatroomMembers(req.Roomid, req.Wxids) + + c.Set("Payload", RespPayload{ + Success: status == 1, + }) + +} + +// @Summary 添加群成员 +// @Produce json +// @Param body body wcferry.MemberMgmt true "增删群成员请求参数" +// @Success 200 {object} RespPayload +// @Router /add_chatroom_members [post] +func addChatRoomMembers(c *gin.Context) { + + var req wcferry.MemberMgmt + if err := c.ShouldBindJSON(&req); err != nil { + c.Set("Error", err) + return + } + + status := wc.CmdClient.AddChatRoomMembers(req.Roomid, req.Wxids) + + c.Set("Payload", RespPayload{ + Success: status == 1, + }) + +} + +// @Summary 删除群成员 +// @Produce json +// @Param body body wcferry.MemberMgmt true "增删群成员请求参数" +// @Success 200 {object} RespPayload +// @Router /del_chatroom_members [post] +func delChatRoomMembers(c *gin.Context) { + + var req wcferry.MemberMgmt + if err := c.ShouldBindJSON(&req); err != nil { + c.Set("Error", err) + return + } + + status := wc.CmdClient.DelChatRoomMembers(req.Roomid, req.Wxids) + + c.Set("Payload", RespPayload{ + Success: status == 1, + }) + +} + +// @Summary 撤回消息 +// @Produce json +// @Param msgid path int true "消息id" +// @Success 200 {object} RespPayload +// @Router /revoke_msg/{msgid} [get] +func revokeMsg(c *gin.Context) { + + id := c.Param("msgid") + msgid := uint64(strutil.ToUint(id)) + + status := wc.CmdClient.RevokeMsg(msgid) + + c.Set("Payload", RespPayload{ + Success: status == 1, + }) + +} + +// @Summary 发送文本消息 +// @Produce json +// @Param body body wcferry.TextMsg true "文本消息请求参数" +// @Success 200 {object} RespPayload +// @Router /send_txt [post] +func sendTxt(c *gin.Context) { + + var req wcferry.TextMsg + if err := c.ShouldBindJSON(&req); err != nil { + c.Set("Error", err) + return + } + + status := wc.CmdClient.SendTxt(req.Msg, req.Receiver, req.Aters) + + c.Set("Payload", RespPayload{ + Success: status == 0, + }) + +} + +// @Summary 发送图片消息 +// @Produce json +// @Param body body wcferry.PathMsg true "图片消息请求参数" +// @Success 200 {object} RespPayload +// @Router /send_img [post] +func sendImg(c *gin.Context) { + + var req wcferry.PathMsg + if err := c.ShouldBindJSON(&req); err != nil { + c.Set("Error", err) + return + } + + status := wc.CmdClient.SendImg(req.Path, req.Receiver) + + c.Set("Payload", RespPayload{ + Success: status == 0, + }) + +} + +// @Summary 发送文件消息 +// @Produce json +// @Param body body wcferry.PathMsg true "文件消息请求参数" +// @Success 200 {object} RespPayload +// @Router /send_file [post] +func sendFile(c *gin.Context) { + + var req wcferry.PathMsg + if err := c.ShouldBindJSON(&req); err != nil { + c.Set("Error", err) + return + } + + status := wc.CmdClient.SendFile(req.Path, req.Receiver) + + c.Set("Payload", RespPayload{ + Success: status == 0, + }) + +} + +// @Summary 发送卡片消息 +// @Produce json +// @Param body body wcferry.RichText true "卡片消息请求参数" +// @Success 200 {object} RespPayload +// @Router /send_rich_text [post] +func sendRichText(c *gin.Context) { + + var req wcferry.RichText + if err := c.ShouldBindJSON(&req); err != nil { + c.Set("Error", err) + return + } + + status := wc.CmdClient.SendRichText(req.Name, req.Account, req.Title, req.Digest, req.Url, req.Thumburl, req.Receiver) + + c.Set("Payload", RespPayload{ + Success: status == 0, + }) + +} + +// @Summary 拍一拍群友 +// @Produce json +// @Param body body wcferry.PatMsg true "拍一拍请求参数" +// @Success 200 {object} RespPayload +// @Router /send_pat_msg [post] +func sendPatMsg(c *gin.Context) { + + var req wcferry.PatMsg + if err := c.ShouldBindJSON(&req); err != nil { + c.Set("Error", err) + return + } + + status := wc.CmdClient.SendPatMsg(req.Roomid, req.Wxid) + + c.Set("Payload", RespPayload{ + Success: status == 1, + }) + +} + +// @Summary 获取语音消息 +// @Produce json +// @Param body body GetAudioMsgRequest true "语音消息请求参数" +// @Success 200 {object} RespPayload +// @Router /get_audio_msg [post] +func getAudioMsg(c *gin.Context) { + + var req GetAudioMsgRequest + if err := c.ShouldBindJSON(&req); err != nil { + c.Set("Error", err) + return + } + + if req.Timeout > 0 { + resp, err := wc.CmdClient.GetAudioMsgTimeout(req.Msgid, req.Dir, req.Timeout) + c.Set("Payload", RespPayload{ + Success: resp != "", + Result: resp, + Error: err, + }) + } else { + resp := wc.CmdClient.GetAudioMsg(req.Msgid, req.Dir) + c.Set("Payload", RespPayload{ + Success: resp != "", + Result: resp, + }) + } + +} + +// @Summary 获取OCR识别结果 +// @Produce json +// @Param body body GetOcrRequest true "文本请求参数" +// @Success 200 {object} RespPayload +// @Router /get_ocr_result [post] +func getOcrResult(c *gin.Context) { + + var req GetOcrRequest + if err := c.ShouldBindJSON(&req); err != nil { + c.Set("Error", err) + return + } + + if req.Timeout > 0 { + resp, err := wc.CmdClient.GetOcrResultTimeout(req.Extra, req.Timeout) + c.Set("Payload", RespPayload{ + Success: resp != "", + Result: resp, + Error: err, + }) + } else { + resp, stat := wc.CmdClient.GetOcrResult(req.Extra) + c.Set("Payload", RespPayload{ + Success: stat == 0, + Result: resp, + }) + } + +} + +// @Summary 下载图片 +// @Produce json +// @Param body body DownloadImageRequest true "下载图片参数" +// @Success 200 {object} RespPayload +// @Router /download_image [post] +func downloadImage(c *gin.Context) { + + var req DownloadImageRequest + if err := c.ShouldBindJSON(&req); err != nil { + c.Set("Error", err) + return + } + + resp, err := wc.CmdClient.DownloadImage(req.Msgid, req.Extra, req.Dir, req.Timeout) + + c.Set("Payload", RespPayload{ + Success: resp != "", + Result: resp, + Error: err, + }) + +} + +// @Summary 下载附件 +// @Produce json +// @Param body body DownloadAttachRequest true "下载附件参数" +// @Success 200 {object} RespPayload +// @Router /download_attach [post] +func downloadAttach(c *gin.Context) { + + var req DownloadAttachRequest + if err := c.ShouldBindJSON(&req); err != nil { + c.Set("Error", err) + return + } + + status := wc.CmdClient.DownloadAttach(req.Msgid, req.Thumb, req.Extra) + + c.Set("Payload", RespPayload{ + Success: status == 0, + }) + +} + +// @Summary 接受好友请求 +// @Produce json +// @Param body body wcferry.Verification true "接受好友请求参数" +// @Success 200 {object} RespPayload +// @Router /accept_new_friend [post] +func acceptNewFriend(c *gin.Context) { + + var req wcferry.Verification + if err := c.ShouldBindJSON(&req); err != nil { + c.Set("Error", err) + return + } + + status := wc.CmdClient.AcceptNewFriend(req.V3, req.V4, req.Scene) + + c.Set("Payload", RespPayload{ + Success: status == 1, + }) + +} + +// @Summary 接受转账 +// @Produce json +// @Param body body wcferry.Transfer true "接受转账请求参数" +// @Success 200 {object} RespPayload +// @Router /receive_transfer [post] +func receiveTransfer(c *gin.Context) { + + var req wcferry.Transfer + if err := c.ShouldBindJSON(&req); err != nil { + c.Set("Error", err) + return + } + + status := wc.CmdClient.ReceiveTransfer(req.Wxid, req.Tfid, req.Taid) + + c.Set("Payload", RespPayload{ + Success: status == 1, + }) + +} + +// @Summary 开启消息转发 +// @Produce json +// @Param body body ForwardMsgRequest true "消息转发请求参数" +// @Success 200 {object} RespPayload +// @Router /enable_forward_msg [post] +func enableForwardMsg(c *gin.Context) { + + var req ForwardMsgRequest + if err := c.ShouldBindJSON(&req); err != nil { + c.Set("Error", err) + return + } + + if !strings.HasPrefix(req.Url, "http") { + c.Set("Error", "url must start with http(s)://") + return + } + + err := wc.EnrollReceiver(true, func(msg *wcferry.WxMsg) { + logman.Info("forward msg", "url", req.Url, "Id", msg.Id) + request.JsonPost(req.Url, msg, request.H{}) + }) + + c.Set("Payload", RespPayload{ + Success: err == nil, + Error: err, + }) + +} + +// @Summary 关闭消息转发 +// @Produce json +// @Param body body ForwardMsgRequest true "消息转发请求参数" +// @Success 200 {object} RespPayload +// @Router /disable_forward_msg [post] +func disableForwardMsg(c *gin.Context) { + + err := wc.DisableReceiver() + + c.Set("Payload", RespPayload{ + Success: err == nil, + Error: err, + }) + +} diff --git a/clients/gohttp/httpd/wcfrest/router.go b/clients/gohttp/httpd/wcfrest/router.go new file mode 100644 index 0000000..8fcb424 --- /dev/null +++ b/clients/gohttp/httpd/wcfrest/router.go @@ -0,0 +1,49 @@ +package wcfrest + +import ( + "github.com/gin-gonic/gin" +) + +func Route(rg *gin.RouterGroup) { + + initService() + + rg.GET("is_login", isLogin) + rg.GET("self_wxid", getSelfWxid) + rg.GET("user_info", getUserInfo) + rg.GET("contacts", getContacts) + rg.GET("friends", getFriends) + rg.GET("user_info/:wxid", getUserInfoByWxid) + + rg.GET("db_names", getDbNames) + rg.GET("db_tables/:db", getDbTables) + rg.POST("db_query_sql", dbSqlQuery) + + rg.GET("msg_types", getMsgTypes) + rg.GET("refresh_pyq/:id", refreshPyq) + + rg.GET("chatrooms", getChatRooms) + rg.GET("chatroom_members/:roomid", getChatRoomMembers) + rg.GET("alias_in_chatroom/:wxid/:roomid", getAliasInChatRoom) + rg.POST("invite_chatroom_members", inviteChatroomMembers) + rg.POST("add_chatroom_members", addChatRoomMembers) + rg.POST("del_chatroom_members", delChatRoomMembers) + + rg.GET("revoke_msg/:msgid", revokeMsg) + rg.POST("send_txt", sendTxt) + rg.POST("send_img", sendImg) + rg.POST("send_file", sendFile) + rg.POST("send_rich_text", sendRichText) + rg.POST("send_pat_msg", sendPatMsg) + rg.POST("get_audio_msg", getAudioMsg) + rg.POST("get_ocr_result", getOcrResult) + rg.POST("download_image", downloadImage) + rg.POST("download_attach", downloadAttach) + + rg.POST("accept_new_friend", acceptNewFriend) + rg.POST("receive_transfer", receiveTransfer) + + rg.POST("enable_forward_msg", enableForwardMsg) + rg.POST("disable_forward_msg", disableForwardMsg) + +} diff --git a/clients/gohttp/httpd/wcfrest/types.go b/clients/gohttp/httpd/wcfrest/types.go new file mode 100644 index 0000000..e5d5989 --- /dev/null +++ b/clients/gohttp/httpd/wcfrest/types.go @@ -0,0 +1,47 @@ +package wcfrest + +// 执行结果 +type RespPayload struct { + Success bool `json:"success,omitempty"` + Result string `json:"result,omitempty"` + Error error `json:"error,omitempty"` +} + +// 数据库查询参数 +type DbSqlQueryRequest struct { + Db string `json:"db"` + Sql string `json:"sql"` +} + +// 消息转发参数 +type ForwardMsgRequest struct { + Url string `json:"url"` +} + +// 获取音频消息参数 +type GetAudioMsgRequest struct { + Msgid uint64 `json:"msgid"` + Dir string `json:"path"` + Timeout int `json:"timeout"` +} + +// 获取OCR识别参数 +type GetOcrRequest struct { + Extra string `json:"extra"` + Timeout int `json:"timeout"` +} + +// 下载图片参数 +type DownloadImageRequest struct { + Msgid uint64 `json:"msgid"` + Extra string `json:"extra"` + Dir string `json:"dir"` + Timeout int `json:"timeout"` +} + +// 下载附件参数 +type DownloadAttachRequest struct { + Msgid uint64 `json:"msgid"` + Thumb string `json:"thumb"` + Extra string `json:"extra"` +} diff --git a/clients/gohttp/main.go b/clients/gohttp/main.go new file mode 100644 index 0000000..93eaacf --- /dev/null +++ b/clients/gohttp/main.go @@ -0,0 +1,22 @@ +package main + +import ( + "embed" + + "github.com/opentdp/wechat-rest/args" + "github.com/opentdp/wechat-rest/httpd" +) + +//go:embed public +var efs embed.FS + +func main() { + + args.Efs = &efs + + c := args.Config{} + c.Init().Unmarshal() + + httpd.Server() + +} diff --git a/clients/gohttp/public/assets/icon.png b/clients/gohttp/public/assets/icon.png new file mode 100644 index 0000000..e69de29 diff --git a/clients/gohttp/public/index.html b/clients/gohttp/public/index.html new file mode 100644 index 0000000..35057f6 --- /dev/null +++ b/clients/gohttp/public/index.html @@ -0,0 +1,34 @@ + + + + + WeChat Rest API + + + + + + + +
+ + + + + \ No newline at end of file diff --git a/clients/gohttp/public/swagger.json b/clients/gohttp/public/swagger.json new file mode 100644 index 0000000..44eb12a --- /dev/null +++ b/clients/gohttp/public/swagger.json @@ -0,0 +1,1068 @@ +{ + "swagger": "2.0", + "info": { + "description": "基于 WeChatFerry RPC 实现的电脑版微信 REST-API,使用 Go 语言编写,无第三方运行时依赖。基于 HTTP 提供操作接口,轻松对接任意编程语言。", + "title": "Wechat Rest API", + "contact": { + "name": "WeChatRest", + "url": "https://github.com/opentdp/wechat-rest" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v0.4.2" + }, + "basePath": "/api", + "paths": { + "/accept_new_friend": { + "post": { + "produces": [ + "application/json" + ], + "summary": "接受好友请求", + "parameters": [ + { + "description": "接受好友请求参数", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/wcferry.Verification" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/wcfrest.RespPayload" + } + } + } + } + }, + "/add_chatroom_members": { + "post": { + "produces": [ + "application/json" + ], + "summary": "添加群成员", + "parameters": [ + { + "description": "增删群成员请求参数", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/wcferry.MemberMgmt" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/wcfrest.RespPayload" + } + } + } + } + }, + "/alias_in_chatroom/{wxid}/{roomid}": { + "get": { + "produces": [ + "application/json" + ], + "summary": "获取群成员昵称", + "parameters": [ + { + "type": "string", + "description": "wxid", + "name": "wxid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "群id", + "name": "roomid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + } + } + } + }, + "/chatroom_members/{roomid}": { + "get": { + "produces": [ + "application/json" + ], + "summary": "获取群成员列表", + "parameters": [ + { + "type": "string", + "description": "群id", + "name": "roomid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/wcferry.RpcContact" + } + } + } + } + } + }, + "/chatrooms": { + "get": { + "produces": [ + "application/json" + ], + "summary": "获取群列表", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/wcferry.RpcContact" + } + } + } + } + } + }, + "/contacts": { + "get": { + "produces": [ + "application/json" + ], + "summary": "获取完整通讯录", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/wcferry.RpcContact" + } + } + } + } + } + }, + "/db_names": { + "get": { + "produces": [ + "application/json" + ], + "summary": "获取数据库列表", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "/db_query_sql": { + "post": { + "produces": [ + "application/json" + ], + "summary": "执行数据库查询", + "parameters": [ + { + "description": "数据库查询请求参数", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/wcfrest.DbSqlQueryRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, + "/db_tables/{db}": { + "get": { + "produces": [ + "application/json" + ], + "summary": "获取数据库表列表", + "parameters": [ + { + "type": "string", + "description": "数据库名", + "name": "db", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/wcferry.DbTable" + } + } + } + } + } + }, + "/del_chatroom_members": { + "post": { + "produces": [ + "application/json" + ], + "summary": "删除群成员", + "parameters": [ + { + "description": "增删群成员请求参数", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/wcferry.MemberMgmt" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/wcfrest.RespPayload" + } + } + } + } + }, + "/disable_forward_msg": { + "post": { + "produces": [ + "application/json" + ], + "summary": "关闭消息转发", + "parameters": [ + { + "description": "消息转发请求参数", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/wcfrest.ForwardMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/wcfrest.RespPayload" + } + } + } + } + }, + "/download_attach": { + "post": { + "produces": [ + "application/json" + ], + "summary": "下载附件", + "parameters": [ + { + "description": "下载附件参数", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/wcfrest.DownloadAttachRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/wcfrest.RespPayload" + } + } + } + } + }, + "/download_image": { + "post": { + "produces": [ + "application/json" + ], + "summary": "下载图片", + "parameters": [ + { + "description": "下载图片参数", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/wcfrest.DownloadImageRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/wcfrest.RespPayload" + } + } + } + } + }, + "/enable_forward_msg": { + "post": { + "produces": [ + "application/json" + ], + "summary": "开启消息转发", + "parameters": [ + { + "description": "消息转发请求参数", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/wcfrest.ForwardMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/wcfrest.RespPayload" + } + } + } + } + }, + "/friends": { + "get": { + "produces": [ + "application/json" + ], + "summary": "获取好友列表", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/wcferry.RpcContact" + } + } + } + } + } + }, + "/get_audio_msg": { + "post": { + "produces": [ + "application/json" + ], + "summary": "获取语音消息", + "parameters": [ + { + "description": "语音消息请求参数", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/wcfrest.GetAudioMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/wcfrest.RespPayload" + } + } + } + } + }, + "/get_ocr_result": { + "post": { + "produces": [ + "application/json" + ], + "summary": "获取OCR识别结果", + "parameters": [ + { + "description": "文本请求参数", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/wcfrest.GetOcrRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/wcfrest.RespPayload" + } + } + } + } + }, + "/invite_chatroom_members": { + "post": { + "produces": [ + "application/json" + ], + "summary": "邀请群成员", + "parameters": [ + { + "description": "增删群成员请求参数", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/wcferry.MemberMgmt" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/wcfrest.RespPayload" + } + } + } + } + }, + "/is_login": { + "get": { + "produces": [ + "application/json" + ], + "summary": "检查登录状态", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "boolean" + } + } + } + } + }, + "/msg_types": { + "get": { + "produces": [ + "application/json" + ], + "summary": "获取所有消息类型", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/receive_transfer": { + "post": { + "produces": [ + "application/json" + ], + "summary": "接受转账", + "parameters": [ + { + "description": "接受转账请求参数", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/wcferry.Transfer" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/wcfrest.RespPayload" + } + } + } + } + }, + "/refresh_pyq/{id}": { + "get": { + "produces": [ + "application/json" + ], + "summary": "刷新朋友圈", + "parameters": [ + { + "type": "integer", + "description": "朋友圈id", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/wcfrest.RespPayload" + } + } + } + } + }, + "/revoke_msg/{msgid}": { + "get": { + "produces": [ + "application/json" + ], + "summary": "撤回消息", + "parameters": [ + { + "type": "integer", + "description": "消息id", + "name": "msgid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/wcfrest.RespPayload" + } + } + } + } + }, + "/self_wxid": { + "get": { + "produces": [ + "application/json" + ], + "summary": "获取登录账号wxid", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + } + } + } + }, + "/send_file": { + "post": { + "produces": [ + "application/json" + ], + "summary": "发送文件消息", + "parameters": [ + { + "description": "文件消息请求参数", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/wcferry.PathMsg" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/wcfrest.RespPayload" + } + } + } + } + }, + "/send_img": { + "post": { + "produces": [ + "application/json" + ], + "summary": "发送图片消息", + "parameters": [ + { + "description": "图片消息请求参数", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/wcferry.PathMsg" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/wcfrest.RespPayload" + } + } + } + } + }, + "/send_pat_msg": { + "post": { + "produces": [ + "application/json" + ], + "summary": "拍一拍群友", + "parameters": [ + { + "description": "拍一拍请求参数", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/wcferry.PatMsg" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/wcfrest.RespPayload" + } + } + } + } + }, + "/send_rich_text": { + "post": { + "produces": [ + "application/json" + ], + "summary": "发送卡片消息", + "parameters": [ + { + "description": "卡片消息请求参数", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/wcferry.RichText" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/wcfrest.RespPayload" + } + } + } + } + }, + "/send_txt": { + "post": { + "produces": [ + "application/json" + ], + "summary": "发送文本消息", + "parameters": [ + { + "description": "文本消息请求参数", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/wcferry.TextMsg" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/wcfrest.RespPayload" + } + } + } + } + }, + "/user_info": { + "get": { + "produces": [ + "application/json" + ], + "summary": "获取登录账号个人信息", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/wcferry.UserInfo" + } + } + } + } + }, + "/user_info/{wxid}": { + "get": { + "produces": [ + "application/json" + ], + "summary": "根据wxid获取个人信息", + "parameters": [ + { + "type": "string", + "description": "wxid", + "name": "wxid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/wcferry.RpcContact" + } + } + } + } + } + }, + "definitions": { + "wcferry.DbTable": { + "type": "object", + "properties": { + "name": { + "description": "表名", + "type": "string" + }, + "sql": { + "description": "建表 SQL", + "type": "string" + } + } + }, + "wcferry.MemberMgmt": { + "type": "object", + "properties": { + "roomid": { + "description": "要加的群ID", + "type": "string" + }, + "wxids": { + "description": "要加群的人列表,逗号分隔", + "type": "string" + } + } + }, + "wcferry.PatMsg": { + "type": "object", + "properties": { + "roomid": { + "description": "群 id", + "type": "string" + }, + "wxid": { + "description": "wxid", + "type": "string" + } + } + }, + "wcferry.PathMsg": { + "type": "object", + "properties": { + "path": { + "description": "要发送的图片的路径", + "type": "string" + }, + "receiver": { + "description": "消息接收人", + "type": "string" + } + } + }, + "wcferry.RichText": { + "type": "object", + "properties": { + "account": { + "description": "公众号 id", + "type": "string" + }, + "digest": { + "description": "摘要", + "type": "string" + }, + "name": { + "description": "显示名字", + "type": "string" + }, + "receiver": { + "description": "接收人", + "type": "string" + }, + "thumburl": { + "description": "缩略图", + "type": "string" + }, + "title": { + "description": "标题", + "type": "string" + }, + "url": { + "description": "链接", + "type": "string" + } + } + }, + "wcferry.RpcContact": { + "type": "object", + "properties": { + "city": { + "description": "城市", + "type": "string" + }, + "code": { + "description": "微信号", + "type": "string" + }, + "country": { + "description": "国家", + "type": "string" + }, + "gender": { + "description": "性别", + "type": "integer" + }, + "name": { + "description": "微信昵称", + "type": "string" + }, + "province": { + "description": "省/州", + "type": "string" + }, + "remark": { + "description": "备注", + "type": "string" + }, + "wxid": { + "description": "微信 id", + "type": "string" + } + } + }, + "wcferry.TextMsg": { + "type": "object", + "properties": { + "aters": { + "description": "要@的人列表,逗号分隔", + "type": "string" + }, + "msg": { + "description": "要发送的消息内容", + "type": "string" + }, + "receiver": { + "description": "消息接收人,当为群时可@", + "type": "string" + } + } + }, + "wcferry.Transfer": { + "type": "object", + "properties": { + "taid": { + "description": "Transaction id", + "type": "string" + }, + "tfid": { + "description": "转账id transferid", + "type": "string" + }, + "wxid": { + "description": "转账人", + "type": "string" + } + } + }, + "wcferry.UserInfo": { + "type": "object", + "properties": { + "home": { + "description": "文件/图片等父路径", + "type": "string" + }, + "mobile": { + "description": "手机号", + "type": "string" + }, + "name": { + "description": "昵称", + "type": "string" + }, + "wxid": { + "description": "微信ID", + "type": "string" + } + } + }, + "wcferry.Verification": { + "type": "object", + "properties": { + "scene": { + "description": "添加方式:17 名片,30 扫码", + "type": "integer" + }, + "v3": { + "description": "加密的用户名", + "type": "string" + }, + "v4": { + "description": "Ticket", + "type": "string" + } + } + }, + "wcfrest.DbSqlQueryRequest": { + "type": "object", + "properties": { + "db": { + "type": "string" + }, + "sql": { + "type": "string" + } + } + }, + "wcfrest.DownloadAttachRequest": { + "type": "object", + "properties": { + "extra": { + "type": "string" + }, + "msgid": { + "type": "integer" + }, + "thumb": { + "type": "string" + } + } + }, + "wcfrest.DownloadImageRequest": { + "type": "object", + "properties": { + "dir": { + "type": "string" + }, + "extra": { + "type": "string" + }, + "msgid": { + "type": "integer" + }, + "timeout": { + "type": "integer" + } + } + }, + "wcfrest.ForwardMsgRequest": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + } + }, + "wcfrest.GetAudioMsgRequest": { + "type": "object", + "properties": { + "msgid": { + "type": "integer" + }, + "path": { + "type": "string" + }, + "timeout": { + "type": "integer" + } + } + }, + "wcfrest.GetOcrRequest": { + "type": "object", + "properties": { + "extra": { + "type": "string" + }, + "timeout": { + "type": "integer" + } + } + }, + "wcfrest.RespPayload": { + "type": "object", + "properties": { + "error": {}, + "result": { + "type": "string" + }, + "success": { + "type": "boolean" + } + } + } + } +} \ No newline at end of file