From f6b1322de51ccc31158ca4142ff61bfc97f2218c Mon Sep 17 00:00:00 2001 From: Peter Broadhurst Date: Wed, 1 Jun 2022 10:46:10 -0400 Subject: [PATCH 1/2] Remove FFCAPI for updated architecture Signed-off-by: Peter Broadhurst --- README.md | 1 - go.mod | 23 ++-- go.sum | 107 +++++++++++---- pkg/ffcapi/api_common.go | 143 -------------------- pkg/ffcapi/apiclient.go | 73 ---------- pkg/ffcapi/apiclient_test.go | 86 ------------ pkg/ffcapi/create_block_listener.go | 43 ------ pkg/ffcapi/create_block_listener_test.go | 48 ------- pkg/ffcapi/exec_query.go | 55 -------- pkg/ffcapi/exec_query_test.go | 53 -------- pkg/ffcapi/get_block_info_by_hash.go | 46 ------- pkg/ffcapi/get_block_info_by_hash_test.go | 50 ------- pkg/ffcapi/get_block_info_by_number.go | 48 ------- pkg/ffcapi/get_block_info_by_number_test.go | 50 ------- pkg/ffcapi/get_gas_price.go | 50 ------- pkg/ffcapi/get_gas_price_test.go | 49 ------- pkg/ffcapi/get_new_block_hashes.go | 44 ------ pkg/ffcapi/get_new_block_hashes_test.go | 48 ------- pkg/ffcapi/get_next_nonce.go | 51 ------- pkg/ffcapi/get_next_nonce_test.go | 49 ------- pkg/ffcapi/get_receipt.go | 52 ------- pkg/ffcapi/get_receipt_test.go | 49 ------- pkg/ffcapi/prepare_transaction.go | 67 --------- pkg/ffcapi/prepare_transaction_test.go | 48 ------- pkg/ffcapi/send_transaction.go | 53 -------- pkg/ffcapi/send_transaction_test.go | 46 ------- 26 files changed, 95 insertions(+), 1337 deletions(-) delete mode 100644 pkg/ffcapi/api_common.go delete mode 100644 pkg/ffcapi/apiclient.go delete mode 100644 pkg/ffcapi/apiclient_test.go delete mode 100644 pkg/ffcapi/create_block_listener.go delete mode 100644 pkg/ffcapi/create_block_listener_test.go delete mode 100644 pkg/ffcapi/exec_query.go delete mode 100644 pkg/ffcapi/exec_query_test.go delete mode 100644 pkg/ffcapi/get_block_info_by_hash.go delete mode 100644 pkg/ffcapi/get_block_info_by_hash_test.go delete mode 100644 pkg/ffcapi/get_block_info_by_number.go delete mode 100644 pkg/ffcapi/get_block_info_by_number_test.go delete mode 100644 pkg/ffcapi/get_gas_price.go delete mode 100644 pkg/ffcapi/get_gas_price_test.go delete mode 100644 pkg/ffcapi/get_new_block_hashes.go delete mode 100644 pkg/ffcapi/get_new_block_hashes_test.go delete mode 100644 pkg/ffcapi/get_next_nonce.go delete mode 100644 pkg/ffcapi/get_next_nonce_test.go delete mode 100644 pkg/ffcapi/get_receipt.go delete mode 100644 pkg/ffcapi/get_receipt_test.go delete mode 100644 pkg/ffcapi/prepare_transaction.go delete mode 100644 pkg/ffcapi/prepare_transaction_test.go delete mode 100644 pkg/ffcapi/send_transaction.go delete mode 100644 pkg/ffcapi/send_transaction_test.go diff --git a/README.md b/README.md index 28506d1..fbb9728 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,6 @@ Common utility modules and interface definitions, used across Hyperledger FireFly microservice runtimes (the Go ones anyway): -- FireFly Connector API (FFCAPI) - [pkg/ffcapi](https://pkg.go.dev/github.com/hyperledger/firefly-common/pkg/ffcapi) - Logging - [pkg/log](https://pkg.go.dev/github.com/hyperledger/firefly-common/pkg/log) - Translation (i18n) - [pkg/i18n](https://pkg.go.dev/github.com/hyperledger/firefly-common/pkg/i18n) - Configuration - [pkg/config](https://pkg.go.dev/github.com/hyperledger/firefly-common/pkg/config) diff --git a/go.mod b/go.mod index 615e06b..6964bbc 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/rs/cors v1.8.2 github.com/sirupsen/logrus v1.8.1 - github.com/spf13/viper v1.11.0 + github.com/spf13/viper v1.12.0 github.com/stretchr/testify v1.7.1 github.com/x-cray/logrus-prefixed-formatter v0.5.2 golang.org/x/text v0.3.7 @@ -29,30 +29,29 @@ require ( github.com/go-openapi/swag v0.19.5 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/invopop/yaml v0.1.0 // indirect - github.com/kr/pretty v0.2.0 // indirect github.com/magiconair/properties v1.8.6 // indirect github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect - github.com/mitchellh/mapstructure v1.4.3 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/onsi/ginkgo v1.16.5 // indirect github.com/onsi/gomega v1.19.0 // indirect - github.com/pelletier/go-toml v1.9.4 // indirect - github.com/pelletier/go-toml/v2 v2.0.0-beta.8 // indirect + github.com/pelletier/go-toml v1.9.5 // indirect + github.com/pelletier/go-toml/v2 v2.0.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/afero v1.8.2 // indirect - github.com/spf13/cast v1.4.1 // indirect + github.com/spf13/cast v1.5.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.1.1 // indirect - github.com/subosito/gotenv v1.2.0 // indirect - golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect - golang.org/x/net v0.0.0-20220412020605-290c469a71a5 // indirect - golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect - golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect + github.com/subosito/gotenv v1.3.0 // indirect + golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect + golang.org/x/net v0.0.0-20220531201128-c960675eff93 // indirect + golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect + golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect - gopkg.in/ini.v1 v1.66.4 // indirect + gopkg.in/ini.v1 v1.66.6 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 37cae6f..4112aa0 100644 --- a/go.sum +++ b/go.sum @@ -38,6 +38,8 @@ cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM7 cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= @@ -63,6 +65,7 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= @@ -89,14 +92,17 @@ github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XP github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -105,14 +111,18 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= +github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/getkin/kin-openapi v0.96.0 h1:VVbcSdQAJzfc5kCLU7z2ezw84czu3rbC6UG1BGGzahY= github.com/getkin/kin-openapi v0.96.0/go.mod h1:w4lRPHiyOdwGbOkLIyk+P0qCwlu7TXPCHD/64nSXzgE= @@ -123,8 +133,10 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= @@ -183,6 +195,8 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -214,11 +228,13 @@ github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pf github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= @@ -256,24 +272,30 @@ github.com/invopop/yaml v0.1.0 h1:YW3WGUoJEXYfzWBjn00zIlrw7brGVD0fUKRYDPAPhrc= github.com/invopop/yaml v0.1.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= github.com/jarcoal/httpmock v1.1.0 h1:F47ChZj1Y2zFsCXxNkBPwNNKnAyOATcdQibk0qEdVCE= github.com/jarcoal/httpmock v1.1.0/go.mod h1:ATjnClrvW/3tijVmpL/va5Z3aAyGvqU3gCT8nX0Txik= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -302,14 +324,16 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= @@ -326,10 +350,10 @@ github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= -github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.0-beta.8 h1:dy81yyLYJDwMTifq24Oi/IslOslRrDSb3jwDggjz3Z0= -github.com/pelletier/go-toml/v2 v2.0.0-beta.8/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.0.1 h1:8e3L2cCQzLFi2CR4g7vGFuFxX7Jl1kKX8gW+iV0GUKU= +github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -342,37 +366,46 @@ github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSg github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sagikazarmark/crypt v0.5.0/go.mod h1:l+nzl7KWh51rpzp2h7t4MZWyiEWdhNpOAnclKvg+mdA= +github.com/sagikazarmark/crypt v0.6.0/go.mod h1:U8+INwJo3nBv1m6A/8OBXAq7Jnpspk5AxSgDyEQcea8= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= -github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= -github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.11.0 h1:7OX/1FS6n7jHD1zGrZTM7WtY13ZELRyosK4k93oPr44= -github.com/spf13/viper v1.11.0/go.mod h1:djo0X/bA5+tYVoCn+C7cAYJGcVn/qYLFTG8gdUsX7Zk= +github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= +github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -384,8 +417,8 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI= +github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJzfthRT6usrui8uGmg= github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= @@ -394,9 +427,10 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.etcd.io/etcd/api/v3 v3.5.2/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= -go.etcd.io/etcd/client/pkg/v3 v3.5.2/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.2/go.mod h1:2D7ZejHVMIfog1221iLSYlQRzrtECw3kz4I4VAQm3qI= +go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= +go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.4/go.mod h1:Ud+VUwIi9/uQHOMA+4ekToJ12lTxlv0zB/+DHwTGEbU= +go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -417,8 +451,9 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA= golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -502,8 +537,11 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5 h1:bRb386wvrE+oBNdF1d/Xh9mQrfQ4ecYhW5qJ5GvTGT4= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220531201128-c960675eff93 h1:MYimHLfoXEpOhqd/zgoA/uoXzHB86AEky4LAx5ij9xA= +golang.org/x/net v0.0.0-20220531201128-c960675eff93/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -535,6 +573,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -560,6 +599,7 @@ golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -574,6 +614,8 @@ golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -582,6 +624,7 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -594,6 +637,7 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -610,11 +654,14 @@ golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 h1:CBpWXWQpIRjzmkkA+M7q9Fqnwd2mZr3AFqexg8YTfoM= +golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -689,6 +736,7 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -725,6 +773,9 @@ google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQ google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.81.0/go.mod h1:FA6Mb/bZxj706H2j+j2d6mHEEaHBmbbWnkfvmorOCko= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -804,6 +855,12 @@ google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2 google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -832,6 +889,8 @@ google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9K google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -854,8 +913,9 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogR gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.6 h1:LATuAqN/shcYAOkv3wl2L4rkaKqkcgTBQjOyYDvcPKI= +gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= @@ -884,3 +944,4 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/pkg/ffcapi/api_common.go b/pkg/ffcapi/api_common.go deleted file mode 100644 index d5a29ff..0000000 --- a/pkg/ffcapi/api_common.go +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright © 2022 Kaleido, Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ffcapi - -import ( - "github.com/hyperledger/firefly-common/pkg/fftypes" -) - -// RequestType for each request is defined in the individual file -type RequestType string - -// Semver API versioning -type Version string - -const ( - Version1_0_0 Version = "v1.0.0" -) - -const VersionCurrent = Version1_0_0 - -type Variant string - -const ( - VariantEVM Variant = "evm" -) - -// ErrorReason are a set of standard error conditions that a blockchain connector can return -// from execution, that affect the action of the transaction manager to the response. -// It is important that error mapping is performed for each of these classification -type ErrorReason string - -const ( - // ErrorReasonInvalidInputs transaction inputs could not be parsed by the connector according to the interface (nothing was sent to the blockchain) - ErrorReasonInvalidInputs ErrorReason = "invalid_inputs" - // ErrorReasonTransactionReverted on-chain execution (only expected to be returned when the connector is doing gas estimation, or executing a query) - ErrorReasonTransactionReverted ErrorReason = "transaction_reverted" - // ErrorReasonNonceTooLow on transaction submission, if the nonce has already been used for a transaction that has made it into a block on canonical chain known to the local node - ErrorReasonNonceTooLow ErrorReason = "nonce_too_low" - // ErrorReasonTransactionUnderpriced if the transaction is rejected due to too low gas price. Either because it was too low according to the minimum configured on the node, or because it's a rescue transaction without a price bump. - ErrorReasonTransactionUnderpriced ErrorReason = "transaction_underpriced" - // ErrorReasonInsufficientFunds if the transaction is rejected due to not having enough of the underlying network coin (ether etc.) in your wallet - ErrorReasonInsufficientFunds ErrorReason = "insufficient_funds" - // ErrorReasonNotFound if the requested object (block/receipt etc.) was not found - ErrorReasonNotFound ErrorReason = "not_found" - // ErrorKnownTransaction if the exact transaction is already known - ErrorKnownTransaction ErrorReason = "known_transaction" -) - -// Header is included consistently as a "ffcapi" structure on each request -type Header struct { - RequestID *fftypes.UUID `json:"id"` // Unique for each request - Version Version `json:"version"` // The API version - Variant Variant `json:"variant"` // Defines the format of the input/output bodies, which FFTM operates pass-through on from FireFly core to the Blockchain connector - RequestType RequestType `json:"type"` // The type of the request, which defines how it should be processed, and the structure of the rest of the payload -} - -// TransactionInput is a standardized set of parameters that describe a transaction submission to a blockchain. -// For convenience, ths structure is compatible with the EthConnect `SendTransaction` structure, for the subset of usage made by FireFly core / Tokens connectors. -// - Numberic values such as nonce/gas/gasPrice, are all passed as string encoded Base 10 integers -// - From/To are passed as strings, and are pass-through for FFTM from the values it receives from FireFly core after signing key resolution -// - The interface is a structure describing the method to invoke. The `variant` in the header tells you how to decode it. For variant=evm it will be an ABI method definition -// - The supplied value is passed through for each input parameter. It could be any JSON type (simple number/boolean/string, or complex object/array). The blockchain connection is responsible for serializing these according to the rules in the interface. -type TransactionInput struct { - TransactionHeaders - Method fftypes.JSONAny `json:"method"` - Params []*fftypes.JSONAny `json:"params"` -} - -type TransactionHeaders struct { - From string `json:"from"` - To string `json:"to,omitempty"` - Nonce *fftypes.FFBigInt `json:"nonce,omitempty"` - Gas *fftypes.FFBigInt `json:"gas,omitempty"` - Value *fftypes.FFBigInt `json:"value,omitempty"` -} - -type BlockInfo struct { - BlockNumber *fftypes.FFBigInt `json:"blockNumber"` - BlockHash string `json:"blockHash"` - ParentHash string `json:"parentHash"` - TransactionHashes []string `json:"transactionHashes"` -} - -// ErrorResponse allows blockchain connectors to encode useful information about an error in a JSON response body. -// This should be accompanied with a suitable non-success HTTP response code. However, the "reason" (if supplied) -// is the only information that will be used to change the transaction manager's handling of the error. -type ErrorResponse struct { - Reason ErrorReason `json:"reason,omitempty"` - Error string `json:"error"` -} - -type RequestBase struct { - FFCAPI Header `json:"ffcapi"` -} - -func (r *RequestBase) FFCAPIHeader() *Header { - return &r.FFCAPI -} - -type ResponseBase struct { - ErrorResponse -} - -func (r *ResponseBase) ErrorMessage() string { - return r.Error -} - -func (r *ResponseBase) ErrorReason() ErrorReason { - return r.Reason -} - -type ffcapiRequest interface { - FFCAPIHeader() *Header - RequestType() RequestType -} - -type ffcapiResponse interface { - ErrorMessage() string - ErrorReason() ErrorReason -} - -type RequestID string - -func initHeader(header *Header, variant Variant, requestType RequestType) { - header.RequestID = fftypes.NewUUID() - header.Version = VersionCurrent - header.Variant = variant - header.RequestType = requestType -} diff --git a/pkg/ffcapi/apiclient.go b/pkg/ffcapi/apiclient.go deleted file mode 100644 index fa6a862..0000000 --- a/pkg/ffcapi/apiclient.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright © 2022 Kaleido, Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ffcapi - -import ( - "context" - "strings" - - "github.com/go-resty/resty/v2" - "github.com/hyperledger/firefly-common/pkg/config" - "github.com/hyperledger/firefly-common/pkg/ffresty" - "github.com/hyperledger/firefly-common/pkg/i18n" -) - -type API interface { - CreateBlockListener(ctx context.Context, req *CreateBlockListenerRequest) (*CreateBlockListenerResponse, ErrorReason, error) - ExecQuery(ctx context.Context, req *ExecQueryRequest) (*ExecQueryResponse, ErrorReason, error) - GetBlockInfoByHash(ctx context.Context, req *GetBlockInfoByHashRequest) (*GetBlockInfoByHashResponse, ErrorReason, error) - GetBlockInfoByNumber(ctx context.Context, req *GetBlockInfoByNumberRequest) (*GetBlockInfoByNumberResponse, ErrorReason, error) - GetGasPrice(ctx context.Context, req *GetGasPriceRequest) (*GetGasPriceResponse, ErrorReason, error) - GetNewBlockHashes(ctx context.Context, req *GetNewBlockHashesRequest) (*GetNewBlockHashesResponse, ErrorReason, error) - GetNextNonce(ctx context.Context, req *GetNextNonceRequest) (*GetNextNonceResponse, ErrorReason, error) - GetReceipt(ctx context.Context, req *GetReceiptRequest) (*GetReceiptResponse, ErrorReason, error) - PrepareTransaction(ctx context.Context, req *PrepareTransactionRequest) (*PrepareTransactionResponse, ErrorReason, error) - SendTransaction(ctx context.Context, req *SendTransactionRequest) (*SendTransactionResponse, ErrorReason, error) -} - -type apiClient struct { - client *resty.Client - variant Variant -} - -func NewFFCAPIClient(ctx context.Context, ffrestyConfig config.Section, variant Variant) API { - return &apiClient{ - client: ffresty.New(ctx, ffrestyConfig), - variant: variant, - } -} - -func (a *apiClient) invokeAPI(ctx context.Context, input ffcapiRequest, output ffcapiResponse) (ErrorReason, error) { - - initHeader(input.FFCAPIHeader(), a.variant, input.RequestType()) - res, err := a.client.R(). - SetBody(input). - SetResult(output). - SetError(output). - Post("/") - if err != nil { - return "", i18n.WrapError(ctx, err, i18n.MsgConnectorFailInvoke, input.FFCAPIHeader().RequestID) - } - if !strings.Contains(res.Header().Get("Content-Type"), "application/json") { - return "", i18n.NewError(ctx, i18n.MsgConnectorInvalidContentType, input.FFCAPIHeader().RequestID, res.Header().Get("Content-Type")) - } - if res.IsError() { - return output.ErrorReason(), i18n.NewError(ctx, i18n.MsgConnectorError, input.FFCAPIHeader().RequestID, output.ErrorReason(), output.ErrorMessage()) - } - - return "", nil -} diff --git a/pkg/ffcapi/apiclient_test.go b/pkg/ffcapi/apiclient_test.go deleted file mode 100644 index 8b91d19..0000000 --- a/pkg/ffcapi/apiclient_test.go +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright © 2022 Kaleido, Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ffcapi - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "net/http/httptest" - "testing" - - "github.com/hyperledger/firefly-common/pkg/config" - "github.com/hyperledger/firefly-common/pkg/ffresty" - "github.com/stretchr/testify/assert" -) - -func newTestClient(t *testing.T, response ffcapiResponse) (*apiClient, func()) { - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - assert.Contains(t, "application/json", r.Header.Get("Content-Type")) - assert.Equal(t, http.MethodPost, r.Method) - w.Header().Set("Content-Type", "application/json; charset=utf-8") - resBytes, err := json.Marshal(response) - w.Header().Set("Content-Length", fmt.Sprintf("%d", len(resBytes))) - if response.ErrorMessage() != "" { - w.WriteHeader(500) - } - _, err = w.Write(resBytes) - assert.NoError(t, err) - })) - section := config.RootSection("unittest") - ffresty.InitConfig(section) - section.Set(ffresty.HTTPConfigURL, fmt.Sprintf("http://%s", server.Listener.Addr())) - ctx := context.Background() - api := NewFFCAPIClient(ctx, section, VariantEVM) - return api.(*apiClient), server.Close -} - -func TestBadResponseContentType(t *testing.T) { - - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.Write([]byte("not JSON")) - })) - defer server.Close() - section := config.RootSection("unittest") - ffresty.InitConfig(section) - section.Set(ffresty.HTTPConfigURL, fmt.Sprintf("http://%s", server.Listener.Addr())) - ctx := context.Background() - - api := NewFFCAPIClient(ctx, section, VariantEVM).(*apiClient) - _, err := api.invokeAPI(ctx, &ExecQueryRequest{}, &ResponseBase{}) - assert.Regexp(t, "FF00156", err) - -} - -func TestBadResponseError(t *testing.T) { - - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.Write([]byte("not JSON")) - })) - config.RootConfigReset() - section := config.RootSection("ffcapi_tests") - ffresty.InitConfig(section) - section.Set(ffresty.HTTPConfigURL, fmt.Sprintf("http://%s", server.Listener.Addr())) - ctx := context.Background() - - server.Close() - api := NewFFCAPIClient(ctx, section, VariantEVM) - _, _, err := api.ExecQuery(ctx, &ExecQueryRequest{}) - assert.Regexp(t, "FF00155", err) - -} diff --git a/pkg/ffcapi/create_block_listener.go b/pkg/ffcapi/create_block_listener.go deleted file mode 100644 index 467ebe6..0000000 --- a/pkg/ffcapi/create_block_listener.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright © 2022 Kaleido, Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ffcapi - -import "context" - -type CreateBlockListenerRequest struct { - RequestBase -} - -type CreateBlockListenerResponse struct { - ResponseBase - ListenerID string `json:"listenerId"` -} - -const RequestTypeCreateBlockListener = "create_block_listener" - -func (r *CreateBlockListenerRequest) RequestType() RequestType { - return RequestTypeCreateBlockListener -} - -func (a *apiClient) CreateBlockListener(ctx context.Context, req *CreateBlockListenerRequest) (*CreateBlockListenerResponse, ErrorReason, error) { - res := &CreateBlockListenerResponse{} - reason, err := a.invokeAPI(ctx, req, res) - if err != nil { - return nil, reason, err - } - return res, "", nil -} diff --git a/pkg/ffcapi/create_block_listener_test.go b/pkg/ffcapi/create_block_listener_test.go deleted file mode 100644 index 19907ff..0000000 --- a/pkg/ffcapi/create_block_listener_test.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright © 2022 Kaleido, Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ffcapi - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestCreateBlockListenerOK(t *testing.T) { - a, cancel := newTestClient(t, &CreateBlockListenerResponse{ - ListenerID: "0x12345", - }) - defer cancel() - res, reason, err := a.CreateBlockListener(context.Background(), &CreateBlockListenerRequest{}) - assert.NoError(t, err) - assert.Empty(t, reason) - assert.Equal(t, "0x12345", res.ListenerID) -} - -func TestCreateBlockListenerFail(t *testing.T) { - a, cancel := newTestClient(t, &ResponseBase{ - ErrorResponse: ErrorResponse{ - Error: "pop", - Reason: ErrorReasonInvalidInputs, - }, - }) - defer cancel() - _, reason, err := a.CreateBlockListener(context.Background(), &CreateBlockListenerRequest{}) - assert.Equal(t, ErrorReasonInvalidInputs, reason) - assert.Regexp(t, "FF00157.*pop", err) -} diff --git a/pkg/ffcapi/exec_query.go b/pkg/ffcapi/exec_query.go deleted file mode 100644 index a328ef8..0000000 --- a/pkg/ffcapi/exec_query.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright © 2022 Kaleido, Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ffcapi - -import ( - "context" - - "github.com/hyperledger/firefly-common/pkg/fftypes" -) - -// ExecQueryRequest requests execution of a smart contract method in order to either: -// 1) Query state -// 2) Attempt to extract the revert reason from an on-chain failure to execute a transaction -// -// See the list of standard error reasons that should be returned for situations that can be -// detected by the back-end connector. -type ExecQueryRequest struct { - RequestBase - TransactionInput - BlockNumber *fftypes.FFBigInt `json:"blockNumber,omitempty"` -} - -type ExecQueryResponse struct { - ResponseBase - Outputs *fftypes.JSONAny `json:"outputs"` -} - -const RequestTypeExecQuery RequestType = "exec_query" - -func (r *ExecQueryRequest) RequestType() RequestType { - return RequestTypeExecQuery -} - -func (a *apiClient) ExecQuery(ctx context.Context, req *ExecQueryRequest) (*ExecQueryResponse, ErrorReason, error) { - res := &ExecQueryResponse{} - reason, err := a.invokeAPI(ctx, req, res) - if err != nil { - return nil, reason, err - } - return res, "", nil -} diff --git a/pkg/ffcapi/exec_query_test.go b/pkg/ffcapi/exec_query_test.go deleted file mode 100644 index 1be6373..0000000 --- a/pkg/ffcapi/exec_query_test.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright © 2022 Kaleido, Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ffcapi - -import ( - "context" - "testing" - - "github.com/hyperledger/firefly-common/pkg/fftypes" - "github.com/stretchr/testify/assert" -) - -func TestExecQueryOK(t *testing.T) { - a, cancel := newTestClient(t, &ExecQueryResponse{ - Outputs: fftypes.JSONAnyPtr(`[{ - "name": "return", - "value": "value1" - }]`), - }) - defer cancel() - res, reason, err := a.ExecQuery(context.Background(), &ExecQueryRequest{}) - assert.NoError(t, err) - assert.Empty(t, reason) - assert.Len(t, res.Outputs.JSONObjectArray(), 1) - assert.Equal(t, "value1", res.Outputs.JSONObjectArray()[0].GetString("value")) -} - -func TestExecQueryFail(t *testing.T) { - a, cancel := newTestClient(t, &ResponseBase{ - ErrorResponse: ErrorResponse{ - Error: "pop", - Reason: ErrorReasonInvalidInputs, - }, - }) - defer cancel() - _, reason, err := a.ExecQuery(context.Background(), &ExecQueryRequest{}) - assert.Equal(t, ErrorReasonInvalidInputs, reason) - assert.Regexp(t, "FF00157.*pop", err) -} diff --git a/pkg/ffcapi/get_block_info_by_hash.go b/pkg/ffcapi/get_block_info_by_hash.go deleted file mode 100644 index 62d13d7..0000000 --- a/pkg/ffcapi/get_block_info_by_hash.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright © 2022 Kaleido, Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ffcapi - -import ( - "context" -) - -type GetBlockInfoByHashRequest struct { - RequestBase - BlockHash string `json:"blockHash"` -} - -type GetBlockInfoByHashResponse struct { - ResponseBase - BlockInfo -} - -const RequestTypeGetBlockInfoByHash RequestType = "get_block_info_by_hash" - -func (r *GetBlockInfoByHashRequest) RequestType() RequestType { - return RequestTypeGetBlockInfoByHash -} - -func (a *apiClient) GetBlockInfoByHash(ctx context.Context, req *GetBlockInfoByHashRequest) (*GetBlockInfoByHashResponse, ErrorReason, error) { - res := &GetBlockInfoByHashResponse{} - reason, err := a.invokeAPI(ctx, req, res) - if err != nil { - return nil, reason, err - } - return res, "", nil -} diff --git a/pkg/ffcapi/get_block_info_by_hash_test.go b/pkg/ffcapi/get_block_info_by_hash_test.go deleted file mode 100644 index 13c4d39..0000000 --- a/pkg/ffcapi/get_block_info_by_hash_test.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright © 2022 Kaleido, Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ffcapi - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestGetBlockInfoByHashOK(t *testing.T) { - a, cancel := newTestClient(t, &GetBlockInfoByHashResponse{ - BlockInfo: BlockInfo{ - BlockHash: "0x12345", - }, - }) - defer cancel() - res, reason, err := a.GetBlockInfoByHash(context.Background(), &GetBlockInfoByHashRequest{}) - assert.NoError(t, err) - assert.Empty(t, reason) - assert.Equal(t, "0x12345", res.BlockHash) -} - -func TestGetBlockInfoByHashFail(t *testing.T) { - a, cancel := newTestClient(t, &ResponseBase{ - ErrorResponse: ErrorResponse{ - Error: "pop", - Reason: ErrorReasonInvalidInputs, - }, - }) - defer cancel() - _, reason, err := a.GetBlockInfoByHash(context.Background(), &GetBlockInfoByHashRequest{}) - assert.Equal(t, ErrorReasonInvalidInputs, reason) - assert.Regexp(t, "FF00157.*pop", err) -} diff --git a/pkg/ffcapi/get_block_info_by_number.go b/pkg/ffcapi/get_block_info_by_number.go deleted file mode 100644 index 895ee21..0000000 --- a/pkg/ffcapi/get_block_info_by_number.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright © 2022 Kaleido, Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ffcapi - -import ( - "context" - - "github.com/hyperledger/firefly-common/pkg/fftypes" -) - -type GetBlockInfoByNumberRequest struct { - RequestBase - BlockNumber *fftypes.FFBigInt `json:"blockNumber"` -} - -type GetBlockInfoByNumberResponse struct { - ResponseBase - BlockInfo -} - -const RequestTypeGetBlockInfoByNumber RequestType = "get_block_info_by_number" - -func (r *GetBlockInfoByNumberRequest) RequestType() RequestType { - return RequestTypeGetBlockInfoByNumber -} - -func (a *apiClient) GetBlockInfoByNumber(ctx context.Context, req *GetBlockInfoByNumberRequest) (*GetBlockInfoByNumberResponse, ErrorReason, error) { - res := &GetBlockInfoByNumberResponse{} - reason, err := a.invokeAPI(ctx, req, res) - if err != nil { - return nil, reason, err - } - return res, "", nil -} diff --git a/pkg/ffcapi/get_block_info_by_number_test.go b/pkg/ffcapi/get_block_info_by_number_test.go deleted file mode 100644 index e8b0a2c..0000000 --- a/pkg/ffcapi/get_block_info_by_number_test.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright © 2022 Kaleido, Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ffcapi - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestGetBlockInfoByNumberOK(t *testing.T) { - a, cancel := newTestClient(t, &GetBlockInfoByNumberResponse{ - BlockInfo: BlockInfo{ - BlockHash: "0x12345", - }, - }) - defer cancel() - res, reason, err := a.GetBlockInfoByNumber(context.Background(), &GetBlockInfoByNumberRequest{}) - assert.NoError(t, err) - assert.Empty(t, reason) - assert.Equal(t, "0x12345", res.BlockHash) -} - -func TestGetBlockInfoByNumberFail(t *testing.T) { - a, cancel := newTestClient(t, &ResponseBase{ - ErrorResponse: ErrorResponse{ - Error: "pop", - Reason: ErrorReasonInvalidInputs, - }, - }) - defer cancel() - _, reason, err := a.GetBlockInfoByNumber(context.Background(), &GetBlockInfoByNumberRequest{}) - assert.Equal(t, ErrorReasonInvalidInputs, reason) - assert.Regexp(t, "FF00157.*pop", err) -} diff --git a/pkg/ffcapi/get_gas_price.go b/pkg/ffcapi/get_gas_price.go deleted file mode 100644 index b253850..0000000 --- a/pkg/ffcapi/get_gas_price.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright © 2022 Kaleido, Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ffcapi - -import ( - "context" - - "github.com/hyperledger/firefly-common/pkg/fftypes" -) - -// GetGasPriceRequest used to do a query for the next nonce to use for a -// given signing identity. This is only used when there are no pending -// operations outstanding for this signer known to the transaction manager. -type GetGasPriceRequest struct { - RequestBase -} - -type GetGasPriceResponse struct { - ResponseBase - GasPrice *fftypes.JSONAny -} - -const RequestTypeGetGasPrice RequestType = "get_gas_price" - -func (r *GetGasPriceRequest) RequestType() RequestType { - return RequestTypeGetGasPrice -} - -func (a *apiClient) GetGasPrice(ctx context.Context, req *GetGasPriceRequest) (*GetGasPriceResponse, ErrorReason, error) { - res := &GetGasPriceResponse{} - reason, err := a.invokeAPI(ctx, req, res) - if err != nil { - return nil, reason, err - } - return res, "", nil -} diff --git a/pkg/ffcapi/get_gas_price_test.go b/pkg/ffcapi/get_gas_price_test.go deleted file mode 100644 index 5198574..0000000 --- a/pkg/ffcapi/get_gas_price_test.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright © 2022 Kaleido, Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ffcapi - -import ( - "context" - "testing" - - "github.com/hyperledger/firefly-common/pkg/fftypes" - "github.com/stretchr/testify/assert" -) - -func TestGetGasPriceOK(t *testing.T) { - a, cancel := newTestClient(t, &GetGasPriceResponse{ - GasPrice: fftypes.JSONAnyPtr(`"12345"`), - }) - defer cancel() - res, reason, err := a.GetGasPrice(context.Background(), &GetGasPriceRequest{}) - assert.NoError(t, err) - assert.Empty(t, reason) - assert.Equal(t, `"12345"`, string(*res.GasPrice)) -} - -func TestGetGasPriceFail(t *testing.T) { - a, cancel := newTestClient(t, &ResponseBase{ - ErrorResponse: ErrorResponse{ - Error: "pop", - Reason: ErrorReasonInvalidInputs, - }, - }) - defer cancel() - _, reason, err := a.GetGasPrice(context.Background(), &GetGasPriceRequest{}) - assert.Equal(t, ErrorReasonInvalidInputs, reason) - assert.Regexp(t, "FF00157.*pop", err) -} diff --git a/pkg/ffcapi/get_new_block_hashes.go b/pkg/ffcapi/get_new_block_hashes.go deleted file mode 100644 index 2f2400a..0000000 --- a/pkg/ffcapi/get_new_block_hashes.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright © 2022 Kaleido, Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ffcapi - -import "context" - -type GetNewBlockHashesRequest struct { - RequestBase - ListenerID string `json:"listenerId"` -} - -type GetNewBlockHashesResponse struct { - ResponseBase - BlockHashes []string `json:"blockHashes"` -} - -const RequestTypeGetNewBlockHashes RequestType = "get_new_block_hashes" - -func (r *GetNewBlockHashesRequest) RequestType() RequestType { - return RequestTypeGetNewBlockHashes -} - -func (a *apiClient) GetNewBlockHashes(ctx context.Context, req *GetNewBlockHashesRequest) (*GetNewBlockHashesResponse, ErrorReason, error) { - res := &GetNewBlockHashesResponse{} - reason, err := a.invokeAPI(ctx, req, res) - if err != nil { - return nil, reason, err - } - return res, "", nil -} diff --git a/pkg/ffcapi/get_new_block_hashes_test.go b/pkg/ffcapi/get_new_block_hashes_test.go deleted file mode 100644 index c2ed470..0000000 --- a/pkg/ffcapi/get_new_block_hashes_test.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright © 2022 Kaleido, Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ffcapi - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestGetNewBlockHashesOK(t *testing.T) { - a, cancel := newTestClient(t, &GetNewBlockHashesResponse{ - BlockHashes: []string{"test"}, - }) - defer cancel() - res, reason, err := a.GetNewBlockHashes(context.Background(), &GetNewBlockHashesRequest{}) - assert.NoError(t, err) - assert.Empty(t, reason) - assert.Equal(t, []string{"test"}, res.BlockHashes) -} - -func TestGetNewBlockHashesFail(t *testing.T) { - a, cancel := newTestClient(t, &ResponseBase{ - ErrorResponse: ErrorResponse{ - Error: "pop", - Reason: ErrorReasonInvalidInputs, - }, - }) - defer cancel() - _, reason, err := a.GetNewBlockHashes(context.Background(), &GetNewBlockHashesRequest{}) - assert.Equal(t, ErrorReasonInvalidInputs, reason) - assert.Regexp(t, "FF00157.*pop", err) -} diff --git a/pkg/ffcapi/get_next_nonce.go b/pkg/ffcapi/get_next_nonce.go deleted file mode 100644 index a404856..0000000 --- a/pkg/ffcapi/get_next_nonce.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright © 2022 Kaleido, Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ffcapi - -import ( - "context" - - "github.com/hyperledger/firefly-common/pkg/fftypes" -) - -// GetNextNonceRequest used to do a query for the next nonce to use for a -// given signing identity. This is only used when there are no pending -// operations outstanding for this signer known to the transaction manager. -type GetNextNonceRequest struct { - RequestBase - Signer string `json:"signer"` -} - -type GetNextNonceResponse struct { - ResponseBase - Nonce *fftypes.FFBigInt `json:"nonce"` -} - -const RequestTypeGetNextNonce RequestType = "get_next_nonce" - -func (r *GetNextNonceRequest) RequestType() RequestType { - return RequestTypeGetNextNonce -} - -func (a *apiClient) GetNextNonce(ctx context.Context, req *GetNextNonceRequest) (*GetNextNonceResponse, ErrorReason, error) { - res := &GetNextNonceResponse{} - reason, err := a.invokeAPI(ctx, req, res) - if err != nil { - return nil, reason, err - } - return res, "", nil -} diff --git a/pkg/ffcapi/get_next_nonce_test.go b/pkg/ffcapi/get_next_nonce_test.go deleted file mode 100644 index 6859e7b..0000000 --- a/pkg/ffcapi/get_next_nonce_test.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright © 2022 Kaleido, Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ffcapi - -import ( - "context" - "testing" - - "github.com/hyperledger/firefly-common/pkg/fftypes" - "github.com/stretchr/testify/assert" -) - -func TestGetNextNonceOK(t *testing.T) { - a, cancel := newTestClient(t, &GetNextNonceResponse{ - Nonce: fftypes.NewFFBigInt(10), - }) - defer cancel() - res, reason, err := a.GetNextNonce(context.Background(), &GetNextNonceRequest{}) - assert.NoError(t, err) - assert.Empty(t, reason) - assert.Equal(t, int64(10), res.Nonce.Int64()) -} - -func TestGetNextNonceFail(t *testing.T) { - a, cancel := newTestClient(t, &ResponseBase{ - ErrorResponse: ErrorResponse{ - Error: "pop", - Reason: ErrorReasonInvalidInputs, - }, - }) - defer cancel() - _, reason, err := a.GetNextNonce(context.Background(), &GetNextNonceRequest{}) - assert.Equal(t, ErrorReasonInvalidInputs, reason) - assert.Regexp(t, "FF00157.*pop", err) -} diff --git a/pkg/ffcapi/get_receipt.go b/pkg/ffcapi/get_receipt.go deleted file mode 100644 index 2d86789..0000000 --- a/pkg/ffcapi/get_receipt.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright © 2022 Kaleido, Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ffcapi - -import ( - "context" - - "github.com/hyperledger/firefly-common/pkg/fftypes" -) - -type GetReceiptRequest struct { - RequestBase - TransactionHash string `json:"transactionHash"` -} - -type GetReceiptResponse struct { - ResponseBase - BlockNumber *fftypes.FFBigInt `json:"blockNumber"` - TransactionIndex *fftypes.FFBigInt `json:"transactinIndex"` - BlockHash string `json:"blockHash"` - Success bool `json:"success"` - ExtraInfo fftypes.JSONAny `json:"extraInfo"` -} - -const RequestTypeGetReceipt RequestType = "get_receipt" - -func (r *GetReceiptRequest) RequestType() RequestType { - return RequestTypeGetReceipt -} - -func (a *apiClient) GetReceipt(ctx context.Context, req *GetReceiptRequest) (*GetReceiptResponse, ErrorReason, error) { - res := &GetReceiptResponse{} - reason, err := a.invokeAPI(ctx, req, res) - if err != nil { - return nil, reason, err - } - return res, "", nil -} diff --git a/pkg/ffcapi/get_receipt_test.go b/pkg/ffcapi/get_receipt_test.go deleted file mode 100644 index 0f6b880..0000000 --- a/pkg/ffcapi/get_receipt_test.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright © 2022 Kaleido, Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ffcapi - -import ( - "context" - "testing" - - "github.com/hyperledger/firefly-common/pkg/fftypes" - "github.com/stretchr/testify/assert" -) - -func TestGetReceiptOK(t *testing.T) { - a, cancel := newTestClient(t, &GetReceiptResponse{ - BlockNumber: fftypes.NewFFBigInt(10), - }) - defer cancel() - res, reason, err := a.GetReceipt(context.Background(), &GetReceiptRequest{}) - assert.NoError(t, err) - assert.Empty(t, reason) - assert.Equal(t, int64(10), res.BlockNumber.Int64()) -} - -func TestGetReceiptFail(t *testing.T) { - a, cancel := newTestClient(t, &ResponseBase{ - ErrorResponse: ErrorResponse{ - Error: "pop", - Reason: ErrorReasonInvalidInputs, - }, - }) - defer cancel() - _, reason, err := a.GetReceipt(context.Background(), &GetReceiptRequest{}) - assert.Equal(t, ErrorReasonInvalidInputs, reason) - assert.Regexp(t, "FF00157.*pop", err) -} diff --git a/pkg/ffcapi/prepare_transaction.go b/pkg/ffcapi/prepare_transaction.go deleted file mode 100644 index 5b492d5..0000000 --- a/pkg/ffcapi/prepare_transaction.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright © 2022 Kaleido, Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ffcapi - -import ( - "context" - - "github.com/hyperledger/firefly-common/pkg/fftypes" -) - -// PrepareTransactionRequest is used to prepare a set of JSON formatted developer friendly -// inputs, into a raw transaction ready for submission to the blockchain. -// -// The connector is responsible for encoding the transaction ready for sumission, -// and returning the hash for the transaction as well as a string serialization of -// the pre-signed raw transaction in a format of its own choosing (hex etc.). -// The hash is expected to be a function of: -// - the method signature -// - the signing identity -// - the nonce -// - the particular blockchain the transaction is submitted to -// - the input parameters -// -// If "gas" is not supplied, the connector is expected to perform gas estimation -// prior to generating the payload. -// -// See the list of standard error reasons that should be returned for situations that can be -// detected by the back-end connector. -type PrepareTransactionRequest struct { - RequestBase - TransactionInput -} - -type PrepareTransactionResponse struct { - ResponseBase - Gas *fftypes.FFBigInt `json:"gas"` - TransactionData string `json:"transactionData"` -} - -const RequestTypePrepareTransaction RequestType = "prepare_transaction" - -func (r *PrepareTransactionRequest) RequestType() RequestType { - return RequestTypePrepareTransaction -} - -func (a *apiClient) PrepareTransaction(ctx context.Context, req *PrepareTransactionRequest) (*PrepareTransactionResponse, ErrorReason, error) { - res := &PrepareTransactionResponse{} - reason, err := a.invokeAPI(ctx, req, res) - if err != nil { - return nil, reason, err - } - return res, "", nil -} diff --git a/pkg/ffcapi/prepare_transaction_test.go b/pkg/ffcapi/prepare_transaction_test.go deleted file mode 100644 index dd4b211..0000000 --- a/pkg/ffcapi/prepare_transaction_test.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright © 2022 Kaleido, Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ffcapi - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestPrepareTransactionOK(t *testing.T) { - a, cancel := newTestClient(t, &PrepareTransactionResponse{ - TransactionData: "0x12345", - }) - defer cancel() - res, reason, err := a.PrepareTransaction(context.Background(), &PrepareTransactionRequest{}) - assert.NoError(t, err) - assert.Empty(t, reason) - assert.Equal(t, "0x12345", res.TransactionData) -} - -func TestPrepareTransactionFail(t *testing.T) { - a, cancel := newTestClient(t, &ResponseBase{ - ErrorResponse: ErrorResponse{ - Error: "pop", - Reason: ErrorReasonInvalidInputs, - }, - }) - defer cancel() - _, reason, err := a.PrepareTransaction(context.Background(), &PrepareTransactionRequest{}) - assert.Equal(t, ErrorReasonInvalidInputs, reason) - assert.Regexp(t, "FF00157.*pop", err) -} diff --git a/pkg/ffcapi/send_transaction.go b/pkg/ffcapi/send_transaction.go deleted file mode 100644 index 0909277..0000000 --- a/pkg/ffcapi/send_transaction.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright © 2022 Kaleido, Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ffcapi - -import ( - "context" - - "github.com/hyperledger/firefly-common/pkg/fftypes" -) - -// SendTransactionRequest is used to send a transaction to the blockchain. -// The connector is responsible for adding it to the transaction pool of the blockchain, -// noting the transaction hash has already been calculated in the prepare step previously. -type SendTransactionRequest struct { - RequestBase - GasPrice *fftypes.JSONAny `json:"gasPrice,omitempty"` // can be a simple string/number, or a complex object - contract is between policy engine and blockchain connector - TransactionHeaders - TransactionData string `json:"transactionData"` -} - -type SendTransactionResponse struct { - ResponseBase - TransactionHash string `json:"transactionHash"` -} - -const RequestTypeSendTransaction RequestType = "send_transaction" - -func (r *SendTransactionRequest) RequestType() RequestType { - return RequestTypeSendTransaction -} - -func (a *apiClient) SendTransaction(ctx context.Context, req *SendTransactionRequest) (*SendTransactionResponse, ErrorReason, error) { - res := &SendTransactionResponse{} - reason, err := a.invokeAPI(ctx, req, res) - if err != nil { - return nil, reason, err - } - return res, "", nil -} diff --git a/pkg/ffcapi/send_transaction_test.go b/pkg/ffcapi/send_transaction_test.go deleted file mode 100644 index 246d910..0000000 --- a/pkg/ffcapi/send_transaction_test.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright © 2022 Kaleido, Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ffcapi - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestSendTransactionOK(t *testing.T) { - a, cancel := newTestClient(t, &SendTransactionResponse{}) - defer cancel() - res, reason, err := a.SendTransaction(context.Background(), &SendTransactionRequest{}) - assert.NoError(t, err) - assert.Empty(t, reason) - assert.NotNil(t, res) -} - -func TestSendTransactionFail(t *testing.T) { - a, cancel := newTestClient(t, &ResponseBase{ - ErrorResponse: ErrorResponse{ - Error: "pop", - Reason: ErrorReasonInvalidInputs, - }, - }) - defer cancel() - _, reason, err := a.SendTransaction(context.Background(), &SendTransactionRequest{}) - assert.Equal(t, ErrorReasonInvalidInputs, reason) - assert.Regexp(t, "FF00157.*pop", err) -} From 310210a6fdc4fa247c735bbbbe8598e09c89329a Mon Sep 17 00:00:00 2001 From: Peter Broadhurst Date: Thu, 2 Jun 2022 15:34:41 -0400 Subject: [PATCH 2/2] Remove two unused fields from FFAPI interface Signed-off-by: Peter Broadhurst --- pkg/ffapi/apirequest.go | 1 - pkg/ffapi/handler.go | 1 - 2 files changed, 2 deletions(-) diff --git a/pkg/ffapi/apirequest.go b/pkg/ffapi/apirequest.go index 8152432..f36ea60 100644 --- a/pkg/ffapi/apirequest.go +++ b/pkg/ffapi/apirequest.go @@ -28,6 +28,5 @@ type APIRequest struct { Input interface{} Part *Multipart SuccessStatus int - APIBaseURL string ResponseHeaders http.Header } diff --git a/pkg/ffapi/handler.go b/pkg/ffapi/handler.go index d1ffbff..0fc76dd 100644 --- a/pkg/ffapi/handler.go +++ b/pkg/ffapi/handler.go @@ -36,7 +36,6 @@ import ( type HandlerFactory struct { DefaultRequestTimeout time.Duration - MinTimeout time.Duration MaxTimeout time.Duration }