├── bin └── .gitignore ├── .gitignore ├── config ├── .gitignore ├── demo.config.yml └── demo.seelog.xml ├── repo ├── defibox │ ├── lptoken │ │ └── models.go │ └── swap_defi │ │ ├── swap_defi.go │ │ ├── models.go │ │ ├── action.go │ │ ├── cmd.go │ │ └── pairs.go ├── constants │ ├── str_const │ │ ├── symbol.go │ │ ├── symbol_code.go │ │ └── contract.go │ └── obj_const │ │ └── symbol.go ├── eos_api │ ├── contants.go │ ├── history.go │ ├── models.go │ └── eos_api.go ├── defis │ └── defisswapcnt │ │ ├── defisswapcnt.go │ │ ├── models.go │ │ ├── action.go │ │ ├── cmd.go │ │ └── pairs.go ├── dolphin │ └── dolphinsswap │ │ ├── dolphinsswap.go │ │ ├── models.go │ │ ├── action.go │ │ ├── cmd.go │ │ └── pairs.go ├── arbitrage │ ├── arbitrage.go │ ├── util │ │ └── path_util.go │ ├── dex_adapter │ │ ├── dex_adapter.go │ │ ├── defis.go │ │ ├── defibox.go │ │ └── dolphin.go │ ├── chances_filter.go │ ├── task.go │ ├── action.go │ ├── printer │ │ └── path_printer.go │ ├── pair.go │ ├── models │ │ └── models.go │ └── chances.go ├── db_util │ └── db.go ├── config │ └── config.go └── defibox_repo.go ├── resources └── img │ ├── example.png │ └── wechat.jpeg ├── util ├── gin_util │ └── gin_util.go ├── token │ └── token_util.go ├── array_util │ └── array_util.go ├── ip_util │ └── ip_util.go ├── model_util │ └── model_util.go ├── str_util │ └── mstr_util.go ├── json_util │ └── json_util.go └── log_util │ └── seelog.go ├── makefile ├── model └── model.go ├── main.go ├── README.md ├── go.mod ├── cmd ├── root.go └── test.go ├── LICENSE └── go.sum /bin/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .* 2 | !.gitignore 3 | *.log 4 | -------------------------------------------------------------------------------- /config/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !demo.* 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /repo/defibox/lptoken/models.go: -------------------------------------------------------------------------------- 1 | package lptoken 2 | -------------------------------------------------------------------------------- /repo/constants/str_const/symbol.go: -------------------------------------------------------------------------------- 1 | package str_const 2 | 3 | 4 | const SUsdt string = "4,USDT" 5 | -------------------------------------------------------------------------------- /repo/constants/str_const/symbol_code.go: -------------------------------------------------------------------------------- 1 | package str_const 2 | 3 | const ScUsdt string = "USDT" 4 | -------------------------------------------------------------------------------- /resources/img/example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panyanyany/eos-arb/HEAD/resources/img/example.png -------------------------------------------------------------------------------- /resources/img/wechat.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panyanyany/eos-arb/HEAD/resources/img/wechat.jpeg -------------------------------------------------------------------------------- /repo/eos_api/contants.go: -------------------------------------------------------------------------------- 1 | package eos_api 2 | 3 | const TimeLayoutQuery = "2006-01-02T15:04:05.000Z" 4 | const TimeLayoutTimestamp = "2006-01-02T15:04:05.000" 5 | -------------------------------------------------------------------------------- /util/gin_util/gin_util.go: -------------------------------------------------------------------------------- 1 | package gin_util 2 | 3 | type PaginationParams struct { 4 | Page int `form:"page" json:"page" validate:"gte=0"` 5 | Limit int `form:"limit" json:"limit" validate:"gte=0"` 6 | } 7 | -------------------------------------------------------------------------------- /makefile: -------------------------------------------------------------------------------- 1 | bin/arb: .force 2 | go build -o bin/arb . 3 | bin/arb-linux: .force 4 | env GOOS=linux GOARCH=386 go build -v -o bin/arb_linux 5 | update-eos-go: 6 | go get -u github.com/panyanyany/eos-go@develop 7 | .force: 8 | -------------------------------------------------------------------------------- /model/model.go: -------------------------------------------------------------------------------- 1 | package model 2 | 3 | import "gorm.io/gorm" 4 | 5 | type PairIdList struct { 6 | gorm.Model 7 | 8 | Contract string `gorm:"type:varchar(255);unique"` 9 | IdList string `gorm:""` 10 | Total int 11 | } 12 | -------------------------------------------------------------------------------- /repo/constants/str_const/contract.go: -------------------------------------------------------------------------------- 1 | package str_const 2 | 3 | const CTether string = "tethertether" 4 | const CUsdx string = "usdxusdxusdx" 5 | const CEosio string = "eosio.token" 6 | const CUsn string = "danchortoken" 7 | const CEubox string = "euboxtokenxx" 8 | -------------------------------------------------------------------------------- /repo/defibox/swap_defi/swap_defi.go: -------------------------------------------------------------------------------- 1 | package swap_defi 2 | 3 | import ( 4 | "eos-arb/repo/eos_api" 5 | 6 | "gorm.io/gorm" 7 | ) 8 | 9 | const Code string = "swap.defi" 10 | 11 | type Repo struct { 12 | Api eos_api.IEosApi 13 | Db *gorm.DB 14 | } 15 | -------------------------------------------------------------------------------- /repo/defis/defisswapcnt/defisswapcnt.go: -------------------------------------------------------------------------------- 1 | package defisswapcnt 2 | 3 | import ( 4 | "eos-arb/repo/eos_api" 5 | 6 | "gorm.io/gorm" 7 | ) 8 | 9 | const Code string = "defisswapcnt" 10 | 11 | type Repo struct { 12 | Api eos_api.IEosApi 13 | Db *gorm.DB 14 | } 15 | -------------------------------------------------------------------------------- /config/demo.config.yml: -------------------------------------------------------------------------------- 1 | cache_timeout: 5m 2 | db: 3 | name: ubuntu 4 | pass: ubuntu 5 | eos: 6 | api_endpoint: https://eospush.tokenpocket.pro 7 | # api_endpoint: https://eos.hyperion.eosrio.io 8 | accounts: 9 | default: 10 | private_key: 11 | name: 12 | -------------------------------------------------------------------------------- /repo/dolphin/dolphinsswap/dolphinsswap.go: -------------------------------------------------------------------------------- 1 | package dolphinsswap 2 | 3 | import ( 4 | "eos-arb/repo/eos_api" 5 | 6 | "gorm.io/gorm" 7 | ) 8 | 9 | const Code string = "dolphinsswap" 10 | 11 | type Repo struct { 12 | Api eos_api.IEosApi 13 | Db *gorm.DB 14 | } 15 | -------------------------------------------------------------------------------- /repo/arbitrage/arbitrage.go: -------------------------------------------------------------------------------- 1 | package arbitrage 2 | 3 | import ( 4 | "eos-arb/repo/arbitrage/dex_adapter" 5 | "eos-arb/repo/arbitrage/printer" 6 | "eos-arb/repo/eos_api" 7 | ) 8 | 9 | type Repo struct { 10 | Dexes []dex_adapter.IDex 11 | Api eos_api.IEosApi 12 | Printer *printer.PathPrinter 13 | } 14 | -------------------------------------------------------------------------------- /repo/constants/obj_const/symbol.go: -------------------------------------------------------------------------------- 1 | package obj_const 2 | 3 | import "github.com/panyanyany/eos-go" 4 | 5 | var SEos = eos.Symbol{ 6 | Precision: 4, 7 | Symbol: "EOS", 8 | } 9 | var SUsdt = eos.Symbol{ 10 | Precision: 4, 11 | Symbol: "USDT", 12 | } 13 | var SUsn = eos.Symbol{ 14 | Precision: 4, 15 | Symbol: "USN", 16 | } 17 | var SUsdc = eos.Symbol{ 18 | Precision: 4, 19 | Symbol: "USDC", 20 | } 21 | -------------------------------------------------------------------------------- /util/token/token_util.go: -------------------------------------------------------------------------------- 1 | package token 2 | 3 | import ( 4 | "fmt" 5 | "strconv" 6 | "strings" 7 | ) 8 | 9 | func ParseQuantity(qty string) (amt float64, symbolCode string, err error) { 10 | piece := strings.Split(qty, " ") 11 | if len(piece) != 2 { 12 | err = fmt.Errorf("invalid quantity format") 13 | return 14 | } 15 | amt, err = strconv.ParseFloat(piece[0], 64) 16 | if err != nil { 17 | err = fmt.Errorf("parsing amount: %w", err) 18 | return 19 | } 20 | return 21 | } 22 | -------------------------------------------------------------------------------- /util/array_util/array_util.go: -------------------------------------------------------------------------------- 1 | package array_util 2 | 3 | func IntMinMax(array []int) (int, int) { 4 | var max int = array[0] 5 | var min int = array[0] 6 | for _, value := range array { 7 | if max < value { 8 | max = value 9 | } 10 | if min > value { 11 | min = value 12 | } 13 | } 14 | return min, max 15 | } 16 | func IntMin(array []int) int { 17 | min := array[0] 18 | for _, value := range array { 19 | if min > value { 20 | min = value 21 | } 22 | } 23 | return min 24 | } 25 | -------------------------------------------------------------------------------- /util/ip_util/ip_util.go: -------------------------------------------------------------------------------- 1 | package ip_util 2 | 3 | import ( 4 | "fmt" 5 | "net" 6 | ) 7 | 8 | func GetMyIP() (ip string, err error) { 9 | addrs, err := net.InterfaceAddrs() 10 | if err != nil { 11 | err = fmt.Errorf("net.InterfaceAddrs: %v", err) 12 | return 13 | } 14 | 15 | for _, a := range addrs { 16 | if ipnet, ok := a.(*net.IPNet); ok && !ipnet.IP.IsLoopback() { 17 | if ipnet.IP.To4() != nil { 18 | ip = ipnet.IP.To4().String() 19 | break 20 | } 21 | } 22 | } 23 | return 24 | } 25 | -------------------------------------------------------------------------------- /util/model_util/model_util.go: -------------------------------------------------------------------------------- 1 | package model_util 2 | 3 | import ( 4 | "eubox-server/util/gin_util" 5 | 6 | "gorm.io/gorm" 7 | ) 8 | 9 | func Paginate(params *gin_util.PaginationParams) func(db *gorm.DB) *gorm.DB { 10 | return func(db *gorm.DB) *gorm.DB { 11 | if params.Limit == 0 { 12 | params.Limit = 99 13 | } 14 | if params.Page == 0 { 15 | params.Page = 1 16 | } 17 | 18 | offset := (params.Page - 1) * params.Limit 19 | 20 | return db.Offset(offset).Limit(params.Limit) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /util/str_util/mstr_util.go: -------------------------------------------------------------------------------- 1 | // m for multi bytes 2 | package str_util 3 | 4 | func MSubString(str string, begin, length int) (substr string) { 5 | // 将字符串的转换成[]rune 6 | rs := []rune(str) 7 | lth := len(rs) 8 | 9 | // 简单的越界判断 10 | if begin < 0 { 11 | begin = 0 12 | } 13 | if begin >= lth { 14 | begin = lth 15 | } 16 | end := begin + length 17 | if end > lth { 18 | end = lth 19 | } 20 | 21 | // 返回子串 22 | return string(rs[begin:end]) 23 | } 24 | func MLen(str string) int { 25 | return len([]rune(str)) 26 | } 27 | -------------------------------------------------------------------------------- /repo/db_util/db.go: -------------------------------------------------------------------------------- 1 | package db_util 2 | 3 | import ( 4 | "fmt" 5 | 6 | "eos-arb/model" 7 | 8 | "gorm.io/driver/mysql" 9 | "gorm.io/gorm" 10 | ) 11 | 12 | func InitDb(name, pass string) *gorm.DB { 13 | 14 | db, err := gorm.Open(mysql.Open(fmt.Sprintf("%s:%s@tcp(localhost:3306)/eos_arb?charset=utf8&parseTime=True&loc=Local", name, pass)), &gorm.Config{}) 15 | if err != nil { 16 | panic("failed to connect database") 17 | } 18 | 19 | // Migrate the schema 20 | db.AutoMigrate( 21 | &model.PairIdList{}, 22 | ) 23 | sqlDb, _ := db.DB() 24 | sqlDb.SetMaxIdleConns(10) 25 | return db 26 | } 27 | -------------------------------------------------------------------------------- /repo/arbitrage/util/path_util.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "eos-arb/repo/arbitrage/models" 5 | ) 6 | 7 | func PathGroupByDex(paths []*models.PathJob) (groups []PathGroup) { 8 | lastPaths := []*models.PathJob{} 9 | for _, path := range paths { 10 | if len(lastPaths) == 0 { 11 | lastPaths = []*models.PathJob{path} 12 | } else { 13 | if lastPaths[len(lastPaths)-1].Pair.Dex == path.Pair.Dex { 14 | lastPaths = append(lastPaths, path) 15 | } else { 16 | groups = append(groups, lastPaths) 17 | lastPaths = []*models.PathJob{path} 18 | } 19 | } 20 | } 21 | groups = append(groups, lastPaths) 22 | return 23 | } 24 | 25 | type PathGroup []*models.PathJob 26 | -------------------------------------------------------------------------------- /repo/config/config.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | import ( 4 | "os" 5 | 6 | "gopkg.in/yaml.v2" 7 | ) 8 | 9 | type Config struct { 10 | Db DbConfig `yaml:"db"` 11 | QueryEndpoints []string `yaml:"query_endpoints"` 12 | Accounts map[string]AccountConfig `yaml:"accounts"` 13 | } 14 | 15 | type AccountConfig struct { 16 | PrivateKey string `yaml:"private_key"` 17 | Name string `yaml:"name"` 18 | } 19 | 20 | type DbConfig struct { 21 | Name string 22 | Pass string 23 | } 24 | 25 | func LoadConfig() (r *Config) { 26 | data, err := os.ReadFile("config/config.yml") 27 | if err != nil { 28 | panic(err) 29 | return 30 | } 31 | 32 | r = &Config{} 33 | err = yaml.Unmarshal(data, r) 34 | if err != nil { 35 | panic(err) 36 | } 37 | return 38 | } 39 | -------------------------------------------------------------------------------- /repo/dolphin/dolphinsswap/models.go: -------------------------------------------------------------------------------- 1 | package dolphinsswap 2 | 3 | import ( 4 | "eos-arb/util/json_util" 5 | 6 | "github.com/panyanyany/eos-go" 7 | ) 8 | 9 | type Pair struct { 10 | ID int `json:"id"` 11 | Code string `json:"code"` 12 | SwapFee int `json:"swap_fee"` 13 | TotalLptoken json_util.StrOrUint64 `json:"total_lptoken"` 14 | CreateTime int `json:"create_time"` 15 | LastUpdateTime int `json:"last_update_time"` 16 | Tokens []struct { 17 | Weight int `json:"weight"` 18 | Symbol struct { 19 | Symbol eos.Symbol `json:"symbol"` 20 | Contract string `json:"contract"` 21 | } `json:"symbol"` 22 | Reserve eos.Asset `json:"reserve"` 23 | } `json:"tokens"` 24 | } 25 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2021 NAME HERE 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | package main 17 | 18 | import ( 19 | "eos-arb/cmd" // 如果项目包不能导入,则删掉 go.sum 并 go mod tidy 20 | "eos-arb/util/log_util" 21 | 22 | "github.com/cihub/seelog" 23 | ) 24 | 25 | func main() { 26 | log_util.SetupSeelog() 27 | cmd.Execute() 28 | seelog.Flush() 29 | } 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | EOS-ARB: EOS链去中心化交易所(DEX)无损套利工具 2 | === 3 | 4 | 概述 5 | --- 6 | EOS-ARB 可以实现在多个DEX之间进行无损套利,套利模式不限于双路径,也可以在多路径之间进行。 7 | 8 | 举个例子,EOS-ARB 可以在 Defis 和 DefiBox 之间,同时查找3路径套利的可能性。 9 | 10 | 再举个例子,以下是 EOS-ARB 能完成的(套利于任意1到N个交易所之间): 11 | USDT --> BTC --> USDT # 双路径,至少需要2个交易所 12 | USDT --> EOS --> ETH --> USDT # 3个及以上路径,可以在1到N个交易所之间套利 13 | USDT --> EOS --> ETH --> EOS --> USDT 14 | ...... 15 | 16 | 17 | 特性: 18 | --- 19 | - 内置多个交易所:Defis Network, DefiBox, Dolphin,并可随意拓展 20 | - 黑名单合约过滤,过滤掉一些容易异常的代币,比如转账燃烧 21 | - 多节点并发查询,尽量避免信息过时 22 | - 无损套利:每次套利,只要最后输出小于(输入+利润),就自动回滚所有交易 23 | 24 | 效果截图: 25 | --- 26 | ![套利效果](./resources/img/example.png) 27 | 28 | 缺点: 29 | --- 30 | - 收益太低, 套利效果远不如直接写合约进行套利 31 | - 不知道为什么,白天看的时候是盈利状态,充了资源后隔天一看,好像又亏损了一点 32 | 33 | 安装&运行 34 | -- 35 | ```bash 36 | go get 37 | make bin/arb 38 | ./bin/arb test 39 | ``` 40 | 41 | 交个朋友: 42 | -- 43 | ![联系方式](./resources/img/wechat.jpeg) 44 | 45 | -------------------------------------------------------------------------------- /repo/defis/defisswapcnt/models.go: -------------------------------------------------------------------------------- 1 | package defisswapcnt 2 | 3 | import ( 4 | "eos-arb/util/json_util" 5 | 6 | "github.com/panyanyany/eos-go" 7 | ) 8 | 9 | type Pair struct { 10 | Mid int `json:"mid"` 11 | Contract0 string `json:"contract0"` 12 | Contract1 string `json:"contract1"` 13 | Sym0 eos.Symbol `json:"sym0"` 14 | Sym1 eos.Symbol `json:"sym1"` 15 | Reserve0 eos.Asset `json:"reserve0"` 16 | Reserve1 eos.Asset `json:"reserve1"` 17 | LiquidityToken json_util.StrOrUint64 `json:"liquidity_token"` 18 | Price0Last json_util.StrOrFloat64 `json:"price0_last"` 19 | Price1Last json_util.StrOrFloat64 `json:"price1_last"` 20 | Price0CumulativeLast json_util.StrOrUint64 `json:"price0_cumulative_last"` 21 | Price1CumulativeLast json_util.StrOrUint64 `json:"price1_cumulative_last"` 22 | LastUpdate string `json:"last_update"` 23 | } 24 | -------------------------------------------------------------------------------- /repo/arbitrage/dex_adapter/dex_adapter.go: -------------------------------------------------------------------------------- 1 | package dex_adapter 2 | 3 | import ( 4 | "eos-arb/repo/arbitrage/models" 5 | "eos-arb/repo/eos_api" 6 | 7 | "github.com/panyanyany/eos-go" 8 | "gorm.io/gorm" 9 | ) 10 | 11 | type IDex interface { 12 | GetAllPairs() ([]*models.Pair, error) 13 | Init(db *gorm.DB) error 14 | GetSwapCmd(GetSwapCmdInput) (string, error) 15 | GetMultiSwapCmd(GetMultiSwapCmdInput) (string, error) 16 | PushMultiSwapAction(params PushMultiSwapActionInput) (resp *eos.PushTransactionFullResp, err error) 17 | GetMultiSwapAction(params PushMultiSwapActionInput) (action *eos.Action, err error) 18 | GetName() string 19 | } 20 | 21 | type BaseAdapter struct { 22 | Api eos_api.IEosApi 23 | } 24 | 25 | type GetSwapCmdInput struct { 26 | Pair *models.Pair 27 | From eos.Name 28 | In eos.Asset 29 | Out eos.Asset 30 | } 31 | type GetMultiSwapCmdInput struct { 32 | Pairs []*models.Pair 33 | From eos.Name 34 | In eos.Asset 35 | Out eos.Asset 36 | } 37 | type PushMultiSwapActionInput struct { 38 | Pairs []*models.Pair 39 | In eos.Asset 40 | Out eos.Asset 41 | } 42 | -------------------------------------------------------------------------------- /repo/arbitrage/chances_filter.go: -------------------------------------------------------------------------------- 1 | package arbitrage 2 | 3 | import ( 4 | "sort" 5 | 6 | "eos-arb/repo/arbitrage/models" 7 | 8 | "github.com/panyanyany/eos-go" 9 | ) 10 | 11 | func (r *Repo) FilterChances(chances [][]*models.PathJob, minProfit eos.Asset) (filtered [][]*models.PathJob) { 12 | if len(chances) == 0 { 13 | return 14 | } 15 | 16 | sort.Slice(chances, func(i, j int) bool { 17 | iPathJob := chances[i][len(chances[i])-1] 18 | jPathJob := chances[j][len(chances[j])-1] 19 | return jPathJob.Out.Asset.Amount < iPathJob.Out.Asset.Amount 20 | }) 21 | 22 | pairExists := make(map[int]bool) 23 | for _, paths := range chances { 24 | skip := false 25 | profit := paths[len(paths)-1].Out.Asset.Sub(paths[0].In.Asset) 26 | if profit.Amount < minProfit.Amount { 27 | continue 28 | } 29 | for _, path := range paths { 30 | //if j == 0 { 31 | // continue 32 | //} 33 | _, found := pairExists[path.Pair.Id] 34 | if found { 35 | skip = true 36 | break 37 | } 38 | pairExists[path.Pair.Id] = true 39 | } 40 | if skip { 41 | continue 42 | } 43 | filtered = append(filtered, paths) 44 | } 45 | 46 | return 47 | } 48 | -------------------------------------------------------------------------------- /repo/defibox/swap_defi/models.go: -------------------------------------------------------------------------------- 1 | package swap_defi 2 | 3 | import ( 4 | "eos-arb/util/json_util" 5 | 6 | "github.com/panyanyany/eos-go" 7 | ) 8 | 9 | type Pair struct { 10 | ID int `json:"id"` 11 | Token0 struct { 12 | Contract string `json:"contract"` 13 | Symbol eos.Symbol `json:"symbol"` 14 | } `json:"token0"` 15 | Token1 struct { 16 | Contract string `json:"contract"` 17 | Symbol eos.Symbol `json:"symbol"` 18 | } `json:"token1"` 19 | Reserve0 eos.Asset `json:"reserve0"` 20 | Reserve1 eos.Asset `json:"reserve1"` 21 | LiquidityToken json_util.StrOrUint64 `json:"liquidity_token"` 22 | Price0Last json_util.StrOrFloat64 `json:"price0_last"` 23 | Price1Last json_util.StrOrFloat64 `json:"price1_last"` 24 | Price0CumulativeLast json_util.StrOrUint64 `json:"price0_cumulative_last"` 25 | Price1CumulativeLast json_util.StrOrUint64 `json:"price1_cumulative_last"` 26 | BlockTimeLast string `json:"block_time_last"` 27 | } 28 | 29 | type PairPrice struct { 30 | Contract string 31 | Symbol string 32 | PriceInUsdt float64 33 | } 34 | -------------------------------------------------------------------------------- /util/json_util/json_util.go: -------------------------------------------------------------------------------- 1 | package json_util 2 | 3 | import ( 4 | "encoding/json" 5 | "math" 6 | "strings" 7 | ) 8 | 9 | type StrOrUint64 struct { 10 | Value uint64 11 | } 12 | 13 | func (r *StrOrUint64) UnmarshalJSON(data []byte) error { 14 | sysLpStr := string(data) 15 | if strings.Contains(sysLpStr, "-nan") { 16 | r.Value = uint64(math.Inf(-1)) 17 | return nil 18 | } 19 | if strings.Contains(sysLpStr, "nan") { 20 | r.Value = uint64(math.Inf(1)) 21 | return nil 22 | } 23 | if strings.Contains(sysLpStr, "\"") { 24 | sysLpStr = strings.ReplaceAll(sysLpStr, "\"", "") 25 | } 26 | 27 | return json.Unmarshal([]byte(sysLpStr), &r.Value) 28 | } 29 | 30 | type StrOrFloat64 struct { 31 | Value float64 32 | } 33 | 34 | func (r *StrOrFloat64) UnmarshalJSON(data []byte) error { 35 | sysLpStr := string(data) 36 | if strings.Contains(sysLpStr, "-nan") { 37 | r.Value = math.Inf(-1) 38 | return nil 39 | } 40 | if strings.Contains(sysLpStr, "nan") { 41 | r.Value = math.Inf(1) 42 | return nil 43 | } 44 | if strings.Contains(sysLpStr, "\"") { 45 | sysLpStr = strings.ReplaceAll(sysLpStr, "\"", "") 46 | } 47 | 48 | return json.Unmarshal([]byte(sysLpStr), &r.Value) 49 | } 50 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module eos-arb 2 | 3 | go 1.16 4 | 5 | require ( 6 | contrib.go.opencensus.io/exporter/stackdriver v0.13.8 // indirect 7 | github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 8 | github.com/elazarl/goproxy v0.0.0-20210110162100-a92cc753f88e // indirect 9 | github.com/go-redis/redis/v8 v8.10.0 10 | github.com/gocarina/gocsv v0.0.0-20210516172204-ca9e8a8ddea8 11 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect 12 | github.com/mitchellh/go-homedir v1.1.0 13 | github.com/panyanyany/eos-go v0.9.4-0.20210621092235-c9610ae7ce20 // indirect 14 | github.com/parnurzeal/gorequest v0.2.16 15 | github.com/spf13/cobra v1.1.3 16 | github.com/spf13/viper v1.8.0 17 | github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125 // indirect 18 | github.com/tidwall/pretty v1.2.0 // indirect 19 | go.uber.org/atomic v1.8.0 // indirect 20 | go.uber.org/multierr v1.7.0 // indirect 21 | golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 // indirect 22 | golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect 23 | gopkg.in/yaml.v2 v2.4.0 24 | gorm.io/driver/mysql v1.1.1 25 | gorm.io/gorm v1.21.11 26 | moul.io/http2curl v1.0.0 // indirect 27 | ) 28 | 29 | //replace github.com/panyanyany/eos-go v0.9.1 => /var/www/go/src/github.com/panyanyany/eos-go 30 | -------------------------------------------------------------------------------- /config/demo.seelog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /repo/arbitrage/task.go: -------------------------------------------------------------------------------- 1 | package arbitrage 2 | 3 | import ( 4 | "fmt" 5 | "time" 6 | 7 | "eos-arb/repo/arbitrage/models" 8 | 9 | "github.com/cihub/seelog" 10 | "github.com/panyanyany/eos-go" 11 | ) 12 | 13 | func (r *Repo) RunTask(params RunTaskInput) { 14 | arb := r 15 | ts_start := time.Now() 16 | baseSym := params.BaseSymbol 17 | baseContract := params.BaseContract 18 | minProfit := eos.Asset{Amount: eos.Int64(params.MinProfitAmount), Symbol: baseSym} 19 | 20 | chances, err := arb.GetChances(GetChancesInput{ 21 | Pairs: params.Pairs, 22 | PathDepth: 4, 23 | BaseAsset: eos.ExtendedAsset{ 24 | Asset: eos.Asset{Amount: eos.Int64(params.BaseAmount), Symbol: baseSym}, 25 | Contract: baseContract, 26 | }, 27 | MinProfit: eos.ExtendedAsset{ 28 | Asset: eos.Asset{Amount: 1, Symbol: baseSym}, 29 | Contract: baseContract, 30 | }, 31 | }) 32 | if err != nil { 33 | err = fmt.Errorf("arb.GetChances: %w", err) 34 | seelog.Error(err) 35 | } 36 | chances = arb.FilterChances(chances, minProfit) 37 | ts_diff := time.Now().Sub(ts_start) 38 | seelog.Debugf("calc time cost: %.3fs", ts_diff.Seconds()) 39 | for _, paths := range chances { 40 | r.Printer.PrintPaths(paths) 41 | } 42 | arb.RunChances(chances, minProfit) 43 | } 44 | 45 | type RunTaskInput struct { 46 | BaseSymbol eos.Symbol 47 | BaseContract eos.AccountName 48 | BaseAmount int64 49 | MinProfitAmount int64 50 | Pairs []*models.Pair 51 | } 52 | -------------------------------------------------------------------------------- /repo/arbitrage/action.go: -------------------------------------------------------------------------------- 1 | package arbitrage 2 | 3 | import ( 4 | "fmt" 5 | 6 | "eos-arb/repo/arbitrage/dex_adapter" 7 | "eos-arb/repo/arbitrage/models" 8 | "eos-arb/repo/arbitrage/util" 9 | 10 | "github.com/cihub/seelog" 11 | "github.com/panyanyany/eos-go" 12 | ) 13 | 14 | func (r *Repo) RunChances(chances [][]*models.PathJob, minProfit eos.Asset) (err error) { 15 | for _, paths := range chances { 16 | var actions []*eos.Action 17 | groups := util.PathGroupByDex(paths) 18 | for j, group := range groups { 19 | var pairs []*models.Pair 20 | for _, path := range group { 21 | pairs = append(pairs, path.Pair) 22 | } 23 | out := group[len(group)-1].Out.Asset 24 | if j == len(groups)-1 { 25 | out = groups[0][0].In.Asset.Add(minProfit) 26 | } 27 | action, err := group[0].Pair.Dex.(dex_adapter.IDex).GetMultiSwapAction(dex_adapter.PushMultiSwapActionInput{ 28 | Pairs: pairs, 29 | In: group[0].In.Asset, 30 | //Out: group[len(group)-1].Out.Asset, 31 | Out: out, 32 | }) 33 | if err != nil { 34 | msg := fmt.Sprintf("GetMultiSwapAction: %v", err) 35 | fmt.Println(msg) 36 | seelog.Errorf(msg) 37 | break 38 | } 39 | actions = append(actions, action) 40 | } 41 | go func(actions []*eos.Action) { 42 | _, err = r.Api.PushActions(actions) 43 | if err != nil { 44 | err = fmt.Errorf("r.Api.PushActions: %s", err) 45 | fmt.Println(err) 46 | seelog.Error(err) 47 | } 48 | }(actions) 49 | } 50 | return 51 | } 52 | -------------------------------------------------------------------------------- /util/log_util/seelog.go: -------------------------------------------------------------------------------- 1 | package log_util 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | "path" 7 | 8 | "eos-arb/util/ip_util" 9 | 10 | "github.com/cihub/seelog" 11 | ) 12 | 13 | // custom formatter,显示进程名 14 | func createProcessFormatter(params string) seelog.FormatterFunc { 15 | return func(message string, level seelog.LogLevel, context seelog.LogContextInterface) interface{} { 16 | return os.Args[0] 17 | } 18 | } 19 | func createShortProcessFormatter(params string) seelog.FormatterFunc { 20 | return func(message string, level seelog.LogLevel, context seelog.LogContextInterface) interface{} { 21 | _, filename := path.Split(os.Args[0]) 22 | return filename 23 | } 24 | } 25 | 26 | var ip string 27 | 28 | func createIpFormatter(params string) seelog.FormatterFunc { 29 | return func(message string, level seelog.LogLevel, context seelog.LogContextInterface) interface{} { 30 | if ip != "" { 31 | return ip 32 | } 33 | ip, err := ip_util.GetMyIP() 34 | if err != nil { 35 | ip = fmt.Sprintf("", err) 36 | return ip 37 | } 38 | return ip 39 | } 40 | } 41 | 42 | func SetupSeelog() { 43 | var err error 44 | // custom formatter,显示进程名 45 | err = seelog.RegisterCustomFormatter("Process", createProcessFormatter) 46 | if err != nil { 47 | panic(err) 48 | } 49 | err = seelog.RegisterCustomFormatter("Proc", createShortProcessFormatter) 50 | if err != nil { 51 | panic(err) 52 | } 53 | err = seelog.RegisterCustomFormatter("IP", createIpFormatter) 54 | if err != nil { 55 | panic(err) 56 | } 57 | // seelog配置,用于输出调试信息 58 | logger, err := seelog.LoggerFromConfigAsFile("config/seelog.xml") 59 | if err != nil { 60 | panic(err) 61 | } 62 | err = seelog.UseLogger(logger) 63 | if err != nil { 64 | panic(err) 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /repo/eos_api/history.go: -------------------------------------------------------------------------------- 1 | package eos_api 2 | 3 | import ( 4 | "crypto/md5" 5 | "encoding/json" 6 | "fmt" 7 | 8 | "github.com/cihub/seelog" 9 | "github.com/go-redis/redis/v8" 10 | "github.com/parnurzeal/gorequest" 11 | ) 12 | 13 | func (r *EosApi) GetActions(params GetActionsInput) (out *ActionOutput, err error) { 14 | var bs []byte 15 | key := "GetActions:" 16 | bs, err = json.Marshal(params) 17 | if err != nil { 18 | seelog.Debugf("params: %#v", params) 19 | err = fmt.Errorf("json.Marshal params for key: %w", err) 20 | return 21 | } 22 | 23 | key += fmt.Sprintf("%x", md5.Sum(bs)) 24 | 25 | var str string 26 | 27 | if r.EnableCache { 28 | str, err = r.Rdb.Get(ctx, key).Result() 29 | if err != redis.Nil && err != nil { 30 | err = fmt.Errorf("r.Rdb.Get: %v, key=%v", err, key) 31 | return 32 | } 33 | if err == redis.Nil { 34 | //seelog.Debugf("params: %#v", params) 35 | } 36 | //seelog.Debugf("r.Rdb.Get key=%v, err=%v", key, err) 37 | } 38 | 39 | if str == "" { 40 | baseUrl := r.GetLock(r.HistoryApiList) 41 | fullUrl := baseUrl + "/v2/history/get_actions?" + params.ToValues().Encode() 42 | seelog.Debugf("GetActions: %v", fullUrl) 43 | _, bs, errs := gorequest.New().Get(fullUrl).EndBytes() 44 | r.ReleaseLock(baseUrl) 45 | if len(errs) != 0 { 46 | err = fmt.Errorf("request failed: %v", errs) 47 | return 48 | } 49 | if r.EnableCache { 50 | err = r.Rdb.Set(ctx, key, string(bs), r.RedisTimeout).Err() 51 | if err != nil { 52 | err = fmt.Errorf("r.Rdb.Set: %w", err) 53 | return 54 | } 55 | } 56 | err = json.Unmarshal(bs, out) 57 | if err != nil { 58 | err = fmt.Errorf("json.Unmarshal response body: %w", err) 59 | return 60 | } 61 | 62 | } else { 63 | err = json.Unmarshal([]byte(str), &out) 64 | if err != nil { 65 | seelog.Debugf("str: %v", str) 66 | err = fmt.Errorf("json.Unmarshal: %w", err) 67 | return 68 | } 69 | } 70 | return 71 | } 72 | -------------------------------------------------------------------------------- /repo/defibox/swap_defi/action.go: -------------------------------------------------------------------------------- 1 | package swap_defi 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/cihub/seelog" 7 | "github.com/panyanyany/eos-go" 8 | ) 9 | 10 | func (r *Repo) GetMultiSwapAction(params PushMultiSwapActionInput) (action *eos.Action, err error) { 11 | inputContract := params.Pairs[0].Token0.Contract 12 | inputSymbol := params.Pairs[0].Token0.Symbol 13 | if inputSymbol.String() != params.In.Symbol.String() { 14 | inputContract = params.Pairs[0].Token1.Contract 15 | inputSymbol = params.Pairs[0].Token1.Symbol 16 | } 17 | if inputSymbol.String() != params.In.Symbol.String() { 18 | err = fmt.Errorf("not found symbol: %v", params.In.Symbol.String()) 19 | return 20 | } 21 | 22 | memo := r.GetSwapMemo(params.Pairs, params.Out) 23 | 24 | actionData := eos.NewActionData(TransferAction{ 25 | From: r.Api.GetActor(), 26 | To: eos.AccountName(Code), 27 | Quantity: params.In, 28 | Memo: memo, 29 | }) 30 | action = &eos.Action{ 31 | Account: eos.AccountName(inputContract), 32 | Name: "transfer", 33 | Authorization: []eos.PermissionLevel{ 34 | {Actor: r.Api.GetActor(), Permission: eos.PermissionName("active")}, 35 | }, 36 | ActionData: actionData, 37 | } 38 | return 39 | } 40 | func (r *Repo) PushMultiSwapAction(params PushMultiSwapActionInput) (resp *eos.PushTransactionFullResp, err error) { 41 | var action *eos.Action 42 | 43 | action, err = r.GetMultiSwapAction(params) 44 | if err != nil { 45 | err = fmt.Errorf("r.GetMultiSwapAction: %w", err) 46 | return 47 | } 48 | 49 | seelog.Debugf("pushActions: %v", action.ActionData) 50 | resp, err = r.Api.PushActions([]*eos.Action{action}) 51 | return 52 | } 53 | 54 | type PushMultiSwapActionInput struct { 55 | Pairs []*Pair 56 | In eos.Asset 57 | Out eos.Asset 58 | } 59 | 60 | type TransferAction struct { 61 | From eos.AccountName `json:"from"` 62 | To eos.AccountName `json:"to"` 63 | Quantity eos.Asset `json:"quantity"` 64 | Memo string `json:"memo"` 65 | } 66 | -------------------------------------------------------------------------------- /repo/arbitrage/printer/path_printer.go: -------------------------------------------------------------------------------- 1 | package printer 2 | 3 | import ( 4 | "fmt" 5 | 6 | "eos-arb/repo/arbitrage/dex_adapter" 7 | "eos-arb/repo/arbitrage/models" 8 | "eos-arb/repo/arbitrage/util" 9 | 10 | "github.com/cihub/seelog" 11 | "github.com/panyanyany/eos-go" 12 | ) 13 | 14 | type PathPrinter struct { 15 | ShowDex bool 16 | ShowContract bool 17 | ShowCmd bool 18 | From eos.Name 19 | } 20 | 21 | func (r *PathPrinter) PrintPaths(paths []*models.PathJob) { 22 | msg := "" 23 | for j := 0; j < len(paths); j++ { 24 | contract := "" 25 | if r.ShowContract { 26 | contract = paths[j].In.GetKey() + ":" 27 | } 28 | dex := "" 29 | if r.ShowDex { 30 | dex = paths[j].Pair.Dex.(dex_adapter.IDex).GetName() + ":" 31 | } 32 | msg += fmt.Sprintf("[%v%v%v] -> ", 33 | dex, 34 | contract, 35 | paths[j].In.Asset.String(), 36 | ) 37 | } 38 | 39 | contract := "" 40 | if r.ShowContract { 41 | contract = paths[len(paths)-1].In.GetKey() + ":" 42 | } 43 | dex := "" 44 | if r.ShowDex { 45 | dex = paths[len(paths)-1].Pair.Dex.(dex_adapter.IDex).GetName() + ":" 46 | } 47 | msg += fmt.Sprintf("[%v%v%v] = %v", 48 | dex, 49 | contract, 50 | paths[len(paths)-1].Out.Asset.String(), 51 | paths[len(paths)-1].Out.Asset.Sub(paths[0].In.Asset), 52 | ) 53 | seelog.Info(msg) 54 | 55 | //fmt.Println() 56 | if r.ShowCmd { 57 | for _, group := range util.PathGroupByDex(paths) { 58 | r.PrintCmd(group) 59 | } 60 | } 61 | } 62 | func (r *PathPrinter) PrintCmd(paths []*models.PathJob) { 63 | var cmd string 64 | var err error 65 | pairs := []*models.Pair{} 66 | for _, _path := range paths { 67 | pairs = append(pairs, _path.Pair) 68 | } 69 | cmd, err = paths[0].Pair.Dex.(dex_adapter.IDex).GetMultiSwapCmd(dex_adapter.GetMultiSwapCmdInput{ 70 | Pairs: pairs, 71 | From: r.From, 72 | In: paths[0].In.Asset, 73 | Out: paths[len(paths)-1].Out.Asset, 74 | }) 75 | if err != nil { 76 | err = fmt.Errorf("GetMultiSwapCmd: %w", err) 77 | seelog.Error(err) 78 | return 79 | } 80 | seelog.Infof("\t%v", cmd) 81 | 82 | } 83 | -------------------------------------------------------------------------------- /repo/defis/defisswapcnt/action.go: -------------------------------------------------------------------------------- 1 | package defisswapcnt 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/cihub/seelog" 7 | "github.com/panyanyany/eos-go" 8 | ) 9 | 10 | func (r *Repo) GetMultiSwapAction(params PushMultiSwapActionInput) (action *eos.Action, err error) { 11 | inputContract := params.Pairs[0].Contract0 12 | inputSymbol := params.Pairs[0].Sym0 13 | if inputSymbol.String() != params.In.Symbol.String() { 14 | inputContract = params.Pairs[0].Contract1 15 | inputSymbol = params.Pairs[0].Sym1 16 | } 17 | if inputSymbol.String() != params.In.Symbol.String() { 18 | err = fmt.Errorf("not found symbol: %v", params.In.Symbol.String()) 19 | //errs = append(errs, err) 20 | return 21 | } 22 | 23 | //memo := fmt.Sprintf("swap,%d,%d", params.Out.Amount, params.Pair.ID) 24 | memo := r.GetSwapMemo(params.Pairs, params.Out) 25 | 26 | actionData := eos.NewActionData(TransferAction{ 27 | From: r.Api.GetActor(), 28 | To: eos.AccountName(Code), 29 | Quantity: params.In, 30 | Memo: memo, 31 | }) 32 | action = &eos.Action{ 33 | Account: eos.AccountName(inputContract), 34 | Name: "transfer", 35 | Authorization: []eos.PermissionLevel{ 36 | {Actor: r.Api.GetActor(), Permission: eos.PermissionName("active")}, 37 | }, 38 | ActionData: actionData, 39 | } 40 | return 41 | } 42 | func (r *Repo) PushMultiSwapAction(params PushMultiSwapActionInput) (resp *eos.PushTransactionFullResp, err error) { 43 | var action *eos.Action 44 | action, err = r.GetMultiSwapAction(params) 45 | if err != nil { 46 | err = fmt.Errorf("r.GetMultiSwapAction: %w", err) 47 | return 48 | } 49 | 50 | seelog.Debugf("pushActions: %v", action.ActionData) 51 | resp, err = r.Api.PushActions([]*eos.Action{action}) 52 | return 53 | } 54 | 55 | type PushMultiSwapActionInput struct { 56 | Pairs []*Pair 57 | In eos.Asset 58 | Out eos.Asset 59 | } 60 | 61 | type TransferAction struct { 62 | From eos.AccountName `json:"from"` 63 | To eos.AccountName `json:"to"` 64 | Quantity eos.Asset `json:"quantity"` 65 | Memo string `json:"memo"` 66 | } 67 | -------------------------------------------------------------------------------- /repo/dolphin/dolphinsswap/action.go: -------------------------------------------------------------------------------- 1 | package dolphinsswap 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/cihub/seelog" 7 | "github.com/panyanyany/eos-go" 8 | ) 9 | 10 | func (r *Repo) GetMultiSwapAction(params PushMultiSwapActionInput) (action *eos.Action, err error) { 11 | inputContract := params.Pairs[0].Tokens[0].Symbol.Contract 12 | inputSymbol := params.Pairs[0].Tokens[0].Symbol.Symbol 13 | if inputSymbol.String() != params.In.Symbol.String() { 14 | inputContract = params.Pairs[0].Tokens[1].Symbol.Contract 15 | inputSymbol = params.Pairs[0].Tokens[1].Symbol.Symbol 16 | } 17 | if inputSymbol.String() != params.In.Symbol.String() { 18 | err = fmt.Errorf("not found symbol: %v", params.In.Symbol.String()) 19 | //errs = append(errs, err) 20 | return 21 | } 22 | 23 | //memo := fmt.Sprintf("swap,%d,%d", params.Out.Amount, params.Pair.ID) 24 | memo := r.GetSwapMemo(params.Pairs, params.Out) 25 | 26 | actionData := eos.NewActionData(TransferAction{ 27 | From: r.Api.GetActor(), 28 | To: eos.AccountName(Code), 29 | Quantity: params.In, 30 | Memo: memo, 31 | }) 32 | action = &eos.Action{ 33 | Account: eos.AccountName(inputContract), 34 | Name: "transfer", 35 | Authorization: []eos.PermissionLevel{ 36 | {Actor: r.Api.GetActor(), Permission: eos.PermissionName("active")}, 37 | }, 38 | ActionData: actionData, 39 | } 40 | return 41 | } 42 | func (r *Repo) PushMultiSwapAction(params PushMultiSwapActionInput) (resp *eos.PushTransactionFullResp, err error) { 43 | var action *eos.Action 44 | action, err = r.GetMultiSwapAction(params) 45 | if err != nil { 46 | err = fmt.Errorf("r.GetMultiSwapAction: %w", err) 47 | return 48 | } 49 | 50 | seelog.Debugf("pushActions: %v", action.ActionData) 51 | resp, err = r.Api.PushActions([]*eos.Action{action}) 52 | return 53 | } 54 | 55 | type PushMultiSwapActionInput struct { 56 | Pairs []*Pair 57 | In eos.Asset 58 | Out eos.Asset 59 | } 60 | 61 | type TransferAction struct { 62 | From eos.AccountName `json:"from"` 63 | To eos.AccountName `json:"to"` 64 | Quantity eos.Asset `json:"quantity"` 65 | Memo string `json:"memo"` 66 | } 67 | -------------------------------------------------------------------------------- /repo/arbitrage/pair.go: -------------------------------------------------------------------------------- 1 | package arbitrage 2 | 3 | import ( 4 | "fmt" 5 | "sync" 6 | 7 | "eos-arb/repo/arbitrage/dex_adapter" 8 | "eos-arb/repo/arbitrage/models" 9 | 10 | "github.com/cihub/seelog" 11 | ) 12 | 13 | func (r *Repo) MakePairHub(pairs []*models.Pair) (pairHub map[string][]*models.Pair) { 14 | pairHub = make(map[string][]*models.Pair) 15 | for _, pair := range pairs { 16 | _, found0 := pairHub[pair.Token0.GetKey()] 17 | if !found0 { 18 | pairHub[pair.Token0.GetKey()] = make([]*models.Pair, 0) 19 | } 20 | pairHub[pair.Token0.GetKey()] = append(pairHub[pair.Token0.GetKey()], pair) 21 | 22 | _, found1 := pairHub[pair.Token1.GetKey()] 23 | if !found1 { 24 | pairHub[pair.Token1.GetKey()] = make([]*models.Pair, 0) 25 | } 26 | pairHub[pair.Token1.GetKey()] = append(pairHub[pair.Token1.GetKey()], pair) 27 | } 28 | return 29 | } 30 | func (r *Repo) FilterPairs(pairs []*models.Pair) (newPairs []*models.Pair) { 31 | contractBlackList := []string{ 32 | "joker.eos", // 老是显示 swap too small 33 | "token.bank", // 吞币 34 | "eoscccdotcom", // 转账燃烧 35 | "yupyupxtoken", // balance error 36 | "token.yup", // balance error 37 | } 38 | for _, pair := range pairs { 39 | skip := false 40 | for _, contract := range contractBlackList { 41 | if pair.Token0.Contract == contract || pair.Token1.Contract == contract { 42 | skip = true 43 | } 44 | } 45 | if skip { 46 | continue 47 | } 48 | newPairs = append(newPairs, pair) 49 | } 50 | return 51 | } 52 | func (r *Repo) GetAllPairs(dexes []dex_adapter.IDex) (pairs []*models.Pair) { 53 | pairs = []*models.Pair{} 54 | wg := sync.WaitGroup{} 55 | cRes := make(chan *GetPairsResult) 56 | done := make(chan bool) 57 | for _, dex := range dexes { 58 | wg.Add(1) 59 | 60 | go func(dex dex_adapter.IDex) { 61 | defer wg.Done() 62 | _pairs, err := dex.GetAllPairs() 63 | cRes <- &GetPairsResult{ 64 | Pairs: _pairs, 65 | Error: err, 66 | } 67 | }(dex) 68 | } 69 | go func() { 70 | for res := range cRes { 71 | if res.Error != nil { 72 | err := fmt.Errorf(": %w", res.Error) 73 | seelog.Error(err) 74 | } else { 75 | pairs = append(pairs, res.Pairs...) 76 | } 77 | } 78 | done <- true 79 | }() 80 | wg.Wait() 81 | close(cRes) 82 | <-done 83 | return 84 | } 85 | 86 | type GetPairsResult struct { 87 | Pairs []*models.Pair 88 | Error error 89 | } 90 | -------------------------------------------------------------------------------- /repo/defis/defisswapcnt/cmd.go: -------------------------------------------------------------------------------- 1 | package defisswapcnt 2 | 3 | import ( 4 | "fmt" 5 | "strconv" 6 | "strings" 7 | 8 | "github.com/panyanyany/eos-go" 9 | ) 10 | 11 | func (r *Repo) GetSwapCmd(params GetSwapCmdInput) (cmd string, err error) { 12 | inputContract := params.Pair.Contract0 13 | inputSymbol := params.Pair.Sym0 14 | if inputSymbol.String() != params.In.Symbol.String() { 15 | inputContract = params.Pair.Contract1 16 | inputSymbol = params.Pair.Sym1 17 | } 18 | if inputSymbol.String() != params.In.Symbol.String() { 19 | err = fmt.Errorf("not found symbol: %v", params.In.Symbol.String()) 20 | return 21 | } 22 | 23 | //memo := fmt.Sprintf("swap,%d,%d", params.Out.Amount, params.Pair.Mid) 24 | memo := r.GetSwapMemo([]*Pair{params.Pair}, params.Out) 25 | data := fmt.Sprintf(`{"from":"%s", "to":"%s", "quantity":"%s", "memo": "%s"}`, params.From, Code, params.In, memo) 26 | cmd = fmt.Sprintf("cleos -u https://eospush.tokenpocket.pro push action %v transfer '%v' -p %v", 27 | inputContract, 28 | data, 29 | params.From, 30 | ) 31 | 32 | return 33 | } 34 | func (r *Repo) GetMultiSwapCmd(params GetMultiSwapCmdInput) (cmd string, err error) { 35 | inputContract := params.Pairs[0].Contract0 36 | inputSymbol := params.Pairs[0].Sym0 37 | if inputSymbol.String() != params.In.Symbol.String() { 38 | inputContract = params.Pairs[0].Contract1 39 | inputSymbol = params.Pairs[0].Sym1 40 | } 41 | if inputSymbol.String() != params.In.Symbol.String() { 42 | err = fmt.Errorf("not found symbol: %v", params.In.Symbol.String()) 43 | return 44 | } 45 | 46 | //memo := fmt.Sprintf("swap,%d,%d", params.Out.Amount, params.Pair.Mid) 47 | memo := r.GetSwapMemo(params.Pairs, params.Out) 48 | data := fmt.Sprintf(`{"from":"%s", "to":"%s", "quantity":"%s", "memo": "%s"}`, params.From, Code, params.In, memo) 49 | cmd = fmt.Sprintf("cleos -u https://eospush.tokenpocket.pro push action %v transfer '%v' -p %v", 50 | inputContract, 51 | data, 52 | params.From, 53 | ) 54 | 55 | return 56 | } 57 | 58 | func (r *Repo) GetSwapMemo(pairs []*Pair, out eos.Asset) (memo string) { 59 | sIds := []string{} 60 | for _, pair := range pairs { 61 | sIds = append(sIds, strconv.Itoa(pair.Mid)) 62 | } 63 | memo = fmt.Sprintf("swap:%s:%d:2", strings.Join(sIds, "-"), out.Amount) 64 | return 65 | } 66 | 67 | type GetSwapCmdInput struct { 68 | Pair *Pair 69 | From eos.Name 70 | In eos.Asset 71 | Out eos.Asset 72 | } 73 | type GetMultiSwapCmdInput struct { 74 | Pairs []*Pair 75 | From eos.Name 76 | In eos.Asset 77 | Out eos.Asset 78 | } 79 | -------------------------------------------------------------------------------- /repo/defibox/swap_defi/cmd.go: -------------------------------------------------------------------------------- 1 | package swap_defi 2 | 3 | import ( 4 | "fmt" 5 | "strconv" 6 | "strings" 7 | 8 | "github.com/panyanyany/eos-go" 9 | ) 10 | 11 | func (r *Repo) GetSwapCmd(params GetSwapCmdInput) (cmd string, err error) { 12 | inputContract := params.Pair.Token0.Contract 13 | inputSymbol := params.Pair.Token0.Symbol 14 | if inputSymbol.String() != params.In.Symbol.String() { 15 | inputContract = params.Pair.Token1.Contract 16 | inputSymbol = params.Pair.Token1.Symbol 17 | } 18 | if inputSymbol.String() != params.In.Symbol.String() { 19 | err = fmt.Errorf("not found symbol: %v", params.In.Symbol.String()) 20 | return 21 | } 22 | 23 | //memo := fmt.Sprintf("swap,%d,%d", params.Out.Amount, params.Pair.ID) 24 | memo := r.GetSwapMemo([]*Pair{params.Pair}, params.Out) 25 | data := fmt.Sprintf(`{"from":"%s", "to":"%s", "quantity":"%s", "memo": "%s"}`, params.From, Code, params.In, memo) 26 | cmd = fmt.Sprintf("cleos -u https://eospush.tokenpocket.pro push action %v transfer '%v' -p %v", 27 | inputContract, 28 | data, 29 | params.From, 30 | ) 31 | 32 | return 33 | } 34 | 35 | func (r *Repo) GetSwapMemo(pairs []*Pair, out eos.Asset) (memo string) { 36 | sIds := []string{} 37 | for _, pair := range pairs { 38 | sIds = append(sIds, strconv.Itoa(pair.ID)) 39 | } 40 | memo = fmt.Sprintf("swap,%d,%s", out.Amount, strings.Join(sIds, "-")) 41 | return 42 | } 43 | 44 | func (r *Repo) GetMultiSwapCmd(params GetMultiSwapCmdInput) (cmd string, err error) { 45 | inputContract := params.Pairs[0].Token0.Contract 46 | inputSymbol := params.Pairs[0].Token0.Symbol 47 | if inputSymbol.String() != params.In.Symbol.String() { 48 | inputContract = params.Pairs[0].Token1.Contract 49 | inputSymbol = params.Pairs[0].Token1.Symbol 50 | } 51 | if inputSymbol.String() != params.In.Symbol.String() { 52 | err = fmt.Errorf("not found symbol: %v", params.In.Symbol.String()) 53 | return 54 | } 55 | 56 | //memo := fmt.Sprintf("swap,%d,%d", params.Out.Amount, params.Pair.ID) 57 | memo := r.GetSwapMemo(params.Pairs, params.Out) 58 | data := fmt.Sprintf(`{"from":"%s", "to":"%s", "quantity":"%s", "memo": "%s"}`, params.From, Code, params.In, memo) 59 | cmd = fmt.Sprintf("cleos -u https://eospush.tokenpocket.pro push action %v transfer '%v' -p %v", 60 | inputContract, 61 | data, 62 | params.From, 63 | ) 64 | 65 | return 66 | } 67 | 68 | type GetSwapCmdInput struct { 69 | Pair *Pair 70 | From eos.Name 71 | In eos.Asset 72 | Out eos.Asset 73 | } 74 | 75 | type GetMultiSwapCmdInput struct { 76 | Pairs []*Pair 77 | From eos.Name 78 | In eos.Asset 79 | Out eos.Asset 80 | } 81 | -------------------------------------------------------------------------------- /repo/dolphin/dolphinsswap/cmd.go: -------------------------------------------------------------------------------- 1 | package dolphinsswap 2 | 3 | import ( 4 | "fmt" 5 | "strconv" 6 | "strings" 7 | 8 | "github.com/panyanyany/eos-go" 9 | ) 10 | 11 | func (r *Repo) GetSwapCmd(params GetSwapCmdInput) (cmd string, err error) { 12 | inputContract := params.Pair.Tokens[0].Symbol.Contract 13 | inputSymbol := params.Pair.Tokens[0].Symbol.Symbol 14 | if inputSymbol.String() != params.In.Symbol.String() { 15 | inputContract = params.Pair.Tokens[1].Symbol.Contract 16 | inputSymbol = params.Pair.Tokens[1].Symbol.Symbol 17 | } 18 | if inputSymbol.String() != params.In.Symbol.String() { 19 | err = fmt.Errorf("not found symbol: %v", params.In.Symbol.String()) 20 | return 21 | } 22 | 23 | //memo := fmt.Sprintf("swap,%d,%d", params.Out.Amount, params.Pair.Mid) 24 | memo := r.GetSwapMemo([]*Pair{params.Pair}, params.Out) 25 | data := fmt.Sprintf(`{"from":"%s", "to":"%s", "quantity":"%s", "memo": "%s"}`, params.From, Code, params.In, memo) 26 | cmd = fmt.Sprintf("cleos -u https://eospush.tokenpocket.pro push action %v transfer '%v' -p %v", 27 | inputContract, 28 | data, 29 | params.From, 30 | ) 31 | 32 | return 33 | } 34 | func (r *Repo) GetMultiSwapCmd(params GetMultiSwapCmdInput) (cmd string, err error) { 35 | inputContract := params.Pairs[0].Tokens[0].Symbol.Contract 36 | inputSymbol := params.Pairs[0].Tokens[0].Symbol.Symbol 37 | if inputSymbol.String() != params.In.Symbol.String() { 38 | inputContract = params.Pairs[0].Tokens[1].Symbol.Contract 39 | inputSymbol = params.Pairs[0].Tokens[1].Symbol.Symbol 40 | } 41 | if inputSymbol.String() != params.In.Symbol.String() { 42 | err = fmt.Errorf("not found symbol: %v", params.In.Symbol.String()) 43 | return 44 | } 45 | 46 | //memo := fmt.Sprintf("swap,%d,%d", params.Out.Amount, params.Pair.Mid) 47 | memo := r.GetSwapMemo(params.Pairs, params.Out) 48 | data := fmt.Sprintf(`{"from":"%s", "to":"%s", "quantity":"%s", "memo": "%s"}`, params.From, Code, params.In, memo) 49 | cmd = fmt.Sprintf("cleos -u https://eospush.tokenpocket.pro push action %v transfer '%v' -p %v", 50 | inputContract, 51 | data, 52 | params.From, 53 | ) 54 | 55 | return 56 | } 57 | 58 | func (r *Repo) GetSwapMemo(pairs []*Pair, out eos.Asset) (memo string) { 59 | sIds := []string{} 60 | for _, pair := range pairs { 61 | sIds = append(sIds, strconv.Itoa(pair.ID)) 62 | } 63 | memo = fmt.Sprintf("swap:%s;min:%d", strings.Join(sIds, "-"), out.Amount) 64 | return 65 | } 66 | 67 | type GetSwapCmdInput struct { 68 | Pair *Pair 69 | From eos.Name 70 | In eos.Asset 71 | Out eos.Asset 72 | } 73 | type GetMultiSwapCmdInput struct { 74 | Pairs []*Pair 75 | From eos.Name 76 | In eos.Asset 77 | Out eos.Asset 78 | } 79 | -------------------------------------------------------------------------------- /repo/arbitrage/models/models.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "fmt" 5 | "math/big" 6 | 7 | "github.com/panyanyany/eos-go" 8 | ) 9 | 10 | type Pair struct { 11 | Id int 12 | Token0 *TokenDetail 13 | Token1 *TokenDetail 14 | Dex interface{} 15 | RawPair interface{} 16 | TheOther map[string]*TokenDetail 17 | } 18 | 19 | type TokenMeta struct { 20 | Contract string 21 | Symbol eos.Symbol 22 | Key string 23 | } 24 | 25 | type TokenDetail struct { 26 | TokenMeta 27 | Reserve eos.Asset 28 | PriceLast float64 29 | } 30 | 31 | func (r *TokenMeta) GetKey() string { 32 | if r.Key == "" { 33 | r.Key = fmt.Sprintf("%v-%v", r.Contract, r.Symbol.String()) 34 | } 35 | return r.Key 36 | } 37 | 38 | func (r *Pair) HasZero() bool { 39 | return r.Token1.Reserve.Amount == 0 || r.Token0.Reserve.Amount == 0 || r.Token0.PriceLast == 0 || r.Token1.PriceLast == 0 40 | } 41 | func (r *Pair) GetAmountOut(qty eos.Asset) (out eos.ExtendedAsset) { 42 | var err error 43 | _997 := new(big.Float).SetUint64(997) 44 | _1000 := new(big.Float).SetUint64(1000) 45 | 46 | inputAmount := qty.ToFloat() 47 | inputToken := r.Token0 48 | 49 | if inputToken.Symbol.String() != qty.Symbol.String() { 50 | inputToken = r.Token1 51 | } 52 | inputReserve := inputToken.Reserve.ToFloat() 53 | 54 | if inputToken.Symbol.String() != qty.Symbol.String() { 55 | panic(fmt.Sprintf("input symbol(%v) do not match any token.", qty.Symbol.String())) 56 | } 57 | 58 | outputToken := r.TheOther[inputToken.GetKey()] 59 | outputReserve := outputToken.Reserve.ToFloat() 60 | 61 | inputAmountWithFee := new(big.Float).Mul(inputAmount, _997) 62 | //fmt.Printf("inputAmountWithFee: %v\n", inputAmountWithFee) 63 | //fmt.Printf("outputReserve: %v\n", outputReserve) 64 | numerator := new(big.Float).Mul(inputAmountWithFee, outputReserve) 65 | //fmt.Printf("numerator: %v\n", numerator) 66 | denominator := new(big.Float).Add(new(big.Float).Mul(inputReserve, _1000), inputAmountWithFee) 67 | //fmt.Printf("inputReserve: %v\n", inputReserve) 68 | //fmt.Printf("denominator: %v\n", denominator) 69 | outputAmount := new(big.Float).Quo(numerator, denominator) 70 | //fmt.Printf("outputAmount: %v\n", outputAmount) 71 | 72 | var ass eos.Asset 73 | ass, err = eos.NewAssetFromFloat(outputAmount, outputToken.Symbol) 74 | if err != nil { 75 | err = fmt.Errorf("eos.NewAssetFromFloat: %w", err) 76 | panic(err) 77 | } 78 | out = eos.ExtendedAsset{ 79 | Asset: ass, 80 | Contract: eos.AccountName(outputToken.Contract), 81 | } 82 | return 83 | } 84 | 85 | type PathLayer struct { 86 | Level int 87 | InAsset eos.ExtendedAsset 88 | PathJobs []*PathJob 89 | } 90 | 91 | type PathJob struct { 92 | Level int 93 | In *eos.ExtendedAsset 94 | Out *eos.ExtendedAsset 95 | Pair *Pair 96 | //SubPathJobs []*PathJob 97 | Parent *PathJob 98 | } 99 | -------------------------------------------------------------------------------- /cmd/root.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2021 NAME HERE 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | package cmd 17 | 18 | import ( 19 | "fmt" 20 | "github.com/spf13/cobra" 21 | "os" 22 | 23 | homedir "github.com/mitchellh/go-homedir" 24 | "github.com/spf13/viper" 25 | ) 26 | 27 | var cfgFile string 28 | 29 | // rootCmd represents the base command when called without any subcommands 30 | var rootCmd = &cobra.Command{ 31 | Use: "eos-arb", 32 | Short: "A brief description of your application", 33 | Long: `A longer description that spans multiple lines and likely contains 34 | examples and usage of using your application. For example: 35 | 36 | Cobra is a CLI library for Go that empowers applications. 37 | This application is a tool to generate the needed files 38 | to quickly create a Cobra application.`, 39 | // Uncomment the following line if your bare application 40 | // has an action associated with it: 41 | // Run: func(cmd *cobra.Command, args []string) { }, 42 | } 43 | 44 | // Execute adds all child commands to the root command and sets flags appropriately. 45 | // This is called by main.main(). It only needs to happen once to the rootCmd. 46 | func Execute() { 47 | if err := rootCmd.Execute(); err != nil { 48 | fmt.Println(err) 49 | os.Exit(1) 50 | } 51 | } 52 | 53 | func init() { 54 | cobra.OnInitialize(initConfig) 55 | 56 | // Here you will define your flags and configuration settings. 57 | // Cobra supports persistent flags, which, if defined here, 58 | // will be global for your application. 59 | 60 | rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.eos-arb.yaml)") 61 | 62 | // Cobra also supports local flags, which will only run 63 | // when this action is called directly. 64 | rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") 65 | } 66 | 67 | // initConfig reads in config file and ENV variables if set. 68 | func initConfig() { 69 | if cfgFile != "" { 70 | // Use config file from the flag. 71 | viper.SetConfigFile(cfgFile) 72 | } else { 73 | // Find home directory. 74 | home, err := homedir.Dir() 75 | if err != nil { 76 | fmt.Println(err) 77 | os.Exit(1) 78 | } 79 | 80 | // Search config in home directory with name ".eos-arb" (without extension). 81 | viper.AddConfigPath(home) 82 | viper.SetConfigName(".eos-arb") 83 | } 84 | 85 | viper.AutomaticEnv() // read in environment variables that match 86 | 87 | // If a config file is found, read it in. 88 | if err := viper.ReadInConfig(); err == nil { 89 | fmt.Println("Using config file:", viper.ConfigFileUsed()) 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /repo/arbitrage/dex_adapter/defis.go: -------------------------------------------------------------------------------- 1 | package dex_adapter 2 | 3 | import ( 4 | "fmt" 5 | 6 | "eos-arb/repo/arbitrage/models" 7 | "eos-arb/repo/defis/defisswapcnt" 8 | 9 | "github.com/panyanyany/eos-go" 10 | "gorm.io/gorm" 11 | ) 12 | 13 | type Defis struct { 14 | BaseAdapter 15 | Repo *defisswapcnt.Repo 16 | } 17 | 18 | func (r *Defis) Init(db *gorm.DB) (err error) { 19 | r.Repo = &defisswapcnt.Repo{ 20 | Api: r.Api, 21 | Db: db, 22 | } 23 | return 24 | } 25 | func (r *Defis) GetAllPairs() (pairs []*models.Pair, err error) { 26 | var _pairs []*defisswapcnt.Pair 27 | //_pairs, err = r.Repo.GetAllPairs() 28 | _pairs, err = r.Repo.GetAllPairsBatch() 29 | if err != nil { 30 | err = fmt.Errorf("r.Repo.GetAllPairs(): %w", err) 31 | return 32 | } 33 | 34 | pairs = make([]*models.Pair, 0, len(_pairs)) 35 | 36 | for _, _pair := range _pairs { 37 | token0 := &models.TokenDetail{ 38 | TokenMeta: models.TokenMeta{ 39 | Contract: _pair.Contract0, 40 | Symbol: _pair.Sym0, 41 | }, 42 | Reserve: _pair.Reserve0, 43 | PriceLast: _pair.Price0Last.Value, 44 | } 45 | token1 := &models.TokenDetail{ 46 | TokenMeta: models.TokenMeta{ 47 | Contract: _pair.Contract1, 48 | Symbol: _pair.Sym1, 49 | }, 50 | Reserve: _pair.Reserve1, 51 | PriceLast: _pair.Price1Last.Value, 52 | } 53 | pairs = append(pairs, 54 | &models.Pair{ 55 | Id: _pair.Mid, 56 | Token0: token0, 57 | Token1: token1, 58 | Dex: r, 59 | RawPair: _pair, 60 | TheOther: map[string]*models.TokenDetail{ 61 | token0.GetKey(): token1, 62 | token1.GetKey(): token0, 63 | }, 64 | }, 65 | ) 66 | } 67 | 68 | return 69 | } 70 | func (r *Defis) GetSwapCmd(params GetSwapCmdInput) (cmd string, err error) { 71 | cmd, err = r.Repo.GetSwapCmd(defisswapcnt.GetSwapCmdInput{ 72 | Pair: params.Pair.RawPair.(*defisswapcnt.Pair), 73 | From: params.From, 74 | In: params.In, 75 | Out: params.Out, 76 | }) 77 | return 78 | } 79 | func (r *Defis) GetMultiSwapCmd(params GetMultiSwapCmdInput) (cmd string, err error) { 80 | pairs := []*defisswapcnt.Pair{} 81 | for _, pair := range params.Pairs { 82 | pairs = append(pairs, pair.RawPair.(*defisswapcnt.Pair)) 83 | } 84 | cmd, err = r.Repo.GetMultiSwapCmd(defisswapcnt.GetMultiSwapCmdInput{ 85 | Pairs: pairs, 86 | From: params.From, 87 | In: params.In, 88 | Out: params.Out, 89 | }) 90 | return 91 | } 92 | func (r *Defis) PushMultiSwapAction(params PushMultiSwapActionInput) (resp *eos.PushTransactionFullResp, err error) { 93 | pairs := []*defisswapcnt.Pair{} 94 | for _, pair := range params.Pairs { 95 | pairs = append(pairs, pair.RawPair.(*defisswapcnt.Pair)) 96 | } 97 | resp, err = r.Repo.PushMultiSwapAction(defisswapcnt.PushMultiSwapActionInput{ 98 | Pairs: pairs, 99 | In: params.In, 100 | Out: params.Out, 101 | }) 102 | return 103 | } 104 | func (r *Defis) GetMultiSwapAction(params PushMultiSwapActionInput) (action *eos.Action, err error) { 105 | pairs := []*defisswapcnt.Pair{} 106 | for _, pair := range params.Pairs { 107 | pairs = append(pairs, pair.RawPair.(*defisswapcnt.Pair)) 108 | } 109 | action, err = r.Repo.GetMultiSwapAction(defisswapcnt.PushMultiSwapActionInput{ 110 | Pairs: pairs, 111 | In: params.In, 112 | Out: params.Out, 113 | }) 114 | return 115 | } 116 | func (r *Defis) GetName() string { 117 | return "Defis" 118 | } 119 | -------------------------------------------------------------------------------- /repo/arbitrage/dex_adapter/defibox.go: -------------------------------------------------------------------------------- 1 | package dex_adapter 2 | 3 | import ( 4 | "fmt" 5 | 6 | "eos-arb/repo/arbitrage/models" 7 | "eos-arb/repo/defibox/swap_defi" 8 | 9 | "github.com/panyanyany/eos-go" 10 | "gorm.io/gorm" 11 | ) 12 | 13 | type Defibox struct { 14 | BaseAdapter 15 | Repo *swap_defi.Repo 16 | } 17 | 18 | func (r *Defibox) Init(db *gorm.DB) (err error) { 19 | r.Repo = &swap_defi.Repo{ 20 | Api: r.Api, 21 | Db: db, 22 | } 23 | return 24 | } 25 | 26 | func (r *Defibox) GetAllPairs() (pairs []*models.Pair, err error) { 27 | var _pairs []*swap_defi.Pair 28 | //_pairs, err = r.Repo.GetAllPairs() 29 | _pairs, err = r.Repo.GetAllPairsBatch() 30 | if err != nil { 31 | err = fmt.Errorf("r.Repo.GetAllPairs(): %w", err) 32 | return 33 | } 34 | 35 | pairs = make([]*models.Pair, 0, len(_pairs)) 36 | 37 | for _, _pair := range _pairs { 38 | token0 := &models.TokenDetail{ 39 | TokenMeta: models.TokenMeta{ 40 | Contract: _pair.Token0.Contract, 41 | Symbol: _pair.Token0.Symbol, 42 | }, 43 | Reserve: _pair.Reserve0, 44 | PriceLast: _pair.Price0Last.Value, 45 | } 46 | token1 := &models.TokenDetail{ 47 | TokenMeta: models.TokenMeta{ 48 | Contract: _pair.Token1.Contract, 49 | Symbol: _pair.Token1.Symbol, 50 | }, 51 | Reserve: _pair.Reserve1, 52 | PriceLast: _pair.Price1Last.Value, 53 | } 54 | pairs = append(pairs, 55 | &models.Pair{ 56 | Id: _pair.ID, 57 | Token0: token0, 58 | Token1: token1, 59 | Dex: r, 60 | RawPair: _pair, 61 | TheOther: map[string]*models.TokenDetail{ 62 | token0.GetKey(): token1, 63 | token1.GetKey(): token0, 64 | }, 65 | }, 66 | ) 67 | } 68 | 69 | return 70 | } 71 | func (r *Defibox) GetSwapCmd(params GetSwapCmdInput) (cmd string, err error) { 72 | cmd, err = r.Repo.GetSwapCmd(swap_defi.GetSwapCmdInput{ 73 | Pair: params.Pair.RawPair.(*swap_defi.Pair), 74 | From: params.From, 75 | In: params.In, 76 | Out: params.Out, 77 | }) 78 | return 79 | } 80 | func (r *Defibox) GetMultiSwapCmd(params GetMultiSwapCmdInput) (cmd string, err error) { 81 | pairs := []*swap_defi.Pair{} 82 | for _, pair := range params.Pairs { 83 | pairs = append(pairs, pair.RawPair.(*swap_defi.Pair)) 84 | } 85 | cmd, err = r.Repo.GetMultiSwapCmd(swap_defi.GetMultiSwapCmdInput{ 86 | Pairs: pairs, 87 | From: params.From, 88 | In: params.In, 89 | Out: params.Out, 90 | }) 91 | return 92 | } 93 | func (r *Defibox) PushMultiSwapAction(params PushMultiSwapActionInput) (resp *eos.PushTransactionFullResp, err error) { 94 | pairs := []*swap_defi.Pair{} 95 | for _, pair := range params.Pairs { 96 | pairs = append(pairs, pair.RawPair.(*swap_defi.Pair)) 97 | } 98 | resp, err = r.Repo.PushMultiSwapAction(swap_defi.PushMultiSwapActionInput{ 99 | Pairs: pairs, 100 | In: params.In, 101 | Out: params.Out, 102 | }) 103 | return 104 | } 105 | func (r *Defibox) GetMultiSwapAction(params PushMultiSwapActionInput) (action *eos.Action, err error) { 106 | pairs := []*swap_defi.Pair{} 107 | for _, pair := range params.Pairs { 108 | pairs = append(pairs, pair.RawPair.(*swap_defi.Pair)) 109 | } 110 | action, err = r.Repo.GetMultiSwapAction(swap_defi.PushMultiSwapActionInput{ 111 | Pairs: pairs, 112 | In: params.In, 113 | Out: params.Out, 114 | }) 115 | return 116 | } 117 | func (r *Defibox) GetName() string { 118 | return "Defibox" 119 | } 120 | -------------------------------------------------------------------------------- /repo/arbitrage/dex_adapter/dolphin.go: -------------------------------------------------------------------------------- 1 | package dex_adapter 2 | 3 | import ( 4 | "fmt" 5 | 6 | "eos-arb/repo/arbitrage/models" 7 | "eos-arb/repo/dolphin/dolphinsswap" 8 | 9 | "github.com/panyanyany/eos-go" 10 | "gorm.io/gorm" 11 | ) 12 | 13 | type Dolphin struct { 14 | BaseAdapter 15 | Repo *dolphinsswap.Repo 16 | } 17 | 18 | func (r *Dolphin) Init(db *gorm.DB) (err error) { 19 | r.Repo = &dolphinsswap.Repo{ 20 | Api: r.Api, 21 | Db: db, 22 | } 23 | return 24 | } 25 | func (r *Dolphin) GetAllPairs() (pairs []*models.Pair, err error) { 26 | var _pairs []*dolphinsswap.Pair 27 | //_pairs, err = r.Repo.GetAllPairs() 28 | _pairs, err = r.Repo.GetAllPairsBatch() 29 | if err != nil { 30 | err = fmt.Errorf("r.Repo.GetAllPairs(): %w", err) 31 | return 32 | } 33 | 34 | pairs = make([]*models.Pair, 0, len(_pairs)) 35 | 36 | for _, _pair := range _pairs { 37 | token0 := &models.TokenDetail{ 38 | TokenMeta: models.TokenMeta{ 39 | Contract: _pair.Tokens[0].Symbol.Contract, 40 | Symbol: _pair.Tokens[0].Symbol.Symbol, 41 | }, 42 | Reserve: _pair.Tokens[0].Reserve, 43 | PriceLast: 0, 44 | } 45 | token1 := &models.TokenDetail{ 46 | TokenMeta: models.TokenMeta{ 47 | Contract: _pair.Tokens[1].Symbol.Contract, 48 | Symbol: _pair.Tokens[1].Symbol.Symbol, 49 | }, 50 | Reserve: _pair.Tokens[1].Reserve, 51 | PriceLast: 0, 52 | } 53 | pairs = append(pairs, 54 | &models.Pair{ 55 | Id: _pair.ID, 56 | Token0: token0, 57 | Token1: token1, 58 | Dex: r, 59 | RawPair: _pair, 60 | TheOther: map[string]*models.TokenDetail{ 61 | token0.GetKey(): token1, 62 | token1.GetKey(): token0, 63 | }, 64 | }, 65 | ) 66 | } 67 | 68 | return 69 | } 70 | func (r *Dolphin) GetSwapCmd(params GetSwapCmdInput) (cmd string, err error) { 71 | cmd, err = r.Repo.GetSwapCmd(dolphinsswap.GetSwapCmdInput{ 72 | Pair: params.Pair.RawPair.(*dolphinsswap.Pair), 73 | From: params.From, 74 | In: params.In, 75 | Out: params.Out, 76 | }) 77 | return 78 | } 79 | func (r *Dolphin) GetMultiSwapCmd(params GetMultiSwapCmdInput) (cmd string, err error) { 80 | pairs := []*dolphinsswap.Pair{} 81 | for _, pair := range params.Pairs { 82 | pairs = append(pairs, pair.RawPair.(*dolphinsswap.Pair)) 83 | } 84 | cmd, err = r.Repo.GetMultiSwapCmd(dolphinsswap.GetMultiSwapCmdInput{ 85 | Pairs: pairs, 86 | From: params.From, 87 | In: params.In, 88 | Out: params.Out, 89 | }) 90 | return 91 | } 92 | func (r *Dolphin) PushMultiSwapAction(params PushMultiSwapActionInput) (resp *eos.PushTransactionFullResp, err error) { 93 | pairs := []*dolphinsswap.Pair{} 94 | for _, pair := range params.Pairs { 95 | pairs = append(pairs, pair.RawPair.(*dolphinsswap.Pair)) 96 | } 97 | resp, err = r.Repo.PushMultiSwapAction(dolphinsswap.PushMultiSwapActionInput{ 98 | Pairs: pairs, 99 | In: params.In, 100 | Out: params.Out, 101 | }) 102 | return 103 | } 104 | func (r *Dolphin) GetMultiSwapAction(params PushMultiSwapActionInput) (action *eos.Action, err error) { 105 | pairs := []*dolphinsswap.Pair{} 106 | for _, pair := range params.Pairs { 107 | pairs = append(pairs, pair.RawPair.(*dolphinsswap.Pair)) 108 | } 109 | action, err = r.Repo.GetMultiSwapAction(dolphinsswap.PushMultiSwapActionInput{ 110 | Pairs: pairs, 111 | In: params.In, 112 | Out: params.Out, 113 | }) 114 | return 115 | } 116 | func (r *Dolphin) GetName() string { 117 | return "Dolphin" 118 | } 119 | -------------------------------------------------------------------------------- /repo/defibox_repo.go: -------------------------------------------------------------------------------- 1 | package repo 2 | 3 | import ( 4 | "context" 5 | "fmt" 6 | "time" 7 | 8 | "github.com/go-redis/redis/v8" 9 | "github.com/parnurzeal/gorequest" 10 | ) 11 | 12 | type DefiboxRepo struct { 13 | rdb *redis.Client 14 | ctx context.Context 15 | timeout time.Duration 16 | } 17 | 18 | func NewDefiboxRepo(rdb *redis.Client, ctx context.Context, timeout time.Duration) (r *DefiboxRepo) { 19 | r = new(DefiboxRepo) 20 | r.ctx = ctx 21 | r.rdb = rdb 22 | r.timeout = timeout 23 | return 24 | } 25 | func (r *DefiboxRepo) GetUserMarket(account string) (body string, err error) { 26 | key := "user_market:" + account 27 | body, err = r.rdb.Get(r.ctx, key).Result() 28 | if err != redis.Nil { 29 | return 30 | } 31 | err = nil 32 | defer func() { 33 | if err == nil { 34 | r.rdb.Set(r.ctx, key, body, r.timeout) 35 | } 36 | }() 37 | 38 | req := gorequest.New() 39 | req.Post("https://defibox.340wan.com/api/swap/account/capital") 40 | req.Header = map[string][]string{ 41 | "authorization": []string{"Basic Og=="}, 42 | "account": []string{account}, 43 | "user-agent": []string{"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36"}, 44 | "referer": []string{"https://defibox.340wan.com/my/"}, 45 | } 46 | req.Data = map[string]interface{}{ 47 | "owner": account, 48 | } 49 | 50 | var resp gorequest.Response 51 | var errs []error 52 | var bytes []byte 53 | resp, bytes, errs = req.EndBytes() 54 | if len(errs) > 0 { 55 | err = fmt.Errorf("request failed: %v", errs) 56 | return 57 | } 58 | if resp.StatusCode != 200 { 59 | err = fmt.Errorf("request failed: status=%v", resp.StatusCode) 60 | return 61 | } 62 | body = string(bytes) 63 | return 64 | } 65 | 66 | func (r *DefiboxRepo) GetBalance(account string) (body string, err error) { 67 | key := "balance:" + account 68 | body, err = r.rdb.Get(r.ctx, key).Result() 69 | if err != redis.Nil { 70 | return 71 | } 72 | err = nil 73 | defer func() { 74 | if err == nil { 75 | r.rdb.Set(r.ctx, key, body, r.timeout) 76 | } 77 | }() 78 | 79 | req := gorequest.New() 80 | req.Get("https://defibox.340wan.com/api/swap/account/getBalances") 81 | req.Header = map[string][]string{ 82 | "authorization": []string{"Basic Og=="}, 83 | "account": []string{account}, 84 | "user-agent": []string{"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36"}, 85 | "referer": []string{"https://defibox.340wan.com/my/"}, 86 | } 87 | var resp gorequest.Response 88 | var errs []error 89 | var bytes []byte 90 | resp, bytes, errs = req.EndBytes() 91 | if len(errs) > 0 { 92 | err = fmt.Errorf("request failed: %v", errs) 93 | return 94 | } 95 | if resp.StatusCode != 200 { 96 | err = fmt.Errorf("request failed: status=%v", resp.StatusCode) 97 | return 98 | } 99 | body = string(bytes) 100 | return 101 | } 102 | 103 | func (r *DefiboxRepo) SwapGetMarket(symbol string) (body string, err error) { 104 | key := "swap_market:" + symbol 105 | body, err = r.rdb.Get(r.ctx, key).Result() 106 | if err != redis.Nil { 107 | return 108 | } 109 | err = nil 110 | defer func() { 111 | if err == nil { 112 | r.rdb.Set(r.ctx, key, body, r.timeout) 113 | } 114 | }() 115 | 116 | req := gorequest.New() 117 | req.Post("https://defibox.340wan.com/api/swap/getMarket") 118 | req.Header = map[string][]string{ 119 | "authorization": []string{"Basic Og=="}, 120 | "user-agent": []string{"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36"}, 121 | //"referer": []string{"https://defibox.340wan.com/my/"}, 122 | } 123 | //req.Send("{\"pairId\":\"1134\"}") 124 | req.Data = map[string]interface{}{ 125 | "limit": 60, 126 | "type": 2, 127 | "symbol": symbol, 128 | "orderColumn": "eos_balance", 129 | "isAsc": false, 130 | } 131 | //req.Param("pairId", pairId) 132 | //seelog.Infof("%#v", req) 133 | var resp gorequest.Response 134 | var errs []error 135 | var bytes []byte 136 | resp, bytes, errs = req.EndBytes() 137 | //seelog.Info(string(bytes)) 138 | if len(errs) > 0 { 139 | err = fmt.Errorf("request failed: %v", errs) 140 | return 141 | } 142 | if resp.StatusCode != 200 { 143 | err = fmt.Errorf("request failed: status=%v", resp.StatusCode) 144 | return 145 | } 146 | body = string(bytes) 147 | return 148 | } 149 | -------------------------------------------------------------------------------- /repo/arbitrage/chances.go: -------------------------------------------------------------------------------- 1 | package arbitrage 2 | 3 | import ( 4 | "eos-arb/repo/arbitrage/models" 5 | 6 | "github.com/panyanyany/eos-go" 7 | ) 8 | 9 | func (r *Repo) GetChances(params GetChancesInput) (chances [][]*models.PathJob, err error) { 10 | pairHub := r.MakePairHub(params.Pairs) 11 | 12 | pathJob := &models.PathJob{ 13 | Level: 0, 14 | Out: ¶ms.BaseAsset, 15 | Pair: &models.Pair{}, 16 | //SubPathJobs: []*PathJob{}, 17 | } 18 | levels := [][]*models.PathJob{ 19 | []*models.PathJob{pathJob}, 20 | } 21 | outputLevels := [][]*models.PathJob{} 22 | for i := 0; i < params.PathDepth; i++ { 23 | // 遍历第i层所有 pathJob 24 | // 准备好下一层的空位 25 | levels = append(levels, []*models.PathJob{}) 26 | outputLevels = append(outputLevels, []*models.PathJob{}) 27 | for _, pathJob := range levels[i] { 28 | key := pathJob.Out.GetKey() 29 | //subPathJobs := pathJob.SubPathJobs 30 | 31 | // 当前 pathJob 所有可能的 pair 32 | for _, pair := range pairHub[key] { 33 | if pair.HasZero() { 34 | continue 35 | } 36 | // 与上级相同,不处理 37 | if pair == pathJob.Pair { 38 | continue 39 | } 40 | //// 不到最后一级,不要处理基准货币 41 | //if i+1 != params.PathDepth && pair.TheOther[key].GetKey() == params.BaseAsset.GetKey() { 42 | // continue 43 | //} 44 | // 到最后一级了,输出必须是基准货币 45 | if i+1 == params.PathDepth && pair.TheOther[key].GetKey() != params.BaseAsset.GetKey() { 46 | continue 47 | } 48 | //if pair.TheOther[key].GetKey() != "issue.newdex-8,BTC" { 49 | // continue 50 | //} 51 | out := pair.GetAmountOut(pathJob.Out.Asset) 52 | pathJob := models.PathJob{ 53 | Level: i + 1, 54 | In: pathJob.Out, 55 | Out: &out, 56 | Pair: pair, 57 | //SubPathJobs: []*PathJob{}, 58 | Parent: pathJob, 59 | } 60 | //subPathJobs = append(subPathJobs, &pathJob) 61 | levels[i+1] = append(levels[i+1], &pathJob) 62 | // 当前输出为基准货币 63 | if pair.TheOther[key].GetKey() == params.BaseAsset.GetKey() { 64 | outputLevels[i] = append(outputLevels[i], &pathJob) 65 | } 66 | } 67 | //pathJob.SubPathJobs = subPathJobs 68 | } 69 | } 70 | 71 | for _, pathJobs := range outputLevels { 72 | _chances := r.GetBestChances(GetBestChancesInput{ 73 | PathJobs: pathJobs, 74 | BaseAsset: params.BaseAsset, 75 | MinProfit: params.MinProfit, 76 | }) 77 | chances = append(chances, _chances...) 78 | } 79 | 80 | return 81 | } 82 | func (r *Repo) GetBestChances(params GetBestChancesInput) (chances [][]*models.PathJob) { 83 | for _, pathJob := range params.PathJobs { 84 | if pathJob.Out.Asset.Amount-params.BaseAsset.Asset.Amount < params.MinProfit.Asset.Amount { 85 | continue 86 | } 87 | paths := []*models.PathJob{} 88 | path := pathJob 89 | for path.Parent != nil { 90 | paths = append(paths, path) 91 | path = path.Parent 92 | } 93 | if len(paths) == 1 { 94 | panic("wrong paths") 95 | } 96 | maxProfit := paths[0].Out.Asset.Sub(paths[len(paths)-1].In.Asset) 97 | oldProfit := maxProfit 98 | _ = oldProfit 99 | // 扩大收益,不停地增加输入资产,找出最大收益 100 | for { 101 | // 不要 _paths := paths[:],相当于直接引用了 paths 102 | _paths := make([]*models.PathJob, len(paths)) 103 | for j, _path := range paths { 104 | _paths[j] = &models.PathJob{ 105 | Level: _path.Level, 106 | In: &eos.ExtendedAsset{ 107 | Asset: _path.In.Asset, 108 | Contract: _path.In.Contract, 109 | }, 110 | Out: &eos.ExtendedAsset{ 111 | Asset: _path.Out.Asset, 112 | Contract: _path.Out.Contract, 113 | }, 114 | Pair: _path.Pair, 115 | //SubPathJobs: _path.SubPathJobs, 116 | Parent: _path.Parent, 117 | } 118 | } 119 | _paths[len(_paths)-1].In.Asset = _paths[len(_paths)-1].In.Asset.Add(params.MinProfit.Asset) 120 | for j := len(_paths) - 1; j >= 0; j-- { 121 | out := _paths[j].Pair.GetAmountOut(_paths[j].In.Asset) 122 | _paths[j].Out = &out 123 | if j > 0 { 124 | _paths[j-1].In = &out 125 | } 126 | } 127 | profit := _paths[0].Out.Asset.Sub(_paths[len(_paths)-1].In.Asset) 128 | //PrintPaths(_paths) 129 | // 同等收益下,尽量多花钱,因为有交易挖矿奖励 130 | if profit.Amount < maxProfit.Amount { 131 | break 132 | } 133 | //fmt.Printf("%v ~ %v\n", profit, maxProfit) 134 | maxProfit = profit 135 | paths = _paths 136 | } 137 | _paths := []*models.PathJob{} 138 | for i := len(paths) - 1; i >= 0; i-- { 139 | _paths = append(_paths, paths[i]) 140 | } 141 | paths = _paths 142 | //PrintPaths(paths) 143 | chances = append(chances, paths) 144 | } 145 | return 146 | } 147 | 148 | type GetChancesInput struct { 149 | Pairs []*models.Pair 150 | PathDepth int 151 | BaseAsset eos.ExtendedAsset 152 | MinProfit eos.ExtendedAsset 153 | } 154 | type GetBestChancesInput struct { 155 | PathJobs []*models.PathJob 156 | BaseAsset eos.ExtendedAsset 157 | MinProfit eos.ExtendedAsset 158 | } 159 | -------------------------------------------------------------------------------- /repo/dolphin/dolphinsswap/pairs.go: -------------------------------------------------------------------------------- 1 | package dolphinsswap 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | "sort" 7 | "strconv" 8 | "strings" 9 | "sync" 10 | "time" 11 | 12 | "eos-arb/model" 13 | 14 | "github.com/cihub/seelog" 15 | "github.com/panyanyany/eos-go" 16 | "gorm.io/gorm" 17 | "gorm.io/gorm/clause" 18 | ) 19 | 20 | func (r *Repo) GetAllPairs() (allRows []*Pair, err error) { 21 | var resp *eos.GetTableRowsResp 22 | var lowerBound string 23 | exists := make(map[int]bool) 24 | //var all_rows []*Sasset 25 | 26 | for { 27 | var rows []*Pair 28 | params := eos.GetTableRowsRequest{ 29 | JSON: true, 30 | Code: Code, 31 | Scope: Code, 32 | Table: "pools", 33 | LowerBound: lowerBound, 34 | UpperBound: "", 35 | Limit: 399, 36 | } 37 | resp, _, err = r.Api.GetTableRows(params) 38 | if err != nil { 39 | err = fmt.Errorf("GetTableRows of nftoken sassets: %w", err) 40 | return 41 | } 42 | err = json.Unmarshal(resp.Rows, &rows) 43 | if err != nil { 44 | seelog.Debugf("rows: %v", string(resp.Rows)) 45 | err = fmt.Errorf("unmarshal: %w", err) 46 | return 47 | } 48 | for _, row := range rows { 49 | _, found := exists[row.ID] 50 | if found { 51 | continue 52 | } 53 | exists[row.ID] = true 54 | allRows = append(allRows, row) 55 | } 56 | if !resp.More { 57 | break 58 | } 59 | lowerBound = strconv.Itoa(rows[len(rows)-1].ID) 60 | } 61 | 62 | return 63 | } 64 | 65 | func (r *Repo) GetAllPairsBatch() (allRows []*Pair, err error) { 66 | mdIdList := model.PairIdList{} 67 | err = r.Db.Where("contract = ?", Code).First(&mdIdList).Error 68 | if err == gorm.ErrRecordNotFound || time.Now().Sub(mdIdList.UpdatedAt).Hours() > 7*24 { 69 | allRows, err = r.GetAllPairs() 70 | if err != nil { 71 | err = fmt.Errorf("r.GetAllPairs(): %w", err) 72 | return 73 | } 74 | seelog.Infof("init pairs: %v", len(allRows)) 75 | ids := []int{} 76 | for _, row := range allRows { 77 | ids = append(ids, row.ID) 78 | } 79 | sort.Ints(ids) 80 | ids2 := []string{} 81 | for _, id := range ids { 82 | ids2 = append(ids2, strconv.Itoa(id)) 83 | } 84 | idStr := strings.Join(ids2, ",") 85 | mdIdList.Contract = Code 86 | mdIdList.IdList = idStr 87 | mdIdList.Total = len(ids) 88 | 89 | err = r.Db.Clauses(clause.OnConflict{UpdateAll: true}).Save(&mdIdList).Error 90 | if err != nil { 91 | err = fmt.Errorf("Save(mdIdList): %w", err) 92 | return 93 | } 94 | return 95 | } 96 | idStrList := strings.Split(mdIdList.IdList, ",") 97 | if len(idStrList) <= 10 { 98 | err = fmt.Errorf("idStrList to small: %v", len(idStrList)) 99 | return 100 | } 101 | exists := make(map[int]bool) 102 | 103 | var wg sync.WaitGroup 104 | step := 399 105 | queue := make(chan *GetTableRowsResult) 106 | resList := []*GetTableRowsResult{} 107 | 108 | done := make(chan bool) 109 | go func() { 110 | for res := range queue { 111 | resList = append(resList, res) 112 | } 113 | done <- true 114 | }() 115 | 116 | for i := 0; i < len(idStrList); i += step { 117 | wg.Add(1) 118 | go func(i int) { 119 | defer wg.Done() 120 | lowerBound := idStrList[i] 121 | 122 | var resp *eos.GetTableRowsResp 123 | params := eos.GetTableRowsRequest{ 124 | JSON: true, 125 | Code: Code, 126 | Scope: Code, 127 | Table: "pools", 128 | LowerBound: lowerBound, 129 | UpperBound: "", 130 | Limit: 399, 131 | } 132 | baseUrl := "" 133 | resp, baseUrl, err = r.Api.GetTableRows(params) 134 | queue <- &GetTableRowsResult{ 135 | Resp: resp, 136 | Error: err, 137 | Params: params, 138 | Url: baseUrl, 139 | } 140 | }(i) 141 | } 142 | wg.Wait() 143 | close(queue) 144 | <-done 145 | 146 | for _, res := range resList { 147 | //seelog.Infof("url=%v, lowerBound=%v, list=%v", res.Url, res.Params.LowerBound, len(resList)) 148 | resp := res.Resp 149 | err = res.Error 150 | if err != nil { 151 | err = fmt.Errorf("r.Api.GetTableRows: %w", err) 152 | seelog.Error(err) 153 | err = nil 154 | continue 155 | } 156 | var rows []*Pair 157 | err = json.Unmarshal(resp.Rows, &rows) 158 | if err != nil { 159 | seelog.Debugf("rows: %v", string(resp.Rows)) 160 | err = fmt.Errorf("unmarshal: %w", err) 161 | seelog.Error(err) 162 | err = nil 163 | continue 164 | } 165 | for _, row := range rows { 166 | _, found := exists[row.ID] 167 | if found { 168 | continue 169 | } 170 | exists[row.ID] = true 171 | allRows = append(allRows, row) 172 | } 173 | //seelog.Infof("url=%v, lowerBound=%v, len=%v", res.Url, res.Params.LowerBound, len(rows)) 174 | } 175 | 176 | //seelog.Infof("get all pairs: %v", len(allRows)) 177 | 178 | return 179 | } 180 | 181 | type GetTableRowsResult struct { 182 | Resp *eos.GetTableRowsResp 183 | Error error 184 | Params eos.GetTableRowsRequest 185 | Url string 186 | } 187 | -------------------------------------------------------------------------------- /repo/defis/defisswapcnt/pairs.go: -------------------------------------------------------------------------------- 1 | package defisswapcnt 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | "sort" 7 | "strconv" 8 | "strings" 9 | "sync" 10 | "time" 11 | 12 | "eos-arb/model" 13 | 14 | "github.com/cihub/seelog" 15 | "github.com/panyanyany/eos-go" 16 | "gorm.io/gorm" 17 | "gorm.io/gorm/clause" 18 | ) 19 | 20 | func (r *Repo) GetAllPairs() (allRows []*Pair, err error) { 21 | var resp *eos.GetTableRowsResp 22 | var lowerBound string 23 | exists := make(map[int]bool) 24 | //var all_rows []*Sasset 25 | 26 | for { 27 | var rows []*Pair 28 | params := eos.GetTableRowsRequest{ 29 | JSON: true, 30 | Code: Code, 31 | Scope: Code, 32 | Table: "markets", 33 | LowerBound: lowerBound, 34 | UpperBound: "", 35 | Limit: 399, 36 | } 37 | resp, _, err = r.Api.GetTableRows(params) 38 | if err != nil { 39 | err = fmt.Errorf("GetTableRows of nftoken sassets: %w", err) 40 | return 41 | } 42 | err = json.Unmarshal(resp.Rows, &rows) 43 | if err != nil { 44 | seelog.Debugf("rows: %v", string(resp.Rows)) 45 | err = fmt.Errorf("unmarshal: %w", err) 46 | return 47 | } 48 | for _, row := range rows { 49 | _, found := exists[row.Mid] 50 | if found { 51 | continue 52 | } 53 | exists[row.Mid] = true 54 | allRows = append(allRows, row) 55 | } 56 | if !resp.More { 57 | break 58 | } 59 | lowerBound = strconv.Itoa(rows[len(rows)-1].Mid) 60 | } 61 | 62 | return 63 | } 64 | 65 | func (r *Repo) GetAllPairsBatch() (allRows []*Pair, err error) { 66 | mdIdList := model.PairIdList{} 67 | err = r.Db.Where("contract = ?", Code).First(&mdIdList).Error 68 | if err == gorm.ErrRecordNotFound || time.Now().Sub(mdIdList.UpdatedAt).Hours() > 7*24 { 69 | allRows, err = r.GetAllPairs() 70 | if err != nil { 71 | err = fmt.Errorf("r.GetAllPairs(): %w", err) 72 | return 73 | } 74 | seelog.Infof("init pairs: %v", len(allRows)) 75 | ids := []int{} 76 | for _, row := range allRows { 77 | ids = append(ids, row.Mid) 78 | } 79 | sort.Ints(ids) 80 | ids2 := []string{} 81 | for _, id := range ids { 82 | ids2 = append(ids2, strconv.Itoa(id)) 83 | } 84 | idStr := strings.Join(ids2, ",") 85 | mdIdList.Contract = Code 86 | mdIdList.IdList = idStr 87 | mdIdList.Total = len(ids) 88 | 89 | err = r.Db.Clauses(clause.OnConflict{UpdateAll: true}).Save(&mdIdList).Error 90 | if err != nil { 91 | err = fmt.Errorf("Save(mdIdList): %w", err) 92 | return 93 | } 94 | return 95 | } 96 | idStrList := strings.Split(mdIdList.IdList, ",") 97 | if len(idStrList) <= 10 { 98 | err = fmt.Errorf("idStrList to small: %v", len(idStrList)) 99 | return 100 | } 101 | exists := make(map[int]bool) 102 | 103 | var wg sync.WaitGroup 104 | step := 399 105 | queue := make(chan *GetTableRowsResult) 106 | resList := []*GetTableRowsResult{} 107 | 108 | done := make(chan bool) 109 | go func() { 110 | for res := range queue { 111 | resList = append(resList, res) 112 | } 113 | done <- true 114 | }() 115 | 116 | for i := 0; i < len(idStrList); i += step { 117 | wg.Add(1) 118 | go func(i int) { 119 | defer wg.Done() 120 | lowerBound := idStrList[i] 121 | 122 | var resp *eos.GetTableRowsResp 123 | params := eos.GetTableRowsRequest{ 124 | JSON: true, 125 | Code: Code, 126 | Scope: Code, 127 | Table: "markets", 128 | LowerBound: lowerBound, 129 | UpperBound: "", 130 | Limit: 399, 131 | } 132 | baseUrl := "" 133 | resp, baseUrl, err = r.Api.GetTableRows(params) 134 | queue <- &GetTableRowsResult{ 135 | Resp: resp, 136 | Error: err, 137 | Params: params, 138 | Url: baseUrl, 139 | } 140 | }(i) 141 | } 142 | wg.Wait() 143 | close(queue) 144 | <-done 145 | 146 | for _, res := range resList { 147 | //seelog.Infof("url=%v, lowerBound=%v, list=%v", res.Url, res.Params.LowerBound, len(resList)) 148 | resp := res.Resp 149 | err = res.Error 150 | if err != nil { 151 | err = fmt.Errorf("r.Api.GetTableRows: %w", err) 152 | seelog.Error(err) 153 | err = nil 154 | continue 155 | } 156 | var rows []*Pair 157 | err = json.Unmarshal(resp.Rows, &rows) 158 | if err != nil { 159 | seelog.Debugf("rows: %v", string(resp.Rows)) 160 | err = fmt.Errorf("unmarshal: %w", err) 161 | seelog.Error(err) 162 | err = nil 163 | continue 164 | } 165 | for _, row := range rows { 166 | _, found := exists[row.Mid] 167 | if found { 168 | continue 169 | } 170 | exists[row.Mid] = true 171 | allRows = append(allRows, row) 172 | } 173 | //seelog.Infof("url=%v, lowerBound=%v, len=%v", res.Url, res.Params.LowerBound, len(rows)) 174 | } 175 | 176 | //seelog.Infof("get all pairs: %v", len(allRows)) 177 | 178 | return 179 | } 180 | 181 | type GetTableRowsResult struct { 182 | Resp *eos.GetTableRowsResp 183 | Error error 184 | Params eos.GetTableRowsRequest 185 | Url string 186 | } 187 | -------------------------------------------------------------------------------- /repo/eos_api/models.go: -------------------------------------------------------------------------------- 1 | package eos_api 2 | 3 | import ( 4 | "encoding/json" 5 | "net/url" 6 | "strconv" 7 | "time" 8 | ) 9 | 10 | type GetActionOutput struct { 11 | QueryTimeMs float64 `json:"query_time_ms"` 12 | Cached bool `json:"cached"` 13 | Lib int `json:"lib"` 14 | Total struct { 15 | Value int `json:"value"` 16 | Relation string `json:"relation"` 17 | } `json:"total"` 18 | Actions []struct { 19 | Timestamp string `json:"timestamp"` 20 | BlockNum int `json:"block_num"` 21 | TrxID string `json:"trx_id"` 22 | Act struct { 23 | Account string `json:"account"` 24 | Name string `json:"name"` 25 | Authorization []struct { 26 | Actor string `json:"actor"` 27 | Permission string `json:"permission"` 28 | } `json:"authorization"` 29 | Data struct { 30 | From string `json:"from"` 31 | To string `json:"to"` 32 | Amount float64 `json:"amount"` 33 | Symbol string `json:"symbol"` 34 | Memo string `json:"memo"` 35 | Quantity string `json:"quantity"` 36 | } `json:"data"` 37 | } `json:"act"` 38 | Notified []string `json:"notified"` 39 | CPUUsageUs int `json:"cpu_usage_us,omitempty"` 40 | NetUsageWords int `json:"net_usage_words,omitempty"` 41 | GlobalSequence int64 `json:"global_sequence"` 42 | Producer string `json:"producer"` 43 | ActionOrdinal int `json:"action_ordinal"` 44 | CreatorActionOrdinal int `json:"creator_action_ordinal"` 45 | AccountRAMDeltas []struct { 46 | Account string `json:"account"` 47 | Delta int `json:"delta"` 48 | } `json:"account_ram_deltas,omitempty"` 49 | } `json:"actions"` 50 | } 51 | 52 | type OfferActionOutputOfferLog struct { 53 | Assetid string `json:"assetid"` 54 | Owner string `json:"owner"` 55 | Category string `json:"category"` 56 | Idata string `json:"idata"` 57 | Mdata string `json:"mdata"` 58 | Color string `json:"color"` 59 | RoleId string `json:"role_id"` 60 | Level string `json:"level"` 61 | Power0 string `json:"power0"` 62 | Power string `json:"power"` 63 | Status int `json:"status"` 64 | Price string `json:"price"` 65 | Offering int `json:"offering"` 66 | } 67 | 68 | type OfferActionOutputBuyOfferLog struct { 69 | Assetid string `json:"assetid"` 70 | PreOwner string `json:"pre_owner"` 71 | NowOwner string `json:"now_owner"` 72 | //Category string `json:"category"` 73 | //Idata string `json:"idata"` 74 | //Mdata string `json:"mdata"` 75 | Color string `json:"color"` 76 | RoleId string `json:"role_id"` 77 | Level string `json:"level"` 78 | Power0 string `json:"power0"` 79 | Power string `json:"power"` 80 | Price string `json:"price"` 81 | } 82 | 83 | type Act struct { 84 | Account string `json:"account"` 85 | Name string `json:"name"` 86 | Authorization []struct { 87 | Actor string `json:"actor"` 88 | Permission string `json:"permission"` 89 | } `json:"authorization"` 90 | Data json.RawMessage `json:"data"` 91 | } 92 | 93 | type ActionOutput struct { 94 | QueryTimeMs float64 `json:"query_time_ms"` 95 | Cached bool `json:"cached"` 96 | Lib int `json:"lib"` 97 | Total struct { 98 | Value int `json:"value"` 99 | Relation string `json:"relation"` 100 | } `json:"total"` 101 | Actions []struct { 102 | Timestamp string `json:"timestamp"` 103 | BlockNum int `json:"block_num"` 104 | TrxID string `json:"trx_id"` 105 | Act Act `json:"act"` 106 | Notified []string `json:"notified"` 107 | GlobalSequence int64 `json:"global_sequence"` 108 | Producer string `json:"producer"` 109 | ActionOrdinal int `json:"action_ordinal"` 110 | CreatorActionOrdinal int `json:"creator_action_ordinal"` 111 | } `json:"actions"` 112 | } 113 | 114 | type ActionOutputRaw struct { 115 | QueryTimeMs float64 `json:"query_time_ms"` 116 | Cached bool `json:"cached"` 117 | Lib int `json:"lib"` 118 | Total struct { 119 | Value int `json:"value"` 120 | Relation string `json:"relation"` 121 | } `json:"total"` 122 | Actions []json.RawMessage `json:"actions"` 123 | } 124 | 125 | type GetActionsInput struct { 126 | Account string `json:"account"` 127 | Filter string `json:"filter"` 128 | Skip int `json:"skip"` 129 | Limit int `json:"limit"` 130 | Sort string `json:"sort"` 131 | After time.Time `json:"after"` 132 | Before time.Time `json:"before"` 133 | } 134 | 135 | func (r *GetActionsInput) ToMap() (out map[string]string) { 136 | out = map[string]string{ 137 | "account": r.Account, 138 | "filter": r.Filter, 139 | "skip": strconv.Itoa(r.Skip), 140 | "limit": strconv.Itoa(r.Limit), 141 | "sort": r.Sort, 142 | } 143 | if !r.After.IsZero() { 144 | out["after"] = r.After.UTC().Format(TimeLayoutQuery) 145 | } 146 | if !r.Before.IsZero() { 147 | out["before"] = r.Before.UTC().Format(TimeLayoutQuery) 148 | } 149 | return 150 | } 151 | func (r *GetActionsInput) ToValues() (out url.Values) { 152 | out = url.Values{} 153 | for key, val := range r.ToMap() { 154 | out.Set(key, val) 155 | } 156 | return 157 | } 158 | -------------------------------------------------------------------------------- /cmd/test.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2021 NAME HERE 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | package cmd 17 | 18 | import ( 19 | "fmt" 20 | "time" 21 | 22 | "eos-arb/repo/arbitrage" 23 | "eos-arb/repo/arbitrage/dex_adapter" 24 | "eos-arb/repo/arbitrage/models" 25 | "eos-arb/repo/arbitrage/printer" 26 | "eos-arb/repo/config" 27 | "eos-arb/repo/constants/obj_const" 28 | "eos-arb/repo/constants/str_const" 29 | "eos-arb/repo/db_util" 30 | "eos-arb/repo/eos_api" 31 | 32 | "github.com/cihub/seelog" 33 | "github.com/go-redis/redis/v8" 34 | "github.com/panyanyany/eos-go" 35 | "github.com/spf13/cobra" 36 | ) 37 | 38 | // testCmd represents the test command 39 | var testCmd = &cobra.Command{ 40 | Use: "test", 41 | Short: "A brief description of your command", 42 | Long: `A longer description that spans multiple lines and likely contains examples 43 | and usage of using your command. For example: 44 | 45 | Cobra is a CLI library for Go that empowers applications. 46 | This application is a tool to generate the needed files 47 | to quickly create a Cobra application.`, 48 | Run: func(cmd *cobra.Command, args []string) { 49 | var err error 50 | 51 | cfg := config.LoadConfig() 52 | db := db_util.InitDb(cfg.Db.Name, cfg.Db.Pass) 53 | 54 | rdb := redis.NewClient(&redis.Options{ 55 | Addr: "localhost:6379", 56 | Password: "", // no password set 57 | DB: 0, // use default DB 58 | }) 59 | 60 | api := eos_api.NewEosApi(rdb, time.Hour*0) 61 | api.Actor = eos.AccountName(cfg.Accounts["default"].Name) 62 | api.PrivateKey = cfg.Accounts["default"].PrivateKey 63 | //api.EnableCache = false 64 | 65 | defibox := &dex_adapter.Defibox{ 66 | BaseAdapter: dex_adapter.BaseAdapter{Api: api}, 67 | Repo: nil, 68 | } 69 | defis := &dex_adapter.Defis{ 70 | BaseAdapter: dex_adapter.BaseAdapter{Api: api}, 71 | Repo: nil, 72 | } 73 | dolphin := &dex_adapter.Dolphin{ 74 | BaseAdapter: dex_adapter.BaseAdapter{Api: api}, 75 | Repo: nil, 76 | } 77 | dexes := []dex_adapter.IDex{ 78 | defibox, 79 | defis, 80 | dolphin, 81 | } 82 | for _, dex := range dexes { 83 | err = dex.Init(db) 84 | if err != nil { 85 | err = fmt.Errorf("dex.Init(): %w", err) 86 | seelog.Error(err) 87 | return 88 | } 89 | } 90 | 91 | arb := new(arbitrage.Repo) 92 | arb.Api = api 93 | arb.Printer = &printer.PathPrinter{ShowContract: false, ShowCmd: false, From: eos.Name(api.GetActor()), ShowDex: true} 94 | 95 | for { 96 | seelog.Debugf("start loop") 97 | pairs := arb.GetAllPairs(dexes) 98 | seelog.Debugf("pairs: %v", len(pairs)) 99 | pairs = arb.FilterPairs(pairs) 100 | 101 | defiPairs := []*models.Pair{} 102 | for _, pair := range pairs { 103 | if pair.Dex == defis { 104 | defiPairs = append(defiPairs, pair) 105 | } 106 | } 107 | 108 | // defis-eos 109 | arb.RunTask(arbitrage.RunTaskInput{ 110 | BaseSymbol: obj_const.SEos, 111 | BaseContract: eos.AccountName(str_const.CEosio), 112 | BaseAmount: 1, 113 | MinProfitAmount: 4, 114 | Pairs: defiPairs, 115 | }) 116 | // defis-usdt 117 | arb.RunTask(arbitrage.RunTaskInput{ 118 | BaseSymbol: obj_const.SUsdt, 119 | BaseContract: eos.AccountName(str_const.CTether), 120 | BaseAmount: 1, 121 | MinProfitAmount: 15, 122 | Pairs: defiPairs, 123 | }) 124 | // defis-usdc 125 | //arb.RunTask(arbitrage.RunTaskInput{ 126 | // BaseSymbol: obj_const.SUsdc, 127 | // BaseContract: eos.AccountName(str_const.CUsdx), 128 | // BaseAmount: 51, 129 | // MinProfitAmount: 204, 130 | // Pairs: defiPairs, 131 | //}) 132 | 133 | // eos 134 | arb.RunTask(arbitrage.RunTaskInput{ 135 | BaseSymbol: obj_const.SEos, 136 | BaseContract: eos.AccountName(str_const.CEosio), 137 | BaseAmount: 1000, 138 | MinProfitAmount: 4, 139 | Pairs: pairs, 140 | }) 141 | // usdt 142 | arb.RunTask(arbitrage.RunTaskInput{ 143 | BaseSymbol: obj_const.SUsdt, 144 | BaseContract: eos.AccountName(str_const.CTether), 145 | BaseAmount: 2000, 146 | MinProfitAmount: 15, 147 | Pairs: pairs, 148 | }) 149 | // usn 150 | //arb.RunTask(arbitrage.RunTaskInput{ 151 | // BaseSymbol: obj_const.SUsn, 152 | // BaseContract: eos.AccountName(str_const.CUsn), 153 | // BaseAmount: 2000, 154 | // MinProfitAmount: 15, 155 | // Pairs: pairs, 156 | //}) 157 | } 158 | }, 159 | } 160 | 161 | func RunDefis(arb *arbitrage.Repo, dex dex_adapter.IDex, pairs []*models.Pair, printer printer.PathPrinter) { 162 | var chances [][]*models.PathJob 163 | var err error 164 | 165 | //printer := printer.PathPrinter{ShowContract: false, ShowCmd: false, From: eos.Name(arb.Api.GetActor())} 166 | pairs = arb.FilterPairs(pairs) 167 | 168 | chances, err = arb.GetChances(arbitrage.GetChancesInput{ 169 | Pairs: pairs, 170 | PathDepth: 4, 171 | BaseAsset: eos.ExtendedAsset{ 172 | Asset: eos.Asset{Amount: 1, Symbol: obj_const.SEos}, 173 | Contract: "eosio.token", 174 | }, 175 | MinProfit: eos.ExtendedAsset{ 176 | Asset: eos.Asset{Amount: 1, Symbol: obj_const.SEos}, 177 | Contract: "eosio.token", 178 | }, 179 | }) 180 | if err != nil { 181 | err = fmt.Errorf("arb.GetChances: %w", err) 182 | seelog.Error(err) 183 | } 184 | //for _, paths := range chances { 185 | // printer.PrintPaths(paths) 186 | //} 187 | //seelog.Infof("") 188 | chances = arb.FilterChances(chances, eos.Asset{Amount: 4, Symbol: obj_const.SEos}) 189 | for _, paths := range chances { 190 | printer.PrintPaths(paths) 191 | } 192 | //return 193 | minProfit := eos.Asset{Amount: 4, Symbol: obj_const.SEos} 194 | arb.RunChances(chances, minProfit) 195 | } 196 | 197 | func init() { 198 | rootCmd.AddCommand(testCmd) 199 | 200 | // Here you will define your flags and configuration settings. 201 | 202 | // Cobra supports Persistent Flags which will work for this command 203 | // and all subcommands, e.g.: 204 | // testCmd.PersistentFlags().String("foo", "", "A help for foo") 205 | 206 | // Cobra supports local flags which will only run when this command 207 | // is called directly, e.g.: 208 | // testCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") 209 | } 210 | -------------------------------------------------------------------------------- /repo/defibox/swap_defi/pairs.go: -------------------------------------------------------------------------------- 1 | package swap_defi 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | "sort" 7 | "strconv" 8 | "strings" 9 | "sync" 10 | "time" 11 | 12 | "eos-arb/model" 13 | "eos-arb/repo/constants/str_const" 14 | 15 | "github.com/cihub/seelog" 16 | "github.com/panyanyany/eos-go" 17 | "gorm.io/gorm" 18 | "gorm.io/gorm/clause" 19 | ) 20 | 21 | func (r *Repo) GetPairs(startPairId int) (pairs []*Pair, err error) { 22 | var resp *eos.GetTableRowsResp 23 | resp, _, err = r.Api.GetTableRows(eos.GetTableRowsRequest{ 24 | Code: Code, 25 | Scope: Code, 26 | Table: "pairs", 27 | JSON: true, 28 | LowerBound: strconv.Itoa(startPairId), 29 | Limit: 99, 30 | }) 31 | if err != nil { 32 | err = fmt.Errorf("get pairs: %w", err) 33 | return 34 | } 35 | pairs = make([]*Pair, 0) 36 | err = json.Unmarshal(resp.Rows, &pairs) 37 | if err != nil { 38 | seelog.Debug(string(resp.Rows)) 39 | err = fmt.Errorf("unmarshal pairs: %w", err) 40 | return 41 | } 42 | return 43 | } 44 | func (r *Repo) GetAllPairs() (allRows []*Pair, err error) { 45 | var resp *eos.GetTableRowsResp 46 | var lowerBound string 47 | exists := make(map[int]bool) 48 | //var all_rows []*Sasset 49 | 50 | for { 51 | var rows []*Pair 52 | params := eos.GetTableRowsRequest{ 53 | JSON: true, 54 | Code: Code, 55 | Scope: Code, 56 | Table: "pairs", 57 | LowerBound: lowerBound, 58 | UpperBound: "", 59 | Limit: 399, 60 | } 61 | resp, _, err = r.Api.GetTableRows(params) 62 | if err != nil { 63 | err = fmt.Errorf("GetTableRows of nftoken sassets: %w", err) 64 | return 65 | } 66 | err = json.Unmarshal(resp.Rows, &rows) 67 | if err != nil { 68 | seelog.Debugf("rows: %v", string(resp.Rows)) 69 | err = fmt.Errorf("unmarshal: %w", err) 70 | return 71 | } 72 | for _, row := range rows { 73 | _, found := exists[row.ID] 74 | if found { 75 | continue 76 | } 77 | exists[row.ID] = true 78 | allRows = append(allRows, row) 79 | } 80 | if !resp.More { 81 | break 82 | } 83 | lowerBound = strconv.Itoa(rows[len(rows)-1].ID) 84 | } 85 | 86 | return 87 | } 88 | func (r *Repo) GetAllPairsBatch() (allRows []*Pair, err error) { 89 | mdIdList := model.PairIdList{} 90 | err = r.Db.Where("contract = ?", Code).First(&mdIdList).Error 91 | if err == gorm.ErrRecordNotFound || time.Now().Sub(mdIdList.UpdatedAt).Hours() > 7*24 { 92 | allRows, err = r.GetAllPairs() 93 | if err != nil { 94 | err = fmt.Errorf("r.GetAllPairs(): %w", err) 95 | return 96 | } 97 | seelog.Infof("init pairs: %v", len(allRows)) 98 | ids := []int{} 99 | for _, row := range allRows { 100 | ids = append(ids, row.ID) 101 | } 102 | sort.Ints(ids) 103 | ids2 := []string{} 104 | for _, id := range ids { 105 | ids2 = append(ids2, strconv.Itoa(id)) 106 | } 107 | idStr := strings.Join(ids2, ",") 108 | mdIdList.Contract = Code 109 | mdIdList.IdList = idStr 110 | mdIdList.Total = len(ids) 111 | 112 | err = r.Db.Clauses(clause.OnConflict{UpdateAll: true}).Save(&mdIdList).Error 113 | if err != nil { 114 | err = fmt.Errorf("Save(mdIdList): %w", err) 115 | return 116 | } 117 | return 118 | } 119 | idStrList := strings.Split(mdIdList.IdList, ",") 120 | if len(idStrList) <= 10 { 121 | err = fmt.Errorf("idStrList to small: %v", len(idStrList)) 122 | return 123 | } 124 | exists := make(map[int]bool) 125 | 126 | var wg sync.WaitGroup 127 | step := 399 128 | queue := make(chan *GetTableRowsResult) 129 | resList := []*GetTableRowsResult{} 130 | 131 | done := make(chan bool) 132 | go func() { 133 | for res := range queue { 134 | resList = append(resList, res) 135 | } 136 | done <- true 137 | }() 138 | 139 | for i := 0; i < len(idStrList); i += step { 140 | wg.Add(1) 141 | go func(i int) { 142 | defer wg.Done() 143 | lowerBound := idStrList[i] 144 | 145 | var resp *eos.GetTableRowsResp 146 | params := eos.GetTableRowsRequest{ 147 | JSON: true, 148 | Code: Code, 149 | Scope: Code, 150 | Table: "pairs", 151 | LowerBound: lowerBound, 152 | UpperBound: "", 153 | Limit: 399, 154 | } 155 | baseUrl := "" 156 | resp, baseUrl, err = r.Api.GetTableRows(params) 157 | queue <- &GetTableRowsResult{ 158 | Resp: resp, 159 | Error: err, 160 | Params: params, 161 | Url: baseUrl, 162 | } 163 | }(i) 164 | } 165 | wg.Wait() 166 | close(queue) 167 | <-done 168 | 169 | for _, res := range resList { 170 | //seelog.Infof("url=%v, lowerBound=%v, list=%v", res.Url, res.Params.LowerBound, len(resList)) 171 | resp := res.Resp 172 | err = res.Error 173 | if err != nil { 174 | err = fmt.Errorf("r.Api.GetTableRows: %w", err) 175 | //seelog.Infof("url=%v, lowerBound=%v, err=%v", res.Url, res.Params.LowerBound, err) 176 | seelog.Error(err) 177 | err = nil 178 | continue 179 | } 180 | var rows []*Pair 181 | err = json.Unmarshal(resp.Rows, &rows) 182 | if err != nil { 183 | seelog.Debugf("rows: %v", string(resp.Rows)) 184 | err = fmt.Errorf("unmarshal: %w", err) 185 | seelog.Error(err) 186 | err = nil 187 | continue 188 | } 189 | for _, row := range rows { 190 | _, found := exists[row.ID] 191 | if found { 192 | continue 193 | } 194 | exists[row.ID] = true 195 | allRows = append(allRows, row) 196 | } 197 | //seelog.Infof("url=%v, lowerBound=%v, len=%v", res.Url, res.Params.LowerBound, len(rows)) 198 | } 199 | 200 | //seelog.Infof("get all pairs: %v", len(allRows)) 201 | 202 | return 203 | } 204 | func (r *Repo) GetAllPrices() (prices map[string]*PairPrice, err error) { 205 | pairs := []*Pair{} 206 | pairs, err = r.GetAllPairs() 207 | if err != nil { 208 | err = fmt.Errorf("r.GetAllPairs: %w", err) 209 | return 210 | } 211 | prices = make(map[string]*PairPrice) 212 | 213 | for _, pair := range pairs { 214 | baseContract := pair.Token0.Contract 215 | baseSymbol := pair.Token0.Symbol 216 | 217 | quoteContract := pair.Token1.Contract 218 | quoteSymbol := pair.Token1.Symbol 219 | quotePrice := pair.Price1Last 220 | 221 | if baseContract != str_const.CTether || eos.Symbol(baseSymbol).String() != str_const.SUsdt { 222 | baseContract = pair.Token1.Contract 223 | baseSymbol = pair.Token1.Symbol 224 | 225 | quoteContract = pair.Token0.Contract 226 | quoteSymbol = pair.Token0.Symbol 227 | quotePrice = pair.Price0Last 228 | } 229 | // 还是没有 230 | if baseContract != str_const.CTether || eos.Symbol(baseSymbol).String() != str_const.SUsdt { 231 | continue 232 | } 233 | 234 | key := fmt.Sprintf("%v-%v", quoteContract, quoteSymbol) 235 | prices[key] = &PairPrice{Contract: quoteContract, Symbol: eos.Symbol(quoteSymbol).String(), PriceInUsdt: quotePrice.Value} 236 | } 237 | 238 | prices[fmt.Sprintf("%v-%v", str_const.CTether, str_const.SUsdt)] = &PairPrice{Contract: str_const.CTether, Symbol: str_const.SUsdt, PriceInUsdt: 1} 239 | return 240 | } 241 | 242 | type GetTableRowsResult struct { 243 | Resp *eos.GetTableRowsResp 244 | Error error 245 | Params eos.GetTableRowsRequest 246 | Url string 247 | } 248 | -------------------------------------------------------------------------------- /repo/eos_api/eos_api.go: -------------------------------------------------------------------------------- 1 | package eos_api 2 | 3 | import ( 4 | "context" 5 | "crypto/md5" 6 | "encoding/hex" 7 | "encoding/json" 8 | "fmt" 9 | "math" 10 | "net" 11 | "net/http" 12 | "sync" 13 | "time" 14 | 15 | "github.com/cihub/seelog" 16 | "github.com/go-redis/redis/v8" 17 | "github.com/panyanyany/eos-go" 18 | ) 19 | 20 | type EosApi struct { 21 | Rdb *redis.Client 22 | RedisTimeout time.Duration 23 | EnableCache bool 24 | FindLock sync.Mutex 25 | LastRequest time.Time 26 | PrivateKey string 27 | QueryApiList []string 28 | PostApiList []string 29 | HistoryApiList []string 30 | ApiLastRequest map[string]time.Time 31 | Apis map[string]*eos.API 32 | UrlLocks map[string]*sync.Mutex 33 | Actor eos.AccountName 34 | } 35 | 36 | type IEosApi interface { 37 | GetTableRows(params eos.GetTableRowsRequest) (out *eos.GetTableRowsResp, baseUrl string, err error) 38 | PushActions(actions []*eos.Action) (response *eos.PushTransactionFullResp, err error) 39 | GetActor() (actor eos.AccountName) 40 | GetActions(params GetActionsInput) (out *ActionOutput, err error) 41 | } 42 | 43 | func NewEosApi(rdb *redis.Client, redisTimeout time.Duration) (r *EosApi) { 44 | r = new(EosApi) 45 | r.RedisTimeout = redisTimeout 46 | r.Rdb = rdb 47 | r.FindLock = sync.Mutex{} 48 | r.EnableCache = rdb != nil && redisTimeout.Seconds() != 0 49 | // https://gist.github.com/akme/89a4e596587cb605b530bd825994a0db 50 | r.QueryApiList = []string{ 51 | // 测试 http://api1.eosasia.one/v1/chain/get_info 52 | "https://eos.newdex.one", 53 | "http://eos.greymass.com", 54 | "http://api.eossweden.org", 55 | "https://api.eoslaomao.com", 56 | 57 | "https://api1.eosasia.one", 58 | "http://api-mainnet.starteos.io", 59 | "http://api1.eosasia.one", 60 | "http://fn001.eossv.org", 61 | "http://mainnet.eosamsterdam.net", 62 | "http://eosbp-0.atticlab.net", 63 | "http://eosbp-1.atticlab.net", 64 | "http://eos.eoscafeblock.com", 65 | "http://api.eosn.io", 66 | "http://node2.eosphere.io", 67 | "http://node1.eosphere.io", 68 | "http://seed01.eosusa.news", 69 | "http://seed02.eosusa.news", 70 | "http://api.eosrio.io", 71 | "http://api.eostitan.com", 72 | 73 | "http://api.eoseoul.io", //易错 74 | "http://bp.cryptolions.io", //易错 75 | //"http://mainnet.eosio.sg", 76 | //"https://mainnet.coscannon.io": "https://mainnet.coscannon.io", 无效 77 | //"https://eos.rrdy.com": "https://eos.rrdy.com", 无效 78 | } 79 | r.PostApiList = []string{ 80 | "https://eospush.tokenpocket.pro", 81 | } 82 | r.HistoryApiList = []string{ 83 | "https://eos.hyperion.eosrio.io", 84 | } 85 | r.ApiLastRequest = map[string]time.Time{} 86 | r.Apis = map[string]*eos.API{} 87 | r.UrlLocks = map[string]*sync.Mutex{} 88 | 89 | allUrlList := []string{} 90 | allUrlListExists := make(map[string]bool) 91 | for _, url := range r.QueryApiList { 92 | _, found := allUrlListExists[url] 93 | if found { 94 | continue 95 | } 96 | allUrlListExists[url] = true 97 | allUrlList = append(allUrlList, url) 98 | } 99 | for _, url := range r.PostApiList { 100 | _, found := allUrlListExists[url] 101 | if found { 102 | continue 103 | } 104 | allUrlListExists[url] = true 105 | allUrlList = append(allUrlList, url) 106 | } 107 | for _, url := range r.HistoryApiList { 108 | _, found := allUrlListExists[url] 109 | if found { 110 | continue 111 | } 112 | allUrlListExists[url] = true 113 | allUrlList = append(allUrlList, url) 114 | } 115 | 116 | for _, url := range allUrlList { 117 | r.ApiLastRequest[url] = time.Time{} 118 | api := eos.New(url) 119 | api.HttpClient.Transport = &http.Transport{ 120 | Proxy: http.ProxyFromEnvironment, 121 | DialContext: (&net.Dialer{ 122 | Timeout: 5 * time.Second, 123 | KeepAlive: 5 * time.Second, 124 | DualStack: true, 125 | }).DialContext, 126 | MaxIdleConns: 100, 127 | IdleConnTimeout: 10 * time.Second, 128 | TLSHandshakeTimeout: 10 * time.Second, 129 | ExpectContinueTimeout: 1 * time.Second, 130 | DisableKeepAlives: true, // default behavior, because of `nodeos`'s lack of support for Keep alives. 131 | } 132 | r.Apis[url] = api 133 | r.UrlLocks[url] = &sync.Mutex{} 134 | } 135 | return 136 | } 137 | 138 | var ctx = context.Background() 139 | 140 | func (r *EosApi) GetActor() (actor eos.AccountName) { 141 | if r.Actor.String() == "" { 142 | panic("unset Actor") 143 | } 144 | return r.Actor 145 | } 146 | func (r *EosApi) GetLock(apiList []string) string { 147 | r.FindLock.Lock() 148 | var foundUrl string 149 | interval := int64(math.MaxInt64) 150 | 151 | for _, url := range apiList { 152 | if r.ApiLastRequest[url].IsZero() { 153 | foundUrl = url 154 | interval = 0 155 | break 156 | } 157 | now := time.Now() 158 | diff := 15 - int64(now.Sub(r.ApiLastRequest[url]).Seconds()) 159 | if diff < interval { 160 | interval = diff 161 | foundUrl = url 162 | } 163 | //seelog.Infof("diff=%v, interval=%v, foundUrl=%v, url=%v, last=%v, now=%v", 164 | // diff, interval, foundUrl, 165 | // url, r.ApiLastRequest[url], now, 166 | //) 167 | } 168 | r.ApiLastRequest[foundUrl] = time.Now() 169 | r.FindLock.Unlock() 170 | 171 | r.UrlLocks[foundUrl].Lock() 172 | if interval > 0 { 173 | seelog.Debugf("sleep: %v", interval) 174 | time.Sleep(time.Duration(interval) * time.Second) 175 | } 176 | return foundUrl 177 | } 178 | func (r *EosApi) ReleaseLock(url string) { 179 | //r.LastRequest = time.Now() 180 | //r.ApiLastRequest[url] = time.Now() 181 | //r.FindLock.Unlock() 182 | r.UrlLocks[url].Unlock() 183 | } 184 | func (r *EosApi) PushActions(actions []*eos.Action) (response *eos.PushTransactionFullResp, err error) { 185 | keyBag := &eos.KeyBag{} 186 | err = keyBag.ImportPrivateKey(ctx, r.PrivateKey) 187 | if err != nil { 188 | err = fmt.Errorf("import private key: %w", err) 189 | return 190 | } 191 | 192 | //baseUrl := r.GetLock(r.PostApiList) 193 | baseUrl := r.PostApiList[0] 194 | 195 | api := r.Apis[baseUrl] 196 | api.SetSigner(keyBag) 197 | 198 | txOpts := &eos.TxOptions{} 199 | if err = txOpts.FillFromChain(ctx, api); err != nil { 200 | err = fmt.Errorf("filling tx opts: %w", err) 201 | return 202 | } 203 | 204 | tx := eos.NewTransaction(actions, txOpts) 205 | signedTx, packedTx, err := api.SignTransaction(ctx, tx, txOpts.ChainID, eos.CompressionNone) 206 | if err != nil { 207 | err = fmt.Errorf("sign transaction: %w", err) 208 | return 209 | } 210 | 211 | content, err := json.MarshalIndent(signedTx, "", " ") 212 | if err != nil { 213 | err = fmt.Errorf("json marshalling transaction: %w", err) 214 | return 215 | } 216 | 217 | seelog.Debug(string(content)) 218 | for _, action := range actions { 219 | seelog.Debugf("actionData: %#v", action.ActionData.Data) 220 | } 221 | 222 | response, err = api.PushTransaction(ctx, packedTx) 223 | if err != nil { 224 | err = fmt.Errorf("push transaction: %w", err) 225 | return 226 | } 227 | //r.ReleaseLock(baseUrl) 228 | 229 | seelog.Debugf("Transaction [%s] submitted to the network succesfully.\n", hex.EncodeToString(response.Processed.ID)) 230 | return 231 | } 232 | 233 | func (r *EosApi) GetTableRows(params eos.GetTableRowsRequest) (out *eos.GetTableRowsResp, baseUrl string, err error) { 234 | var bs []byte 235 | key := "GetTableRows:" 236 | bs, err = json.Marshal(params) 237 | if err != nil { 238 | seelog.Debugf("params: %#v", params) 239 | err = fmt.Errorf("json.Marshal params for key: %w", err) 240 | return 241 | } 242 | 243 | key += fmt.Sprintf("%x", md5.Sum(bs)) 244 | 245 | var str string 246 | 247 | if r.EnableCache { 248 | str, err = r.Rdb.Get(ctx, key).Result() 249 | if err != redis.Nil && err != nil { 250 | err = fmt.Errorf("r.Rdb.Get: %v, key=%v", err, key) 251 | return 252 | } 253 | if err == redis.Nil { 254 | //seelog.Debugf("params: %#v", params) 255 | } 256 | //seelog.Debugf("r.Rdb.Get key=%v, err=%v", key, err) 257 | } 258 | 259 | if str == "" { 260 | baseUrl = r.GetLock(r.QueryApiList) 261 | api := r.Apis[baseUrl] 262 | seelog.Debugf("GetTableRows, url=%v", api.BaseURL) 263 | tsStart := time.Now() 264 | ctx2, _ := context.WithTimeout(ctx, time.Second*10) 265 | out, err = api.GetTableRows(ctx2, params) 266 | r.ReleaseLock(baseUrl) 267 | if err != nil { 268 | seelog.Debugf("params: %#v", params) 269 | err = fmt.Errorf("r.Api.GetTableRows: %w, time=%v, url=%v", err, time.Now().Sub(tsStart).Seconds(), baseUrl) 270 | //seelog.Error(err) 271 | return 272 | } 273 | bs, err = json.Marshal(out) 274 | if err != nil { 275 | err = fmt.Errorf("json.Marshal: %w", err) 276 | return 277 | } 278 | if r.EnableCache { 279 | err = r.Rdb.Set(ctx, key, string(bs), r.RedisTimeout).Err() 280 | if err != nil { 281 | err = fmt.Errorf("r.Rdb.Set: %w", err) 282 | return 283 | } 284 | } 285 | } else { 286 | err = json.Unmarshal([]byte(str), &out) 287 | if err != nil { 288 | seelog.Debugf("str: %v", str) 289 | err = fmt.Errorf("json.Unmarshal: %w", err) 290 | return 291 | } 292 | } 293 | return 294 | } 295 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 2 | cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 3 | cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= 4 | cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= 5 | cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= 6 | cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= 7 | cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= 8 | cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= 9 | cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= 10 | cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= 11 | cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= 12 | cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= 13 | cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= 14 | cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= 15 | cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= 16 | cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= 17 | cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= 18 | cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= 19 | cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= 20 | cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= 21 | cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= 22 | cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= 23 | cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= 24 | cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= 25 | cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= 26 | cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= 27 | cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= 28 | cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= 29 | cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= 30 | cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= 31 | cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= 32 | cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= 33 | cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= 34 | cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= 35 | cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= 36 | cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= 37 | cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= 38 | cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= 39 | cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= 40 | cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= 41 | contrib.go.opencensus.io/exporter/stackdriver v0.12.6/go.mod h1:8x999/OcIPy5ivx/wDiV7Gx4D+VUPODf0mWRGRc5kSk= 42 | contrib.go.opencensus.io/exporter/stackdriver v0.13.8 h1:lIFYmQsqejvlq+GobFUbC5F0prD5gvhP6r0gWLZRDq4= 43 | contrib.go.opencensus.io/exporter/stackdriver v0.13.8/go.mod h1:huNtlWx75MwO7qMs0KrMxPZXzNNWebav1Sq/pm02JdQ= 44 | dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= 45 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 46 | github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= 47 | github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= 48 | github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= 49 | github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= 50 | github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= 51 | github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= 52 | github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= 53 | github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= 54 | github.com/aws/aws-sdk-go v1.22.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= 55 | github.com/aws/aws-sdk-go v1.37.0/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= 56 | github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= 57 | github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 58 | github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= 59 | github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= 60 | github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= 61 | github.com/blendle/zapdriver v1.3.1 h1:C3dydBOWYRiOk+B8X9IVZ5IOe+7cl+tGOexN4QqHfpE= 62 | github.com/blendle/zapdriver v1.3.1/go.mod h1:mdXfREi6u5MArG4j9fewC+FGnXaBR+T4Ox4J2u4eHCc= 63 | github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= 64 | github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= 65 | github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= 66 | github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= 67 | github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= 68 | github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 69 | github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= 70 | github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= 71 | github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= 72 | github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 h1:kHaBemcxl8o/pQ5VM1c8PVE1PubbNx3mjUr09OqWGCs= 73 | github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575/go.mod h1:9d6lWj8KzO/fd/NrVaLscBKmPigpZpn5YawRPw+e3Yo= 74 | github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 75 | github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= 76 | github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= 77 | github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= 78 | github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= 79 | github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= 80 | github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= 81 | github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= 82 | github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= 83 | github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= 84 | github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= 85 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 86 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 87 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 88 | github.com/dfuse-io/logging v0.0.0-20210518215502-2d920b2ad1f2 h1:UESSYlCW/yF5xIoGV8azG0G3CQ2oMIKrB7Xp/egPfV0= 89 | github.com/dfuse-io/logging v0.0.0-20210518215502-2d920b2ad1f2/go.mod h1:EoK/8RFbMEteaCaz89uessDTnCWjbbcr+DXcBh4el5o= 90 | github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= 91 | github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= 92 | github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= 93 | github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= 94 | github.com/elazarl/goproxy v0.0.0-20210110162100-a92cc753f88e h1:/cwV7t2xezilMljIftb7WlFtzGANRCnoOhPjtl2ifcs= 95 | github.com/elazarl/goproxy v0.0.0-20210110162100-a92cc753f88e/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= 96 | github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= 97 | github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= 98 | github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= 99 | github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= 100 | github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= 101 | github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= 102 | github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= 103 | github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= 104 | github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= 105 | github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= 106 | github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= 107 | github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= 108 | github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= 109 | github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= 110 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= 111 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= 112 | github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= 113 | github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= 114 | github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= 115 | github.com/go-redis/redis/v8 v8.10.0 h1:OZwrQKuZqdJ4QIM8wn8rnuz868Li91xA3J2DEq+TPGA= 116 | github.com/go-redis/redis/v8 v8.10.0/go.mod h1:vXLTvigok0VtUX0znvbcEW1SOt4OA9CU1ZfnOtKOaiM= 117 | github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= 118 | github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= 119 | github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= 120 | github.com/gocarina/gocsv v0.0.0-20210516172204-ca9e8a8ddea8 h1:hp1oqdzmv37vPLYFGjuM/RmUgUMfD9vQfMszc54l55Y= 121 | github.com/gocarina/gocsv v0.0.0-20210516172204-ca9e8a8ddea8/go.mod h1:5YoVOkjYAQumqlV356Hj3xeYh4BdZuLE0/nRkf2NKkI= 122 | github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= 123 | github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= 124 | github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= 125 | github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= 126 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= 127 | github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 128 | github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 129 | github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 130 | github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 131 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= 132 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 133 | github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 134 | github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 135 | github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= 136 | github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= 137 | github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= 138 | github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= 139 | github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= 140 | github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= 141 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 142 | github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 143 | github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 144 | github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= 145 | github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= 146 | github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= 147 | github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= 148 | github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= 149 | github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= 150 | github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= 151 | github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= 152 | github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= 153 | github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 154 | github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 155 | github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= 156 | github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= 157 | github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= 158 | github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 159 | github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 160 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= 161 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 162 | github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 163 | github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 164 | github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 165 | github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 166 | github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 167 | github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 168 | github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 169 | github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 170 | github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= 171 | github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 172 | github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 173 | github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= 174 | github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= 175 | github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= 176 | github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= 177 | github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= 178 | github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 179 | github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 180 | github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 181 | github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 182 | github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 183 | github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 184 | github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 185 | github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 186 | github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 187 | github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 188 | github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= 189 | github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 190 | github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= 191 | github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= 192 | github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= 193 | github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= 194 | github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= 195 | github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= 196 | github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= 197 | github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= 198 | github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= 199 | github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= 200 | github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= 201 | github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= 202 | github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= 203 | github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= 204 | github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= 205 | github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= 206 | github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= 207 | github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= 208 | github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= 209 | github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= 210 | github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= 211 | github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= 212 | github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 213 | github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 214 | github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= 215 | github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= 216 | github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= 217 | github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= 218 | github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= 219 | github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= 220 | github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= 221 | github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= 222 | github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= 223 | github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= 224 | github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= 225 | github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= 226 | github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= 227 | github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= 228 | github.com/jinzhu/now v1.1.2 h1:eVKgfIdy9b6zbWBMgFpfDPoAMifwSZagU9HmEU6zgiI= 229 | github.com/jinzhu/now v1.1.2/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= 230 | github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= 231 | github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= 232 | github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= 233 | github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= 234 | github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= 235 | github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 236 | github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= 237 | github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= 238 | github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= 239 | github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= 240 | github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= 241 | github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= 242 | github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= 243 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 244 | github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= 245 | github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= 246 | github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= 247 | github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= 248 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= 249 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 250 | github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= 251 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 252 | github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8= 253 | github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= 254 | github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= 255 | github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= 256 | github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= 257 | github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= 258 | github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= 259 | github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= 260 | github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= 261 | github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= 262 | github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= 263 | github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= 264 | github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= 265 | github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= 266 | github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= 267 | github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= 268 | github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= 269 | github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= 270 | github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= 271 | github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= 272 | github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= 273 | github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= 274 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 275 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 276 | github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= 277 | github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= 278 | github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= 279 | github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= 280 | github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= 281 | github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= 282 | github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= 283 | github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= 284 | github.com/onsi/ginkgo v1.15.0 h1:1V1NfVQR87RtWAgp1lv9JZJ5Jap+XFGKPi00andXGi4= 285 | github.com/onsi/ginkgo v1.15.0/go.mod h1:hF8qUzuuC8DJGygJH3726JnCZX4MYbRB8yFfISqnKUg= 286 | github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= 287 | github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= 288 | github.com/onsi/gomega v1.10.5 h1:7n6FEkpFmfCoo2t+YYqXH0evK+a9ICQz0xcAy9dYcaQ= 289 | github.com/onsi/gomega v1.10.5/go.mod h1:gza4q3jKQJijlu05nKWRCW/GavJumGt8aNRxWg7mt48= 290 | github.com/panyanyany/eos-go v0.9.3 h1:jkeAzXavu++ocEgzqyvnGv0OiL9UENNXyKh6uzUz1Dw= 291 | github.com/panyanyany/eos-go v0.9.3/go.mod h1:KBniZDDO7gRFEVQ2tOW+5G2SFgDfsPFeXcohGgRzeVY= 292 | github.com/panyanyany/eos-go v0.9.4-0.20210619011908-2c42cc190cc5 h1:3uM5siqO0BAMQemvzLfPMwK6MIlwNLWvRgO9AzWSCko= 293 | github.com/panyanyany/eos-go v0.9.4-0.20210619011908-2c42cc190cc5/go.mod h1:KBniZDDO7gRFEVQ2tOW+5G2SFgDfsPFeXcohGgRzeVY= 294 | github.com/panyanyany/eos-go v0.9.4-0.20210619023135-030d1d31a903 h1:ow48aDKcO5Lp58RSCnMW/1S+Kov0A+oTJIjlWx6BfWw= 295 | github.com/panyanyany/eos-go v0.9.4-0.20210619023135-030d1d31a903/go.mod h1:KBniZDDO7gRFEVQ2tOW+5G2SFgDfsPFeXcohGgRzeVY= 296 | github.com/panyanyany/eos-go v0.9.4-0.20210620023352-a998c973cd24 h1:yxpjhnxFUtnDymMTOXu99vhN6di5IQeWVbzD6GNRwTw= 297 | github.com/panyanyany/eos-go v0.9.4-0.20210620023352-a998c973cd24/go.mod h1:KBniZDDO7gRFEVQ2tOW+5G2SFgDfsPFeXcohGgRzeVY= 298 | github.com/panyanyany/eos-go v0.9.4-0.20210620030118-c30a5ee5bf94 h1:SQxmLBgp58ART70kBBTexrTWtUBDycaivFNZ40Wf3kg= 299 | github.com/panyanyany/eos-go v0.9.4-0.20210620030118-c30a5ee5bf94/go.mod h1:KBniZDDO7gRFEVQ2tOW+5G2SFgDfsPFeXcohGgRzeVY= 300 | github.com/panyanyany/eos-go v0.9.4-0.20210621092235-c9610ae7ce20 h1:Xg/dThjyTmlq+ywCQ9kutJp6/imWaLAMC/owBiNVF6I= 301 | github.com/panyanyany/eos-go v0.9.4-0.20210621092235-c9610ae7ce20/go.mod h1:KBniZDDO7gRFEVQ2tOW+5G2SFgDfsPFeXcohGgRzeVY= 302 | github.com/parnurzeal/gorequest v0.2.16 h1:T/5x+/4BT+nj+3eSknXmCTnEVGSzFzPGdpqmUVVZXHQ= 303 | github.com/parnurzeal/gorequest v0.2.16/go.mod h1:3Kh2QUMJoqw3icWAecsyzkpY7UzRfDhbRdTjtNwNiUE= 304 | github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= 305 | github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= 306 | github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ= 307 | github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= 308 | github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 309 | github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 310 | github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= 311 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 312 | github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= 313 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 314 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 315 | github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= 316 | github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= 317 | github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= 318 | github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= 319 | github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 320 | github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 321 | github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= 322 | github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= 323 | github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= 324 | github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= 325 | github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= 326 | github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= 327 | github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= 328 | github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= 329 | github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= 330 | github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= 331 | github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= 332 | github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= 333 | github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= 334 | github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= 335 | github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= 336 | github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= 337 | github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= 338 | github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= 339 | github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= 340 | github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= 341 | github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= 342 | github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= 343 | github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= 344 | github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= 345 | github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= 346 | github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= 347 | github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M= 348 | github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= 349 | github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= 350 | github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= 351 | github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= 352 | github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= 353 | github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= 354 | github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= 355 | github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= 356 | github.com/spf13/viper v1.8.0 h1:QRwDgoG8xX+kp69di68D+YYTCWfYEckbZRfUlEIAal0= 357 | github.com/spf13/viper v1.8.0/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= 358 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 359 | github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 360 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 361 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 362 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 363 | github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= 364 | github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 365 | github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= 366 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 367 | github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= 368 | github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= 369 | github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf/go.mod h1:M8agBzgqHIhgj7wEn9/0hJUZcrvt9VY+Ln+S1I5Mha0= 370 | github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125 h1:3SNcvBmEPE1YlB1JpVZouslJpI3GBNoiqW7+wb0Rz7w= 371 | github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125/go.mod h1:M8agBzgqHIhgj7wEn9/0hJUZcrvt9VY+Ln+S1I5Mha0= 372 | github.com/test-go/testify v1.1.4 h1:Tf9lntrKUMHiXQ07qBScBTSA0dhYQlu83hswqelv1iE= 373 | github.com/test-go/testify v1.1.4/go.mod h1:rH7cfJo/47vWGdi4GPj16x3/t1xGOj2YxzmNQzk2ghU= 374 | github.com/tidwall/gjson v1.8.0 h1:Qt+orfosKn0rbNTZqHYDqBrmm3UDA4KRkv70fDzG+PQ= 375 | github.com/tidwall/gjson v1.8.0/go.mod h1:5/xDoumyyDNerp2U36lyolv46b3uF/9Bu6OfyQ9GImk= 376 | github.com/tidwall/match v1.0.3 h1:FQUVvBImDutD8wJLN6c5eMzWtjgONK9MwIBCOrUJKeE= 377 | github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= 378 | github.com/tidwall/pretty v1.1.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= 379 | github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= 380 | github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= 381 | github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= 382 | github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= 383 | github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 384 | github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 385 | github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 386 | github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 387 | github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 388 | go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= 389 | go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= 390 | go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= 391 | go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= 392 | go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= 393 | go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= 394 | go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= 395 | go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= 396 | go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= 397 | go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= 398 | go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= 399 | go.opencensus.io v0.22.6/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= 400 | go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= 401 | go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= 402 | go.opentelemetry.io/otel v0.20.0 h1:eaP0Fqu7SXHwvjiqDq83zImeehOHX8doTvU9AwXON8g= 403 | go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= 404 | go.opentelemetry.io/otel/metric v0.20.0 h1:4kzhXFP+btKm4jwxpjIqjs41A7MakRFUS86bqLHTIw8= 405 | go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= 406 | go.opentelemetry.io/otel/oteltest v0.20.0 h1:HiITxCawalo5vQzdHfKeZurV8x7ljcqAgiWzF6Vaeaw= 407 | go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= 408 | go.opentelemetry.io/otel/trace v0.20.0 h1:1DL6EXUdcg95gukhuRRvLDO/4X5THh/5dIV52lqtnbw= 409 | go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= 410 | go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= 411 | go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= 412 | go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= 413 | go.uber.org/atomic v1.8.0 h1:CUhrE4N1rqSE6FM9ecihEjRkLQu8cDfgDyoOs83mEY4= 414 | go.uber.org/atomic v1.8.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= 415 | go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= 416 | go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= 417 | go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= 418 | go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec= 419 | go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= 420 | go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= 421 | go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= 422 | go.uber.org/zap v1.14.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= 423 | go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U= 424 | go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= 425 | golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= 426 | golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= 427 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 428 | golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 429 | golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 430 | golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 431 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 432 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 433 | golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e h1:gsTQYXdTw2Gq7RBsWvlQ91b+aEQ6bXFUngBGuR8sPpI= 434 | golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 435 | golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 436 | golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 437 | golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= 438 | golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= 439 | golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= 440 | golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= 441 | golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= 442 | golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= 443 | golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= 444 | golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= 445 | golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= 446 | golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= 447 | golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 448 | golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= 449 | golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 450 | golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 451 | golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 452 | golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 453 | golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 454 | golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= 455 | golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 456 | golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 457 | golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 458 | golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 459 | golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= 460 | golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= 461 | golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= 462 | golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= 463 | golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 464 | golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 465 | golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 466 | golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 467 | golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 468 | golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 469 | golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 470 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 471 | golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 472 | golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 473 | golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 474 | golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 475 | golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 476 | golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 477 | golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 478 | golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 479 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 480 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 481 | golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 482 | golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 483 | golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= 484 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 485 | golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 486 | golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 487 | golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 488 | golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 489 | golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 490 | golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 491 | golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 492 | golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 493 | golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 494 | golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 495 | golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 496 | golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 497 | golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 498 | golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 499 | golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 500 | golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 501 | golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 502 | golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 503 | golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 504 | golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 505 | golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 506 | golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 507 | golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 508 | golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 509 | golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 510 | golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= 511 | golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0= 512 | golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= 513 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 514 | golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 515 | golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 516 | golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 517 | golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 518 | golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 519 | golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 520 | golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 521 | golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 522 | golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 523 | golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 524 | golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 525 | golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 526 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 527 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 528 | golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 529 | golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 530 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 531 | golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 532 | golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 533 | golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 534 | golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 535 | golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 536 | golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 537 | golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 538 | golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 539 | golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 540 | golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 541 | golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 542 | golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 543 | golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 544 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 545 | golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 546 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 547 | golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 548 | golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 549 | golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 550 | golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 551 | golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 552 | golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 553 | golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 554 | golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 555 | golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 556 | golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 557 | golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 558 | golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 559 | golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 560 | golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 561 | golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 562 | golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 563 | golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 564 | golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 565 | golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 566 | golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 567 | golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 568 | golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 569 | golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 570 | golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 571 | golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 572 | golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 573 | golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 574 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 575 | golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 576 | golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 577 | golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 578 | golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 579 | golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 580 | golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 581 | golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 582 | golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 583 | golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 584 | golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 585 | golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 586 | golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 587 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 588 | golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 h1:RqytpXGR1iVNX7psjB3ff8y7sNFinVFvkx1c8SjBkio= 589 | golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 590 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 591 | golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= 592 | golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= 593 | golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 594 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 595 | golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 596 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= 597 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 598 | golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 599 | golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= 600 | golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 601 | golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 602 | golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 603 | golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 604 | golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 605 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 606 | golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 607 | golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= 608 | golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 609 | golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 610 | golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 611 | golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 612 | golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 613 | golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 614 | golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 615 | golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 616 | golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 617 | golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 618 | golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 619 | golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 620 | golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 621 | golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 622 | golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 623 | golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 624 | golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 625 | golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 626 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 627 | golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 628 | golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 629 | golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 630 | golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 631 | golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 632 | golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 633 | golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 634 | golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 635 | golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 636 | golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 637 | golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 638 | golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 639 | golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= 640 | golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= 641 | golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= 642 | golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 643 | golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 644 | golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 645 | golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 646 | golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 647 | golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= 648 | golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= 649 | golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= 650 | golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= 651 | golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 652 | golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 653 | golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 654 | golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 655 | golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 656 | golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 657 | golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 658 | golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= 659 | golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= 660 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 661 | golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 662 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 663 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 664 | google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= 665 | google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= 666 | google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= 667 | google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= 668 | google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= 669 | google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= 670 | google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= 671 | google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 672 | google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 673 | google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 674 | google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 675 | google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 676 | google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= 677 | google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= 678 | google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= 679 | google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= 680 | google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= 681 | google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= 682 | google.golang.org/api v0.37.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= 683 | google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= 684 | google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= 685 | google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= 686 | google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= 687 | google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= 688 | google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 689 | google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 690 | google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= 691 | google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= 692 | google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= 693 | google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= 694 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= 695 | google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 696 | google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 697 | google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 698 | google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 699 | google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 700 | google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 701 | google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 702 | google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= 703 | google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 704 | google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 705 | google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 706 | google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 707 | google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 708 | google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 709 | google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= 710 | google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 711 | google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 712 | google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 713 | google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 714 | google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 715 | google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 716 | google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 717 | google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 718 | google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 719 | google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= 720 | google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= 721 | google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= 722 | google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 723 | google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 724 | google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 725 | google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 726 | google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 727 | google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 728 | google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 729 | google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 730 | google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 731 | google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 732 | google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 733 | google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 734 | google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 735 | google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 736 | google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= 737 | google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= 738 | google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= 739 | google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= 740 | google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= 741 | google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= 742 | google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= 743 | google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= 744 | google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= 745 | google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= 746 | google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= 747 | google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= 748 | google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= 749 | google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= 750 | google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= 751 | google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= 752 | google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= 753 | google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= 754 | google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= 755 | google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= 756 | google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= 757 | google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= 758 | google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= 759 | google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= 760 | google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= 761 | google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= 762 | google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= 763 | google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= 764 | google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 765 | google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 766 | google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 767 | google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= 768 | google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= 769 | google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= 770 | google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= 771 | gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 772 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 773 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= 774 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 775 | gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= 776 | gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= 777 | gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= 778 | gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= 779 | gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= 780 | gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= 781 | gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= 782 | gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= 783 | gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= 784 | gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 785 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 786 | gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 787 | gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 788 | gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 789 | gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 790 | gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= 791 | gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 792 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 793 | gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= 794 | gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 795 | gorm.io/driver/mysql v1.1.1 h1:yr1bpyqiwuSPJ4aGGUX9nu46RHXlF8RASQVb1QQNcvo= 796 | gorm.io/driver/mysql v1.1.1/go.mod h1:KdrTanmfLPPyAOeYGyG+UpDys7/7eeWT1zCq+oekYnU= 797 | gorm.io/gorm v1.21.9/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0= 798 | gorm.io/gorm v1.21.11 h1:CxkXW6Cc+VIBlL8yJEHq+Co4RYXdSLiMKNvgoZPjLK4= 799 | gorm.io/gorm v1.21.11/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0= 800 | honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 801 | honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 802 | honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 803 | honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 804 | honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= 805 | honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= 806 | honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= 807 | moul.io/http2curl v1.0.0 h1:6XwpyZOYsgZJrU8exnG87ncVkU1FVCcTRpwzOkTDUi8= 808 | moul.io/http2curl v1.0.0/go.mod h1:f6cULg+e4Md/oW1cYmwW4IWQOVl2lGbmCNGOHvzX2kE= 809 | rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= 810 | rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= 811 | rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= 812 | --------------------------------------------------------------------------------