From 02c76f52bffe1e65d13f75ee9ca26b32cfebf389 Mon Sep 17 00:00:00 2001 From: Adrian Gallagher Date: Tue, 24 Feb 2026 11:34:23 +1100 Subject: [PATCH] codespell: Automate detection of more words and fix spelling issues (#2172) * codespell: Automate detection of more words and fix spelling issues * refactor(tests): Improve comments for websocket stream key test and remove redundant lines * codespell: Add missing newline at end of .codespellrc file * Update contrib/spellcheck/codespell_custom_dictionary.txt Co-authored-by: Scott * fix: update comments for consistency in British English spelling and improve clarity - Changed "behavior" to "behaviour" in multiple comments across various files. - Updated "canceled" to "cancelled" in documentation and comments for consistency. - Improved comment clarity by rephrasing and ensuring self-explanatory language. --------- Co-authored-by: Scott --- .codespellrc | 3 +- .github/workflows/spell-checker.yml | 2 + .../exchanges_templates/orders.tmpl | 2 +- .../exchanges_templates/validate.tmpl | 10 +- cmd/gctcli/commands.go | 14 +- cmd/gctcli/websocket_management.go | 2 +- common/common.go | 2 +- .../codespell_custom_dictionary.txt | 64 + contrib/spellcheck/exclude_lines.txt | 38 + contrib/spellcheck/ignore_words.txt | 2 +- currency/code.go | 2 +- currency/coinmarketcap/coinmarketcap.go | 4 +- currency/currencies.go | 4 +- currency/pairs.go | 4 +- database/repository/withdraw/withdraw_test.go | 2 +- docs/CODING_GUIDELINES.md | 2 +- docs/WS_ORDER_EVENTS.md | 6 +- engine/helpers_test.go | 195 +- engine/order_manager.go | 4 +- engine/rpcserver.go | 12 +- exchange/websocket/buffer/buffer_test.go | 10 +- exchanges/asset/asset.go | 2 +- exchanges/binance/binance.go | 2 +- exchanges/binance/binance_types.go | 42 +- exchanges/binance/binance_wrapper.go | 8 +- exchanges/binanceus/binanceus_test.go | 65 +- exchanges/binanceus/binanceus_types.go | 29 +- exchanges/binanceus/binanceus_wrapper.go | 2 +- exchanges/bitfinex/bitfinex.go | 2 +- exchanges/bitfinex/bitfinex_test.go | 34 +- exchanges/bitstamp/bitstamp_type_convert.go | 2 +- exchanges/btcmarkets/btcmarkets_test.go | 6 +- exchanges/btcmarkets/btcmarkets_types.go | 4 +- exchanges/bybit/bybit.go | 4 +- exchanges/bybit/bybit_test.go | 10 +- exchanges/coinbase/coinbase_test.go | 2 +- exchanges/coinut/coinut.go | 2 +- exchanges/credentials_test.go | 24 +- exchanges/deribit/deribit.go | 8 +- exchanges/deribit/deribit_test.go | 16 +- exchanges/deribit/deribit_types.go | 4 +- exchanges/deribit/deribit_ws_endpoints.go | 8 +- exchanges/futures/futures.go | 2 +- exchanges/gateio/gateio.go | 12 +- exchanges/gateio/gateio_test.go | 21 +- exchanges/gateio/gateio_types.go | 6 +- exchanges/gemini/gemini.go | 2 +- exchanges/gemini/gemini_types.go | 4 +- exchanges/hitbtc/hitbtc.go | 2 +- exchanges/hitbtc/hitbtc_types.go | 14 +- exchanges/kline/kline.go | 4 +- exchanges/kline/kline_test.go | 4 +- exchanges/kline/kline_types.go | 4 +- exchanges/kucoin/kucoin.go | 12 +- exchanges/kucoin/kucoin_ratelimit.go | 4 +- exchanges/kucoin/kucoin_test.go | 14 +- exchanges/kucoin/kucoin_types.go | 2 +- exchanges/kucoin/kucoin_websocket.go | 2 +- exchanges/mock/recording_test.go | 4 +- exchanges/okx/okx.go | 30 +- exchanges/okx/okx_test.go | 2 +- exchanges/okx/okx_type_convert.go | 2 +- exchanges/okx/okx_types.go | 82 +- exchanges/okx/okx_websocket.go | 4 +- exchanges/okx/ratelimit.go | 4 +- exchanges/okx/ratelimiter_test.go | 4 +- exchanges/order/README.md | 2 +- exchanges/order/orders.go | 2 +- exchanges/order/timeinforce.go | 2 +- exchanges/orderbook/orderbook_test.go | 8 +- exchanges/poloniex/poloniex_futures.go | 2 +- exchanges/poloniex/poloniex_futures_types.go | 10 +- exchanges/poloniex/poloniex_types.go | 4 +- exchanges/request/limit_test.go | 2 +- exchanges/request/request_types.go | 2 +- exchanges/subscription/subscription.go | 2 +- exchanges/ticker/ticker_test.go | 8 +- exchanges/validate/README.md | 10 +- gctrpc/rpc.pb.go | 84 +- gctrpc/rpc.pb.gw.go | 5792 ++++++----------- gctrpc/rpc.proto | 8 +- gctrpc/rpc.swagger.json | 34 +- gctrpc/rpc_grpc.pb.go | 874 ++- gctscript/examples/account.gct | 2 +- .../modules/ta/indicators/indicators_test.go | 2 +- gctscript/wrappers/validator/validator.go | 2 +- portfolio/portfolio_test.go | 2 +- types/time.go | 6 +- 88 files changed, 3016 insertions(+), 4745 deletions(-) create mode 100644 contrib/spellcheck/codespell_custom_dictionary.txt diff --git a/.codespellrc b/.codespellrc index bafcaf3cbe2..a6cc222d57f 100644 --- a/.codespellrc +++ b/.codespellrc @@ -1,5 +1,6 @@ [codespell] -skip = ./.git,./web,./currency/code_types.go,*.json,*.sum,*.html,./vendor +skip = ./.git,./web,./currency/code_types.go,*.json,*.sum,*.html,./vendor,./contrib/spellcheck/codespell_custom_dictionary.txt exclude-file = ./contrib/spellcheck/exclude_lines.txt ignore-words = ./contrib/spellcheck/ignore_words.txt ignore-regex = currency\.\w+ +dictionary = ./contrib/spellcheck/codespell_custom_dictionary.txt,- \ No newline at end of file diff --git a/.github/workflows/spell-checker.yml b/.github/workflows/spell-checker.yml index 0c922de36e5..37a4012309e 100644 --- a/.github/workflows/spell-checker.yml +++ b/.github/workflows/spell-checker.yml @@ -7,3 +7,5 @@ jobs: steps: - uses: actions/checkout@v6 - uses: codespell-project/actions-codespell@master + with: + args: --dictionary=-,./contrib/spellcheck/codespell_custom_dictionary.txt diff --git a/cmd/documentation/exchanges_templates/orders.tmpl b/cmd/documentation/exchanges_templates/orders.tmpl index 81e1918572d..e382140ea51 100644 --- a/cmd/documentation/exchanges_templates/orders.tmpl +++ b/cmd/documentation/exchanges_templates/orders.tmpl @@ -7,7 +7,7 @@ - Deletion of order - Order tracking -+ For futures orders, this package also contains a futures position controller. It is responsible for tracking all futures orders that GoCryptoTrader processes. It keeps a running history of realised and unreaslied PNL to allow a trader to track their profits. Positions are closed once the exposure reaches zero, then upon a new futures order being processed, a new position is created. To view futures positions, see the GRPC command `getfuturesposition` ++ For futures orders, this package also contains a futures position controller. It is responsible for tracking all futures orders that GoCryptoTrader processes. It keeps a running history of realised and unrealised PNL to allow a trader to track their profits. Positions are closed once the exposure reaches zero, then upon a new futures order being processed, a new position is created. To view futures positions, see the GRPC command `getfuturesposition` {{template "donations" .}} {{end}} diff --git a/cmd/documentation/exchanges_templates/validate.tmpl b/cmd/documentation/exchanges_templates/validate.tmpl index fcad7cabf21..8eb0807f045 100644 --- a/cmd/documentation/exchanges_templates/validate.tmpl +++ b/cmd/documentation/exchanges_templates/validate.tmpl @@ -21,9 +21,9 @@ type Critical struct { } // define validation and add a variadic param -func (supercritcalinfo *Critical) Validate(opt ...validate.Checker) error { +func (superCriticalInfo *Critical) Validate(opt ...validate.Checker) error { // define base level validation - if supercritcalinfo != nil { + if superCriticalInfo != nil { // oh no this is nil, could panic program! } @@ -44,10 +44,10 @@ func (supercritcalinfo *Critical) Validate(opt ...validate.Checker) error { // define an exchange or package level check that returns a validate.Checker // interface -func (supercritcalinfo *Critical) PleaseDontSendMoneyToParents() validate.Checker { +func (superCriticalInfo *Critical) PleaseDontSendMoneyToParents() validate.Checker { return validate.Check(func() error { - if supercritcalinfo.Person == "Mother Dearest" || - supercritcalinfo.Person == "Father Dearest" { + if superCriticalInfo.Person == "Mother Dearest" || + superCriticalInfo.Person == "Father Dearest" { return errors.New("nope") } return nil diff --git a/cmd/gctcli/commands.go b/cmd/gctcli/commands.go index 3219b189e84..d9c51216e0e 100644 --- a/cmd/gctcli/commands.go +++ b/cmd/gctcli/commands.go @@ -2749,7 +2749,7 @@ var withdrawalRequestCommand = &cli.Command{ Usage: "withdrawal id", }, }, - Action: withdrawlRequestByID, + Action: withdrawalRequestByID, }, { Name: "byexchangeid", @@ -2765,7 +2765,7 @@ var withdrawalRequestCommand = &cli.Command{ Usage: "withdrawal id", }, }, - Action: withdrawlRequestByExchangeID, + Action: withdrawalRequestByExchangeID, }, { Name: "byexchange", @@ -2789,7 +2789,7 @@ var withdrawalRequestCommand = &cli.Command{ Usage: "the asset type of the currency pair", }, }, - Action: withdrawlRequestByExchangeID, + Action: withdrawalRequestByExchangeID, }, { Name: "bydate", @@ -2817,12 +2817,12 @@ var withdrawalRequestCommand = &cli.Command{ Usage: "max number of withdrawals to return", }, }, - Action: withdrawlRequestByDate, + Action: withdrawalRequestByDate, }, }, } -func withdrawlRequestByID(c *cli.Context) error { +func withdrawalRequestByID(c *cli.Context) error { if c.NArg() == 0 && c.NumFlags() == 0 { return cli.ShowSubcommandHelp(c) } @@ -2858,7 +2858,7 @@ func withdrawlRequestByID(c *cli.Context) error { return nil } -func withdrawlRequestByExchangeID(c *cli.Context) error { +func withdrawalRequestByExchangeID(c *cli.Context) error { if c.NArg() == 0 && c.NumFlags() == 0 { return cli.ShowSubcommandHelp(c) } @@ -2935,7 +2935,7 @@ func withdrawlRequestByExchangeID(c *cli.Context) error { return nil } -func withdrawlRequestByDate(c *cli.Context) error { +func withdrawalRequestByDate(c *cli.Context) error { if c.NArg() == 0 && c.NumFlags() == 0 { return cli.ShowSubcommandHelp(c) } diff --git a/cmd/gctcli/websocket_management.go b/cmd/gctcli/websocket_management.go index a2714bb088d..76cf046a05c 100644 --- a/cmd/gctcli/websocket_management.go +++ b/cmd/gctcli/websocket_management.go @@ -69,7 +69,7 @@ var websocketManagerCommand = &cli.Command{ }, &cli.StringFlag{ Name: "proxy", - Usage: "proxy address to change to, if proxy string is not set, this will stop the utilization of the prior set proxy.", + Usage: "proxy address to change to, if proxy string is not set, this will stop the utilisation of the prior set proxy.", }, }, Action: setProxy, diff --git a/common/common.go b/common/common.go index c132d036d8a..c776470da34 100644 --- a/common/common.go +++ b/common/common.go @@ -92,7 +92,7 @@ func NilGuard(ptrs ...any) (errs error) { Obviously can't compare to nil, since the types won't match, so we look into the interface eface is the internal representation of any; e(mpty-inter)face See: https://cs.opensource.google/go/go/+/refs/tags/go1.24.1:src/runtime/runtime2.go;l=184-187 - We optimize here by converting to [2]uintptr and just checking the address, instead of casting to a local eface type + We optimise here by converting to [2]uintptr and just checking the address, instead of casting to a local eface type */ if (*[2]uintptr)(unsafe.Pointer(&p))[1] == 0 { errs = AppendError(errs, fmt.Errorf("%w: %T", ErrNilPointer, p)) diff --git a/contrib/spellcheck/codespell_custom_dictionary.txt b/contrib/spellcheck/codespell_custom_dictionary.txt new file mode 100644 index 00000000000..174e50ad970 --- /dev/null +++ b/contrib/spellcheck/codespell_custom_dictionary.txt @@ -0,0 +1,64 @@ +accetable->acceptable +adresstag->addresstag +affilate->affiliate +authentecated->authenticated +behavior->behaviour +bifinex->bitfinex +canceled->cancelled +candlesctick->candlestick +critcalbankingstuff->criticalbankingstuff +crypo->crypto +cummulative->cumulative +curency->currency +customize->customise +customized->customised +customizes->customises +decerialize->deserialise +decerialized->deserialised +decerializing->deserialising +deserialize->deserialise +deserialized->deserialised +deserializes->deserialises +deserializing->deserialising +favor->favour +generalized->generalised +indivudal->individual +lenging->lending +liquidiation->liquidation +minimize->minimise +minimized->minimised +minimizes->minimises +mmethod->method +openinig->opening +optimize->optimise +optimized->optimised +optimization->optimisation +optimizes->optimises +organize->organise +organized->organised +overrided->overridden +recieve->receive +referal->referral +relationl->relational +retrive->retrieve +serialize->serialise +serialized->serialised +serializes->serialises +serializing->serialising +serparated->separated +snapshooooot->snapshot +sream->stream +suabccount->subaccount +subrcribe->subscribe +summarize->summarise +summarized->summarised +supercritcalinfo->superCriticalInfo +susbsytems->subsystems +umarshal->unmarshal +unreaslied->unrealised +utilize->utilise +utilized->utilised +utilization->utilisation +utilizing->utilising +withdaw->withdraw +withdrawl->withdrawal diff --git a/contrib/spellcheck/exclude_lines.txt b/contrib/spellcheck/exclude_lines.txt index f55c7616701..f490bbdf7c2 100644 --- a/contrib/spellcheck/exclude_lines.txt +++ b/contrib/spellcheck/exclude_lines.txt @@ -13,3 +13,41 @@ currency.SHFT: 84, TotalIn float64 `json:"totalIn"` TotalIn int64 `json:"totalIn"` + behavior: default + loanCustomiseMarginCall = "/sapi/v1/loan/customize/margin_call" + assert.ErrorIs(t, b.StartPortfolioWatcher(ctx, 0), context.Canceled, "StartPortfolioWatcher should return context.Canceled") + assert.ErrorIs(t, <-doneCh, context.Canceled, "StartPortfolioWatcher should return a context cancelled error") + {Case: "CANCELED", Result: order.Cancelled}, + case "CANCELED": + if algoOrderID == "" && !slices.Contains([]string{"effective", "order_failed", "canceled"}, state) { +// GetCompletedSpreadOrdersLast7Days retrieve the completed order data for the last 7 days, and the incomplete orders (filledSz =0 & state = canceled) that have been cancelled are only reserved for 2 hours. Results are returned in counter chronological order + "70200": errors.New("the RFQ with {0} status cannot be canceled"), + "70400": errors.New("the quote with {0} status cannot be canceled"), + "58220": errors.New("the withdrawal order is already canceled"), + "51401": errors.New("cancellation failed as the order is already canceled"), + "51406": errors.New("canceled - order count exceeds the limit {0}"), + "51509": errors.New("modification failed as the order has been canceled"), + result, err := e.GetCompletedSpreadOrdersLast7Days(contextGenerate(), "", "limit", "canceled", "", "", time.Time{}, time.Time{}, 10) + {Case: "canceled", Result: order.Cancelled}, + case "canceled": + states := "partial-canceled,filled,canceled" + require.ErrorIs(t, err, context.Canceled) + case "CANCELED", "CANCELLED": + "status": "canceled", + "reportType": "canceled" + Status string `json:"status"` // new, suspended, partiallyFilled, filled, canceled, expired + case "replaced", "canceled", "new": + o.Status = strings.Replace(o.Status, "canceled", "cancelled", 1) + if resp[i].Status != "canceled" { + "CANCELED": order.Cancelled, + Status: "CANCELED", + case PartiallyCancelled.String(), "PARTIAL-CANCELED", "PARTIALLY CANCELLED", "ORDER_PARTIALLY_TRANSACTED": + case Cancelled.String(), "CANCELED", "ORDER_CANCELLED": + assert.ErrorIs(t, err, context.Canceled, "should return correct error when context is cancelled") + require.ErrorIs(t, err, context.Canceled, "must return error when context is cancelled") + Type string `json:"type"` // Message Type: "open", "match", "filled", "canceled", "update" + case "partial-canceled": + {Case: "partial-canceled", Result: order.PartiallyCancelled}, + withdrawal := []byte(`[13293039,"ETH","ETHEREUM",null,null,1574175052000,1574181326000,null,null,"CANCELED",null,null,-0.24,-0.00135,null,null,"DESTINATION_ADDRESS",null,null,null,"TRANSACTION_ID","Purchase of 100 pizzas"]`) + pressXToJSON = `[0,"oc",[34930659963,null,1574955083558,"tETHUSD",1574955083558,1574955354487,0.201104,0.201104,"EXCHANGE LIMIT",null,null,null,0,"CANCELED",null,null,120,0,0,0,null,null,null,0,0,null,null,null,"BFX",null,null,null]]` + "Quotes": `{"arg": {"channel":"quotes"},"data":[{"validUntil":"1608997227854","uTime":"1608267227834","cTime":"1608267227834","legs":[{"px":"0.0023","sz":"25.0","instId":"BTC-USD-220114-25000-C","side":"sell","tgtCcy":""},{"px":"0.0045","sz":"25","instId":"BTC-USD-220114-35000-C","side":"buy","tgtCcy":""}],"quoteId":"25092","rfqId":"18753","traderCode":"SATS","quoteSide":"sell","state":"canceled","clQuoteId":""}]}`, diff --git a/contrib/spellcheck/ignore_words.txt b/contrib/spellcheck/ignore_words.txt index 3fb32207cd0..8d9dba32c4a 100644 --- a/contrib/spellcheck/ignore_words.txt +++ b/contrib/spellcheck/ignore_words.txt @@ -4,4 +4,4 @@ prevend flate zar insid -totalin +totalin \ No newline at end of file diff --git a/currency/code.go b/currency/code.go index b24d22d48e4..6bbcd75e6e0 100644 --- a/currency/code.go +++ b/currency/code.go @@ -297,7 +297,7 @@ func (c Code) Upper() Code { return c } -// UnmarshalJSON conforms type to the umarshaler interface +// UnmarshalJSON conforms type to the unmarshaler interface func (c *Code) UnmarshalJSON(d []byte) error { var newcode string err := json.Unmarshal(d, &newcode) diff --git a/currency/coinmarketcap/coinmarketcap.go b/currency/coinmarketcap/coinmarketcap.go index 59de812d504..f2eb7647df7 100644 --- a/currency/coinmarketcap/coinmarketcap.go +++ b/currency/coinmarketcap/coinmarketcap.go @@ -409,7 +409,7 @@ func (c *Coinmarketcap) GetExchangeInfo(exchangeID ...int64) (ExchangeInfo, erro // GetExchangeMap returns a paginated list of all cryptocurrency exchanges by // CoinMarketCap ID. Recommend using this convenience endpoint to lookup and -// utilize the unique exchange id across all endpoints as typical exchange +// utilise the unique exchange id across all endpoints as typical exchange // identifiers may change over time. ie huobi -> hadax -> global -> who knows // what else // @@ -704,7 +704,7 @@ func (c *Coinmarketcap) SendHTTPRequest(method, endpoint string, v url.Values, r } // CheckAccountPlan checks your current account plan to the minimal account -// needed to send http request, this is used to minimize requests for lower +// needed to send http request, this is used to minimise requests for lower // account privileges func (c *Coinmarketcap) CheckAccountPlan(minAllowable uint8) error { if c.Plan < minAllowable { diff --git a/currency/currencies.go b/currency/currencies.go index cba31ce7ac5..37c3942a40b 100644 --- a/currency/currencies.go +++ b/currency/currencies.go @@ -48,12 +48,12 @@ func (c Currencies) Contains(check Code) bool { return false } -// Join returns a comma serparated string +// Join returns a comma separated string func (c Currencies) Join() string { return strings.Join(c.Strings(), ",") } -// UnmarshalJSON conforms type to the umarshaler interface +// UnmarshalJSON conforms type to the unmarshaler interface func (c *Currencies) UnmarshalJSON(d []byte) error { if d[0] != '[' { d = []byte(`[` + string(d) + `]`) diff --git a/currency/pairs.go b/currency/pairs.go index 60b0016afd8..a52a6e1fa49 100644 --- a/currency/pairs.go +++ b/currency/pairs.go @@ -69,7 +69,7 @@ func (p Pairs) Format(pairFmt PairFormat) Pairs { return pairs } -// UnmarshalJSON conforms type to the umarshaler interface +// UnmarshalJSON conforms type to the unmarshaler interface func (p *Pairs) UnmarshalJSON(d []byte) error { var pairs string err := json.Unmarshal(d, &pairs) @@ -292,7 +292,7 @@ func (p Pairs) GetRandomPair() (Pair, error) { if len(p) == 0 { return EMPTYPAIR, ErrCurrencyPairsEmpty } - return p[rand.Intn(len(p))], nil //nolint:gosec // basic number generation required, no need for crypo/rand + return p[rand.Intn(len(p))], nil //nolint:gosec // basic number generation required, no need for crypto/rand } // DeriveFrom matches symbol string to the available pairs list when no diff --git a/database/repository/withdraw/withdraw_test.go b/database/repository/withdraw/withdraw_test.go index fad18060415..1b316ea5b90 100644 --- a/database/repository/withdraw/withdraw_test.go +++ b/database/repository/withdraw/withdraw_test.go @@ -139,7 +139,7 @@ func seedWithdrawData() { }, }, } - rnd := rand.Intn(2) //nolint:gosec // used for generating test data, no need to import crypo/rand + rnd := rand.Intn(2) //nolint:gosec // used for generating test data, no need to import crypto/rand if rnd == 0 { resp.RequestDetails.Currency = currency.AUD resp.RequestDetails.Type = 1 diff --git a/docs/CODING_GUIDELINES.md b/docs/CODING_GUIDELINES.md index a6e07a5c44f..ce27f83e614 100644 --- a/docs/CODING_GUIDELINES.md +++ b/docs/CODING_GUIDELINES.md @@ -167,7 +167,7 @@ Use `require` and `assert` appropriately: - API methods and public types must have comments for GoDoc. - Comments should explain **why** the code is doing something, not **what** it's doing, which should be self-explanatory. - Self-explanatory comments must be avoided. -- Only retain comments for complex logic or where external behavior needs clarification. +- Only retain comments for complex logic or where external behaviour needs clarification. ## Formatting diff --git a/docs/WS_ORDER_EVENTS.md b/docs/WS_ORDER_EVENTS.md index 493150f1e86..326aa98ff28 100644 --- a/docs/WS_ORDER_EVENTS.md +++ b/docs/WS_ORDER_EVENTS.md @@ -15,10 +15,10 @@ out of reported trades. |----------------------|-------------------------------------------------------------------|---------------------------------------------------------|-----------| | Price | Original price assigned to order | Depends on order type (e.g. limit orders have prices) | Mandatory | | Amount | Original quantity assigned to order | | Mandatory | -| AverageExecutedPrice | Average price of what's traded thus far | Order is filled, partially filled or partially canceled | Desirable | -| ExecutedAmount | How much of the original order quantity is filled | Order is filled, partially filled or partially canceled | Mandatory | +| AverageExecutedPrice | Average price of what's traded thus far | Order is filled, partially filled or partially cancelled | Desirable | +| ExecutedAmount | How much of the original order quantity is filled | Order is filled, partially filled or partially cancelled | Mandatory | | RemainingAmount | Amount - ExecutedAmount | | Mandatory | -| Cost | How much is spent thus far (cumulative transacted quote currency) | Order is filled, partially filled or partially canceled | Mandatory | +| Cost | How much is spent thus far (cumulative transacted quote currency) | Order is filled, partially filled or partially cancelled | Mandatory | | CostAsset | Deprecated, cost currency is always pair.Quote | | - | | Fee | How much last trade was charged by the exchange | Reported event is a trade | Optional | | FeeAsset | Asset of the taken fee | | Optional | diff --git a/engine/helpers_test.go b/engine/helpers_test.go index 3426e1f5215..b582615bc0a 100644 --- a/engine/helpers_test.go +++ b/engine/helpers_test.go @@ -382,176 +382,33 @@ func TestGetSpecificAvailablePairs(t *testing.T) { func TestIsRelatablePairs(t *testing.T) { t.Parallel() - CreateTestBot(t) - - btcusd := currency.NewBTCUSD() - xbtusd := currency.NewPair(currency.XBT, currency.USD) - xbtusdt := currency.NewPair(currency.XBT, currency.USDT) - - // Test relational pairs with similar names - result := IsRelatablePairs(xbtusd, btcusd, false) - if !result { - t.Fatal("Unexpected result") - } - - // Test relational pairs with similar names reversed - result = IsRelatablePairs(btcusd, xbtusd, false) - if !result { - t.Fatal("Unexpected result") - } - - // Test relational pairs with similar names but with Tether support disabled - result = IsRelatablePairs(xbtusd, currency.NewBTCUSDT(), false) - if result { - t.Fatal("Unexpected result") - } - - // Test relational pairs with similar names but with Tether support enabled - result = IsRelatablePairs(xbtusdt, btcusd, true) - if !result { - t.Fatal("Unexpected result") - } - - aeusdt, err := currency.NewPairFromStrings("AE", "USDT") - if err != nil { - t.Fatal(err) - } - - usdtae, err := currency.NewPairDelimiter("USDT-AE", "-") - if err != nil { - t.Fatal(err) - } - - // Test relational pairs with different ordering, a delimiter and with - // Tether support enabled - result = IsRelatablePairs(aeusdt, usdtae, true) - if !result { - t.Fatal("Unexpected result") - } - - // Test relational pairs with different ordering, a delimiter and with - // Tether support disabled - result = IsRelatablePairs(aeusdt, usdtae, false) - if !result { - t.Fatal("Unexpected result") - } - - xbteur, err := currency.NewPairFromStrings("XBT", "EUR") - if err != nil { - t.Fatal(err) - } - - btcaud, err := currency.NewPairFromStrings("BTC", "AUD") - if err != nil { - t.Fatal(err) - } - - // Test relationl pairs with similar names and different fiat currencies - result = IsRelatablePairs(xbteur, btcaud, false) - if !result { - t.Fatal("Unexpected result") - } - - usdbtc, err := currency.NewPairFromStrings("USD", "BTC") - if err != nil { - t.Fatal(err) - } - - btceur, err := currency.NewPairFromStrings("BTC", "EUR") - if err != nil { - t.Fatal(err) - } - - // Test relationl pairs with similar names, different fiat currencies and - // with different ordering - result = IsRelatablePairs(usdbtc, btceur, false) - if !result { // Is this really expected result??? - t.Fatal("Unexpected result") - } - - // Test relationl pairs with similar names, different fiat currencies and - // with Tether enabled - result = IsRelatablePairs(usdbtc, currency.NewBTCUSDT(), true) - if !result { - t.Fatal("Unexpected result") - } - ltcbtc, err := currency.NewPairFromStrings("LTC", "BTC") - if err != nil { - t.Fatal(err) - } - - btcltc, err := currency.NewPairFromStrings("BTC", "LTC") - if err != nil { - t.Fatal(err) - } - - // Test relationl crypto pairs with similar names - result = IsRelatablePairs(ltcbtc, btcltc, false) - if !result { - t.Fatal("Unexpected result") - } - - ltceth, err := currency.NewPairFromStrings("LTC", "ETH") - if err != nil { - t.Fatal(err) - } - - btceth, err := currency.NewPairFromStrings("BTC", "ETH") - if err != nil { - t.Fatal(err) - } - - // Test relationl crypto pairs with similar different pairs - result = IsRelatablePairs(ltceth, btceth, false) - if result { - t.Fatal("Unexpected result") - } - - // Test relationl crypto pairs with similar different pairs and with USDT - // enabled - usdtusd, err := currency.NewPairFromStrings("USDT", "USD") - if err != nil { - t.Fatal(err) - } - - result = IsRelatablePairs(usdtusd, btcusd, true) - if result { - t.Fatal("Unexpected result") - } - - xbtltc, err := currency.NewPairFromStrings("XBT", "LTC") - if err != nil { - t.Fatal(err) - } - - // Test relationl crypto pairs with similar names - result = IsRelatablePairs(xbtltc, btcltc, false) - if !result { - t.Fatal("Unexpected result") - } - - ltcxbt, err := currency.NewPairFromStrings("LTC", "XBT") - if err != nil { - t.Fatal(err) - } - - // Test relationl crypto pairs with different ordering and similar names - result = IsRelatablePairs(ltcxbt, btcltc, false) - if !result { - t.Fatal("Unexpected result") - } - - // Test edge case between two pairs when currency translations were causing - // non-relational pairs to be relatable - eurusd, err := currency.NewPairFromStrings("EUR", "USD") - if err != nil { - t.Fatal(err) - } - - result = IsRelatablePairs(eurusd, btcusd, false) - if result { - t.Fatal("Unexpected result") + for _, tc := range []struct { + name string + p1, p2 currency.Pair + tether bool + related bool + }{ + {"similar names", currency.NewPair(currency.XBT, currency.USD), currency.NewBTCUSD(), false, true}, + {"similar names reversed", currency.NewBTCUSD(), currency.NewPair(currency.XBT, currency.USD), false, true}, + {"tether disabled", currency.NewPair(currency.XBT, currency.USD), currency.NewBTCUSDT(), false, false}, + {"tether enabled", currency.NewPair(currency.XBT, currency.USDT), currency.NewBTCUSD(), true, true}, + {"different ordering tether enabled", currency.NewPair(currency.AE, currency.USDT), currency.NewPair(currency.USDT, currency.AE), true, true}, + {"different ordering tether disabled", currency.NewPair(currency.AE, currency.USDT), currency.NewPair(currency.USDT, currency.AE), false, true}, + {"similar names different fiat", currency.NewPair(currency.XBT, currency.EUR), currency.NewPair(currency.BTC, currency.AUD), false, true}, + {"different fiat different ordering", currency.NewPair(currency.USD, currency.BTC), currency.NewPair(currency.BTC, currency.EUR), false, true}, + {"different fiat tether enabled", currency.NewPair(currency.USD, currency.BTC), currency.NewBTCUSDT(), true, true}, + {"crypto pairs similar names", currency.NewPair(currency.LTC, currency.BTC), currency.NewPair(currency.BTC, currency.LTC), false, true}, + {"crypto pairs different bases", currency.NewPair(currency.LTC, currency.ETH), currency.NewPair(currency.BTC, currency.ETH), false, false}, + {"USDT/USD not relatable to BTC/USD", currency.NewPair(currency.USDT, currency.USD), currency.NewBTCUSD(), true, false}, + {"XBT translation", currency.NewPair(currency.XBT, currency.LTC), currency.NewPair(currency.BTC, currency.LTC), false, true}, + {"XBT translation reversed", currency.NewPair(currency.LTC, currency.XBT), currency.NewPair(currency.BTC, currency.LTC), false, true}, + {"non-relatable fiat pair", currency.NewPair(currency.EUR, currency.USD), currency.NewBTCUSD(), false, false}, + } { + t.Run(tc.name, func(t *testing.T) { + t.Parallel() + assert.Equal(t, tc.related, IsRelatablePairs(tc.p1, tc.p2, tc.tether)) + }) } } diff --git a/engine/order_manager.go b/engine/order_manager.go index 786d42c26a5..88a30503b68 100644 --- a/engine/order_manager.go +++ b/engine/order_manager.go @@ -1119,7 +1119,7 @@ func (s *store) getFilteredOrders(f *order.Filter) ([]order.Detail, error) { defer s.m.RUnlock() var os []order.Detail - // optimization if Exchange is filtered + // optimisation if Exchange is filtered if f.Exchange != "" { if e, ok := s.Orders[strings.ToLower(f.Exchange)]; ok { for i := range e { @@ -1159,7 +1159,7 @@ func (s *store) getActiveOrders(f *order.Filter) []order.Detail { } } case f.Exchange != "": - // optimization if Exchange is filtered + // optimisation if Exchange is filtered if e, ok := s.Orders[strings.ToLower(f.Exchange)]; ok { for i := range e { if e[i].Status != order.UnknownStatus && (!e[i].IsActive() || !e[i].MatchFilter(f)) { diff --git a/engine/rpcserver.go b/engine/rpcserver.go index 6ea39d2c9a5..0f9d22dcef7 100644 --- a/engine/rpcserver.go +++ b/engine/rpcserver.go @@ -259,8 +259,8 @@ func (s *RPCServer) getRPCEndpoints() (map[string]*gctrpc.RPCEndpoint, error) { } // GetSubsystems returns a list of subsystems and their status -func (s *RPCServer) GetSubsystems(_ context.Context, _ *gctrpc.GetSubsystemsRequest) (*gctrpc.GetSusbsytemsResponse, error) { - return &gctrpc.GetSusbsytemsResponse{SubsystemsStatus: s.GetSubsystemsStatus()}, nil +func (s *RPCServer) GetSubsystems(_ context.Context, _ *gctrpc.GetSubsystemsRequest) (*gctrpc.GetSubsystemsResponse, error) { + return &gctrpc.GetSubsystemsResponse{SubsystemsStatus: s.GetSubsystemsStatus()}, nil } // EnableSubsystem enables a engine subsystem @@ -1735,7 +1735,7 @@ func (s *RPCServer) WithdrawalEventByID(_ context.Context, r *gctrpc.WithdrawalE resp := &gctrpc.WithdrawalEventByIDResponse{ Event: &gctrpc.WithdrawalEventResponse{ Id: v.ID.String(), - Exchange: &gctrpc.WithdrawlExchangeEvent{ + Exchange: &gctrpc.WithdrawalExchangeEvent{ Name: v.Exchange.Name, Id: v.Exchange.Name, Status: v.Exchange.Status, @@ -3564,7 +3564,7 @@ func parseMultipleEvents(ret []*withdraw.Response) *gctrpc.WithdrawalEventsByExc for x := range ret { tempEvent := &gctrpc.WithdrawalEventResponse{ Id: ret[x].ID.String(), - Exchange: &gctrpc.WithdrawlExchangeEvent{ + Exchange: &gctrpc.WithdrawalExchangeEvent{ Name: ret[x].Exchange.Name, Id: ret[x].Exchange.ID, Status: ret[x].Exchange.Status, @@ -3620,7 +3620,7 @@ func parseWithdrawalsHistory(ret []exchange.WithdrawalHistory, exchName string, tempEvent := &gctrpc.WithdrawalEventResponse{ Id: ret[x].TransferID, - Exchange: &gctrpc.WithdrawlExchangeEvent{ + Exchange: &gctrpc.WithdrawalExchangeEvent{ Name: exchName, Status: ret[x].Status, }, @@ -3650,7 +3650,7 @@ func parseWithdrawalsHistory(ret []exchange.WithdrawalHistory, exchName string, func parseSingleEvents(ret *withdraw.Response) *gctrpc.WithdrawalEventsByExchangeResponse { tempEvent := &gctrpc.WithdrawalEventResponse{ Id: ret.ID.String(), - Exchange: &gctrpc.WithdrawlExchangeEvent{ + Exchange: &gctrpc.WithdrawalExchangeEvent{ Name: ret.Exchange.Name, Id: ret.Exchange.Name, Status: ret.Exchange.Status, diff --git a/exchange/websocket/buffer/buffer_test.go b/exchange/websocket/buffer/buffer_test.go index ab4632c0ebe..1eb3dd80664 100644 --- a/exchange/websocket/buffer/buffer_test.go +++ b/exchange/websocket/buffer/buffer_test.go @@ -88,7 +88,7 @@ func BenchmarkBufferPerformance(b *testing.B) { Asset: asset.Spot, } for b.Loop() { - randomIndex := rand.Intn(4) //nolint:gosec // no need to import crypo/rand for testing + randomIndex := rand.Intn(4) //nolint:gosec // no need to import crypto/rand for testing update.Asks = itemArray[randomIndex] update.Bids = itemArray[randomIndex] require.NoError(b, holder.Update(update)) @@ -115,7 +115,7 @@ func BenchmarkBufferSortingPerformance(b *testing.B) { Asset: asset.Spot, } for b.Loop() { - randomIndex := rand.Intn(4) //nolint:gosec // no need to import crypo/rand for testing + randomIndex := rand.Intn(4) //nolint:gosec // no need to import crypto/rand for testing update.Asks = itemArray[randomIndex] update.Bids = itemArray[randomIndex] require.NoError(b, holder.Update(update)) @@ -142,7 +142,7 @@ func BenchmarkBufferSortingByIDPerformance(b *testing.B) { } for b.Loop() { - randomIndex := rand.Intn(4) //nolint:gosec // no need to import crypo/rand for testing + randomIndex := rand.Intn(4) //nolint:gosec // no need to import crypto/rand for testing update.Asks = itemArray[randomIndex] update.Bids = itemArray[randomIndex] require.NoError(b, holder.Update(update)) @@ -170,7 +170,7 @@ func BenchmarkNoBufferPerformance(b *testing.B) { } for b.Loop() { - randomIndex := rand.Intn(4) //nolint:gosec // no need to import crypo/rand for testing + randomIndex := rand.Intn(4) //nolint:gosec // no need to import crypto/rand for testing update.Asks = itemArray[randomIndex] update.Bids = itemArray[randomIndex] require.NoError(b, obl.Update(update)) @@ -737,7 +737,7 @@ func TestInvalidateOrderbook(t *testing.T) { require.NoError(t, err) var snapShot1 orderbook.Book - snapShot1.Exchange = "Snapshooooot" + snapShot1.Exchange = "Snapshot" asks := []orderbook.Level{{Price: 4000, Amount: 1, ID: 8}} bids := []orderbook.Level{{Price: 4000, Amount: 1, ID: 9}} snapShot1.Asks = asks diff --git a/exchanges/asset/asset.go b/exchanges/asset/asset.go index 7e35dc79722..0084c654dce 100644 --- a/exchanges/asset/asset.go +++ b/exchanges/asset/asset.go @@ -174,7 +174,7 @@ func (a Item) IsOptions() bool { return a >= Options && a < All } -// UnmarshalJSON conforms type to the umarshaler interface +// UnmarshalJSON conforms type to the unmarshaler interface func (a *Item) UnmarshalJSON(d []byte) error { var assetString string err := json.Unmarshal(d, &assetString) diff --git a/exchanges/binance/binance.go b/exchanges/binance/binance.go index 9c2d8fe83ad..272ea0f4c99 100644 --- a/exchanges/binance/binance.go +++ b/exchanges/binance/binance.go @@ -576,7 +576,7 @@ func (e *Exchange) OpenOrders(ctx context.Context, pair currency.Pair) ([]QueryO return resp, nil } -// AllOrders Get all account orders; active, canceled, or filled. +// AllOrders Get all account orders; active, cancelled, or filled. // orderId optional param // limit optional param, default 500; max 500 func (e *Exchange) AllOrders(ctx context.Context, symbol currency.Pair, orderID, limit string) ([]QueryOrderData, error) { diff --git a/exchanges/binance/binance_types.go b/exchanges/binance/binance_types.go index 2780b9ce95c..fe4885f1ff6 100644 --- a/exchanges/binance/binance_types.go +++ b/exchanges/binance/binance_types.go @@ -420,26 +420,26 @@ type CancelOrderResponse struct { // QueryOrderData holds query order data type QueryOrderData struct { - Code int `json:"code"` - Msg string `json:"msg"` - Symbol string `json:"symbol"` - OrderID int64 `json:"orderId"` - ClientOrderID string `json:"clientOrderId"` - Price float64 `json:"price,string"` - OrigQty float64 `json:"origQty,string"` - ExecutedQty float64 `json:"executedQty,string"` - Status string `json:"status"` - TimeInForce string `json:"timeInForce"` - Type string `json:"type"` - Side string `json:"side"` - StopPrice float64 `json:"stopPrice,string"` - IcebergQty float64 `json:"icebergQty,string"` - Time types.Time `json:"time"` - IsWorking bool `json:"isWorking"` - CummulativeQuoteQty float64 `json:"cummulativeQuoteQty,string"` - OrderListID int64 `json:"orderListId"` - OrigQuoteOrderQty float64 `json:"origQuoteOrderQty,string"` - UpdateTime types.Time `json:"updateTime"` + Code int `json:"code"` + Msg string `json:"msg"` + Symbol string `json:"symbol"` + OrderID int64 `json:"orderId"` + ClientOrderID string `json:"clientOrderId"` + Price float64 `json:"price,string"` + OrigQty float64 `json:"origQty,string"` + ExecutedQty float64 `json:"executedQty,string"` + Status string `json:"status"` + TimeInForce string `json:"timeInForce"` + Type string `json:"type"` + Side string `json:"side"` + StopPrice float64 `json:"stopPrice,string"` + IcebergQty float64 `json:"icebergQty,string"` + Time types.Time `json:"time"` + IsWorking bool `json:"isWorking"` + CumulativeQuoteQty float64 `json:"cummulativeQuoteQty,string"` + OrderListID int64 `json:"orderListId"` + OrigQuoteOrderQty float64 `json:"origQuoteOrderQty,string"` + UpdateTime types.Time `json:"updateTime"` } // Balance holds query order data @@ -695,7 +695,7 @@ type DepositHistory struct { Network string `json:"network"` Status uint8 `json:"status"` Address string `json:"address"` - AddressTag string `json:"adressTag"` + AddressTag string `json:"addressTag"` TransactionID string `json:"txId"` InsertTime types.Time `json:"insertTime"` TransferType uint8 `json:"transferType"` diff --git a/exchanges/binance/binance_wrapper.go b/exchanges/binance/binance_wrapper.go index 84e8f8f319a..fe13b73529e 100644 --- a/exchanges/binance/binance_wrapper.go +++ b/exchanges/binance/binance_wrapper.go @@ -1111,7 +1111,7 @@ func (e *Exchange) GetOrderInfo(ctx context.Context, orderID string, pair curren Side: side, Type: orderType, Pair: pair, - Cost: resp.CummulativeQuoteQty, + Cost: resp.CumulativeQuoteQty, AssetType: assetType, Status: status, Price: resp.Price, @@ -1408,10 +1408,10 @@ func (e *Exchange) GetOrderHistory(ctx context.Context, req *order.MultiOrderReq } var cost float64 - // For some historical orders cummulativeQuoteQty will be < 0, + // For some historical orders cumulativeQuoteQty will be < 0, // meaning the data is not available at this time. - if resp[i].CummulativeQuoteQty > 0 { - cost = resp[i].CummulativeQuoteQty + if resp[i].CumulativeQuoteQty > 0 { + cost = resp[i].CumulativeQuoteQty } detail := order.Detail{ Amount: resp[i].OrigQty, diff --git a/exchanges/binanceus/binanceus_test.go b/exchanges/binanceus/binanceus_test.go index f63aff65db0..387f5a1f595 100644 --- a/exchanges/binanceus/binanceus_test.go +++ b/exchanges/binanceus/binanceus_test.go @@ -635,17 +635,15 @@ var subaccountItemJSON = `{ func TestGetSubaccountInformation(t *testing.T) { t.Parallel() var resp SubAccount - if er := json.Unmarshal([]byte(subaccountItemJSON), &resp); er != nil { - t.Error("Binanceus decerializing to SubAccount error", er) - } + require.NoError(t, json.Unmarshal([]byte(subaccountItemJSON), &resp), "Unmarshal SubAccount must not error") sharedtestvalues.SkipTestIfCredentialsUnset(t, e) - _, er := e.GetSubaccountInformation(t.Context(), 1, 100, "", "") - if er != nil && !strings.Contains(er.Error(), "Sub-account function is not enabled.") { - t.Error("Binanceus GetSubaccountInformation() error", er) + _, err := e.GetSubaccountInformation(t.Context(), 1, 100, "", "") + if err != nil { + assert.ErrorContains(t, err, "Sub-account function is not enabled.", "GetSubaccountInformation should only error for sub-account not enabled") } } -var referalRewardHistoryResponse = `{ +var referralRewardHistoryResponse = `{ "total": 1, "rows": [ { @@ -660,7 +658,7 @@ var referalRewardHistoryResponse = `{ func TestGetReferralRewardHistory(t *testing.T) { t.Parallel() var resp ReferralRewardHistoryResponse - require.NoError(t, json.Unmarshal([]byte(referalRewardHistoryResponse), &resp)) + require.NoError(t, json.Unmarshal([]byte(referralRewardHistoryResponse), &resp)) _, err := e.GetReferralRewardHistory(t.Context(), 9, 5, 50) assert.ErrorIs(t, err, errInvalidUserBusinessType) _, err = e.GetReferralRewardHistory(t.Context(), 1, 0, 50) @@ -736,9 +734,7 @@ var testNewOrderResponseJSON = `{ func TestNewOrderTest(t *testing.T) { t.Parallel() var resp NewOrderResponse - if er := json.Unmarshal([]byte(testNewOrderResponseJSON), &resp); er != nil { - t.Error("Binanceus decerializing to Order error", er) - } + require.NoError(t, json.Unmarshal([]byte(testNewOrderResponseJSON), &resp), "Unmarshal Order must not error") sharedtestvalues.SkipTestIfCredentialsUnset(t, e, canManipulateRealOrders) req := &NewOrderRequest{ Symbol: currency.NewPair(currency.LTC, currency.BTC), @@ -749,9 +745,7 @@ func TestNewOrderTest(t *testing.T) { TimeInForce: order.GoodTillCancel.String(), } _, err := e.NewOrderTest(t.Context(), req) - if err != nil { - t.Error("Binanceus NewOrderTest() error", err) - } + assert.NoError(t, err, "NewOrderTest should not error for limit order") req = &NewOrderRequest{ Symbol: currency.NewPair(currency.LTC, currency.BTC), Side: order.Sell.String(), @@ -760,9 +754,7 @@ func TestNewOrderTest(t *testing.T) { QuoteOrderQty: 10, } _, err = e.NewOrderTest(t.Context(), req) - if err != nil { - t.Error("NewOrderTest() error", err) - } + assert.NoError(t, err, "NewOrderTest should not error for market order") } func TestNewOrder(t *testing.T) { @@ -818,15 +810,10 @@ var openOrdersItemJSON = `{ func TestGetAllOpenOrders(t *testing.T) { t.Parallel() var resp Order - if er := json.Unmarshal([]byte(openOrdersItemJSON), &resp); er != nil { - t.Error("Binanceus decerializing to Order error", er) - } + require.NoError(t, json.Unmarshal([]byte(openOrdersItemJSON), &resp), "Unmarshal Order must not error") sharedtestvalues.SkipTestIfCredentialsUnset(t, e) - - _, er := e.GetAllOpenOrders(t.Context(), "") - if er != nil { - t.Error("Binanceus GetAllOpenOrders() error", er) - } + _, err := e.GetAllOpenOrders(t.Context(), "") + assert.NoError(t, err, "GetAllOpenOrders should not error") } func TestCancelExistingOrder(t *testing.T) { @@ -1096,13 +1083,10 @@ var ocbsTradeOrderJSON = ` func TestGetAllOCBSTradeOrders(t *testing.T) { t.Parallel() var orderDetail OCBSOrder - if er := json.Unmarshal([]byte(ocbsTradeOrderJSON), &orderDetail); er != nil { - t.Error("Binanceus decerializing to OCBSOrder error", er) - } + require.NoError(t, json.Unmarshal([]byte(ocbsTradeOrderJSON), &orderDetail), "Unmarshal OCBSOrder must not error") sharedtestvalues.SkipTestIfCredentialsUnset(t, e) - if _, er := e.GetAllOCBSTradeOrders(t.Context(), OCBSOrderRequestParams{}); er != nil { - t.Error("Binanceus GetAllOCBSTradeOrders() error", er) - } + _, err := e.GetAllOCBSTradeOrders(t.Context(), OCBSOrderRequestParams{}) + assert.NoError(t, err, "GetAllOCBSTradeOrders should not error") } func TestGetAssetFeesAndWalletStatus(t *testing.T) { @@ -1169,13 +1153,8 @@ func TestFiatDepositHistory(t *testing.T) { } } -// WEBSOCKET support testing -// Since both binance and Binance US has same websocket functions, -// the tests functions are also similar - -// TestWebsocketStreamKey this test mmethod handles the -// creating, updating, and deleting of user stream key or "listenKey" -// all the three methods in one test methods. +// TestWebsocketStreamKey verifies the creation, renewal and deletion +// of a user data stream key ("listenKey"). func TestWebsocketStreamKey(t *testing.T) { t.Parallel() sharedtestvalues.SkipTestIfCredentialsUnset(t, e) @@ -1449,9 +1428,8 @@ func TestWebsocketPartialOrderBookDepthStream(t *testing.T) { ] }}`) var err error - if err = e.wsHandleData(t.Context(), update1); err != nil { - t.Error("Binanceus Partial Order Book Depth Sream error", err) - } + err = e.wsHandleData(t.Context(), update1) + require.NoError(t, err, "wsHandleData for partial orderbook update1 must not error") update2 := []byte(`{ "stream":"btcusdt@depth10", "data":{ @@ -1470,9 +1448,8 @@ func TestWebsocketPartialOrderBookDepthStream(t *testing.T) { ] } }`) - if err = e.wsHandleData(t.Context(), update2); err != nil { - t.Error("Binanceus Partial Order Book Depth Sream error", err) - } + err = e.wsHandleData(t.Context(), update2) + require.NoError(t, err, "wsHandleData for partial orderbook update2 must not error") } func TestWebsocketBookTicker(t *testing.T) { diff --git a/exchanges/binanceus/binanceus_types.go b/exchanges/binanceus/binanceus_types.go index 30bd21cc4bd..c2c335200e3 100644 --- a/exchanges/binanceus/binanceus_types.go +++ b/exchanges/binanceus/binanceus_types.go @@ -367,7 +367,7 @@ type SubAccountTransferRequestParams struct { RecvWindow uint64 } -// SubAccountTransferResponse represents a suabccount transfer history +// SubAccountTransferResponse represents a subaccount transfer history // having the transaction id which is to be returned due to the transfer type SubAccountTransferResponse struct { Success bool `json:"success"` @@ -446,20 +446,19 @@ type NewOrderResponse struct { // CommonOrder instance holds the order information common to both // for Order and OrderReportItem type CommonOrder struct { - Symbol string `json:"symbol"` - OrderID uint64 `json:"orderId"` - OrderListID int8 `json:"orderListId"` - ClientOrderID string `json:"clientOrderId"` - - Price float64 `json:"price,string"` - OrigQty float64 `json:"origQty,string"` - ExecutedQty float64 `json:"executedQty,string"` - CummulativeQuoteQty float64 `json:"cummulativeQuoteQty,string"` - Status string `json:"status"` - TimeInForce string `json:"timeInForce"` - Type string `json:"type"` - Side string `json:"side"` - StopPrice float64 `json:"stopPrice,string"` + Symbol string `json:"symbol"` + OrderID uint64 `json:"orderId"` + OrderListID int8 `json:"orderListId"` + ClientOrderID string `json:"clientOrderId"` + Price float64 `json:"price,string"` + OrigQty float64 `json:"origQty,string"` + ExecutedQty float64 `json:"executedQty,string"` + CumulativeQuoteQty float64 `json:"cummulativeQuoteQty,string"` + Status string `json:"status"` + TimeInForce string `json:"timeInForce"` + Type string `json:"type"` + Side string `json:"side"` + StopPrice float64 `json:"stopPrice,string"` } // Order struct represents an ordinary order response. diff --git a/exchanges/binanceus/binanceus_wrapper.go b/exchanges/binanceus/binanceus_wrapper.go index cd0b4e2cce4..d06a6b08d66 100644 --- a/exchanges/binanceus/binanceus_wrapper.go +++ b/exchanges/binanceus/binanceus_wrapper.go @@ -621,7 +621,7 @@ func (e *Exchange) GetOrderInfo(ctx context.Context, orderID string, pair curren Side: orderSide, Type: orderType, Pair: pair, - Cost: resp.CummulativeQuoteQty, + Cost: resp.CumulativeQuoteQty, AssetType: assetType, Status: status, Price: resp.Price, diff --git a/exchanges/bitfinex/bitfinex.go b/exchanges/bitfinex/bitfinex.go index 383f9ffdece..9d7e77c85bc 100644 --- a/exchanges/bitfinex/bitfinex.go +++ b/exchanges/bitfinex/bitfinex.go @@ -118,7 +118,7 @@ type Exchange struct { exchange.Base } -// GetPlatformStatus returns the Bifinex platform status +// GetPlatformStatus returns the Bitfinex platform status func (e *Exchange) GetPlatformStatus(ctx context.Context) (int, error) { var response []int err := e.SendHTTPRequest(ctx, exchange.RestSpot, diff --git a/exchanges/bitfinex/bitfinex_test.go b/exchanges/bitfinex/bitfinex_test.go index 325ad3fcfe6..db694b90bb9 100644 --- a/exchanges/bitfinex/bitfinex_test.go +++ b/exchanges/bitfinex/bitfinex_test.go @@ -1116,7 +1116,7 @@ func TestWSAuth(t *testing.T) { } sharedtestvalues.SkipTestIfCredentialsUnset(t, e) if !e.API.AuthenticatedWebsocketSupport { - t.Skip("Authentecated API support not enabled") + t.Skip("Authenticated API support not enabled") } testexch.SetupWs(t, e) require.True(t, e.Websocket.CanUseAuthenticatedEndpoints(), "CanUseAuthenticatedEndpoints must be turned on") @@ -1191,7 +1191,7 @@ func TestWSSubscribe(t *testing.T) { require.NoError(t, testexch.Setup(e), "TestInstance must not error") testexch.SetupWs(t, e) err := e.Subscribe(subscription.List{{Channel: subscription.TickerChannel, Pairs: currency.Pairs{currency.NewBTCUSD()}, Asset: asset.Spot}}) - require.NoError(t, err, "Subrcribe must not error") + require.NoError(t, err, "Subscribe must not error") catcher := func() (ok bool) { i := <-e.Websocket.DataHandler.C _, ok = i.Data.(*ticker.Price) @@ -1827,31 +1827,27 @@ func TestGetAvailableTransferChains(t *testing.T) { } } -func TestAccetableMethodStore(t *testing.T) { +func TestAcceptableMethodStore(t *testing.T) { t.Parallel() var a acceptableMethodStore - if a.loaded() { - t.Error("should be empty") - } + assert.False(t, a.loaded(), "acceptable method store should start empty") data := map[string][]string{ "BITCOIN": {"BTC"}, "TETHER1": {"UST"}, "TETHER2": {"UST"}, } a.load(data) - if !a.loaded() { - t.Error("data should be loaded") - } - if name := a.lookup(currency.NewCode("BTC")); len(name) != 1 && name[1] != "BITCOIN" { - t.Error("incorrect values") - } - if name := a.lookup(currency.NewCode("UST")); (name[0] != "TETHER1" && name[1] != "TETHER2") && - (name[0] != "TETHER2" && name[1] != "TETHER1") { - t.Errorf("incorrect values") - } - if name := a.lookup(currency.NewCode("PANDA_HORSE")); len(name) != 0 { - t.Error("incorrect values") - } + assert.True(t, a.loaded(), "acceptable method store should be loaded after load call") + + btcName := a.lookup(currency.NewCode("BTC")) + require.Len(t, btcName, 1, "BTC lookup must return exactly one value") + assert.Equal(t, "BITCOIN", btcName[0], "BTC lookup should map to BITCOIN") + + ustName := a.lookup(currency.NewCode("UST")) + assert.ElementsMatch(t, []string{"TETHER1", "TETHER2"}, ustName, "UST lookup should contain both tether aliases") + + pandaHorseName := a.lookup(currency.NewCode("PANDA_HORSE")) + assert.Empty(t, pandaHorseName, "unknown lookup should return no values") } func TestGetSiteListConfigData(t *testing.T) { diff --git a/exchanges/bitstamp/bitstamp_type_convert.go b/exchanges/bitstamp/bitstamp_type_convert.go index 21ea018363f..5301a3072fc 100644 --- a/exchanges/bitstamp/bitstamp_type_convert.go +++ b/exchanges/bitstamp/bitstamp_type_convert.go @@ -9,7 +9,7 @@ import ( "github.com/thrasher-corp/gocryptotrader/exchanges/order" ) -// UnmarshalJSON deserializes JSON, and timestamp information. +// UnmarshalJSON deserialises JSON and parses the minimum order value func (p *TradingPair) UnmarshalJSON(data []byte) error { type Alias TradingPair t := &struct { diff --git a/exchanges/btcmarkets/btcmarkets_test.go b/exchanges/btcmarkets/btcmarkets_test.go index ac04c533aab..94e1d1ce50c 100644 --- a/exchanges/btcmarkets/btcmarkets_test.go +++ b/exchanges/btcmarkets/btcmarkets_test.go @@ -363,14 +363,12 @@ func TestGetReport(t *testing.T) { } } -func TestRequestWithdaw(t *testing.T) { +func TestRequestWithdraw(t *testing.T) { t.Parallel() sharedtestvalues.SkipTestIfCredentialsUnset(t, e, canManipulateRealOrders) _, err := e.RequestWithdraw(t.Context(), "BTC", 1, "sdjflajdslfjld", "", "", "", "") - if err == nil { - t.Error("expected an error due to invalid toAddress") - } + assert.Error(t, err, "RequestWithdraw should error due to invalid toAddress") } func TestBatchPlaceCancelOrders(t *testing.T) { diff --git a/exchanges/btcmarkets/btcmarkets_types.go b/exchanges/btcmarkets/btcmarkets_types.go index 177eff51e23..483b9a96cdc 100644 --- a/exchanges/btcmarkets/btcmarkets_types.go +++ b/exchanges/btcmarkets/btcmarkets_types.go @@ -277,14 +277,14 @@ type BatchCancelResponse struct { UnprocessedRequests []UnprocessedBatchResp `json:"unprocessedRequests"` } -// WithdrawRequestCrypto is a generalized withdraw request type +// WithdrawRequestCrypto is a generalised withdraw request type type WithdrawRequestCrypto struct { Amount int64 `json:"amount"` Currency string `json:"currency"` Address string `json:"address"` } -// WithdrawRequestAUD is a generalized withdraw request type +// WithdrawRequestAUD is a generalised withdraw request type type WithdrawRequestAUD struct { Amount int64 `json:"amount"` Currency string `json:"currency"` diff --git a/exchanges/bybit/bybit.go b/exchanges/bybit/bybit.go index b1f7c1c74da..0195236ec2d 100644 --- a/exchanges/bybit/bybit.go +++ b/exchanges/bybit/bybit.go @@ -2242,9 +2242,9 @@ func (e *Exchange) GetProductInfo(ctx context.Context, productID string) (*Insti return resp, e.SendHTTPRequest(ctx, exchange.RestSpot, common.EncodeURLValues("ins-loan/product-infos", params), defaultEPL, &resp) } -// GetInstitutionalLengingMarginCoinInfo retrieves institutional lending margin coin information. +// GetInstitutionalLendingMarginCoinInfo retrieves institutional lending margin coin information. // ProductId. If not passed, then return all product margin coin. For spot, it returns coin that convertRation greater than 0. -func (e *Exchange) GetInstitutionalLengingMarginCoinInfo(ctx context.Context, productID string) (*InstitutionalMarginCoinInfo, error) { +func (e *Exchange) GetInstitutionalLendingMarginCoinInfo(ctx context.Context, productID string) (*InstitutionalMarginCoinInfo, error) { params := url.Values{} if productID != "" { params.Set("productId", productID) diff --git a/exchanges/bybit/bybit_test.go b/exchanges/bybit/bybit_test.go index b9b4c8ecbb7..72f24bbbb4c 100644 --- a/exchanges/bybit/bybit_test.go +++ b/exchanges/bybit/bybit_test.go @@ -2661,12 +2661,10 @@ func TestGetProductInfo(t *testing.T) { } } -func TestGetInstitutionalLengingMarginCoinInfo(t *testing.T) { +func TestGetInstitutionalLendingMarginCoinInfo(t *testing.T) { t.Parallel() - _, err := e.GetInstitutionalLengingMarginCoinInfo(t.Context(), "") - if err != nil { - t.Error(err) - } + _, err := e.GetInstitutionalLendingMarginCoinInfo(t.Context(), "") + assert.NoError(t, err, "GetInstitutionalLendingMarginCoinInfo should not error") } func TestGetInstitutionalLoanOrders(t *testing.T) { @@ -3000,7 +2998,7 @@ var pushDataMap = map[string]string{ "Orderbook Update": `{"topic":"orderbook.50.BTCUSDT","ts":1731035685345,"type":"delta","data":{"s":"BTCUSDT","b":[["75848.62","0.014895"],["75837.13","0"]],"a":[["75848.89","0.088149"],["75851.44","0.078379"],["75852.65","0"],["75855.23","0.260219"],["75857.74","0.049778"]],"u":2876701,"seq":47474967823},"cts":1731035685342}`, "Public Trade": `{"topic":"publicTrade.BTCUSDT","ts":1690720953113,"type":"snapshot","data":[{"i":"2200000000067341890","T":1690720953111,"p":"3.6279","v":"1.3637","S":"Sell","s":"BTCUSDT","BT":false}]}`, "Public Kline": `{ "topic": "kline.5.BTCUSDT", "data": [ { "start": 1672324800000, "end": 1672325099999, "interval": "5", "open": "16649.5", "close": "16677", "high": "16677", "low": "16608", "volume": "2.081", "turnover": "34666.4005", "confirm": false, "timestamp": 1672324988882} ], "ts": 1672324988882,"type": "snapshot"}`, - "Public Liquidiation": `{ "data": { "price": "0.03803", "side": "Buy", "size": "1637", "symbol": "GALAUSDT", "updatedTime": 1673251091822}, "topic": "liquidation.GALAUSDT", "ts": 1673251091822, "type": "snapshot" }`, + "Public Liquidation": `{ "data": { "price": "0.03803", "side": "Buy", "size": "1637", "symbol": "GALAUSDT", "updatedTime": 1673251091822}, "topic": "liquidation.GALAUSDT", "ts": 1673251091822, "type": "snapshot" }`, "Public LT Kline": `{ "type": "snapshot", "topic": "kline_lt.5.BTCUSDT", "data": [ { "start": 1672325100000, "end": 1672325399999, "interval": "5", "open": "0.416039541212402799", "close": "0.41477848043290448", "high": "0.416039541212402799", "low": "0.409734237314911206", "confirm": false, "timestamp": 1672325322393} ], "ts": 1672325322393}`, "Public LT Ticker": `{ "topic": "tickers_lt.BTCUSDT", "ts": 1672325446847, "type": "snapshot", "data": { "symbol": "BTCUSDT", "lastPrice": "0.41477848043290448", "highPrice24h": "0.435285472510871305", "lowPrice24h": "0.394601507960931382", "prevPrice24h": "0.431502290172376349", "price24hPcnt": "-0.0388" } }`, "Public LT Navigation": `{ "topic": "lt.EOS3LUSDT", "ts": 1672325564669, "type": "snapshot", "data": { "symbol": "BTCUSDT", "time": 1672325564554, "nav": "0.413517419653406162", "basketPosition": "1.261060779498318641", "leverage": "2.656197506416192150", "basketLoan": "-0.684866519289629374", "circulation": "72767.309468460367138199", "basket": "91764.000000292013277472" } }`, diff --git a/exchanges/coinbase/coinbase_test.go b/exchanges/coinbase/coinbase_test.go index 8434b37300b..ee24920fa6d 100644 --- a/exchanges/coinbase/coinbase_test.go +++ b/exchanges/coinbase/coinbase_test.go @@ -74,7 +74,7 @@ const ( errInvalidProductID = `Coinbase unsuccessful HTTP status code: 404 raw response: {"error":"NOT_FOUND","error_details":"valid product_id is required","message":"valid product_id is required"}` errExpectedFeeRange = "expected fee range of %v and %v, received %v" errOptionInvalid = `Coinbase unsuccessful HTTP status code: 400 raw response: {"error":"unknown","error_details":"parsing field \"product_type\": \"OPTIONS\" is not a valid value","message":"parsing field \"product_type\": \"OPTIONS\" is not a valid value"}` - errJSONUnmarshalUnexpected = "JSON umarshalling did not return expected error" + errJSONUnmarshalUnexpected = "JSON unmarshalling did not return expected error" ) func TestMain(m *testing.M) { diff --git a/exchanges/coinut/coinut.go b/exchanges/coinut/coinut.go index 296255ec0f6..2f4dc819f04 100644 --- a/exchanges/coinut/coinut.go +++ b/exchanges/coinut/coinut.go @@ -470,5 +470,5 @@ func (i *instrumentMap) GetInstrumentIDs() []int64 { } func getNonce() int64 { - return rand.Int63n(coinutMaxNonce-1) + 1 //nolint:gosec // basic number generation required, no need for crypo/rand + return rand.Int63n(coinutMaxNonce-1) + 1 //nolint:gosec // basic number generation required, no need for crypto/rand } diff --git a/exchanges/credentials_test.go b/exchanges/credentials_test.go index 72b4c61a578..b5e4cd60858 100644 --- a/exchanges/credentials_test.go +++ b/exchanges/credentials_test.go @@ -92,25 +92,21 @@ func TestGetCredentials(t *testing.T) { b.API.SetClientID("1337") ctx = context.WithValue(t.Context(), accounts.ContextSubAccountFlag, "superaccount") - overridedSA, err := b.GetCredentials(ctx) + overriddenSA, err := b.GetCredentials(ctx) require.NoError(t, err) - if overridedSA.Key != "hello" && - overridedSA.Secret != "sir" && - overridedSA.ClientID != "1337" && - overridedSA.SubAccount != "superaccount" { - t.Fatal("unexpected values") - } + assert.Equal(t, "hello", overriddenSA.Key, "Key should match") + assert.Equal(t, "sir", overriddenSA.Secret, "Secret should match") + assert.Equal(t, "1337", overriddenSA.ClientID, "ClientID should match") + assert.Equal(t, "superaccount", overriddenSA.SubAccount, "SubAccount should match") - notOverrided, err := b.GetCredentials(t.Context()) + notOverridden, err := b.GetCredentials(t.Context()) require.NoError(t, err) - if notOverrided.Key != "hello" && - notOverrided.Secret != "sir" && - notOverrided.ClientID != "1337" && - notOverrided.SubAccount != "" { - t.Fatal("unexpected values") - } + assert.Equal(t, "hello", notOverridden.Key, "Key should match") + assert.Equal(t, "sir", notOverridden.Secret, "Secret should match") + assert.Equal(t, "1337", notOverridden.ClientID, "ClientID should match") + assert.Empty(t, notOverridden.SubAccount, "SubAccount should be empty") } func TestAreCredentialsValid(t *testing.T) { diff --git a/exchanges/deribit/deribit.go b/exchanges/deribit/deribit.go index 6e7737d1acd..91cbb9f679c 100644 --- a/exchanges/deribit/deribit.go +++ b/exchanges/deribit/deribit.go @@ -1337,8 +1337,8 @@ func (e *Exchange) SetEmailLanguage(ctx context.Context, language string) error return nil } -// SetSelfTradingConfig configure self trading behavior -// mode: Self trading prevention behavior. Possible values: 'reject_taker', 'cancel_maker' +// SetSelfTradingConfig configure self trading behaviour +// mode: Self trading prevention behaviour. Possible values: 'reject_taker', 'cancel_maker' // extended_to_subaccounts: If value is true trading is prevented between subaccounts of given account func (e *Exchange) SetSelfTradingConfig(ctx context.Context, mode string, extendedToSubaccounts bool) (string, error) { if mode == "" { @@ -2127,8 +2127,8 @@ func (e *Exchange) GetSettlementHistoryByInstrument(ctx context.Context, instrum getSettlementHistoryByInstrument, params, &resp) } -// GetSettlementHistoryByCurency sends a request to fetch settlement history data sorted by currency -func (e *Exchange) GetSettlementHistoryByCurency(ctx context.Context, ccy currency.Code, settlementType, continuation string, count int64, searchStartTimeStamp time.Time) (*PrivateSettlementsHistoryData, error) { +// GetSettlementHistoryByCurrency sends a request to fetch settlement history data sorted by currency +func (e *Exchange) GetSettlementHistoryByCurrency(ctx context.Context, ccy currency.Code, settlementType, continuation string, count int64, searchStartTimeStamp time.Time) (*PrivateSettlementsHistoryData, error) { if ccy.IsEmpty() { return nil, currency.ErrCurrencyCodeEmpty } diff --git a/exchanges/deribit/deribit_test.go b/exchanges/deribit/deribit_test.go index a7753f5168c..7d7099fd23c 100644 --- a/exchanges/deribit/deribit_test.go +++ b/exchanges/deribit/deribit_test.go @@ -1001,12 +1001,12 @@ func TestWSRetrieveTransfers(t *testing.T) { assert.NotNil(t, result) } -const cancelWithdrawlPushDataJSON = `{"address": "2NBqqD5GRJ8wHy1PYyCXTe9ke5226FhavBz", "amount": 0.5, "confirmed_timestamp": null, "created_timestamp": 1550571443070, "currency": "BTC", "fee": 0.0001, "id": 1, "priority": 0.15, "state": "cancelled", "transaction_id": null, "updated_timestamp": 1550571443070}` +const cancelWithdrawalPushDataJSON = `{"address": "2NBqqD5GRJ8wHy1PYyCXTe9ke5226FhavBz", "amount": 0.5, "confirmed_timestamp": null, "created_timestamp": 1550571443070, "currency": "BTC", "fee": 0.0001, "id": 1, "priority": 0.15, "state": "cancelled", "transaction_id": null, "updated_timestamp": 1550571443070}` func TestCancelWithdrawal(t *testing.T) { t.Parallel() var resp *CancelWithdrawalData - err := json.Unmarshal([]byte(cancelWithdrawlPushDataJSON), &resp) + err := json.Unmarshal([]byte(cancelWithdrawalPushDataJSON), &resp) require.NoError(t, err) _, err = e.CancelWithdrawal(t.Context(), currency.EMPTYCODE, 123844) require.ErrorIs(t, err, currency.ErrCurrencyCodeEmpty) @@ -2608,24 +2608,24 @@ func TestWSSetMMPConfig(t *testing.T) { assert.NoError(t, err) } -func TestGetSettlementHistoryByCurency(t *testing.T) { +func TestGetSettlementHistoryByCurrency(t *testing.T) { t.Parallel() - _, err := e.GetSettlementHistoryByCurency(t.Context(), currency.EMPTYCODE, "settlement", "", 10, time.Now().Add(-time.Hour)) + _, err := e.GetSettlementHistoryByCurrency(t.Context(), currency.EMPTYCODE, "settlement", "", 10, time.Now().Add(-time.Hour)) require.ErrorIs(t, err, currency.ErrCurrencyCodeEmpty) sharedtestvalues.SkipTestIfCredentialsUnset(t, e) - result, err := e.GetSettlementHistoryByCurency(t.Context(), currency.BTC, "settlement", "", 10, time.Now().Add(-time.Hour)) + result, err := e.GetSettlementHistoryByCurrency(t.Context(), currency.BTC, "settlement", "", 10, time.Now().Add(-time.Hour)) require.NoError(t, err) assert.NotNil(t, result) } -func TestWSRetrieveSettlementHistoryByCurency(t *testing.T) { +func TestWSRetrieveSettlementHistoryByCurrency(t *testing.T) { t.Parallel() - _, err := e.WSRetrieveSettlementHistoryByCurency(t.Context(), currency.EMPTYCODE, "settlement", "", 10, time.Now().Add(-time.Hour)) + _, err := e.WSRetrieveSettlementHistoryByCurrency(t.Context(), currency.EMPTYCODE, "settlement", "", 10, time.Now().Add(-time.Hour)) require.ErrorIs(t, err, currency.ErrCurrencyCodeEmpty) sharedtestvalues.SkipTestIfCredentialsUnset(t, e) - result, err := e.WSRetrieveSettlementHistoryByCurency(t.Context(), currency.BTC, "settlement", "", 10, time.Now().Add(-time.Hour)) + result, err := e.WSRetrieveSettlementHistoryByCurrency(t.Context(), currency.BTC, "settlement", "", 10, time.Now().Add(-time.Hour)) require.NoError(t, err) assert.NotNil(t, result) } diff --git a/exchanges/deribit/deribit_types.go b/exchanges/deribit/deribit_types.go index 733b3582479..4164c5a8f92 100644 --- a/exchanges/deribit/deribit_types.go +++ b/exchanges/deribit/deribit_types.go @@ -543,7 +543,7 @@ type PrivateTradeData struct { Order OrderData `json:"order"` } -// CancelResp represents the detail of canceled order. +// CancelResp represents the detail of cancelled order. type CancelResp struct { InstrumentName string `json:"instrument_name"` Currency string `json:"currency"` @@ -591,7 +591,7 @@ type MultipleCancelResponse struct { CancelDetails []CancelResp } -// UnmarshalJSON deserializes order cancellation response into a MultipleCancelResponse instance. +// UnmarshalJSON deserialises order cancellation response into a MultipleCancelResponse instance. func (a *MultipleCancelResponse) UnmarshalJSON(data []byte) error { var cancelCount int64 var cancelDetails []CancelResp diff --git a/exchanges/deribit/deribit_ws_endpoints.go b/exchanges/deribit/deribit_ws_endpoints.go index 3b85ca1061f..fe1f1713fd0 100644 --- a/exchanges/deribit/deribit_ws_endpoints.go +++ b/exchanges/deribit/deribit_ws_endpoints.go @@ -1172,8 +1172,8 @@ func (e *Exchange) WSSetEmailLanguage(ctx context.Context, language string) erro return nil } -// WsSetSelfTradingConfig configure self trading behavior through the websocket connection. -// mode: Self trading prevention behavior. Possible values: 'reject_taker', 'cancel_maker' +// WsSetSelfTradingConfig configure self trading behaviour through the websocket connection. +// mode: Self trading prevention behaviour. Possible values: 'reject_taker', 'cancel_maker' // extended_to_subaccounts: If value is true trading is prevented between subaccounts of given account func (e *Exchange) WsSetSelfTradingConfig(ctx context.Context, mode string, extendedToSubaccounts bool) (string, error) { if mode == "" { @@ -1825,8 +1825,8 @@ func (e *Exchange) WSRetrieveSettlementHistoryByInstrument(ctx context.Context, return resp, e.SendWSRequest(ctx, nonMatchingEPL, getSettlementHistoryByInstrument, input, &resp, true) } -// WSRetrieveSettlementHistoryByCurency sends a request to fetch settlement history data sorted by currency through the websocket connection. -func (e *Exchange) WSRetrieveSettlementHistoryByCurency(ctx context.Context, ccy currency.Code, settlementType, continuation string, count int64, searchStartTimeStamp time.Time) (*PrivateSettlementsHistoryData, error) { +// WSRetrieveSettlementHistoryByCurrency sends a request to fetch settlement history data sorted by currency through the websocket connection. +func (e *Exchange) WSRetrieveSettlementHistoryByCurrency(ctx context.Context, ccy currency.Code, settlementType, continuation string, count int64, searchStartTimeStamp time.Time) (*PrivateSettlementsHistoryData, error) { if ccy.IsEmpty() { return nil, currency.ErrCurrencyCodeEmpty } diff --git a/exchanges/futures/futures.go b/exchanges/futures/futures.go index a7e972b8b71..b42a02f07df 100644 --- a/exchanges/futures/futures.go +++ b/exchanges/futures/futures.go @@ -991,7 +991,7 @@ func (p *PNLCalculator) CalculatePNL(_ context.Context, calc *PNLCalculatorReque unrealisedPNL = currentExposure.Mul(first.Sub(second)) realisedPNL = calc.Amount.Mul(first.Sub(second)) default: - return nil, fmt.Errorf("%w openinig direction: '%v' order direction: '%v' exposure: '%v'", errCannotCalculateUnrealisedPNL, calc.OpeningDirection, calc.OrderDirection, currentExposure) + return nil, fmt.Errorf("%w opening direction: '%v' order direction: '%v' exposure: '%v'", errCannotCalculateUnrealisedPNL, calc.OpeningDirection, calc.OrderDirection, currentExposure) } totalFees := calc.Fee for i := range calc.PNLHistory { diff --git a/exchanges/gateio/gateio.go b/exchanges/gateio/gateio.go index cb2b99f34db..0f8de921bb0 100644 --- a/exchanges/gateio/gateio.go +++ b/exchanges/gateio/gateio.go @@ -515,7 +515,7 @@ func (e *Exchange) GetUnifiedAccount(ctx context.Context, ccy currency.Code) (*U // maximum 10 orders each, are allowed in one request No mixture of spot orders and margin orders, i.e. account must be identical for all orders func (e *Exchange) CreateBatchOrders(ctx context.Context, args []CreateOrderRequest) ([]SpotOrder, error) { if len(args) > 10 { - return nil, fmt.Errorf("%w only 10 orders are canceled at once", errMultipleOrders) + return nil, fmt.Errorf("%w only 10 orders are cancelled at once", errMultipleOrders) } for x := range args { if (x != 0) && args[x-1].Account != args[x].Account { @@ -1495,9 +1495,9 @@ func (e *Exchange) MergeMultipleLendingLoans(ctx context.Context, ccy currency.C return response, e.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, marginMergeLendingLoansEPL, http.MethodPost, gateioMarginMergedLoans, params, nil, &response) } -// RetriveOneSingleLoanDetail retrieve one single loan detail +// RetrieveOneSingleLoanDetail retrieve one single loan detail // "side" represents loan side: Lend or Borrow -func (e *Exchange) RetriveOneSingleLoanDetail(ctx context.Context, side, loanID string) (*MarginLoanResponse, error) { +func (e *Exchange) RetrieveOneSingleLoanDetail(ctx context.Context, side, loanID string) (*MarginLoanResponse, error) { if side != sideBorrow && side != sideLend { return nil, errInvalidLoanSide } @@ -1532,7 +1532,7 @@ func (e *Exchange) ModifyALoan(ctx context.Context, loanID string, arg *ModifyLo return response, e.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, marginModifyLoanEPL, http.MethodPatch, gateioMarginLoans+"/"+loanID, nil, &arg, &response) } -// CancelLendingLoan cancels lending loans. only lent loans can be canceled. +// CancelLendingLoan cancels lending loans. only lent loans can be cancelled. func (e *Exchange) CancelLendingLoan(ctx context.Context, ccy currency.Code, loanID string) (*MarginLoanResponse, error) { if loanID == "" { return nil, fmt.Errorf("%w, %s", errInvalidLoanID, " loan_id is required") @@ -2179,8 +2179,8 @@ func (e *Exchange) EnableOrDisableDualMode(ctx context.Context, settle currency. return response, e.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, perpetualToggleDualModeEPL, http.MethodGet, futuresPath+settle.Item.Lower+"/dual_mode", params, nil, &response) } -// RetrivePositionDetailInDualMode retrieve position detail in dual mode -func (e *Exchange) RetrivePositionDetailInDualMode(ctx context.Context, settle currency.Code, contract currency.Pair) ([]Position, error) { +// RetrievePositionDetailInDualMode retrieve position detail in dual mode +func (e *Exchange) RetrievePositionDetailInDualMode(ctx context.Context, settle currency.Code, contract currency.Pair) ([]Position, error) { if settle.IsEmpty() { return nil, errEmptyOrInvalidSettlementCurrency } diff --git a/exchanges/gateio/gateio_test.go b/exchanges/gateio/gateio_test.go index 73d7b4a1b8a..93a27204415 100644 --- a/exchanges/gateio/gateio_test.go +++ b/exchanges/gateio/gateio_test.go @@ -500,12 +500,11 @@ func TestMergeMultipleLendingLoans(t *testing.T) { } } -func TestRetriveOneSingleLoanDetail(t *testing.T) { +func TestRetrieveOneSingleLoanDetail(t *testing.T) { t.Parallel() sharedtestvalues.SkipTestIfCredentialsUnset(t, e) - if _, err := e.RetriveOneSingleLoanDetail(t.Context(), "borrow", "123"); err != nil { - t.Errorf("%s RetriveOneSingleLoanDetail() error %v", e.Name, err) - } + _, err := e.RetrieveOneSingleLoanDetail(t.Context(), "borrow", "123") + assert.NoError(t, err, "RetrieveOneSingleLoanDetail should not error") } func TestModifyALoan(t *testing.T) { @@ -656,7 +655,7 @@ func TestCreateCrossMarginBorrowLoan(t *testing.T) { t.Parallel() var response CrossMarginLoanResponse if err := json.Unmarshal([]byte(createCrossMarginBorrowLoanJSON), &response); err != nil { - t.Errorf("%s error while deserializing to CrossMarginBorrowLoanResponse %v", e.Name, err) + t.Errorf("%s error while deserialising to CrossMarginBorrowLoanResponse %v", e.Name, err) } sharedtestvalues.SkipTestIfCredentialsUnset(t, e, canManipulateRealOrders) if _, err := e.CreateCrossMarginBorrowLoan(t.Context(), CrossMarginBorrowLoanParams{ @@ -1152,13 +1151,13 @@ func TestEnableOrDisableDualMode(t *testing.T) { assert.NoError(t, err, "EnableOrDisableDualMode should not error") } -func TestRetrivePositionDetailInDualMode(t *testing.T) { +func TestRetrievePositionDetailInDualMode(t *testing.T) { t.Parallel() sharedtestvalues.SkipTestIfCredentialsUnset(t, e) - _, err := e.RetrivePositionDetailInDualMode(t.Context(), currency.BTC, getPair(t, asset.CoinMarginedFutures)) - assert.NoError(t, err, "RetrivePositionDetailInDualMode should not error for CoinMarginedFutures") - _, err = e.RetrivePositionDetailInDualMode(t.Context(), currency.USDT, getPair(t, asset.USDTMarginedFutures)) - assert.NoError(t, err, "RetrivePositionDetailInDualMode should not error for USDTMarginedFutures") + _, err := e.RetrievePositionDetailInDualMode(t.Context(), currency.BTC, getPair(t, asset.CoinMarginedFutures)) + assert.NoError(t, err, "RetrievePositionDetailInDualMode should not error for CoinMarginedFutures") + _, err = e.RetrievePositionDetailInDualMode(t.Context(), currency.USDT, getPair(t, asset.USDTMarginedFutures)) + assert.NoError(t, err, "RetrievePositionDetailInDualMode should not error for USDTMarginedFutures") } func TestUpdatePositionMarginInDualMode(t *testing.T) { @@ -1502,7 +1501,7 @@ func TestCreateFlashSwapOrder(t *testing.T) { t.Parallel() var response FlashSwapOrderResponse if err := json.Unmarshal([]byte(flashSwapOrderResponseJSON), &response); err != nil { - t.Errorf("%s error while deserializing to FlashSwapOrderResponse %v", e.Name, err) + t.Errorf("%s error while deserialising to FlashSwapOrderResponse %v", e.Name, err) } sharedtestvalues.SkipTestIfCredentialsUnset(t, e, canManipulateRealOrders) if _, err := e.CreateFlashSwapOrder(t.Context(), FlashSwapOrderParams{ diff --git a/exchanges/gateio/gateio_types.go b/exchanges/gateio/gateio_types.go index 1bc926401b7..97dd67504c1 100644 --- a/exchanges/gateio/gateio_types.go +++ b/exchanges/gateio/gateio_types.go @@ -776,7 +776,7 @@ type ContractStat struct { MarkPrice float64 `json:"mark_price"` TopLongShortSize float64 `json:"top_lsr_size"` ShortLiquidationAmount float64 `json:"short_liq_amount"` - LongLiquidiationAmount float64 `json:"long_liq_amount"` + LongLiquidationAmount float64 `json:"long_liq_amount"` OpenInterestUsd float64 `json:"open_interest_usd"` TopLongShortAccount float64 `json:"top_lsr_account"` LongLiquidationUSD float64 `json:"long_liq_usd"` @@ -1418,7 +1418,7 @@ type SpotOrder struct { AverageFillPrice types.Number `json:"avg_deal_price"` FeeDeducted types.Number `json:"fee"` FeeCurrency string `json:"fee_currency"` - FillPrice types.Number `json:"fill_price"` // Total filled in quote currency. Deprecated in favor of filled_total + FillPrice types.Number `json:"fill_price"` // Total filled in quote currency. Deprecated in favour of filled_total FilledTotal types.Number `json:"filled_total"` // Total filled in quote currency PointFee types.Number `json:"point_fee"` GtFee string `json:"gt_fee,omitempty"` @@ -2027,7 +2027,7 @@ type WsEventResponse struct { } } -// WSResponse represents generalized websocket push data from the server. +// WSResponse represents generalised websocket push data from the server. type WSResponse struct { ID int64 `json:"id"` Time time.Time `json:"time"` diff --git a/exchanges/gemini/gemini.go b/exchanges/gemini/gemini.go index f382ab53b4c..141c8a3dadc 100644 --- a/exchanges/gemini/gemini.go +++ b/exchanges/gemini/gemini.go @@ -215,7 +215,7 @@ func (e *Exchange) Transfers(ctx context.Context, curr currency.Code, start time return response, e.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, http.MethodPost, geminiTransfers, req, &response) } -// CancelExistingOrder will cancel an order. If the order is already canceled, the +// CancelExistingOrder will cancel an order. If the order is already cancelled, the // message will succeed but have no effect. func (e *Exchange) CancelExistingOrder(ctx context.Context, orderID int64) (Order, error) { req := make(map[string]any) diff --git a/exchanges/gemini/gemini_types.go b/exchanges/gemini/gemini_types.go index 0373549820a..32ad5c33559 100644 --- a/exchanges/gemini/gemini_types.go +++ b/exchanges/gemini/gemini_types.go @@ -72,7 +72,7 @@ type Trade struct { Type string `json:"type"` } -// Auction is generalized response type +// Auction is generalised response type type Auction struct { LastAuctionEID int64 `json:"last_auction_eid"` ClosedUntilMs int64 `json:"closed_until_ms"` @@ -247,7 +247,7 @@ type WithdrawalAddress struct { Reason string `json:"reason"` } -// ErrorCapture is a generalized error response from the server +// ErrorCapture is a generalised error response from the server type ErrorCapture struct { Result string `json:"result"` Reason string `json:"reason"` diff --git a/exchanges/hitbtc/hitbtc.go b/exchanges/hitbtc/hitbtc.go index 8229b1ddd20..6c6f7f29b00 100644 --- a/exchanges/hitbtc/hitbtc.go +++ b/exchanges/hitbtc/hitbtc.go @@ -149,7 +149,7 @@ func (e *Exchange) GetTrades(ctx context.Context, currencyPair, by, sort string, } // GetOrderbook an order book is an electronic list of buy and sell orders for a -// specific symbol, organized by price level. +// specific symbol, organised by price level. func (e *Exchange) GetOrderbook(ctx context.Context, currencyPair string, limit int) (*Orderbook, error) { // limit Limit of orderbook levels, default 100. Set 0 to view full orderbook levels vals := url.Values{} diff --git a/exchanges/hitbtc/hitbtc_types.go b/exchanges/hitbtc/hitbtc_types.go index 463b8c2f5ed..9d6da9d5162 100644 --- a/exchanges/hitbtc/hitbtc_types.go +++ b/exchanges/hitbtc/hitbtc_types.go @@ -240,13 +240,13 @@ type Margin struct { // MarginPosition holds information about your current margin position type MarginPosition struct { - Amount float64 `json:"amount,string"` - Total float64 `json:"total,string"` - BasePrice float64 `json:"basePrice,string"` - LiquidiationPrice float64 `json:"liquidiationPrice"` - ProfitLoss float64 `json:"pl,string"` - LendingFees float64 `json:"lendingFees,string"` - Type string `json:"type"` + Amount float64 `json:"amount,string"` + Total float64 `json:"total,string"` + BasePrice float64 `json:"basePrice,string"` + LiquidationPrice float64 `json:"liquidationPrice"` + ProfitLoss float64 `json:"pl,string"` + LendingFees float64 `json:"lendingFees,string"` + Type string `json:"type"` } // LoanOffer holds information about your loan offers diff --git a/exchanges/kline/kline.go b/exchanges/kline/kline.go index 31c3baf582d..d48d7654e24 100644 --- a/exchanges/kline/kline.go +++ b/exchanges/kline/kline.go @@ -237,7 +237,7 @@ func (k *Item) addPadding(start, exclusiveEnd time.Time, purgeOnPartial bool) er } // RemoveDuplicates removes any duplicate candles. NOTE: Filter-in-place is used -// in this function for optimization and to keep the slice reference pointer the +// in this function for optimisation and to keep the slice reference pointer the // same, if changed ExtendedRequest ConvertCandles functionality will break. func (k *Item) RemoveDuplicates() { lookup := make(map[int64]bool) @@ -253,7 +253,7 @@ func (k *Item) RemoveDuplicates() { } // RemoveOutsideRange removes any candles outside the start and end date. -// NOTE: Filter-in-place is used in this function for optimization and to keep +// NOTE: Filter-in-place is used in this function for optimisation and to keep // the slice reference pointer the same, if changed ExtendedRequest // ConvertCandles functionality will break. func (k *Item) RemoveOutsideRange(start, end time.Time) { diff --git a/exchanges/kline/kline_test.go b/exchanges/kline/kline_test.go index 2399e9539d5..51bdd3ef04f 100644 --- a/exchanges/kline/kline_test.go +++ b/exchanges/kline/kline_test.go @@ -94,7 +94,7 @@ func TestCreateKline(t *testing.T) { trades := make([]order.TradeHistory, tradeTotal) execution := time.Now() for x := range tradeTotal { - price, rndTime := 1000+float64(rand.Intn(1000)), rand.Intn(10) //nolint:gosec // no need to import crypo/rand for testing + price, rndTime := 1000+float64(rand.Intn(1000)), rand.Intn(10) //nolint:gosec // no need to import crypto/rand for testing execution = execution.Add(time.Duration(rndTime) * time.Second) trades[x] = order.TradeHistory{ Timestamp: execution, @@ -343,7 +343,7 @@ func TestItem_SortCandlesByTimestamp(t *testing.T) { } for x := range 100 { - y := rand.Float64() //nolint:gosec // used for generating test data, no need to import crypo/rand + y := rand.Float64() //nolint:gosec // used for generating test data, no need to import crypto/rand tempKline.Candles = append(tempKline.Candles, Candle{ Time: time.Now().AddDate(0, 0, -x), diff --git a/exchanges/kline/kline_types.go b/exchanges/kline/kline_types.go index 0d15d876989..df9192ef15b 100644 --- a/exchanges/kline/kline_types.go +++ b/exchanges/kline/kline_types.go @@ -163,12 +163,12 @@ type ExchangeCapabilitiesEnabled struct { Intervals ExchangeIntervals // GlobalResultLimit is the maximum amount of candles that can be returned // across all intervals. This is used to determine if a request will exceed - // the exchange limits. Indivudal interval limits are stored in the + // the exchange limits. Individual interval limits are stored in the // ExchangeIntervals struct. If this is set to 0, it will be ignored. GlobalResultLimit uint64 } -// ExchangeIntervals stores the supported intervals in an optimized lookup table +// ExchangeIntervals stores the supported intervals in an optimised lookup table // with a supplementary aligned retrieval list type ExchangeIntervals struct { supported map[Interval]uint64 diff --git a/exchanges/kucoin/kucoin.go b/exchanges/kucoin/kucoin.go index d4bc73c3f17..d63933982d4 100644 --- a/exchanges/kucoin/kucoin.go +++ b/exchanges/kucoin/kucoin.go @@ -1385,7 +1385,7 @@ func (e *Exchange) SendPlaceMarginHFOrder(ctx context.Context, arg *PlaceMarginH return resp, e.SendAuthHTTPRequest(ctx, exchange.RestSpot, placeMarginOrderEPL, http.MethodPost, path, arg, &resp) } -// CancelMarginHFOrderByOrderID cancels a single order by orderId. If the order cannot be canceled (sold or canceled), +// CancelMarginHFOrderByOrderID cancels a single order by orderId. If the order cannot be cancelled (sold or cancelled), // an error message will be returned, and the reason can be obtained according to the returned msg. func (e *Exchange) CancelMarginHFOrderByOrderID(ctx context.Context, orderID, symbol string) (string, error) { return e.CancelMarginHFOrderByID(ctx, orderID, symbol, "/v3/hf/margin/orders/") @@ -2005,8 +2005,8 @@ func (e *Exchange) TransferToMainOrTradeAccount(ctx context.Context, arg *FundTr if arg.Currency.IsEmpty() { return nil, currency.ErrCurrencyCodeEmpty } - if arg.RecieveAccountType != "MAIN" && arg.RecieveAccountType != SpotTradeType { - return nil, fmt.Errorf("invalid receive account type %s, only TRADE and MAIN are supported", arg.RecieveAccountType) + if arg.ReceiveAccountType != "MAIN" && arg.ReceiveAccountType != SpotTradeType { + return nil, fmt.Errorf("invalid receive account type %s, only TRADE and MAIN are supported", arg.ReceiveAccountType) } var resp *InnerTransferToMainAndTradeResponse return resp, e.SendAuthHTTPRequest(ctx, exchange.RestFutures, toMainOrTradeAccountEPL, http.MethodPost, "/v3/transfer-out", arg, &resp) @@ -2713,8 +2713,8 @@ func (e *Exchange) GetInformationOnAccountInvolvedInOffExchangeLoans(ctx context return resp, e.SendAuthHTTPRequest(ctx, exchange.RestSpot, vipLendingEPL, http.MethodGet, "/v1/otc-loan/accounts", nil, &resp) } -// GetAffilateUserRebateInformation allows getting affiliate user rebate information. -func (e *Exchange) GetAffilateUserRebateInformation(ctx context.Context, date time.Time, offset string, maxCount int64) ([]UserRebateInfo, error) { +// GetAffiliateUserRebateInformation allows getting affiliate user rebate information. +func (e *Exchange) GetAffiliateUserRebateInformation(ctx context.Context, date time.Time, offset string, maxCount int64) ([]UserRebateInfo, error) { if date.IsZero() { return nil, errQueryDateIsRequired } @@ -2729,7 +2729,7 @@ func (e *Exchange) GetAffilateUserRebateInformation(ctx context.Context, date ti params.Set("maxCount", strconv.FormatInt(maxCount, 10)) } var resp []UserRebateInfo - return resp, e.SendAuthHTTPRequest(ctx, exchange.RestSpot, affilateUserRebateInfoEPL, http.MethodGet, common.EncodeURLValues("/v2/affiliate/inviter/statistics", params), nil, &resp) + return resp, e.SendAuthHTTPRequest(ctx, exchange.RestSpot, affiliateUserRebateInfoEPL, http.MethodGet, common.EncodeURLValues("/v2/affiliate/inviter/statistics", params), nil, &resp) } // GetMarginPairsConfigurations allows querying the configuration of cross margin trading pairs. diff --git a/exchanges/kucoin/kucoin_ratelimit.go b/exchanges/kucoin/kucoin_ratelimit.go index aa3ba8b399f..1ab4bccbfad 100644 --- a/exchanges/kucoin/kucoin_ratelimit.go +++ b/exchanges/kucoin/kucoin_ratelimit.go @@ -205,7 +205,7 @@ const ( earnStakingProductEPL vipLendingEPL - affilateUserRebateInfoEPL + affiliateUserRebateInfoEPL marginPairsConfigurationEPL modifyLeverageMultiplierEPL marginActiveHFOrdersEPL @@ -415,7 +415,7 @@ func GetRateLimit() request.RateLimitDefinitions { earnStakingProductEPL: request.GetRateLimiterWithWeight(spotRate, 5), vipLendingEPL: request.GetRateLimiterWithWeight(spotRate, 1), - affilateUserRebateInfoEPL: request.GetRateLimiterWithWeight(spotRate, 30), + affiliateUserRebateInfoEPL: request.GetRateLimiterWithWeight(spotRate, 30), marginPairsConfigurationEPL: request.GetRateLimiterWithWeight(spotRate, 5), modifyLeverageMultiplierEPL: request.GetRateLimiterWithWeight(spotRate, 5), marginActiveHFOrdersEPL: request.GetRateLimiterWithWeight(spotRate, 2), diff --git a/exchanges/kucoin/kucoin_test.go b/exchanges/kucoin/kucoin_test.go index 202d02fbe82..06e0cec0ef1 100644 --- a/exchanges/kucoin/kucoin_test.go +++ b/exchanges/kucoin/kucoin_test.go @@ -1167,16 +1167,16 @@ func TestTransferToMainOrTradeAccount(t *testing.T) { t.Parallel() _, err := e.TransferToMainOrTradeAccount(t.Context(), &FundTransferFuturesParam{}) require.ErrorIs(t, err, common.ErrNilPointer) - _, err = e.TransferToMainOrTradeAccount(t.Context(), &FundTransferFuturesParam{RecieveAccountType: "MAIN"}) + _, err = e.TransferToMainOrTradeAccount(t.Context(), &FundTransferFuturesParam{ReceiveAccountType: "MAIN"}) require.ErrorIs(t, err, limits.ErrAmountBelowMin) - _, err = e.TransferToMainOrTradeAccount(t.Context(), &FundTransferFuturesParam{Amount: 1, RecieveAccountType: "MAIN"}) + _, err = e.TransferToMainOrTradeAccount(t.Context(), &FundTransferFuturesParam{Amount: 1, ReceiveAccountType: "MAIN"}) require.ErrorIs(t, err, currency.ErrCurrencyCodeEmpty) sharedtestvalues.SkipTestIfCredentialsUnset(t, e, canManipulateRealOrders) result, err := e.TransferToMainOrTradeAccount(t.Context(), &FundTransferFuturesParam{ Amount: 1, Currency: currency.USDT, - RecieveAccountType: SpotTradeType, + ReceiveAccountType: SpotTradeType, }) assert.NoError(t, err) assert.NotNil(t, result) @@ -4248,15 +4248,15 @@ func TestGetInformationOnAccountInvolvedInOffExchangeLoans(t *testing.T) { assert.NotNil(t, result) } -func TestGetAffilateUserRebateInformation(t *testing.T) { +func TestGetAffiliateUserRebateInformation(t *testing.T) { t.Parallel() - _, err := e.GetAffilateUserRebateInformation(t.Context(), time.Time{}, "1234", 0) + _, err := e.GetAffiliateUserRebateInformation(t.Context(), time.Time{}, "1234", 0) require.ErrorIs(t, err, errQueryDateIsRequired) - _, err = e.GetAffilateUserRebateInformation(t.Context(), time.Now(), "", 0) + _, err = e.GetAffiliateUserRebateInformation(t.Context(), time.Now(), "", 0) require.ErrorIs(t, err, errOffsetIsRequired) sharedtestvalues.SkipTestIfCredentialsUnset(t, e) - result, err := e.GetAffilateUserRebateInformation(t.Context(), time.Now(), "1234", 0) + result, err := e.GetAffiliateUserRebateInformation(t.Context(), time.Now(), "1234", 0) assert.NoError(t, err) assert.NotNil(t, result) } diff --git a/exchanges/kucoin/kucoin_types.go b/exchanges/kucoin/kucoin_types.go index 1a8f97d57eb..d7684b66d14 100644 --- a/exchanges/kucoin/kucoin_types.go +++ b/exchanges/kucoin/kucoin_types.go @@ -1002,7 +1002,7 @@ type TransferableBalanceInfo struct { type FundTransferFuturesParam struct { Amount float64 `json:"amount"` Currency currency.Code `json:"currency"` - RecieveAccountType string `json:"recAccountType"` // possible values are: MAIN and TRADE + ReceiveAccountType string `json:"recAccountType"` // possible values are: MAIN and TRADE } // FundTransferToFuturesParam holds request parameters to transfer funds to futures account diff --git a/exchanges/kucoin/kucoin_websocket.go b/exchanges/kucoin/kucoin_websocket.go index d38a9fa6efc..229e8e1ba06 100644 --- a/exchanges/kucoin/kucoin_websocket.go +++ b/exchanges/kucoin/kucoin_websocket.go @@ -340,7 +340,7 @@ func (e *Exchange) wsHandleData(ctx context.Context, respData []byte) error { return nil } -// processData used to deserialize and forward the data to DataHandler. +// processData used to deserialise and forward the data to DataHandler. func (e *Exchange) processData(ctx context.Context, respData []byte, resp any) error { if err := json.Unmarshal(respData, &resp); err != nil { return err diff --git a/exchanges/mock/recording_test.go b/exchanges/mock/recording_test.go index 95c44f84df5..2e158853906 100644 --- a/exchanges/mock/recording_test.go +++ b/exchanges/mock/recording_test.go @@ -102,7 +102,7 @@ var testVal = []TestStructLevel0{ StructVal: TestStructLevel1{ OkayVal: "stuff", OkayVal2: 120938, - BadVal: "CritcalBankingStuff", + BadVal: "CriticalBankingStuff", BadVal2: 1337, OtherData: TestStructLevel2{ OkayVal: "stuff", @@ -160,7 +160,7 @@ func TestCheckJSON(t *testing.T) { newStruct := []TestStructLevel0{} err = json.Unmarshal(payload, &newStruct) - require.NoError(t, err, "Umarshal must not error") + require.NoError(t, err, "Unmarshal must not error") assert.Len(t, newStruct, 4) assert.Empty(t, newStruct[0].StructVal.BadVal, "Value not wiped correctly") diff --git a/exchanges/okx/okx.go b/exchanges/okx/okx.go index 692e6e06661..f0e213ebb45 100644 --- a/exchanges/okx/okx.go +++ b/exchanges/okx/okx.go @@ -113,7 +113,7 @@ func (e *Exchange) CancelSingleOrder(ctx context.Context, arg *CancelOrderReques return resp, nil } -// CancelMultipleOrders cancel incomplete orders in batches. Maximum 20 orders can be canceled at a time. +// CancelMultipleOrders cancel incomplete orders in batches. Maximum 20 orders can be cancelled at a time. // Request parameters should be passed in the form of an array func (e *Exchange) CancelMultipleOrders(ctx context.Context, args []CancelOrderRequestParam) ([]*OrderData, error) { if len(args) == 0 { @@ -511,7 +511,7 @@ func (e *Exchange) PlaceTriggerAlgoOrder(ctx context.Context, arg *AlgoOrderPara } // CancelAdvanceAlgoOrder Cancel unfilled algo orders -// A maximum of 10 orders can be canceled at a time. +// A maximum of 10 orders can be cancelled at a time. // Request parameters should be passed in the form of an array func (e *Exchange) CancelAdvanceAlgoOrder(ctx context.Context, args []AlgoOrderCancelParams) (*AlgoOrder, error) { if len(args) == 0 { @@ -521,7 +521,7 @@ func (e *Exchange) CancelAdvanceAlgoOrder(ctx context.Context, args []AlgoOrderC } // CancelAlgoOrder to cancel unfilled algo orders (not including Iceberg order, TWAP order, Trailing Stop order). -// A maximum of 10 orders can be canceled at a time. +// A maximum of 10 orders can be cancelled at a time. // Request parameters should be passed in the form of an array func (e *Exchange) CancelAlgoOrder(ctx context.Context, args []AlgoOrderCancelParams) (*AlgoOrder, error) { if len(args) == 0 { @@ -836,7 +836,7 @@ func (e *Exchange) CancelRFQ(ctx context.Context, rfqID, clientRFQID string) (*C }, &resp, request.AuthenticatedRequest) } -// CancelMultipleRFQs cancel multiple active RFQs in a single batch. Maximum 100 RFQ orders can be canceled at a time +// CancelMultipleRFQs cancel multiple active RFQs in a single batch. Maximum 100 RFQ orders can be cancelled at a time func (e *Exchange) CancelMultipleRFQs(ctx context.Context, arg *CancelRFQRequestsParam) ([]CancelRFQResponse, error) { if arg == nil { return nil, common.ErrNilPointer @@ -874,7 +874,7 @@ func (e *Exchange) GetQuoteProducts(ctx context.Context) ([]QuoteProduct, error) return resp, e.SendHTTPRequest(ctx, exchange.RestSpot, getQuoteProductsEPL, http.MethodGet, "rfq/maker-instrument-settings", nil, &resp, request.AuthenticatedRequest) } -// SetQuoteProducts customize the products which makers want to quote and receive RFQs for, and the corresponding price and size limit +// SetQuoteProducts customise the products which makers want to quote and receive RFQs for, and the corresponding price and size limit func (e *Exchange) SetQuoteProducts(ctx context.Context, args []SetQuoteProductParam) (*SetQuoteProductsResult, error) { if len(args) == 0 { return nil, common.ErrEmptyParams @@ -3001,7 +3001,7 @@ func (e *Exchange) AmendGridAlgoOrder(ctx context.Context, arg *GridAlgoOrderAme } // StopGridAlgoOrder stop a batch of grid algo orders. -// A maximum of 10 orders can be canceled per request +// A maximum of 10 orders can be cancelled per request func (e *Exchange) StopGridAlgoOrder(ctx context.Context, arg []StopGridAlgoOrderRequest) ([]GridAlgoOrderIDResponse, error) { if len(arg) == 0 { return nil, common.ErrEmptyParams @@ -3346,7 +3346,7 @@ func (e *Exchange) RSIBackTesting(ctx context.Context, instrumentID, triggerCond // ****************************************** Signal bot trading ************************************************** -// GetSignalBotOrderDetail create and customize your own signals while gaining access to a diverse selection of signals from top providers. +// GetSignalBotOrderDetail create and customise your own signals while gaining access to a diverse selection of signals from top providers. // Empower your trading strategies and stay ahead of the game with our comprehensive signal trading platform func (e *Exchange) GetSignalBotOrderDetail(ctx context.Context, algoOrderType, algoID string) (*SignalBotOrderDetail, error) { if algoOrderType == "" { @@ -4152,7 +4152,7 @@ func (e *Exchange) RedeemETHStaking(ctx context.Context, amount float64) error { map[string]string{"amt": strconv.FormatFloat(amount, 'f', -1, 64)}, &resp, request.AuthenticatedRequest) } -// GetBETHAssetsBalance balance is a snapshot summarized all BETH assets in trading and funding accounts. Also, the snapshot updates hourly +// GetBETHAssetsBalance balance is a snapshot summarised all BETH assets in trading and funding accounts. Also, the snapshot updates hourly func (e *Exchange) GetBETHAssetsBalance(ctx context.Context) (*BETHAssetsBalance, error) { var resp *BETHAssetsBalance return resp, e.SendHTTPRequest(ctx, exchange.RestSpot, getBETHBalanceEPL, http.MethodGet, @@ -4722,7 +4722,7 @@ func (e *Exchange) GetActiveSpreadOrders(ctx context.Context, spreadID, orderTyp return resp, e.SendHTTPRequest(ctx, exchange.RestSpot, getActiveSpreadOrdersEPL, http.MethodGet, common.EncodeURLValues("sprd/orders-pending", params), nil, &resp, request.AuthenticatedRequest) } -// GetCompletedSpreadOrdersLast7Days retrieve the completed order data for the last 7 days, and the incomplete orders (filledSz =0 & state = canceled) that have been canceled are only reserved for 2 hours. Results are returned in counter chronological order +// GetCompletedSpreadOrdersLast7Days retrieve the completed order data for the last 7 days, and the incomplete orders (filledSz =0 & state = canceled) that have been cancelled are only reserved for 2 hours. Results are returned in counter chronological order func (e *Exchange) GetCompletedSpreadOrdersLast7Days(ctx context.Context, spreadID, orderType, state, beginID, endID string, begin, end time.Time, limit int64) ([]SpreadOrder, error) { params := url.Values{} if spreadID != "" { @@ -5479,27 +5479,27 @@ func (e *Exchange) GetTakerFlow(ctx context.Context, ccy currency.Code, period k // We will reach out to you through your BD to provide more comprehensive API support // GetInviteesDetail retrieves affiliate invitees details -func (e *Exchange) GetInviteesDetail(ctx context.Context, uid string) (*AffilateInviteesDetail, error) { +func (e *Exchange) GetInviteesDetail(ctx context.Context, uid string) (*AffiliateInviteesDetail, error) { if uid == "" { return nil, errUserIDRequired } - var resp *AffilateInviteesDetail - return resp, e.SendHTTPRequest(ctx, exchange.RestSpot, getAffilateInviteesDetailEPL, http.MethodGet, "affiliate/invitee/detail?uid="+uid, nil, &resp, request.AuthenticatedRequest) + var resp *AffiliateInviteesDetail + return resp, e.SendHTTPRequest(ctx, exchange.RestSpot, getAffiliateInviteesDetailEPL, http.MethodGet, "affiliate/invitee/detail?uid="+uid, nil, &resp, request.AuthenticatedRequest) } // GetUserAffiliateRebateInformation this endpoint is used to get the user's affiliate rebate information for affiliate -func (e *Exchange) GetUserAffiliateRebateInformation(ctx context.Context, apiKey string) (*AffilateRebateInfo, error) { +func (e *Exchange) GetUserAffiliateRebateInformation(ctx context.Context, apiKey string) (*AffiliateRebateInfo, error) { if apiKey == "" { return nil, errInvalidAPIKey } - var resp *AffilateRebateInfo + var resp *AffiliateRebateInfo return resp, e.SendHTTPRequest(ctx, exchange.RestSpot, getUserAffiliateRebateInformationEPL, http.MethodGet, "users/partner/if-rebate?apiKey="+apiKey, nil, &resp, request.AuthenticatedRequest) } // Status // SystemStatusResponse retrieves the system status. -// state supports valid values 'scheduled', 'ongoing', 'pre_open', 'completed', and 'canceled' +// state supports valid values 'scheduled', 'ongoing', 'pre_open', 'completed', and 'cancelled' func (e *Exchange) SystemStatusResponse(ctx context.Context, state string) ([]SystemStatusResponse, error) { params := url.Values{} if state != "" { diff --git a/exchanges/okx/okx_test.go b/exchanges/okx/okx_test.go index db21e77264c..bb0a7d4c8d9 100644 --- a/exchanges/okx/okx_test.go +++ b/exchanges/okx/okx_test.go @@ -5615,7 +5615,7 @@ func TestGetInviteesDetail(t *testing.T) { assert.NotNil(t, result) } -func TestGetUserAffilateRebateInformation(t *testing.T) { +func TestGetUserAffiliateRebateInformation(t *testing.T) { t.Parallel() _, err := e.GetUserAffiliateRebateInformation(contextGenerate(), "") require.ErrorIs(t, err, errInvalidAPIKey) diff --git a/exchanges/okx/okx_type_convert.go b/exchanges/okx/okx_type_convert.go index d46fcf15209..c623d178193 100644 --- a/exchanges/okx/okx_type_convert.go +++ b/exchanges/okx/okx_type_convert.go @@ -23,7 +23,7 @@ func (a *OpenInterest) UnmarshalJSON(data []byte) error { return err } -// MarshalJSON serialized QuoteLeg instance into bytes +// MarshalJSON serialised QuoteLeg instance into bytes func (a *QuoteLeg) MarshalJSON() ([]byte, error) { type Alias QuoteLeg chil := &struct { diff --git a/exchanges/okx/okx_types.go b/exchanges/okx/okx_types.go index 0cfe95f348e..ae2718a5039 100644 --- a/exchanges/okx/okx_types.go +++ b/exchanges/okx/okx_types.go @@ -232,7 +232,7 @@ type OrderbookItemDetail struct { NumberOfOrders types.Number } -// UnmarshalJSON deserializes byte data into OrderbookItemDetail instance +// UnmarshalJSON deserialises byte data into OrderbookItemDetail instance func (o *OrderbookItemDetail) UnmarshalJSON(data []byte) error { return json.Unmarshal(data, &[4]any{&o.DepthPrice, &o.Amount, &o.LiquidationOrders, &o.NumberOfOrders}) } @@ -272,7 +272,7 @@ type CandleStick struct { QuoteAssetVolume types.Number } -// UnmarshalJSON deserializes slice of data into Candlestick structure +// UnmarshalJSON deserialises slice of data into Candlestick structure func (c *CandleStick) UnmarshalJSON(data []byte) error { return json.Unmarshal(data, &[7]any{&c.OpenTime, &c.OpenPrice, &c.HighestPrice, &c.LowestPrice, &c.ClosePrice, &c.Volume, &c.QuoteAssetVolume}) } @@ -631,7 +631,7 @@ type TakerVolume struct { BuyVolume types.Number } -// UnmarshalJSON deserializes a slice of data into TakerVolume +// UnmarshalJSON deserialises a slice of data into TakerVolume func (t *TakerVolume) UnmarshalJSON(data []byte) error { return json.Unmarshal(data, &[3]any{&t.Timestamp, &t.SellVolume, &t.BuyVolume}) } @@ -642,7 +642,7 @@ type MarginLendRatioItem struct { MarginLendRatio types.Number } -// UnmarshalJSON deserializes a slice of data into MarginLendRatio +// UnmarshalJSON deserialises a slice of data into MarginLendRatio func (m *MarginLendRatioItem) UnmarshalJSON(data []byte) error { return json.Unmarshal(data, &[2]any{&m.Timestamp, &m.MarginLendRatio}) } @@ -653,7 +653,7 @@ type LongShortRatio struct { MarginLendRatio types.Number } -// UnmarshalJSON deserializes a slice of data into LongShortRatio +// UnmarshalJSON deserialises a slice of data into LongShortRatio func (l *LongShortRatio) UnmarshalJSON(data []byte) error { return json.Unmarshal(data, &[2]any{&l.Timestamp, &l.MarginLendRatio}) } @@ -665,7 +665,7 @@ type OpenInterestVolume struct { Volume types.Number } -// UnmarshalJSON deserializes json data into OpenInterestVolume struct +// UnmarshalJSON deserialises json data into OpenInterestVolume struct func (p *OpenInterestVolume) UnmarshalJSON(data []byte) error { return json.Unmarshal(data, &[3]any{&p.Timestamp, &p.OpenInterest, &p.Volume}) } @@ -677,7 +677,7 @@ type OpenInterestVolumeRatio struct { VolumeRatio types.Number } -// UnmarshalJSON deserializes json data into OpenInterestVolumeRatio +// UnmarshalJSON deserialises json data into OpenInterestVolumeRatio func (o *OpenInterestVolumeRatio) UnmarshalJSON(data []byte) error { return json.Unmarshal(data, &[3]any{&o.Timestamp, &o.OpenInterestRatio, &o.VolumeRatio}) } @@ -692,7 +692,7 @@ type ExpiryOpenInterestAndVolume struct { PutVolume types.Number } -// UnmarshalJSON deserializes slice of data into ExpiryOpenInterestAndVolume structure +// UnmarshalJSON deserialises slice of data into ExpiryOpenInterestAndVolume structure func (e *ExpiryOpenInterestAndVolume) UnmarshalJSON(data []byte) error { var expiryTimeString string err := json.Unmarshal(data, &[6]any{&e.Timestamp, &expiryTimeString, &e.CallOpenInterest, &e.PutOpenInterest, &e.CallVolume, &e.PutVolume}) @@ -742,7 +742,7 @@ type StrikeOpenInterestAndVolume struct { PutVolume types.Number } -// UnmarshalJSON deserializes slice of byte data into StrikeOpenInterestAndVolume +// UnmarshalJSON deserialises slice of byte data into StrikeOpenInterestAndVolume func (s *StrikeOpenInterestAndVolume) UnmarshalJSON(data []byte) error { return json.Unmarshal(data, &[6]any{&s.Timestamp, &s.Strike, &s.CallOpenInterest, &s.PutOpenInterest, &s.CallVolume, &s.PutVolume}) } @@ -758,7 +758,7 @@ type CurrencyTakerFlow struct { PutBlockVolume types.Number } -// UnmarshalJSON deserializes a slice of byte data into CurrencyTakerFlow +// UnmarshalJSON deserialises a slice of byte data into CurrencyTakerFlow func (c *CurrencyTakerFlow) UnmarshalJSON(data []byte) error { return json.Unmarshal(data, &[7]any{&c.Timestamp, &c.CallBuyVolume, &c.CallSellVolume, &c.PutBuyVolume, &c.PutSellVolume, &c.CallBlockVolume, &c.PutBlockVolume}) } @@ -1157,7 +1157,7 @@ type AmendAlgoOrderParam struct { InstrumentID string `json:"instId"` AlgoID string `json:"algoId,omitempty"` ClientSuppliedAlgoOrderID string `json:"algoClOrdId,omitempty"` - CancelOrderWhenFail bool `json:"cxlOnFail,omitempty"` // Whether the order needs to be automatically canceled when the order amendment fails Valid options: false or true, the default is false. + CancelOrderWhenFail bool `json:"cxlOnFail,omitempty"` // Whether the order needs to be automatically cancelled when the order amendment fails Valid options: false or true, the default is false. RequestID string `json:"reqId,omitempty"` NewSize float64 `json:"newSz,omitempty,string"` @@ -1814,7 +1814,7 @@ type AccountPositionHistory struct { UPLLastPrice types.Number `json:"uplLastPx"` UPLRatioLastPrice types.Number `json:"uplRatioLastPx"` Leverage string `json:"lever"` - LiquidiationPrice types.Number `json:"liqPx"` + LiquidationPrice types.Number `json:"liqPx"` InitialMarginRequirement types.Number `json:"imr"` Margin string `json:"margin"` MarginRatio types.Number `json:"mgnRatio"` @@ -4316,7 +4316,7 @@ type ActiveFundingOrder struct { Tag string `json:"tag"` } -// BETHAssetsBalance balance is a snapshot summarized all BETH assets +// BETHAssetsBalance balance is a snapshot summarised all BETH assets type BETHAssetsBalance struct { Currency string `json:"ccy"` Amount types.Number `json:"amt"` @@ -4500,8 +4500,8 @@ type WsSpreadOrderbookData struct { Data []WsSpreadOrderbookItem } -// AffilateInviteesDetail represents affiliate invitee's detail -type AffilateInviteesDetail struct { +// AffiliateInviteesDetail represents affiliate invitee's detail +type AffiliateInviteesDetail struct { InviteeLevel types.Number `json:"inviteeLv"` JoinTime types.Time `json:"joinTime"` InviteeRebateRate types.Number `json:"inviteeRebateRate"` @@ -4516,8 +4516,8 @@ type AffilateInviteesDetail struct { AffiliateCode string `json:"affiliateCode"` } -// AffilateRebateInfo represents rebate information -type AffilateRebateInfo struct { +// AffiliateRebateInfo represents rebate information +type AffiliateRebateInfo struct { Result bool `json:"result"` Type string `json:"type"` } @@ -4541,8 +4541,8 @@ type WsDepositInfo struct { UID string `json:"uid"` } -// WsWithdrawlInfo represents push notification is triggered when a withdrawal is initiated or the withdrawal status changes -type WsWithdrawlInfo struct { +// WsWithdrawalInfo represents push notification is triggered when a withdrawal is initiated or the withdrawal status changes +type WsWithdrawalInfo struct { AddrEx any `json:"addrEx"` Amount types.Number `json:"amt"` AreaCodeFrom string `json:"areaCodeFrom"` @@ -4959,7 +4959,7 @@ type ContractTakerVolume struct { TakerBuyVolume types.Number } -// UnmarshalJSON deserializes a slice data into ContractTakerVolume +// UnmarshalJSON deserialises a slice data into ContractTakerVolume func (c *ContractTakerVolume) UnmarshalJSON(data []byte) error { return json.Unmarshal(data, &[3]any{&c.Timestamp, &c.TakerSellVolume, &c.TakerBuyVolume}) } @@ -4972,7 +4972,7 @@ type ContractOpenInterestHistoryItem struct { OpenInterestInUSD types.Number } -// UnmarshalJSON deserializes slice data into ContractOpenInterestHistoryItem instance +// UnmarshalJSON deserialises slice data into ContractOpenInterestHistoryItem instance func (c *ContractOpenInterestHistoryItem) UnmarshalJSON(data []byte) error { return json.Unmarshal(data, &[4]any{&c.Timestamp, &c.OpenInterestInContract, &c.OpenInterestInCurrency, &c.OpenInterestInUSD}) } @@ -4983,7 +4983,7 @@ type TopTraderContractsLongShortRatio struct { Ratio types.Number } -// UnmarshalJSON deserializes slice data into TopTraderContractsLongShortRatio instance +// UnmarshalJSON deserialises slice data into TopTraderContractsLongShortRatio instance func (t *TopTraderContractsLongShortRatio) UnmarshalJSON(data []byte) error { return json.Unmarshal(data, &[2]any{&t.Timestamp, &t.Ratio}) } @@ -5198,25 +5198,25 @@ type AlgoOrderInfo struct { // OrderPreCheckResponse represents an order pre-checks response of account information for placing orders type OrderPreCheckResponse struct { - AdjEq types.Number `json:"adjEq"` - AdjEqChg types.Number `json:"adjEqChg"` - AvailBal types.Number `json:"availBal"` - AvailBalChg types.Number `json:"availBalChg"` - IMR types.Number `json:"imr"` - IMRChg types.Number `json:"imrChg"` - Liab types.Number `json:"liab"` - LiabChg types.Number `json:"liabChg"` - LiabChgCurrency string `json:"liabChgCcy"` - LiquidiationPrice types.Number `json:"liqPx"` - LiquidiationPriceDiff string `json:"liqPxDiff"` - LiquidiationPriceDiffRatio types.Number `json:"liqPxDiffRatio"` - MgnRatio types.Number `json:"mgnRatio"` - MgnRatioChg types.Number `json:"mgnRatioChg"` - MMR types.Number `json:"mmr"` - MMRChange types.Number `json:"mmrChg"` - PosBalance types.Number `json:"posBal"` - PosBalChange types.Number `json:"posBalChg"` - Type string `json:"type"` + AdjEq types.Number `json:"adjEq"` + AdjEqChg types.Number `json:"adjEqChg"` + AvailBal types.Number `json:"availBal"` + AvailBalChg types.Number `json:"availBalChg"` + IMR types.Number `json:"imr"` + IMRChg types.Number `json:"imrChg"` + Liab types.Number `json:"liab"` + LiabChg types.Number `json:"liabChg"` + LiabChgCurrency string `json:"liabChgCcy"` + LiquidationPrice types.Number `json:"liqPx"` + LiquidationPriceDiff string `json:"liqPxDiff"` + LiquidationPriceDiffRatio types.Number `json:"liqPxDiffRatio"` + MgnRatio types.Number `json:"mgnRatio"` + MgnRatioChg types.Number `json:"mgnRatioChg"` + MMR types.Number `json:"mmr"` + MMRChange types.Number `json:"mmrChg"` + PosBalance types.Number `json:"posBal"` + PosBalChange types.Number `json:"posBalChg"` + Type string `json:"type"` } // AnnouncementDetail represents an exchange's announcement detail diff --git a/exchanges/okx/okx_websocket.go b/exchanges/okx/okx_websocket.go index 01b8e5905b0..cfdc6531b17 100644 --- a/exchanges/okx/okx_websocket.go +++ b/exchanges/okx/okx_websocket.go @@ -522,8 +522,8 @@ func (e *Exchange) wsHandleData(ctx context.Context, conn websocket.Connection, return e.wsProcessPushData(ctx, respRaw, resp) case okxDepositInfo: resp := &struct { - Arguments SubscriptionInfo `json:"arg"` - Data []WsWithdrawlInfo `json:"data"` + Arguments SubscriptionInfo `json:"arg"` + Data []WsWithdrawalInfo `json:"data"` }{} return e.wsProcessPushData(ctx, respRaw, resp) case channelRecurringBuy: diff --git a/exchanges/okx/ratelimit.go b/exchanges/okx/ratelimit.go index f4050678229..6dd089da3ed 100644 --- a/exchanges/okx/ratelimit.go +++ b/exchanges/okx/ratelimit.go @@ -296,7 +296,7 @@ const ( getEconomicCalendarEPL getEstimatedDeliveryPriceEPL - getAffilateInviteesDetailEPL + getAffiliateInviteesDetailEPL getUserAffiliateRebateInformationEPL placeLendingOrderEPL @@ -639,7 +639,7 @@ var rateLimits = func() request.RateLimitDefinitions { // Status Endpoints getEventStatusEPL: request.NewRateLimitWithWeight(fiveSecondsInterval, 1, 1), - getAffilateInviteesDetailEPL: request.NewRateLimitWithWeight(twoSecondsInterval, 20, 1), + getAffiliateInviteesDetailEPL: request.NewRateLimitWithWeight(twoSecondsInterval, 20, 1), getUserAffiliateRebateInformationEPL: request.NewRateLimitWithWeight(twoSecondsInterval, 20, 1), placeLendingOrderEPL: request.NewRateLimitWithWeight(oneSecondInterval, 2, 1), diff --git a/exchanges/okx/ratelimiter_test.go b/exchanges/okx/ratelimiter_test.go index fc3d69e28ce..34bb23eed2a 100644 --- a/exchanges/okx/ratelimiter_test.go +++ b/exchanges/okx/ratelimiter_test.go @@ -263,8 +263,8 @@ func TestRateLimit_LimitStatic(t *testing.T) { "getMarkPriceCandlesticksHistory": getMarkPriceCandlesticksHistoryEPL, "getEconomicCalendar": getEconomicCalendarEPL, "getEstimatedDeliveryPrice": getEstimatedDeliveryPriceEPL, - "getAffilateInviteesDetail": getAffilateInviteesDetailEPL, - "getUserAffilateRebateInformation": getUserAffiliateRebateInformationEPL, + "getAffiliateInviteesDetail": getAffiliateInviteesDetailEPL, + "getUserAffiliateRebateInformation": getUserAffiliateRebateInformationEPL, } rl, err := request.New("RateLimit_Static", http.DefaultClient, request.WithLimiter(rateLimits)) diff --git a/exchanges/order/README.md b/exchanges/order/README.md index f060ec709f8..fabfd9ea76c 100644 --- a/exchanges/order/README.md +++ b/exchanges/order/README.md @@ -25,7 +25,7 @@ Join our slack to discuss all things related to GoCryptoTrader! [GoCryptoTrader - Deletion of order - Order tracking -+ For futures orders, this package also contains a futures position controller. It is responsible for tracking all futures orders that GoCryptoTrader processes. It keeps a running history of realised and unreaslied PNL to allow a trader to track their profits. Positions are closed once the exposure reaches zero, then upon a new futures order being processed, a new position is created. To view futures positions, see the GRPC command `getfuturesposition` ++ For futures orders, this package also contains a futures position controller. It is responsible for tracking all futures orders that GoCryptoTrader processes. It keeps a running history of realised and unrealised PNL to allow a trader to track their profits. Positions are closed once the exposure reaches zero, then upon a new futures order being processed, a new position is created. To view futures positions, see the GRPC command `getfuturesposition` ## Donations diff --git a/exchanges/order/orders.go b/exchanges/order/orders.go index 19914060b7e..bd93fcff6d3 100644 --- a/exchanges/order/orders.go +++ b/exchanges/order/orders.go @@ -461,7 +461,7 @@ func (d *Detail) Copy() Detail { // submission has occurred. NOTE: order status is populated as order.Filled for a // market order else order.New if an order is accepted as default, date and // lastupdated fields have been populated as time.Now(). All fields can be -// customized in caller scope if needed. +// customised in caller scope if needed. func (s *Submit) DeriveSubmitResponse(orderID string) (*SubmitResponse, error) { if s == nil { return nil, errOrderSubmitIsNil diff --git a/exchanges/order/timeinforce.go b/exchanges/order/timeinforce.go index 9cfd449a608..c19429bd04a 100644 --- a/exchanges/order/timeinforce.go +++ b/exchanges/order/timeinforce.go @@ -129,7 +129,7 @@ func (t TimeInForce) Lower() string { return strings.ToLower(t.String()) } -// UnmarshalJSON deserializes a string data into TimeInForce instance. +// UnmarshalJSON deserialises a string data into TimeInForce instance. func (t *TimeInForce) UnmarshalJSON(data []byte) error { for val := range strings.SplitSeq(strings.Trim(string(data), `"`), ",") { tif, err := StringToTimeInForce(val) diff --git a/exchanges/orderbook/orderbook_test.go b/exchanges/orderbook/orderbook_test.go index 0b374f15432..cf765b3b467 100644 --- a/exchanges/orderbook/orderbook_test.go +++ b/exchanges/orderbook/orderbook_test.go @@ -331,12 +331,12 @@ func TestProcessOrderbook(t *testing.T) { } m.Unlock() wg.Go(func() { - newName := "Exchange" + strconv.FormatInt(rand.Int63(), 10) //nolint:gosec // no need to import crypo/rand for testing + newName := "Exchange" + strconv.FormatInt(rand.Int63(), 10) //nolint:gosec // no need to import crypto/rand for testing newPairs := currency.NewPair(currency.NewCode("BTC"+strconv.FormatInt(rand.Int63(), 10)), - currency.NewCode("USD"+strconv.FormatInt(rand.Int63(), 10))) //nolint:gosec // no need to import crypo/rand for testing + currency.NewCode("USD"+strconv.FormatInt(rand.Int63(), 10))) //nolint:gosec // no need to import crypto/rand for testing - asks := []Level{{Price: rand.Float64(), Amount: rand.Float64()}} //nolint:gosec // no need to import crypo/rand for testing - bids := []Level{{Price: rand.Float64(), Amount: rand.Float64()}} //nolint:gosec // no need to import crypo/rand for testing + asks := []Level{{Price: rand.Float64(), Amount: rand.Float64()}} //nolint:gosec // no need to import crypto/rand for testing + bids := []Level{{Price: rand.Float64(), Amount: rand.Float64()}} //nolint:gosec // no need to import crypto/rand for testing b := &Book{ Pair: newPairs, Asks: asks, diff --git a/exchanges/poloniex/poloniex_futures.go b/exchanges/poloniex/poloniex_futures.go index e608f8e08e4..527df3faf36 100644 --- a/exchanges/poloniex/poloniex_futures.go +++ b/exchanges/poloniex/poloniex_futures.go @@ -264,7 +264,7 @@ func (e *Exchange) GetOrderExecutionDetails(ctx context.Context, side order.Side return resp, e.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, fGetFillsV2EPL, http.MethodGet, tradePathV3+"order/trades", params, nil, &resp) } -// GetFuturesOrderHistory retrieves previous futures orders. Orders initiated through the API that are completely canceled (no transaction has occurred) can only be queried for 4 hours. +// GetFuturesOrderHistory retrieves previous futures orders. Orders initiated through the API that are completely cancelled (no transaction has occurred) can only be queried for 4 hours. func (e *Exchange) GetFuturesOrderHistory(ctx context.Context, symbol currency.Pair, side order.Side, orderType, orderState, orderID, clientOrderID, direction string, startTime, endTime time.Time, offset, limit uint64) ([]*FuturesOrderDetails, error) { if !startTime.IsZero() && !endTime.IsZero() { if err := common.StartEndTimeCheck(startTime, endTime); err != nil { diff --git a/exchanges/poloniex/poloniex_futures_types.go b/exchanges/poloniex/poloniex_futures_types.go index 9a2a5332cc4..d4e1c3ab3a5 100644 --- a/exchanges/poloniex/poloniex_futures_types.go +++ b/exchanges/poloniex/poloniex_futures_types.go @@ -15,7 +15,7 @@ import ( // MarginMode represents margin mode type for futures orders type MarginMode margin.Type -// MarshalText implements encoding.TextMarshaler and serializes MarginMode to a string +// MarshalText implements encoding.TextMarshaler and serialises MarginMode to a string func (m MarginMode) MarshalText() ([]byte, error) { switch margin.Type(m) { case margin.Multi: @@ -402,7 +402,7 @@ type FuturesCandle struct { EndTime types.Time } -// UnmarshalJSON deserializes JSON data into a kline.Candle instance +// UnmarshalJSON deserialises JSON data into a kline.Candle instance func (v *FuturesCandle) UnmarshalJSON(data []byte) error { return json.Unmarshal(data, &[9]any{&v.LowestPrice, &v.HighestPrice, &v.OpeningPrice, &v.ClosingPrice, &v.QuoteAmount, &v.BaseAmount, &v.Trades, &v.StartTime, &v.EndTime}) } @@ -488,7 +488,7 @@ type FuturesIndexPriceData struct { EndTime types.Time } -// UnmarshalJSON deserializes candlestick data into a FuturesIndexPriceData instance +// UnmarshalJSON deserialises candlestick data into a FuturesIndexPriceData instance func (v *FuturesIndexPriceData) UnmarshalJSON(data []byte) error { return json.Unmarshal(data, &[6]any{&v.LowestPrice, &v.HighPrice, &v.OpenPrice, &v.ClosingPrice, &v.StartTime, &v.EndTime}) } @@ -516,7 +516,7 @@ type FuturesMarkPriceCandle struct { EndTime types.Time } -// UnmarshalJSON deserializes byte data into FuturesMarkPriceCandle instance +// UnmarshalJSON deserialises byte data into FuturesMarkPriceCandle instance func (v *FuturesMarkPriceCandle) UnmarshalJSON(data []byte) error { return json.Unmarshal(data, &[6]any{&v.LowestPrice, &v.HighestPrice, &v.OpeningPrice, &v.ClosingPrice, &v.StartTime, &v.EndTime}) } @@ -673,7 +673,7 @@ type WsFuturesMarkAndIndexPriceCandle struct { PushTimestamp types.Time } -// UnmarshalJSON deserializes byte data into WsFuturesMarkAndIndexPriceCandle instance +// UnmarshalJSON deserialises byte data into WsFuturesMarkAndIndexPriceCandle instance func (v *WsFuturesMarkAndIndexPriceCandle) UnmarshalJSON(data []byte) error { return json.Unmarshal(data, &[8]any{&v.Symbol, &v.LowestPrice, &v.HighestPrice, &v.OpeningPrice, &v.ClosingPrice, &v.StartTime, &v.EndTime, &v.PushTimestamp}) } diff --git a/exchanges/poloniex/poloniex_types.go b/exchanges/poloniex/poloniex_types.go index cf23111a09d..237e717f319 100644 --- a/exchanges/poloniex/poloniex_types.go +++ b/exchanges/poloniex/poloniex_types.go @@ -287,7 +287,7 @@ type CandlestickData struct { EndTime types.Time } -// UnmarshalJSON deserializes byte data into CandlestickData structure +// UnmarshalJSON deserialises byte data into CandlestickData structure func (c *CandlestickData) UnmarshalJSON(data []byte) error { return json.Unmarshal(data, &[14]any{&c.Low, &c.High, &c.Open, &c.Close, &c.QuoteAmount, &c.BaseAmount, &c.BuyTakerAmount, &c.BuyTakerQuantity, &c.TradeCount, &c.PushTimestamp, &c.WeightedAverage, &c.Interval, &c.StartTime, &c.EndTime}) } @@ -588,7 +588,7 @@ type PlaceOrderRequest struct { ClientOrderID string `json:"clientOrderId,omitempty"` AllowBorrow bool `json:"allowBorrow,omitempty"` - SelfTradePreventionMode string `json:"stpMode,omitempty"` // self-trade prevention. Defaults to EXPIRE_TAKER. None: enable self-trade; EXPIRE_TAKER: Taker order will be canceled when self-trade happens + SelfTradePreventionMode string `json:"stpMode,omitempty"` // self-trade prevention. Defaults to EXPIRE_TAKER. None: enable self-trade; EXPIRE_TAKER: Taker order will be cancelled when self-trade happens SlippageTolerance string `json:"slippageTolerance,omitempty"` // Used to control the maximum slippage ratio, the value range is greater than 0 and less than 1 } diff --git a/exchanges/request/limit_test.go b/exchanges/request/limit_test.go index a20f20f7b20..4a5e1d8b964 100644 --- a/exchanges/request/limit_test.go +++ b/exchanges/request/limit_test.go @@ -58,7 +58,7 @@ func TestRateLimit(t *testing.T) { ctx, cancel := context.WithCancel(t.Context()) cancel() err = r.RateLimit(ctx) - assert.ErrorIs(t, err, context.Canceled, "should return correct error when context is canceled") + assert.ErrorIs(t, err, context.Canceled, "should return correct error when context is cancelled") // Rate limit is 100ms. Set deadline for 50ms. ctx, cancel = context.WithTimeout(t.Context(), 50*time.Millisecond) diff --git a/exchanges/request/request_types.go b/exchanges/request/request_types.go index bd1f9206103..33491207ab1 100644 --- a/exchanges/request/request_types.go +++ b/exchanges/request/request_types.go @@ -67,7 +67,7 @@ type RetryPolicy func(resp *http.Response, err error) (bool, error) type RequesterOption func(*Requester) // Generate defines a closure for functionality outside the requester to -// generate a new *http.Request on every attempt. This minimizes the chance of +// generate a new *http.Request on every attempt. This minimises the chance of // being outside the receive window if application rate limiting reduces outbound // requests. type Generate func() (*Item, error) diff --git a/exchanges/subscription/subscription.go b/exchanges/subscription/subscription.go index 8a3fcfda793..df29699ba55 100644 --- a/exchanges/subscription/subscription.go +++ b/exchanges/subscription/subscription.go @@ -120,7 +120,7 @@ func (s *Subscription) SetKey(key any) { // EnsureKeyed returns the subscription key // If no key exists then ExactKey will be used func (s *Subscription) EnsureKeyed() any { - // Juggle RLock/WLock to minimize concurrent bottleneck for hottest path + // Juggle RLock/WLock to minimise concurrent bottleneck for hottest path s.m.RLock() if s.Key != nil { defer s.m.RUnlock() diff --git a/exchanges/ticker/ticker_test.go b/exchanges/ticker/ticker_test.go index f8b347bcdc2..f2ac032b123 100644 --- a/exchanges/ticker/ticker_test.go +++ b/exchanges/ticker/ticker_test.go @@ -364,17 +364,17 @@ func TestProcessTicker(t *testing.T) { // non-appending function to tickers } wg.Go(func() { - //nolint:gosec // no need to import crypo/rand for testing + //nolint:gosec // no need to import crypto/rand for testing newName := "Exchange" + strconv.FormatInt(rand.Int63(), 10) - newPairs, err := currency.NewPairFromStrings("BTC"+strconv.FormatInt(rand.Int63(), 10), //nolint:gosec // no need to import crypo/rand for testing - "USD"+strconv.FormatInt(rand.Int63(), 10)) //nolint:gosec // no need to import crypo/rand for testing + newPairs, err := currency.NewPairFromStrings("BTC"+strconv.FormatInt(rand.Int63(), 10), //nolint:gosec // no need to import crypto/rand for testing + "USD"+strconv.FormatInt(rand.Int63(), 10)) //nolint:gosec // no need to import crypto/rand for testing if err != nil { log.Fatal(err) } tp := Price{ Pair: newPairs, - Last: rand.Float64(), //nolint:gosec // no need to import crypo/rand for testing + Last: rand.Float64(), //nolint:gosec // no need to import crypto/rand for testing ExchangeName: newName, AssetType: asset.Spot, } diff --git a/exchanges/validate/README.md b/exchanges/validate/README.md index 83e85743e90..10acd45f262 100644 --- a/exchanges/validate/README.md +++ b/exchanges/validate/README.md @@ -39,9 +39,9 @@ type Critical struct { } // define validation and add a variadic param -func (supercritcalinfo *Critical) Validate(opt ...validate.Checker) error { +func (superCriticalInfo *Critical) Validate(opt ...validate.Checker) error { // define base level validation - if supercritcalinfo != nil { + if superCriticalInfo != nil { // oh no this is nil, could panic program! } @@ -62,10 +62,10 @@ func (supercritcalinfo *Critical) Validate(opt ...validate.Checker) error { // define an exchange or package level check that returns a validate.Checker // interface -func (supercritcalinfo *Critical) PleaseDontSendMoneyToParents() validate.Checker { +func (superCriticalInfo *Critical) PleaseDontSendMoneyToParents() validate.Checker { return validate.Check(func() error { - if supercritcalinfo.Person == "Mother Dearest" || - supercritcalinfo.Person == "Father Dearest" { + if superCriticalInfo.Person == "Mother Dearest" || + superCriticalInfo.Person == "Father Dearest" { return errors.New("nope") } return nil diff --git a/gctrpc/rpc.pb.go b/gctrpc/rpc.pb.go index 2ed739abcf3..2b4e40ef9cd 100644 --- a/gctrpc/rpc.pb.go +++ b/gctrpc/rpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 +// protoc-gen-go v1.36.11 // protoc (unknown) // source: rpc.proto @@ -363,27 +363,27 @@ func (*GetSubsystemsRequest) Descriptor() ([]byte, []int) { return file_rpc_proto_rawDescGZIP(), []int{6} } -type GetSusbsytemsResponse struct { +type GetSubsystemsResponse struct { state protoimpl.MessageState `protogen:"open.v1"` SubsystemsStatus map[string]bool `protobuf:"bytes,1,rep,name=subsystems_status,json=subsystemsStatus,proto3" json:"subsystems_status,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *GetSusbsytemsResponse) Reset() { - *x = GetSusbsytemsResponse{} +func (x *GetSubsystemsResponse) Reset() { + *x = GetSubsystemsResponse{} mi := &file_rpc_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetSusbsytemsResponse) String() string { +func (x *GetSubsystemsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetSusbsytemsResponse) ProtoMessage() {} +func (*GetSubsystemsResponse) ProtoMessage() {} -func (x *GetSusbsytemsResponse) ProtoReflect() protoreflect.Message { +func (x *GetSubsystemsResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -395,12 +395,12 @@ func (x *GetSusbsytemsResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetSusbsytemsResponse.ProtoReflect.Descriptor instead. -func (*GetSusbsytemsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use GetSubsystemsResponse.ProtoReflect.Descriptor instead. +func (*GetSubsystemsResponse) Descriptor() ([]byte, []int) { return file_rpc_proto_rawDescGZIP(), []int{7} } -func (x *GetSusbsytemsResponse) GetSubsystemsStatus() map[string]bool { +func (x *GetSubsystemsResponse) GetSubsystemsStatus() map[string]bool { if x != nil { return x.SubsystemsStatus } @@ -5636,12 +5636,12 @@ func (x *WithdrawalEventsByExchangeResponse) GetEvent() []*WithdrawalEventRespon } type WithdrawalEventResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Exchange *WithdrawlExchangeEvent `protobuf:"bytes,3,opt,name=exchange,proto3" json:"exchange,omitempty"` - Request *WithdrawalRequestEvent `protobuf:"bytes,4,opt,name=request,proto3" json:"request,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Exchange *WithdrawalExchangeEvent `protobuf:"bytes,3,opt,name=exchange,proto3" json:"exchange,omitempty"` + Request *WithdrawalRequestEvent `protobuf:"bytes,4,opt,name=request,proto3" json:"request,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -5683,7 +5683,7 @@ func (x *WithdrawalEventResponse) GetId() string { return "" } -func (x *WithdrawalEventResponse) GetExchange() *WithdrawlExchangeEvent { +func (x *WithdrawalEventResponse) GetExchange() *WithdrawalExchangeEvent { if x != nil { return x.Exchange } @@ -5711,7 +5711,7 @@ func (x *WithdrawalEventResponse) GetUpdatedAt() *timestamppb.Timestamp { return nil } -type WithdrawlExchangeEvent struct { +type WithdrawalExchangeEvent struct { state protoimpl.MessageState `protogen:"open.v1"` Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` @@ -5720,20 +5720,20 @@ type WithdrawlExchangeEvent struct { sizeCache protoimpl.SizeCache } -func (x *WithdrawlExchangeEvent) Reset() { - *x = WithdrawlExchangeEvent{} +func (x *WithdrawalExchangeEvent) Reset() { + *x = WithdrawalExchangeEvent{} mi := &file_rpc_proto_msgTypes[96] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *WithdrawlExchangeEvent) String() string { +func (x *WithdrawalExchangeEvent) String() string { return protoimpl.X.MessageStringOf(x) } -func (*WithdrawlExchangeEvent) ProtoMessage() {} +func (*WithdrawalExchangeEvent) ProtoMessage() {} -func (x *WithdrawlExchangeEvent) ProtoReflect() protoreflect.Message { +func (x *WithdrawalExchangeEvent) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[96] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -5745,26 +5745,26 @@ func (x *WithdrawlExchangeEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use WithdrawlExchangeEvent.ProtoReflect.Descriptor instead. -func (*WithdrawlExchangeEvent) Descriptor() ([]byte, []int) { +// Deprecated: Use WithdrawalExchangeEvent.ProtoReflect.Descriptor instead. +func (*WithdrawalExchangeEvent) Descriptor() ([]byte, []int) { return file_rpc_proto_rawDescGZIP(), []int{96} } -func (x *WithdrawlExchangeEvent) GetName() string { +func (x *WithdrawalExchangeEvent) GetName() string { if x != nil { return x.Name } return "" } -func (x *WithdrawlExchangeEvent) GetId() string { +func (x *WithdrawalExchangeEvent) GetId() string { if x != nil { return x.Id } return "" } -func (x *WithdrawlExchangeEvent) GetStatus() string { +func (x *WithdrawalExchangeEvent) GetStatus() string { if x != nil { return x.Status } @@ -15127,8 +15127,8 @@ const file_rpc_proto_rawDesc = "" + "\x17GenericSubsystemRequest\x12\x1c\n" + "\tsubsystem\x18\x01 \x01(\tR\tsubsystem\"\x16\n" + "\x14GetSubsystemsRequest\"\xbe\x01\n" + - "\x15GetSusbsytemsResponse\x12`\n" + - "\x11subsystems_status\x18\x01 \x03(\v23.gctrpc.GetSusbsytemsResponse.SubsystemsStatusEntryR\x10subsystemsStatus\x1aC\n" + + "\x15GetSubsystemsResponse\x12`\n" + + "\x11subsystems_status\x18\x01 \x03(\v23.gctrpc.GetSubsystemsResponse.SubsystemsStatusEntryR\x10subsystemsStatus\x1aC\n" + "\x15SubsystemsStatusEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + "\x05value\x18\x02 \x01(\bR\x05value:\x028\x01\"\x18\n" + @@ -15553,16 +15553,16 @@ const file_rpc_proto_rawDesc = "" + "\x03end\x18\x03 \x01(\tR\x03end\x12\x14\n" + "\x05limit\x18\x04 \x01(\x05R\x05limit\"[\n" + "\"WithdrawalEventsByExchangeResponse\x125\n" + - "\x05event\x18\x02 \x03(\v2\x1f.gctrpc.WithdrawalEventResponseR\x05event\"\x95\x02\n" + + "\x05event\x18\x02 \x03(\v2\x1f.gctrpc.WithdrawalEventResponseR\x05event\"\x96\x02\n" + "\x17WithdrawalEventResponse\x12\x0e\n" + - "\x02id\x18\x02 \x01(\tR\x02id\x12:\n" + - "\bexchange\x18\x03 \x01(\v2\x1e.gctrpc.WithdrawlExchangeEventR\bexchange\x128\n" + + "\x02id\x18\x02 \x01(\tR\x02id\x12;\n" + + "\bexchange\x18\x03 \x01(\v2\x1f.gctrpc.WithdrawalExchangeEventR\bexchange\x128\n" + "\arequest\x18\x04 \x01(\v2\x1e.gctrpc.WithdrawalRequestEventR\arequest\x129\n" + "\n" + "created_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + "\n" + - "updated_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"T\n" + - "\x16WithdrawlExchangeEvent\x12\x12\n" + + "updated_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"U\n" + + "\x17WithdrawalExchangeEvent\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04name\x12\x0e\n" + "\x02id\x18\x02 \x01(\tR\x02id\x12\x16\n" + "\x06status\x18\x03 \x01(\tR\x06status\"\xea\x01\n" + @@ -16370,7 +16370,7 @@ const file_rpc_proto_rawDesc = "" + "\x03url\x18\x01 \x01(\tR\x03url2\xccl\n" + "\x15GoCryptoTraderService\x12O\n" + "\aGetInfo\x12\x16.gctrpc.GetInfoRequest\x1a\x17.gctrpc.GetInfoResponse\"\x13\x82\xd3\xe4\x93\x02\r\x12\v/v1/getinfo\x12g\n" + - "\rGetSubsystems\x12\x1c.gctrpc.GetSubsystemsRequest\x1a\x1d.gctrpc.GetSusbsytemsResponse\"\x19\x82\xd3\xe4\x93\x02\x13\x12\x11/v1/getsubsystems\x12h\n" + + "\rGetSubsystems\x12\x1c.gctrpc.GetSubsystemsRequest\x1a\x1d.gctrpc.GetSubsystemsResponse\"\x19\x82\xd3\xe4\x93\x02\x13\x12\x11/v1/getsubsystems\x12h\n" + "\x0fEnableSubsystem\x12\x1f.gctrpc.GenericSubsystemRequest\x1a\x17.gctrpc.GenericResponse\"\x1b\x82\xd3\xe4\x93\x02\x15\x12\x13/v1/enablesubsystem\x12j\n" + "\x10DisableSubsystem\x12\x1f.gctrpc.GenericSubsystemRequest\x1a\x17.gctrpc.GenericResponse\"\x1c\x82\xd3\xe4\x93\x02\x16\x12\x14/v1/disablesubsystem\x12o\n" + "\x0fGetRPCEndpoints\x12\x1e.gctrpc.GetRPCEndpointsRequest\x1a\x1f.gctrpc.GetRPCEndpointsResponse\"\x1b\x82\xd3\xe4\x93\x02\x15\x12\x13/v1/getrpcendpoints\x12\x93\x01\n" + @@ -16507,7 +16507,7 @@ var file_rpc_proto_goTypes = []any{ (*GetCommunicationRelayersResponse)(nil), // 4: gctrpc.GetCommunicationRelayersResponse (*GenericSubsystemRequest)(nil), // 5: gctrpc.GenericSubsystemRequest (*GetSubsystemsRequest)(nil), // 6: gctrpc.GetSubsystemsRequest - (*GetSusbsytemsResponse)(nil), // 7: gctrpc.GetSusbsytemsResponse + (*GetSubsystemsResponse)(nil), // 7: gctrpc.GetSubsystemsResponse (*GetRPCEndpointsRequest)(nil), // 8: gctrpc.GetRPCEndpointsRequest (*RPCEndpoint)(nil), // 9: gctrpc.RPCEndpoint (*GetRPCEndpointsResponse)(nil), // 10: gctrpc.GetRPCEndpointsResponse @@ -16596,7 +16596,7 @@ var file_rpc_proto_goTypes = []any{ (*WithdrawalEventsByDateRequest)(nil), // 93: gctrpc.WithdrawalEventsByDateRequest (*WithdrawalEventsByExchangeResponse)(nil), // 94: gctrpc.WithdrawalEventsByExchangeResponse (*WithdrawalEventResponse)(nil), // 95: gctrpc.WithdrawalEventResponse - (*WithdrawlExchangeEvent)(nil), // 96: gctrpc.WithdrawlExchangeEvent + (*WithdrawalExchangeEvent)(nil), // 96: gctrpc.WithdrawalExchangeEvent (*WithdrawalRequestEvent)(nil), // 97: gctrpc.WithdrawalRequestEvent (*FiatWithdrawalEvent)(nil), // 98: gctrpc.FiatWithdrawalEvent (*CryptoWithdrawalEvent)(nil), // 99: gctrpc.CryptoWithdrawalEvent @@ -16729,7 +16729,7 @@ var file_rpc_proto_goTypes = []any{ nil, // 226: gctrpc.GetInfoResponse.SubsystemStatusEntry nil, // 227: gctrpc.GetInfoResponse.RpcEndpointsEntry nil, // 228: gctrpc.GetCommunicationRelayersResponse.CommunicationRelayersEntry - nil, // 229: gctrpc.GetSusbsytemsResponse.SubsystemsStatusEntry + nil, // 229: gctrpc.GetSubsystemsResponse.SubsystemsStatusEntry nil, // 230: gctrpc.GetRPCEndpointsResponse.EndpointsEntry nil, // 231: gctrpc.GetExchangeOTPsResponse.OtpCodesEntry nil, // 232: gctrpc.GetExchangeInfoResponse.SupportedAssetsEntry @@ -16746,7 +16746,7 @@ var file_rpc_proto_depIdxs = []int32{ 226, // 0: gctrpc.GetInfoResponse.subsystem_status:type_name -> gctrpc.GetInfoResponse.SubsystemStatusEntry 227, // 1: gctrpc.GetInfoResponse.rpc_endpoints:type_name -> gctrpc.GetInfoResponse.RpcEndpointsEntry 228, // 2: gctrpc.GetCommunicationRelayersResponse.communication_relayers:type_name -> gctrpc.GetCommunicationRelayersResponse.CommunicationRelayersEntry - 229, // 3: gctrpc.GetSusbsytemsResponse.subsystems_status:type_name -> gctrpc.GetSusbsytemsResponse.SubsystemsStatusEntry + 229, // 3: gctrpc.GetSubsystemsResponse.subsystems_status:type_name -> gctrpc.GetSubsystemsResponse.SubsystemsStatusEntry 230, // 4: gctrpc.GetRPCEndpointsResponse.endpoints:type_name -> gctrpc.GetRPCEndpointsResponse.EndpointsEntry 231, // 5: gctrpc.GetExchangeOTPsResponse.otp_codes:type_name -> gctrpc.GetExchangeOTPsResponse.OtpCodesEntry 232, // 6: gctrpc.GetExchangeInfoResponse.supported_assets:type_name -> gctrpc.GetExchangeInfoResponse.SupportedAssetsEntry @@ -16795,7 +16795,7 @@ var file_rpc_proto_depIdxs = []int32{ 237, // 49: gctrpc.GetCryptocurrencyDepositAddressesResponse.addresses:type_name -> gctrpc.GetCryptocurrencyDepositAddressesResponse.AddressesEntry 95, // 50: gctrpc.WithdrawalEventByIDResponse.event:type_name -> gctrpc.WithdrawalEventResponse 95, // 51: gctrpc.WithdrawalEventsByExchangeResponse.event:type_name -> gctrpc.WithdrawalEventResponse - 96, // 52: gctrpc.WithdrawalEventResponse.exchange:type_name -> gctrpc.WithdrawlExchangeEvent + 96, // 52: gctrpc.WithdrawalEventResponse.exchange:type_name -> gctrpc.WithdrawalExchangeEvent 97, // 53: gctrpc.WithdrawalEventResponse.request:type_name -> gctrpc.WithdrawalRequestEvent 240, // 54: gctrpc.WithdrawalEventResponse.created_at:type_name -> google.protobuf.Timestamp 240, // 55: gctrpc.WithdrawalEventResponse.updated_at:type_name -> google.protobuf.Timestamp @@ -17015,7 +17015,7 @@ var file_rpc_proto_depIdxs = []int32{ 220, // 269: gctrpc.GoCryptoTraderService.GetOpenInterest:input_type -> gctrpc.GetOpenInterestRequest 224, // 270: gctrpc.GoCryptoTraderService.GetCurrencyTradeURL:input_type -> gctrpc.GetCurrencyTradeURLRequest 1, // 271: gctrpc.GoCryptoTraderService.GetInfo:output_type -> gctrpc.GetInfoResponse - 7, // 272: gctrpc.GoCryptoTraderService.GetSubsystems:output_type -> gctrpc.GetSusbsytemsResponse + 7, // 272: gctrpc.GoCryptoTraderService.GetSubsystems:output_type -> gctrpc.GetSubsystemsResponse 132, // 273: gctrpc.GoCryptoTraderService.EnableSubsystem:output_type -> gctrpc.GenericResponse 132, // 274: gctrpc.GoCryptoTraderService.DisableSubsystem:output_type -> gctrpc.GenericResponse 10, // 275: gctrpc.GoCryptoTraderService.GetRPCEndpoints:output_type -> gctrpc.GetRPCEndpointsResponse diff --git a/gctrpc/rpc.pb.gw.go b/gctrpc/rpc.pb.gw.go index 3481c997432..fa63379d313 100644 --- a/gctrpc/rpc.pb.gw.go +++ b/gctrpc/rpc.pb.gw.go @@ -10,6 +10,7 @@ package gctrpc import ( "context" + "errors" "io" "net/http" @@ -24,542 +25,532 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_GoCryptoTraderService_GetInfo_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetInfoRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetInfoRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GetInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetInfo_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetInfoRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetInfoRequest + metadata runtime.ServerMetadata + ) msg, err := server.GetInfo(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GetSubsystems_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetSubsystemsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetSubsystemsRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GetSubsystems(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetSubsystems_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetSubsystemsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetSubsystemsRequest + metadata runtime.ServerMetadata + ) msg, err := server.GetSubsystems(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_EnableSubsystem_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_EnableSubsystem_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_EnableSubsystem_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GenericSubsystemRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GenericSubsystemRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_EnableSubsystem_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.EnableSubsystem(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_EnableSubsystem_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GenericSubsystemRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GenericSubsystemRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_EnableSubsystem_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.EnableSubsystem(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_DisableSubsystem_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_DisableSubsystem_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_DisableSubsystem_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GenericSubsystemRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GenericSubsystemRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_DisableSubsystem_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.DisableSubsystem(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_DisableSubsystem_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GenericSubsystemRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GenericSubsystemRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_DisableSubsystem_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.DisableSubsystem(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GetRPCEndpoints_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRPCEndpointsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetRPCEndpointsRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GetRPCEndpoints(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetRPCEndpoints_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRPCEndpointsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetRPCEndpointsRequest + metadata runtime.ServerMetadata + ) msg, err := server.GetRPCEndpoints(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GetCommunicationRelayers_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetCommunicationRelayersRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetCommunicationRelayersRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GetCommunicationRelayers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetCommunicationRelayers_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetCommunicationRelayersRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetCommunicationRelayersRequest + metadata runtime.ServerMetadata + ) msg, err := server.GetCommunicationRelayers(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetExchanges_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetExchanges_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetExchanges_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetExchangesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetExchangesRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetExchanges_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetExchanges(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetExchanges_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetExchangesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetExchangesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetExchanges_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetExchanges(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_DisableExchange_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GenericExchangeNameRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GenericExchangeNameRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.DisableExchange(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_DisableExchange_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GenericExchangeNameRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GenericExchangeNameRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.DisableExchange(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetExchangeInfo_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetExchangeInfo_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetExchangeInfo_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GenericExchangeNameRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GenericExchangeNameRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetExchangeInfo_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetExchangeInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetExchangeInfo_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GenericExchangeNameRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GenericExchangeNameRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetExchangeInfo_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetExchangeInfo(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetExchangeOTPCode_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetExchangeOTPCode_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetExchangeOTPCode_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GenericExchangeNameRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GenericExchangeNameRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetExchangeOTPCode_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetExchangeOTPCode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetExchangeOTPCode_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GenericExchangeNameRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GenericExchangeNameRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetExchangeOTPCode_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetExchangeOTPCode(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GetExchangeOTPCodes_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetExchangeOTPsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetExchangeOTPsRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GetExchangeOTPCodes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetExchangeOTPCodes_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetExchangeOTPsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetExchangeOTPsRequest + metadata runtime.ServerMetadata + ) msg, err := server.GetExchangeOTPCodes(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_EnableExchange_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GenericExchangeNameRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GenericExchangeNameRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.EnableExchange(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_EnableExchange_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GenericExchangeNameRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GenericExchangeNameRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.EnableExchange(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GetTicker_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetTickerRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GetTickerRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GetTicker(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetTicker_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetTickerRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GetTickerRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetTicker(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GetTickers_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetTickersRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetTickersRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GetTickers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetTickers_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetTickersRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetTickersRequest + metadata runtime.ServerMetadata + ) msg, err := server.GetTickers(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GetOrderbook_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetOrderbookRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GetOrderbookRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GetOrderbook(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetOrderbook_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetOrderbookRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GetOrderbookRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetOrderbook(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GetOrderbooks_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetOrderbooksRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetOrderbooksRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GetOrderbooks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetOrderbooks_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetOrderbooksRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetOrderbooksRequest + metadata runtime.ServerMetadata + ) msg, err := server.GetOrderbooks(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetAccountBalances_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetAccountBalances_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetAccountBalances_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAccountBalancesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetAccountBalancesRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetAccountBalances_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetAccountBalances(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetAccountBalances_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAccountBalancesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetAccountBalancesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetAccountBalances_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetAccountBalances(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_UpdateAccountBalances_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_UpdateAccountBalances_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_UpdateAccountBalances_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAccountBalancesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetAccountBalancesRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_UpdateAccountBalances_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.UpdateAccountBalances(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_UpdateAccountBalances_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAccountBalancesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetAccountBalancesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_UpdateAccountBalances_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.UpdateAccountBalances(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetAccountBalancesStream_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetAccountBalancesStream_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetAccountBalancesStream_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (GoCryptoTraderService_GetAccountBalancesStreamClient, runtime.ServerMetadata, error) { - var protoReq GetAccountBalancesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetAccountBalancesRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetAccountBalancesStream_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - stream, err := client.GetAccountBalancesStream(ctx, &protoReq) if err != nil { return nil, metadata, err @@ -570,950 +561,806 @@ func request_GoCryptoTraderService_GetAccountBalancesStream_0(ctx context.Contex } metadata.HeaderMD = header return stream, metadata, nil - } func request_GoCryptoTraderService_GetConfig_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetConfigRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetConfigRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GetConfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetConfig_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetConfigRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetConfigRequest + metadata runtime.ServerMetadata + ) msg, err := server.GetConfig(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GetPortfolio_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPortfolioRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetPortfolioRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GetPortfolio(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetPortfolio_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPortfolioRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetPortfolioRequest + metadata runtime.ServerMetadata + ) msg, err := server.GetPortfolio(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GetPortfolioSummary_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPortfolioSummaryRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetPortfolioSummaryRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GetPortfolioSummary(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetPortfolioSummary_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPortfolioSummaryRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetPortfolioSummaryRequest + metadata runtime.ServerMetadata + ) msg, err := server.GetPortfolioSummary(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_AddPortfolioAddress_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddPortfolioAddressRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq AddPortfolioAddressRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.AddPortfolioAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_AddPortfolioAddress_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddPortfolioAddressRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq AddPortfolioAddressRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.AddPortfolioAddress(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_RemovePortfolioAddress_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RemovePortfolioAddressRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq RemovePortfolioAddressRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.RemovePortfolioAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_RemovePortfolioAddress_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RemovePortfolioAddressRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq RemovePortfolioAddressRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.RemovePortfolioAddress(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GetForexProviders_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetForexProvidersRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetForexProvidersRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GetForexProviders(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetForexProviders_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetForexProvidersRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetForexProvidersRequest + metadata runtime.ServerMetadata + ) msg, err := server.GetForexProviders(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GetForexRates_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetForexRatesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetForexRatesRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GetForexRates(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetForexRates_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetForexRatesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetForexRatesRequest + metadata runtime.ServerMetadata + ) msg, err := server.GetForexRates(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GetOrders_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetOrdersRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GetOrdersRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GetOrders(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetOrders_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetOrdersRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GetOrdersRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetOrders(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GetOrder_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetOrderRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GetOrderRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GetOrder(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetOrder_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetOrderRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GetOrderRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetOrder(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_SubmitOrder_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SubmitOrderRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq SubmitOrderRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.SubmitOrder(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_SubmitOrder_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SubmitOrderRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq SubmitOrderRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.SubmitOrder(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_SimulateOrder_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SimulateOrderRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq SimulateOrderRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.SimulateOrder(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_SimulateOrder_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SimulateOrderRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq SimulateOrderRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.SimulateOrder(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_WhaleBomb_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq WhaleBombRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq WhaleBombRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.WhaleBomb(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_WhaleBomb_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq WhaleBombRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq WhaleBombRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.WhaleBomb(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_CancelOrder_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CancelOrderRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq CancelOrderRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.CancelOrder(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_CancelOrder_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CancelOrderRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq CancelOrderRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CancelOrder(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_CancelBatchOrders_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CancelBatchOrdersRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq CancelBatchOrdersRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.CancelBatchOrders(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_CancelBatchOrders_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CancelBatchOrdersRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq CancelBatchOrdersRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CancelBatchOrders(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_CancelAllOrders_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CancelAllOrdersRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq CancelAllOrdersRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.CancelAllOrders(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_CancelAllOrders_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CancelAllOrdersRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq CancelAllOrdersRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CancelAllOrders(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GetEvents_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetEventsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetEventsRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GetEvents(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetEvents_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetEventsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetEventsRequest + metadata runtime.ServerMetadata + ) msg, err := server.GetEvents(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_AddEvent_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddEventRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq AddEventRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.AddEvent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_AddEvent_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddEventRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq AddEventRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.AddEvent(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_RemoveEvent_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RemoveEventRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq RemoveEventRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.RemoveEvent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_RemoveEvent_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RemoveEventRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq RemoveEventRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.RemoveEvent(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GetCryptocurrencyDepositAddresses_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetCryptocurrencyDepositAddressesRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GetCryptocurrencyDepositAddressesRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GetCryptocurrencyDepositAddresses(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetCryptocurrencyDepositAddresses_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetCryptocurrencyDepositAddressesRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GetCryptocurrencyDepositAddressesRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetCryptocurrencyDepositAddresses(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetCryptocurrencyDepositAddressRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GetCryptocurrencyDepositAddressRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GetCryptocurrencyDepositAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetCryptocurrencyDepositAddressRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GetCryptocurrencyDepositAddressRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetCryptocurrencyDepositAddress(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GetAvailableTransferChains_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAvailableTransferChainsRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GetAvailableTransferChainsRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GetAvailableTransferChains(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetAvailableTransferChains_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAvailableTransferChainsRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GetAvailableTransferChainsRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetAvailableTransferChains(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_WithdrawFiatFunds_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq WithdrawFiatRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq WithdrawFiatRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.WithdrawFiatFunds(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_WithdrawFiatFunds_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq WithdrawFiatRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq WithdrawFiatRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.WithdrawFiatFunds(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq WithdrawCryptoRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq WithdrawCryptoRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.WithdrawCryptocurrencyFunds(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq WithdrawCryptoRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq WithdrawCryptoRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.WithdrawCryptocurrencyFunds(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_WithdrawalEventByID_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq WithdrawalEventByIDRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq WithdrawalEventByIDRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.WithdrawalEventByID(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_WithdrawalEventByID_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq WithdrawalEventByIDRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq WithdrawalEventByIDRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.WithdrawalEventByID(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_WithdrawalEventsByExchange_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq WithdrawalEventsByExchangeRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq WithdrawalEventsByExchangeRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.WithdrawalEventsByExchange(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_WithdrawalEventsByExchange_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq WithdrawalEventsByExchangeRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq WithdrawalEventsByExchangeRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.WithdrawalEventsByExchange(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_WithdrawalEventsByDate_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq WithdrawalEventsByDateRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq WithdrawalEventsByDateRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.WithdrawalEventsByDate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_WithdrawalEventsByDate_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq WithdrawalEventsByDateRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq WithdrawalEventsByDateRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.WithdrawalEventsByDate(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetLoggerDetails_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetLoggerDetails_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetLoggerDetails_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetLoggerDetailsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetLoggerDetailsRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetLoggerDetails_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetLoggerDetails(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetLoggerDetails_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetLoggerDetailsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetLoggerDetailsRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetLoggerDetails_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetLoggerDetails(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_SetLoggerDetails_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetLoggerDetailsRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq SetLoggerDetailsRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.SetLoggerDetails(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_SetLoggerDetails_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetLoggerDetailsRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq SetLoggerDetailsRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.SetLoggerDetails(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GetExchangePairs_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetExchangePairsRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GetExchangePairsRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GetExchangePairs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetExchangePairs_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetExchangePairsRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GetExchangePairsRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetExchangePairs(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_SetExchangePair_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetExchangePairRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq SetExchangePairRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.SetExchangePair(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_SetExchangePair_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetExchangePairRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq SetExchangePairRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.SetExchangePair(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetOrderbookStream_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetOrderbookStream_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetOrderbookStream_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (GoCryptoTraderService_GetOrderbookStreamClient, runtime.ServerMetadata, error) { - var protoReq GetOrderbookStreamRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetOrderbookStreamRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetOrderbookStream_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - stream, err := client.GetOrderbookStream(ctx, &protoReq) if err != nil { return nil, metadata, err @@ -1524,24 +1371,24 @@ func request_GoCryptoTraderService_GetOrderbookStream_0(ctx context.Context, mar } metadata.HeaderMD = header return stream, metadata, nil - } -var ( - filter_GoCryptoTraderService_GetExchangeOrderbookStream_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetExchangeOrderbookStream_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetExchangeOrderbookStream_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (GoCryptoTraderService_GetExchangeOrderbookStreamClient, runtime.ServerMetadata, error) { - var protoReq GetExchangeOrderbookStreamRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetExchangeOrderbookStreamRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetExchangeOrderbookStream_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - stream, err := client.GetExchangeOrderbookStream(ctx, &protoReq) if err != nil { return nil, metadata, err @@ -1552,24 +1399,24 @@ func request_GoCryptoTraderService_GetExchangeOrderbookStream_0(ctx context.Cont } metadata.HeaderMD = header return stream, metadata, nil - } -var ( - filter_GoCryptoTraderService_GetTickerStream_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetTickerStream_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetTickerStream_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (GoCryptoTraderService_GetTickerStreamClient, runtime.ServerMetadata, error) { - var protoReq GetTickerStreamRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetTickerStreamRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetTickerStream_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - stream, err := client.GetTickerStream(ctx, &protoReq) if err != nil { return nil, metadata, err @@ -1580,24 +1427,24 @@ func request_GoCryptoTraderService_GetTickerStream_0(ctx context.Context, marsha } metadata.HeaderMD = header return stream, metadata, nil - } -var ( - filter_GoCryptoTraderService_GetExchangeTickerStream_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetExchangeTickerStream_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetExchangeTickerStream_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (GoCryptoTraderService_GetExchangeTickerStreamClient, runtime.ServerMetadata, error) { - var protoReq GetExchangeTickerStreamRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetExchangeTickerStreamRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetExchangeTickerStream_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - stream, err := client.GetExchangeTickerStream(ctx, &protoReq) if err != nil { return nil, metadata, err @@ -1608,750 +1455,697 @@ func request_GoCryptoTraderService_GetExchangeTickerStream_0(ctx context.Context } metadata.HeaderMD = header return stream, metadata, nil - } -var ( - filter_GoCryptoTraderService_GetAuditEvent_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetAuditEvent_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetAuditEvent_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAuditEventRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetAuditEventRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetAuditEvent_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetAuditEvent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetAuditEvent_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAuditEventRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetAuditEventRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetAuditEvent_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetAuditEvent(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GCTScriptExecute_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GCTScriptExecute_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GCTScriptExecute_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GCTScriptExecuteRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GCTScriptExecuteRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GCTScriptExecute_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GCTScriptExecute(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GCTScriptExecute_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GCTScriptExecuteRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GCTScriptExecuteRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GCTScriptExecute_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GCTScriptExecute(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GCTScriptUpload_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GCTScriptUploadRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GCTScriptUploadRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GCTScriptUpload(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GCTScriptUpload_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GCTScriptUploadRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GCTScriptUploadRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GCTScriptUpload(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GCTScriptReadScript_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GCTScriptReadScriptRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GCTScriptReadScriptRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GCTScriptReadScript(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GCTScriptReadScript_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GCTScriptReadScriptRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GCTScriptReadScriptRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GCTScriptReadScript(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GCTScriptStatus_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GCTScriptStatusRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GCTScriptStatusRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GCTScriptStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GCTScriptStatus_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GCTScriptStatusRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GCTScriptStatusRequest + metadata runtime.ServerMetadata + ) msg, err := server.GCTScriptStatus(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GCTScriptQuery_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GCTScriptQuery_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GCTScriptQuery_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GCTScriptQueryRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GCTScriptQueryRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GCTScriptQuery_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GCTScriptQuery(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GCTScriptQuery_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GCTScriptQueryRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GCTScriptQueryRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GCTScriptQuery_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GCTScriptQuery(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GCTScriptStop_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GCTScriptStopRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GCTScriptStopRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GCTScriptStop(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GCTScriptStop_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GCTScriptStopRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GCTScriptStopRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GCTScriptStop(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GCTScriptStopAll_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GCTScriptStopAllRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GCTScriptStopAllRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GCTScriptStopAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GCTScriptStopAll_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GCTScriptStopAllRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GCTScriptStopAllRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GCTScriptStopAll(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GCTScriptListAll_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GCTScriptListAllRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GCTScriptListAllRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GCTScriptListAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GCTScriptListAll_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GCTScriptListAllRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GCTScriptListAllRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GCTScriptListAll(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GCTScriptAutoLoadToggle_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GCTScriptAutoLoadRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GCTScriptAutoLoadRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GCTScriptAutoLoadToggle(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GCTScriptAutoLoadToggle_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GCTScriptAutoLoadRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GCTScriptAutoLoadRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GCTScriptAutoLoadToggle(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetHistoricCandles_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetHistoricCandles_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetHistoricCandles_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetHistoricCandlesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetHistoricCandlesRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetHistoricCandles_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetHistoricCandles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetHistoricCandles_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetHistoricCandlesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetHistoricCandlesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetHistoricCandles_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetHistoricCandles(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_SetExchangeAsset_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_SetExchangeAsset_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_SetExchangeAsset_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetExchangeAssetRequest - var metadata runtime.ServerMetadata - + var ( + protoReq SetExchangeAssetRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_SetExchangeAsset_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.SetExchangeAsset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_SetExchangeAsset_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetExchangeAssetRequest - var metadata runtime.ServerMetadata - + var ( + protoReq SetExchangeAssetRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_SetExchangeAsset_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.SetExchangeAsset(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_SetAllExchangePairs_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_SetAllExchangePairs_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_SetAllExchangePairs_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetExchangeAllPairsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq SetExchangeAllPairsRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_SetAllExchangePairs_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.SetAllExchangePairs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_SetAllExchangePairs_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetExchangeAllPairsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq SetExchangeAllPairsRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_SetAllExchangePairs_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.SetAllExchangePairs(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_UpdateExchangeSupportedPairs_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_UpdateExchangeSupportedPairs_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_UpdateExchangeSupportedPairs_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateExchangeSupportedPairsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq UpdateExchangeSupportedPairsRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_UpdateExchangeSupportedPairs_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.UpdateExchangeSupportedPairs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_UpdateExchangeSupportedPairs_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateExchangeSupportedPairsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq UpdateExchangeSupportedPairsRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_UpdateExchangeSupportedPairs_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.UpdateExchangeSupportedPairs(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetExchangeAssets_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetExchangeAssets_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetExchangeAssets_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetExchangeAssetsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetExchangeAssetsRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetExchangeAssets_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetExchangeAssets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetExchangeAssets_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetExchangeAssetsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetExchangeAssetsRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetExchangeAssets_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetExchangeAssets(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_WebsocketGetInfo_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_WebsocketGetInfo_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_WebsocketGetInfo_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq WebsocketGetInfoRequest - var metadata runtime.ServerMetadata - + var ( + protoReq WebsocketGetInfoRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_WebsocketGetInfo_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.WebsocketGetInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_WebsocketGetInfo_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq WebsocketGetInfoRequest - var metadata runtime.ServerMetadata - + var ( + protoReq WebsocketGetInfoRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_WebsocketGetInfo_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.WebsocketGetInfo(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_WebsocketSetEnabled_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_WebsocketSetEnabled_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_WebsocketSetEnabled_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq WebsocketSetEnabledRequest - var metadata runtime.ServerMetadata - + var ( + protoReq WebsocketSetEnabledRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_WebsocketSetEnabled_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.WebsocketSetEnabled(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_WebsocketSetEnabled_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq WebsocketSetEnabledRequest - var metadata runtime.ServerMetadata - + var ( + protoReq WebsocketSetEnabledRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_WebsocketSetEnabled_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.WebsocketSetEnabled(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_WebsocketGetSubscriptions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_WebsocketGetSubscriptions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_WebsocketGetSubscriptions_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq WebsocketGetSubscriptionsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq WebsocketGetSubscriptionsRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_WebsocketGetSubscriptions_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.WebsocketGetSubscriptions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_WebsocketGetSubscriptions_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq WebsocketGetSubscriptionsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq WebsocketGetSubscriptionsRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_WebsocketGetSubscriptions_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.WebsocketGetSubscriptions(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_WebsocketSetProxy_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_WebsocketSetProxy_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_WebsocketSetProxy_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq WebsocketSetProxyRequest - var metadata runtime.ServerMetadata - + var ( + protoReq WebsocketSetProxyRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_WebsocketSetProxy_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.WebsocketSetProxy(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_WebsocketSetProxy_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq WebsocketSetProxyRequest - var metadata runtime.ServerMetadata - + var ( + protoReq WebsocketSetProxyRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_WebsocketSetProxy_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.WebsocketSetProxy(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_WebsocketSetURL_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_WebsocketSetURL_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_WebsocketSetURL_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq WebsocketSetURLRequest - var metadata runtime.ServerMetadata - + var ( + protoReq WebsocketSetURLRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_WebsocketSetURL_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.WebsocketSetURL(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_WebsocketSetURL_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq WebsocketSetURLRequest - var metadata runtime.ServerMetadata - + var ( + protoReq WebsocketSetURLRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_WebsocketSetURL_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.WebsocketSetURL(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetRecentTrades_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetRecentTrades_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetRecentTrades_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetSavedTradesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetSavedTradesRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetRecentTrades_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetRecentTrades(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetRecentTrades_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetSavedTradesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetSavedTradesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetRecentTrades_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetRecentTrades(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetHistoricTrades_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetHistoricTrades_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetHistoricTrades_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (GoCryptoTraderService_GetHistoricTradesClient, runtime.ServerMetadata, error) { - var protoReq GetSavedTradesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetSavedTradesRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetHistoricTrades_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - stream, err := client.GetHistoricTrades(ctx, &protoReq) if err != nil { return nil, metadata, err @@ -2362,1412 +2156,1329 @@ func request_GoCryptoTraderService_GetHistoricTrades_0(ctx context.Context, mars } metadata.HeaderMD = header return stream, metadata, nil - } -var ( - filter_GoCryptoTraderService_GetSavedTrades_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetSavedTrades_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetSavedTrades_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetSavedTradesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetSavedTradesRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetSavedTrades_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetSavedTrades(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetSavedTrades_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetSavedTradesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetSavedTradesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetSavedTrades_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetSavedTrades(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_ConvertTradesToCandles_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_ConvertTradesToCandles_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_ConvertTradesToCandles_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ConvertTradesToCandlesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ConvertTradesToCandlesRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_ConvertTradesToCandles_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ConvertTradesToCandles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_ConvertTradesToCandles_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ConvertTradesToCandlesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ConvertTradesToCandlesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_ConvertTradesToCandles_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ConvertTradesToCandles(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_FindMissingSavedCandleIntervals_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_FindMissingSavedCandleIntervals_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_FindMissingSavedCandleIntervals_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq FindMissingCandlePeriodsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq FindMissingCandlePeriodsRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_FindMissingSavedCandleIntervals_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.FindMissingSavedCandleIntervals(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_FindMissingSavedCandleIntervals_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq FindMissingCandlePeriodsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq FindMissingCandlePeriodsRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_FindMissingSavedCandleIntervals_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.FindMissingSavedCandleIntervals(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_FindMissingSavedTradeIntervals_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_FindMissingSavedTradeIntervals_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_FindMissingSavedTradeIntervals_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq FindMissingTradePeriodsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq FindMissingTradePeriodsRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_FindMissingSavedTradeIntervals_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.FindMissingSavedTradeIntervals(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_FindMissingSavedTradeIntervals_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq FindMissingTradePeriodsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq FindMissingTradePeriodsRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_FindMissingSavedTradeIntervals_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.FindMissingSavedTradeIntervals(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_SetExchangeTradeProcessing_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_SetExchangeTradeProcessing_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_SetExchangeTradeProcessing_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetExchangeTradeProcessingRequest - var metadata runtime.ServerMetadata - + var ( + protoReq SetExchangeTradeProcessingRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_SetExchangeTradeProcessing_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.SetExchangeTradeProcessing(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_SetExchangeTradeProcessing_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetExchangeTradeProcessingRequest - var metadata runtime.ServerMetadata - + var ( + protoReq SetExchangeTradeProcessingRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_SetExchangeTradeProcessing_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.SetExchangeTradeProcessing(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_UpsertDataHistoryJob_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpsertDataHistoryJobRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq UpsertDataHistoryJobRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.UpsertDataHistoryJob(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_UpsertDataHistoryJob_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpsertDataHistoryJobRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq UpsertDataHistoryJobRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.UpsertDataHistoryJob(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetDataHistoryJobDetails_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetDataHistoryJobDetails_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetDataHistoryJobDetails_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetDataHistoryJobDetailsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetDataHistoryJobDetailsRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetDataHistoryJobDetails_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetDataHistoryJobDetails(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetDataHistoryJobDetails_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetDataHistoryJobDetailsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetDataHistoryJobDetailsRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetDataHistoryJobDetails_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetDataHistoryJobDetails(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GetActiveDataHistoryJobs_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetInfoRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetInfoRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GetActiveDataHistoryJobs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetActiveDataHistoryJobs_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetInfoRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetInfoRequest + metadata runtime.ServerMetadata + ) msg, err := server.GetActiveDataHistoryJobs(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetDataHistoryJobsBetween_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetDataHistoryJobsBetween_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetDataHistoryJobsBetween_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetDataHistoryJobsBetweenRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetDataHistoryJobsBetweenRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetDataHistoryJobsBetween_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetDataHistoryJobsBetween(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetDataHistoryJobsBetween_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetDataHistoryJobsBetweenRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetDataHistoryJobsBetweenRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetDataHistoryJobsBetween_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetDataHistoryJobsBetween(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetDataHistoryJobSummary_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetDataHistoryJobSummary_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetDataHistoryJobSummary_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetDataHistoryJobDetailsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetDataHistoryJobDetailsRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetDataHistoryJobSummary_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetDataHistoryJobSummary(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetDataHistoryJobSummary_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetDataHistoryJobDetailsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetDataHistoryJobDetailsRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetDataHistoryJobSummary_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetDataHistoryJobSummary(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_SetDataHistoryJobStatus_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetDataHistoryJobStatusRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq SetDataHistoryJobStatusRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.SetDataHistoryJobStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_SetDataHistoryJobStatus_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetDataHistoryJobStatusRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq SetDataHistoryJobStatusRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.SetDataHistoryJobStatus(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateDataHistoryJobPrerequisiteRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq UpdateDataHistoryJobPrerequisiteRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.UpdateDataHistoryJobPrerequisite(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateDataHistoryJobPrerequisiteRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq UpdateDataHistoryJobPrerequisiteRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.UpdateDataHistoryJobPrerequisite(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_GetManagedOrders_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetOrdersRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GetOrdersRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GetManagedOrders(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetManagedOrders_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetOrdersRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq GetOrdersRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetManagedOrders(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_ModifyOrder_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_ModifyOrder_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_ModifyOrder_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyOrderRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ModifyOrderRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_ModifyOrder_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ModifyOrder(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_ModifyOrder_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyOrderRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ModifyOrderRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_ModifyOrder_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ModifyOrder(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_CurrencyStateGetAll_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_CurrencyStateGetAll_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_CurrencyStateGetAll_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CurrencyStateGetAllRequest - var metadata runtime.ServerMetadata - + var ( + protoReq CurrencyStateGetAllRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_CurrencyStateGetAll_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.CurrencyStateGetAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_CurrencyStateGetAll_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CurrencyStateGetAllRequest - var metadata runtime.ServerMetadata - + var ( + protoReq CurrencyStateGetAllRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_CurrencyStateGetAll_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CurrencyStateGetAll(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_CurrencyStateTrading_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_CurrencyStateTrading_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_CurrencyStateTrading_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CurrencyStateTradingRequest - var metadata runtime.ServerMetadata - + var ( + protoReq CurrencyStateTradingRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_CurrencyStateTrading_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.CurrencyStateTrading(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_CurrencyStateTrading_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CurrencyStateTradingRequest - var metadata runtime.ServerMetadata - + var ( + protoReq CurrencyStateTradingRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_CurrencyStateTrading_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CurrencyStateTrading(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_CurrencyStateDeposit_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_CurrencyStateDeposit_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_CurrencyStateDeposit_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CurrencyStateDepositRequest - var metadata runtime.ServerMetadata - + var ( + protoReq CurrencyStateDepositRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_CurrencyStateDeposit_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.CurrencyStateDeposit(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_CurrencyStateDeposit_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CurrencyStateDepositRequest - var metadata runtime.ServerMetadata - + var ( + protoReq CurrencyStateDepositRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_CurrencyStateDeposit_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CurrencyStateDeposit(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_CurrencyStateWithdraw_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_CurrencyStateWithdraw_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_CurrencyStateWithdraw_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CurrencyStateWithdrawRequest - var metadata runtime.ServerMetadata - + var ( + protoReq CurrencyStateWithdrawRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_CurrencyStateWithdraw_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.CurrencyStateWithdraw(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_CurrencyStateWithdraw_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CurrencyStateWithdrawRequest - var metadata runtime.ServerMetadata - + var ( + protoReq CurrencyStateWithdrawRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_CurrencyStateWithdraw_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CurrencyStateWithdraw(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_CurrencyStateTradingPair_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_CurrencyStateTradingPair_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_CurrencyStateTradingPair_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CurrencyStateTradingPairRequest - var metadata runtime.ServerMetadata - + var ( + protoReq CurrencyStateTradingPairRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_CurrencyStateTradingPair_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.CurrencyStateTradingPair(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_CurrencyStateTradingPair_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CurrencyStateTradingPairRequest - var metadata runtime.ServerMetadata - + var ( + protoReq CurrencyStateTradingPairRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_CurrencyStateTradingPair_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CurrencyStateTradingPair(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetFuturesPositionsSummary_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetFuturesPositionsSummary_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetFuturesPositionsSummary_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetFuturesPositionsSummaryRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetFuturesPositionsSummaryRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetFuturesPositionsSummary_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetFuturesPositionsSummary(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetFuturesPositionsSummary_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetFuturesPositionsSummaryRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetFuturesPositionsSummaryRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetFuturesPositionsSummary_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetFuturesPositionsSummary(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetFuturesPositionsOrders_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetFuturesPositionsOrders_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetFuturesPositionsOrders_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetFuturesPositionsOrdersRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetFuturesPositionsOrdersRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetFuturesPositionsOrders_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetFuturesPositionsOrders(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetFuturesPositionsOrders_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetFuturesPositionsOrdersRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetFuturesPositionsOrdersRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetFuturesPositionsOrders_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetFuturesPositionsOrders(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetCollateral_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetCollateral_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetCollateral_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetCollateralRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetCollateralRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetCollateral_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetCollateral(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetCollateral_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetCollateralRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetCollateralRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetCollateral_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetCollateral(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_Shutdown_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ShutdownRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ShutdownRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Shutdown(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_Shutdown_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ShutdownRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ShutdownRequest + metadata runtime.ServerMetadata + ) msg, err := server.Shutdown(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetTechnicalAnalysis_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetTechnicalAnalysis_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetTechnicalAnalysis_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetTechnicalAnalysisRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetTechnicalAnalysisRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetTechnicalAnalysis_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetTechnicalAnalysis(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetTechnicalAnalysis_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetTechnicalAnalysisRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetTechnicalAnalysisRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetTechnicalAnalysis_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetTechnicalAnalysis(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetMarginRatesHistory_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetMarginRatesHistory_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetMarginRatesHistory_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetMarginRatesHistoryRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetMarginRatesHistoryRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetMarginRatesHistory_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetMarginRatesHistory(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetMarginRatesHistory_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetMarginRatesHistoryRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetMarginRatesHistoryRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetMarginRatesHistory_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetMarginRatesHistory(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetManagedPosition_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetManagedPosition_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetManagedPosition_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetManagedPositionRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetManagedPositionRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetManagedPosition_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetManagedPosition(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetManagedPosition_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetManagedPositionRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetManagedPositionRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetManagedPosition_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetManagedPosition(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetAllManagedPositions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetAllManagedPositions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetAllManagedPositions_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAllManagedPositionsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetAllManagedPositionsRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetAllManagedPositions_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetAllManagedPositions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetAllManagedPositions_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAllManagedPositionsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetAllManagedPositionsRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetAllManagedPositions_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetAllManagedPositions(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetFundingRates_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetFundingRates_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetFundingRates_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetFundingRatesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetFundingRatesRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetFundingRates_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetFundingRates(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetFundingRates_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetFundingRatesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetFundingRatesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetFundingRates_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetFundingRates(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetLatestFundingRate_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetLatestFundingRate_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetLatestFundingRate_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetLatestFundingRateRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetLatestFundingRateRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetLatestFundingRate_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetLatestFundingRate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetLatestFundingRate_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetLatestFundingRateRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetLatestFundingRateRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetLatestFundingRate_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetLatestFundingRate(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetOrderbookMovement_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetOrderbookMovement_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetOrderbookMovement_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetOrderbookMovementRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetOrderbookMovementRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetOrderbookMovement_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetOrderbookMovement(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetOrderbookMovement_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetOrderbookMovementRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetOrderbookMovementRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetOrderbookMovement_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetOrderbookMovement(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetOrderbookAmountByNominal_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetOrderbookAmountByNominal_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetOrderbookAmountByNominal_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetOrderbookAmountByNominalRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetOrderbookAmountByNominalRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetOrderbookAmountByNominal_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetOrderbookAmountByNominal(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetOrderbookAmountByNominal_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetOrderbookAmountByNominalRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetOrderbookAmountByNominalRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetOrderbookAmountByNominal_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetOrderbookAmountByNominal(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetOrderbookAmountByImpact_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetOrderbookAmountByImpact_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetOrderbookAmountByImpact_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetOrderbookAmountByImpactRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetOrderbookAmountByImpactRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetOrderbookAmountByImpact_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetOrderbookAmountByImpact(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetOrderbookAmountByImpact_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetOrderbookAmountByImpactRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetOrderbookAmountByImpactRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetOrderbookAmountByImpact_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetOrderbookAmountByImpact(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetCollateralMode_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetCollateralMode_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetCollateralMode_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetCollateralModeRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetCollateralModeRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetCollateralMode_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetCollateralMode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetCollateralMode_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetCollateralModeRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetCollateralModeRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetCollateralMode_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetCollateralMode(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetLeverage_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetLeverage_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetLeverage_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetLeverageRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetLeverageRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetLeverage_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetLeverage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetLeverage_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetLeverageRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetLeverageRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetLeverage_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetLeverage(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_SetCollateralMode_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetCollateralModeRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq SetCollateralModeRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.SetCollateralMode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_SetCollateralMode_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetCollateralModeRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq SetCollateralModeRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.SetCollateralMode(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_SetMarginType_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetMarginTypeRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq SetMarginTypeRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.SetMarginType(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_SetMarginType_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetMarginTypeRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq SetMarginTypeRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.SetMarginType(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_SetLeverage_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetLeverageRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq SetLeverageRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.SetLeverage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_SetLeverage_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetLeverageRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq SetLeverageRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.SetLeverage(ctx, &protoReq) return msg, metadata, err - } func request_GoCryptoTraderService_ChangePositionMargin_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ChangePositionMarginRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq ChangePositionMarginRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.ChangePositionMargin(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_ChangePositionMargin_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ChangePositionMarginRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq ChangePositionMarginRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ChangePositionMargin(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetOpenInterest_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetOpenInterest_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetOpenInterest_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetOpenInterestRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetOpenInterestRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetOpenInterest_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetOpenInterest(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetOpenInterest_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetOpenInterestRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetOpenInterestRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetOpenInterest_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetOpenInterest(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_GoCryptoTraderService_GetCurrencyTradeURL_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_GoCryptoTraderService_GetCurrencyTradeURL_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_GoCryptoTraderService_GetCurrencyTradeURL_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetCurrencyTradeURLRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetCurrencyTradeURLRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetCurrencyTradeURL_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetCurrencyTradeURL(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_GoCryptoTraderService_GetCurrencyTradeURL_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetCurrencyTradeURLRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetCurrencyTradeURLRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetCurrencyTradeURL_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetCurrencyTradeURL(ctx, &protoReq) return msg, metadata, err - } // RegisterGoCryptoTraderServiceHandlerServer registers the http handlers for service GoCryptoTraderService to "mux". // UnaryRPC :call GoCryptoTraderServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterGoCryptoTraderServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GoCryptoTraderServiceServer) error { - - mux.Handle("GET", pattern_GoCryptoTraderService_GetInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetInfo", runtime.WithHTTPPathPattern("/v1/getinfo")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetInfo", runtime.WithHTTPPathPattern("/v1/getinfo")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -3779,20 +3490,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetSubsystems_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetSubsystems_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetSubsystems", runtime.WithHTTPPathPattern("/v1/getsubsystems")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetSubsystems", runtime.WithHTTPPathPattern("/v1/getsubsystems")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -3804,20 +3510,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetSubsystems_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_EnableSubsystem_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_EnableSubsystem_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/EnableSubsystem", runtime.WithHTTPPathPattern("/v1/enablesubsystem")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/EnableSubsystem", runtime.WithHTTPPathPattern("/v1/enablesubsystem")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -3829,20 +3530,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_EnableSubsystem_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_DisableSubsystem_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_DisableSubsystem_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/DisableSubsystem", runtime.WithHTTPPathPattern("/v1/disablesubsystem")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/DisableSubsystem", runtime.WithHTTPPathPattern("/v1/disablesubsystem")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -3854,20 +3550,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_DisableSubsystem_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetRPCEndpoints_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetRPCEndpoints_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetRPCEndpoints", runtime.WithHTTPPathPattern("/v1/getrpcendpoints")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetRPCEndpoints", runtime.WithHTTPPathPattern("/v1/getrpcendpoints")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -3879,20 +3570,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetRPCEndpoints_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetCommunicationRelayers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetCommunicationRelayers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCommunicationRelayers", runtime.WithHTTPPathPattern("/v1/getcommunicationrelayers")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCommunicationRelayers", runtime.WithHTTPPathPattern("/v1/getcommunicationrelayers")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -3904,20 +3590,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCommunicationRelayers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetExchanges_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetExchanges_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchanges", runtime.WithHTTPPathPattern("/v1/getexchanges")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchanges", runtime.WithHTTPPathPattern("/v1/getexchanges")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -3929,20 +3610,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchanges_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_DisableExchange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_DisableExchange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/DisableExchange", runtime.WithHTTPPathPattern("/v1/disableexchange")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/DisableExchange", runtime.WithHTTPPathPattern("/v1/disableexchange")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -3954,20 +3630,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_DisableExchange_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetExchangeInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetExchangeInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeInfo", runtime.WithHTTPPathPattern("/v1/getexchangeinfo")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeInfo", runtime.WithHTTPPathPattern("/v1/getexchangeinfo")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -3979,20 +3650,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetExchangeOTPCode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetExchangeOTPCode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeOTPCode", runtime.WithHTTPPathPattern("/v1/getexchangeotp")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeOTPCode", runtime.WithHTTPPathPattern("/v1/getexchangeotp")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4004,20 +3670,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeOTPCode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetExchangeOTPCodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetExchangeOTPCodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeOTPCodes", runtime.WithHTTPPathPattern("/v1/getexchangeotps")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeOTPCodes", runtime.WithHTTPPathPattern("/v1/getexchangeotps")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4029,20 +3690,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeOTPCodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_EnableExchange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_EnableExchange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/EnableExchange", runtime.WithHTTPPathPattern("/v1/enableexchange")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/EnableExchange", runtime.WithHTTPPathPattern("/v1/enableexchange")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4054,20 +3710,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_EnableExchange_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GetTicker_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GetTicker_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTicker", runtime.WithHTTPPathPattern("/v1/getticker")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTicker", runtime.WithHTTPPathPattern("/v1/getticker")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4079,20 +3730,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetTicker_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetTickers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetTickers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTickers", runtime.WithHTTPPathPattern("/v1/gettickers")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTickers", runtime.WithHTTPPathPattern("/v1/gettickers")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4104,20 +3750,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetTickers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GetOrderbook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GetOrderbook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbook", runtime.WithHTTPPathPattern("/v1/getorderbook")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbook", runtime.WithHTTPPathPattern("/v1/getorderbook")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4129,20 +3770,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetOrderbooks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetOrderbooks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbooks", runtime.WithHTTPPathPattern("/v1/getorderbooks")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbooks", runtime.WithHTTPPathPattern("/v1/getorderbooks")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4154,20 +3790,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbooks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetAccountBalances_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetAccountBalances_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAccountBalances", runtime.WithHTTPPathPattern("/v1/getaccountbalances")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAccountBalances", runtime.WithHTTPPathPattern("/v1/getaccountbalances")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4179,20 +3810,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetAccountBalances_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_UpdateAccountBalances_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_UpdateAccountBalances_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateAccountBalances", runtime.WithHTTPPathPattern("/v1/updateaccountbalances")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateAccountBalances", runtime.WithHTTPPathPattern("/v1/updateaccountbalances")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4204,27 +3830,22 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_UpdateAccountBalances_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle("GET", pattern_GoCryptoTraderService_GetAccountBalancesStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetAccountBalancesStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetConfig", runtime.WithHTTPPathPattern("/v1/getconfig")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetConfig", runtime.WithHTTPPathPattern("/v1/getconfig")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4236,20 +3857,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetPortfolio_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetPortfolio_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetPortfolio", runtime.WithHTTPPathPattern("/v1/getportfolio")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetPortfolio", runtime.WithHTTPPathPattern("/v1/getportfolio")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4261,20 +3877,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetPortfolio_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetPortfolioSummary_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetPortfolioSummary_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetPortfolioSummary", runtime.WithHTTPPathPattern("/v1/getportfoliosummary")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetPortfolioSummary", runtime.WithHTTPPathPattern("/v1/getportfoliosummary")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4286,20 +3897,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetPortfolioSummary_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_AddPortfolioAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_AddPortfolioAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/AddPortfolioAddress", runtime.WithHTTPPathPattern("/v1/addportfolioaddress")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/AddPortfolioAddress", runtime.WithHTTPPathPattern("/v1/addportfolioaddress")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4311,20 +3917,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_AddPortfolioAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_RemovePortfolioAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_RemovePortfolioAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/RemovePortfolioAddress", runtime.WithHTTPPathPattern("/v1/removeportfolioaddress")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/RemovePortfolioAddress", runtime.WithHTTPPathPattern("/v1/removeportfolioaddress")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4336,20 +3937,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_RemovePortfolioAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetForexProviders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetForexProviders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetForexProviders", runtime.WithHTTPPathPattern("/v1/getforexproviders")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetForexProviders", runtime.WithHTTPPathPattern("/v1/getforexproviders")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4361,20 +3957,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetForexProviders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetForexRates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetForexRates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetForexRates", runtime.WithHTTPPathPattern("/v1/getforexrates")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetForexRates", runtime.WithHTTPPathPattern("/v1/getforexrates")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4386,20 +3977,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetForexRates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GetOrders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GetOrders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrders", runtime.WithHTTPPathPattern("/v1/getorders")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrders", runtime.WithHTTPPathPattern("/v1/getorders")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4411,20 +3997,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GetOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GetOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrder", runtime.WithHTTPPathPattern("/v1/getorder")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrder", runtime.WithHTTPPathPattern("/v1/getorder")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4436,20 +4017,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_SubmitOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_SubmitOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SubmitOrder", runtime.WithHTTPPathPattern("/v1/submitorder")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SubmitOrder", runtime.WithHTTPPathPattern("/v1/submitorder")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4461,20 +4037,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SubmitOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_SimulateOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_SimulateOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SimulateOrder", runtime.WithHTTPPathPattern("/v1/simulateorder")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SimulateOrder", runtime.WithHTTPPathPattern("/v1/simulateorder")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4486,20 +4057,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SimulateOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_WhaleBomb_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_WhaleBomb_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WhaleBomb", runtime.WithHTTPPathPattern("/v1/whalebomb")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WhaleBomb", runtime.WithHTTPPathPattern("/v1/whalebomb")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4511,20 +4077,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WhaleBomb_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_CancelOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_CancelOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelOrder", runtime.WithHTTPPathPattern("/v1/cancelorder")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelOrder", runtime.WithHTTPPathPattern("/v1/cancelorder")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4536,20 +4097,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CancelOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_CancelBatchOrders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_CancelBatchOrders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelBatchOrders", runtime.WithHTTPPathPattern("/v1/cancelbatchorders")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelBatchOrders", runtime.WithHTTPPathPattern("/v1/cancelbatchorders")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4561,20 +4117,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CancelBatchOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_CancelAllOrders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_CancelAllOrders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelAllOrders", runtime.WithHTTPPathPattern("/v1/cancelallorders")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelAllOrders", runtime.WithHTTPPathPattern("/v1/cancelallorders")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4586,20 +4137,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CancelAllOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetEvents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetEvents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetEvents", runtime.WithHTTPPathPattern("/v1/getevents")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetEvents", runtime.WithHTTPPathPattern("/v1/getevents")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4611,20 +4157,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetEvents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_AddEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_AddEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/AddEvent", runtime.WithHTTPPathPattern("/v1/addevent")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/AddEvent", runtime.WithHTTPPathPattern("/v1/addevent")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4636,20 +4177,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_AddEvent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_RemoveEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_RemoveEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/RemoveEvent", runtime.WithHTTPPathPattern("/v1/removeevent")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/RemoveEvent", runtime.WithHTTPPathPattern("/v1/removeevent")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4661,20 +4197,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_RemoveEvent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GetCryptocurrencyDepositAddresses_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GetCryptocurrencyDepositAddresses_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCryptocurrencyDepositAddresses", runtime.WithHTTPPathPattern("/v1/getcryptodepositaddresses")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCryptocurrencyDepositAddresses", runtime.WithHTTPPathPattern("/v1/getcryptodepositaddresses")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4686,20 +4217,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCryptocurrencyDepositAddresses_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCryptocurrencyDepositAddress", runtime.WithHTTPPathPattern("/v1/getcryptodepositaddress")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCryptocurrencyDepositAddress", runtime.WithHTTPPathPattern("/v1/getcryptodepositaddress")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4711,20 +4237,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GetAvailableTransferChains_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GetAvailableTransferChains_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAvailableTransferChains", runtime.WithHTTPPathPattern("/v1/getavailabletransferchains")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAvailableTransferChains", runtime.WithHTTPPathPattern("/v1/getavailabletransferchains")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4736,20 +4257,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetAvailableTransferChains_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_WithdrawFiatFunds_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_WithdrawFiatFunds_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawFiatFunds", runtime.WithHTTPPathPattern("/v1/withdrawfiatfunds")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawFiatFunds", runtime.WithHTTPPathPattern("/v1/withdrawfiatfunds")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4761,20 +4277,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawFiatFunds_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawCryptocurrencyFunds", runtime.WithHTTPPathPattern("/v1/withdrawithdrawcryptofundswfiatfunds")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawCryptocurrencyFunds", runtime.WithHTTPPathPattern("/v1/withdrawithdrawcryptofundswfiatfunds")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4786,20 +4297,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_WithdrawalEventByID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_WithdrawalEventByID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventByID", runtime.WithHTTPPathPattern("/v1/withdrawaleventbyid")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventByID", runtime.WithHTTPPathPattern("/v1/withdrawaleventbyid")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4811,20 +4317,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawalEventByID_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_WithdrawalEventsByExchange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_WithdrawalEventsByExchange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventsByExchange", runtime.WithHTTPPathPattern("/v1/withdrawaleventbyexchange")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventsByExchange", runtime.WithHTTPPathPattern("/v1/withdrawaleventbyexchange")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4836,20 +4337,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawalEventsByExchange_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_WithdrawalEventsByDate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_WithdrawalEventsByDate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventsByDate", runtime.WithHTTPPathPattern("/v1/withdrawaleventbydate")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventsByDate", runtime.WithHTTPPathPattern("/v1/withdrawaleventbydate")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4861,20 +4357,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawalEventsByDate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetLoggerDetails_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetLoggerDetails_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLoggerDetails", runtime.WithHTTPPathPattern("/v1/getloggerdetails")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLoggerDetails", runtime.WithHTTPPathPattern("/v1/getloggerdetails")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4886,20 +4377,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetLoggerDetails_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_SetLoggerDetails_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_SetLoggerDetails_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetLoggerDetails", runtime.WithHTTPPathPattern("/v1/setloggerdetails")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetLoggerDetails", runtime.WithHTTPPathPattern("/v1/setloggerdetails")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4911,20 +4397,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetLoggerDetails_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GetExchangePairs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GetExchangePairs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangePairs", runtime.WithHTTPPathPattern("/v1/getexchangepairs")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangePairs", runtime.WithHTTPPathPattern("/v1/getexchangepairs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4936,20 +4417,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangePairs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_SetExchangePair_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_SetExchangePair_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangePair", runtime.WithHTTPPathPattern("/v1/setexchangepair")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangePair", runtime.WithHTTPPathPattern("/v1/setexchangepair")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -4961,48 +4437,43 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetExchangePair_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle("GET", pattern_GoCryptoTraderService_GetOrderbookStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetOrderbookStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return }) - mux.Handle("GET", pattern_GoCryptoTraderService_GetExchangeOrderbookStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetExchangeOrderbookStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return }) - mux.Handle("GET", pattern_GoCryptoTraderService_GetTickerStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetTickerStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return }) - mux.Handle("GET", pattern_GoCryptoTraderService_GetExchangeTickerStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetExchangeTickerStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetAuditEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetAuditEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAuditEvent", runtime.WithHTTPPathPattern("/v1/getauditevent")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAuditEvent", runtime.WithHTTPPathPattern("/v1/getauditevent")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5014,20 +4485,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetAuditEvent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GCTScriptExecute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GCTScriptExecute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptExecute", runtime.WithHTTPPathPattern("/v1/gctscript/execute")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptExecute", runtime.WithHTTPPathPattern("/v1/gctscript/execute")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5039,20 +4505,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptExecute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GCTScriptUpload_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GCTScriptUpload_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptUpload", runtime.WithHTTPPathPattern("/v1/gctscript/upload")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptUpload", runtime.WithHTTPPathPattern("/v1/gctscript/upload")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5064,20 +4525,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptUpload_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GCTScriptReadScript_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GCTScriptReadScript_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptReadScript", runtime.WithHTTPPathPattern("/v1/gctscript/read")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptReadScript", runtime.WithHTTPPathPattern("/v1/gctscript/read")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5089,20 +4545,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptReadScript_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GCTScriptStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GCTScriptStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStatus", runtime.WithHTTPPathPattern("/v1/gctscript/status")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStatus", runtime.WithHTTPPathPattern("/v1/gctscript/status")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5114,20 +4565,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GCTScriptQuery_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GCTScriptQuery_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptQuery", runtime.WithHTTPPathPattern("/v1/gctscript/query")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptQuery", runtime.WithHTTPPathPattern("/v1/gctscript/query")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5139,20 +4585,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptQuery_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GCTScriptStop_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GCTScriptStop_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStop", runtime.WithHTTPPathPattern("/v1/gctscript/stop")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStop", runtime.WithHTTPPathPattern("/v1/gctscript/stop")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5164,20 +4605,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptStop_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GCTScriptStopAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GCTScriptStopAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStopAll", runtime.WithHTTPPathPattern("/v1/gctscript/stopall")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStopAll", runtime.WithHTTPPathPattern("/v1/gctscript/stopall")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5189,20 +4625,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptStopAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GCTScriptListAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GCTScriptListAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptListAll", runtime.WithHTTPPathPattern("/v1/gctscript/list")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptListAll", runtime.WithHTTPPathPattern("/v1/gctscript/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5214,20 +4645,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptListAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GCTScriptAutoLoadToggle_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GCTScriptAutoLoadToggle_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptAutoLoadToggle", runtime.WithHTTPPathPattern("/v1/gctscript/autoload")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptAutoLoadToggle", runtime.WithHTTPPathPattern("/v1/gctscript/autoload")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5239,20 +4665,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptAutoLoadToggle_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetHistoricCandles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetHistoricCandles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetHistoricCandles", runtime.WithHTTPPathPattern("/v1/gethistoriccandles")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetHistoricCandles", runtime.WithHTTPPathPattern("/v1/gethistoriccandles")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5264,20 +4685,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetHistoricCandles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_SetExchangeAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_SetExchangeAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangeAsset", runtime.WithHTTPPathPattern("/v1/setexchangeasset")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangeAsset", runtime.WithHTTPPathPattern("/v1/setexchangeasset")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5289,20 +4705,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetExchangeAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_SetAllExchangePairs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_SetAllExchangePairs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetAllExchangePairs", runtime.WithHTTPPathPattern("/v1/setallexchangepairs")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetAllExchangePairs", runtime.WithHTTPPathPattern("/v1/setallexchangepairs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5314,20 +4725,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetAllExchangePairs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_UpdateExchangeSupportedPairs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_UpdateExchangeSupportedPairs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateExchangeSupportedPairs", runtime.WithHTTPPathPattern("/v1/updateexchangesupportedpairs")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateExchangeSupportedPairs", runtime.WithHTTPPathPattern("/v1/updateexchangesupportedpairs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5339,20 +4745,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_UpdateExchangeSupportedPairs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetExchangeAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetExchangeAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeAssets", runtime.WithHTTPPathPattern("/v1/getexchangeassets")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeAssets", runtime.WithHTTPPathPattern("/v1/getexchangeassets")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5364,20 +4765,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeAssets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_WebsocketGetInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_WebsocketGetInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketGetInfo", runtime.WithHTTPPathPattern("/v1/websocketgetinfo")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketGetInfo", runtime.WithHTTPPathPattern("/v1/websocketgetinfo")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5389,20 +4785,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketGetInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_WebsocketSetEnabled_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_WebsocketSetEnabled_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetEnabled", runtime.WithHTTPPathPattern("/v1/websocketsetenabled")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetEnabled", runtime.WithHTTPPathPattern("/v1/websocketsetenabled")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5414,20 +4805,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketSetEnabled_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_WebsocketGetSubscriptions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_WebsocketGetSubscriptions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketGetSubscriptions", runtime.WithHTTPPathPattern("/v1/websocketgetsubscriptions")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketGetSubscriptions", runtime.WithHTTPPathPattern("/v1/websocketgetsubscriptions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5439,20 +4825,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketGetSubscriptions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_WebsocketSetProxy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_WebsocketSetProxy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetProxy", runtime.WithHTTPPathPattern("/v1/websocketsetproxy")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetProxy", runtime.WithHTTPPathPattern("/v1/websocketsetproxy")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5464,20 +4845,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketSetProxy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_WebsocketSetURL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_WebsocketSetURL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetURL", runtime.WithHTTPPathPattern("/v1/websocketseturl")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetURL", runtime.WithHTTPPathPattern("/v1/websocketseturl")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5489,20 +4865,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketSetURL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetRecentTrades_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetRecentTrades_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetRecentTrades", runtime.WithHTTPPathPattern("/v1/getrecenttrades")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetRecentTrades", runtime.WithHTTPPathPattern("/v1/getrecenttrades")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5514,27 +4885,22 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetRecentTrades_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle("GET", pattern_GoCryptoTraderService_GetHistoricTrades_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetHistoricTrades_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetSavedTrades_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetSavedTrades_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetSavedTrades", runtime.WithHTTPPathPattern("/v1/getsavedtrades")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetSavedTrades", runtime.WithHTTPPathPattern("/v1/getsavedtrades")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5546,20 +4912,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetSavedTrades_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_ConvertTradesToCandles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_ConvertTradesToCandles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ConvertTradesToCandles", runtime.WithHTTPPathPattern("/v1/converttradestocandles")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ConvertTradesToCandles", runtime.WithHTTPPathPattern("/v1/converttradestocandles")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5571,20 +4932,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_ConvertTradesToCandles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_FindMissingSavedCandleIntervals_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_FindMissingSavedCandleIntervals_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/FindMissingSavedCandleIntervals", runtime.WithHTTPPathPattern("/v1/findmissingsavedcandleintervals")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/FindMissingSavedCandleIntervals", runtime.WithHTTPPathPattern("/v1/findmissingsavedcandleintervals")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5596,20 +4952,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_FindMissingSavedCandleIntervals_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_FindMissingSavedTradeIntervals_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_FindMissingSavedTradeIntervals_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/FindMissingSavedTradeIntervals", runtime.WithHTTPPathPattern("/v1/findmissingsavedtradeintervals")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/FindMissingSavedTradeIntervals", runtime.WithHTTPPathPattern("/v1/findmissingsavedtradeintervals")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5621,20 +4972,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_FindMissingSavedTradeIntervals_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_SetExchangeTradeProcessing_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_SetExchangeTradeProcessing_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangeTradeProcessing", runtime.WithHTTPPathPattern("/v1/setexchangetradeprocessing")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangeTradeProcessing", runtime.WithHTTPPathPattern("/v1/setexchangetradeprocessing")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5646,20 +4992,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetExchangeTradeProcessing_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_UpsertDataHistoryJob_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_UpsertDataHistoryJob_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpsertDataHistoryJob", runtime.WithHTTPPathPattern("/v1/upsertdatahistoryjob")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpsertDataHistoryJob", runtime.WithHTTPPathPattern("/v1/upsertdatahistoryjob")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5671,20 +5012,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_UpsertDataHistoryJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetDataHistoryJobDetails_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetDataHistoryJobDetails_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobDetails", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobdetails")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobDetails", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobdetails")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5696,20 +5032,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetDataHistoryJobDetails_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetActiveDataHistoryJobs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetActiveDataHistoryJobs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetActiveDataHistoryJobs", runtime.WithHTTPPathPattern("/v1/getactivedatahistoryjobs")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetActiveDataHistoryJobs", runtime.WithHTTPPathPattern("/v1/getactivedatahistoryjobs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5721,20 +5052,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetActiveDataHistoryJobs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetDataHistoryJobsBetween_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetDataHistoryJobsBetween_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobsBetween", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobsbetween")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobsBetween", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobsbetween")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5746,20 +5072,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetDataHistoryJobsBetween_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetDataHistoryJobSummary_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetDataHistoryJobSummary_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobSummary", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobsummary")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobSummary", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobsummary")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5771,20 +5092,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetDataHistoryJobSummary_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_SetDataHistoryJobStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_SetDataHistoryJobStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetDataHistoryJobStatus", runtime.WithHTTPPathPattern("/v1/setdatahistoryjobstatus")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetDataHistoryJobStatus", runtime.WithHTTPPathPattern("/v1/setdatahistoryjobstatus")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5796,20 +5112,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetDataHistoryJobStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateDataHistoryJobPrerequisite", runtime.WithHTTPPathPattern("/v1/updatedatahistoryjobprerequisite")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateDataHistoryJobPrerequisite", runtime.WithHTTPPathPattern("/v1/updatedatahistoryjobprerequisite")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5821,20 +5132,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GetManagedOrders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GetManagedOrders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetManagedOrders", runtime.WithHTTPPathPattern("/v1/getmanagedorders")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetManagedOrders", runtime.WithHTTPPathPattern("/v1/getmanagedorders")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5846,20 +5152,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetManagedOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_ModifyOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_ModifyOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ModifyOrder", runtime.WithHTTPPathPattern("/v1/modifyorder")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ModifyOrder", runtime.WithHTTPPathPattern("/v1/modifyorder")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5871,20 +5172,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_ModifyOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_CurrencyStateGetAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_CurrencyStateGetAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateGetAll", runtime.WithHTTPPathPattern("/v1/currencystategetall")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateGetAll", runtime.WithHTTPPathPattern("/v1/currencystategetall")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5896,20 +5192,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateGetAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_CurrencyStateTrading_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_CurrencyStateTrading_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateTrading", runtime.WithHTTPPathPattern("/v1/currencystatetrading")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateTrading", runtime.WithHTTPPathPattern("/v1/currencystatetrading")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5921,20 +5212,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateTrading_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_CurrencyStateDeposit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_CurrencyStateDeposit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateDeposit", runtime.WithHTTPPathPattern("/v1/currencystatedeposit")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateDeposit", runtime.WithHTTPPathPattern("/v1/currencystatedeposit")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5946,20 +5232,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateDeposit_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_CurrencyStateWithdraw_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_CurrencyStateWithdraw_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateWithdraw", runtime.WithHTTPPathPattern("/v1/currencystatewithdraw")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateWithdraw", runtime.WithHTTPPathPattern("/v1/currencystatewithdraw")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5971,20 +5252,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateWithdraw_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_CurrencyStateTradingPair_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_CurrencyStateTradingPair_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateTradingPair", runtime.WithHTTPPathPattern("/v1/currencystatetradingpair")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateTradingPair", runtime.WithHTTPPathPattern("/v1/currencystatetradingpair")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -5996,20 +5272,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateTradingPair_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetFuturesPositionsSummary_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetFuturesPositionsSummary_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFuturesPositionsSummary", runtime.WithHTTPPathPattern("/v1/getfuturespositionssummary")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFuturesPositionsSummary", runtime.WithHTTPPathPattern("/v1/getfuturespositionssummary")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6021,20 +5292,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetFuturesPositionsSummary_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetFuturesPositionsOrders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetFuturesPositionsOrders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFuturesPositionsOrders", runtime.WithHTTPPathPattern("/v1/getfuturespositionsorders")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFuturesPositionsOrders", runtime.WithHTTPPathPattern("/v1/getfuturespositionsorders")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6046,20 +5312,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetFuturesPositionsOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetCollateral_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetCollateral_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCollateral", runtime.WithHTTPPathPattern("/v1/getcollateral")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCollateral", runtime.WithHTTPPathPattern("/v1/getcollateral")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6071,20 +5332,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCollateral_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_Shutdown_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_Shutdown_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/Shutdown", runtime.WithHTTPPathPattern("/v1/shutdown")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/Shutdown", runtime.WithHTTPPathPattern("/v1/shutdown")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6096,20 +5352,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_Shutdown_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetTechnicalAnalysis_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetTechnicalAnalysis_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTechnicalAnalysis", runtime.WithHTTPPathPattern("/v1/gettechnicalanalysis")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTechnicalAnalysis", runtime.WithHTTPPathPattern("/v1/gettechnicalanalysis")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6121,20 +5372,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetTechnicalAnalysis_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetMarginRatesHistory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetMarginRatesHistory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetMarginRatesHistory", runtime.WithHTTPPathPattern("/v1/getmarginrateshistory")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetMarginRatesHistory", runtime.WithHTTPPathPattern("/v1/getmarginrateshistory")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6146,20 +5392,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetMarginRatesHistory_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetManagedPosition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetManagedPosition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetManagedPosition", runtime.WithHTTPPathPattern("/v1/getmanagedposition")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetManagedPosition", runtime.WithHTTPPathPattern("/v1/getmanagedposition")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6171,20 +5412,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetManagedPosition_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetAllManagedPositions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetAllManagedPositions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAllManagedPositions", runtime.WithHTTPPathPattern("/v1/getallmanagedpositions")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAllManagedPositions", runtime.WithHTTPPathPattern("/v1/getallmanagedpositions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6196,20 +5432,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetAllManagedPositions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetFundingRates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetFundingRates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFundingRates", runtime.WithHTTPPathPattern("/v1/getfundingrates")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFundingRates", runtime.WithHTTPPathPattern("/v1/getfundingrates")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6221,20 +5452,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetFundingRates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetLatestFundingRate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetLatestFundingRate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLatestFundingRate", runtime.WithHTTPPathPattern("/v1/getlatestfundingrate")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLatestFundingRate", runtime.WithHTTPPathPattern("/v1/getlatestfundingrate")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6246,20 +5472,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetLatestFundingRate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetOrderbookMovement_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetOrderbookMovement_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookMovement", runtime.WithHTTPPathPattern("/v1/getorderbookmovement")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookMovement", runtime.WithHTTPPathPattern("/v1/getorderbookmovement")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6271,20 +5492,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbookMovement_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetOrderbookAmountByNominal_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetOrderbookAmountByNominal_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookAmountByNominal", runtime.WithHTTPPathPattern("/v1/getorderbookamountbynominal")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookAmountByNominal", runtime.WithHTTPPathPattern("/v1/getorderbookamountbynominal")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6296,20 +5512,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbookAmountByNominal_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetOrderbookAmountByImpact_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetOrderbookAmountByImpact_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookAmountByImpact", runtime.WithHTTPPathPattern("/v1/getorderbookamountbyimpact")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookAmountByImpact", runtime.WithHTTPPathPattern("/v1/getorderbookamountbyimpact")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6321,20 +5532,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbookAmountByImpact_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetCollateralMode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetCollateralMode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCollateralMode", runtime.WithHTTPPathPattern("/v1/getcollateralmode")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCollateralMode", runtime.WithHTTPPathPattern("/v1/getcollateralmode")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6346,20 +5552,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCollateralMode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetLeverage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetLeverage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLeverage", runtime.WithHTTPPathPattern("/v1/getleverage")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLeverage", runtime.WithHTTPPathPattern("/v1/getleverage")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6371,20 +5572,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetLeverage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_SetCollateralMode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_SetCollateralMode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetCollateralMode", runtime.WithHTTPPathPattern("/v1/getcollateralmode")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetCollateralMode", runtime.WithHTTPPathPattern("/v1/getcollateralmode")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6396,20 +5592,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetCollateralMode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_SetMarginType_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_SetMarginType_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetMarginType", runtime.WithHTTPPathPattern("/v1/getmargintype")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetMarginType", runtime.WithHTTPPathPattern("/v1/getmargintype")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6421,20 +5612,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetMarginType_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_SetLeverage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_SetLeverage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetLeverage", runtime.WithHTTPPathPattern("/v1/getleverage")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetLeverage", runtime.WithHTTPPathPattern("/v1/getleverage")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6446,20 +5632,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetLeverage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_ChangePositionMargin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_ChangePositionMargin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ChangePositionMargin", runtime.WithHTTPPathPattern("/v1/changepositionmargin")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ChangePositionMargin", runtime.WithHTTPPathPattern("/v1/changepositionmargin")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6471,20 +5652,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_ChangePositionMargin_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetOpenInterest_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetOpenInterest_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOpenInterest", runtime.WithHTTPPathPattern("/v1/getopeninterest")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOpenInterest", runtime.WithHTTPPathPattern("/v1/getopeninterest")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6496,20 +5672,15 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOpenInterest_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetCurrencyTradeURL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetCurrencyTradeURL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCurrencyTradeURL", runtime.WithHTTPPathPattern("/v1/getcurrencytradeurl")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCurrencyTradeURL", runtime.WithHTTPPathPattern("/v1/getcurrencytradeurl")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6521,9 +5692,7 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCurrencyTradeURL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -6532,25 +5701,24 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim // RegisterGoCryptoTraderServiceHandlerFromEndpoint is same as RegisterGoCryptoTraderServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterGoCryptoTraderServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() - return RegisterGoCryptoTraderServiceHandler(ctx, mux, conn) } @@ -6564,16 +5732,13 @@ func RegisterGoCryptoTraderServiceHandler(ctx context.Context, mux *runtime.Serv // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "GoCryptoTraderServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "GoCryptoTraderServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "GoCryptoTraderServiceClient" to call the correct interceptors. +// "GoCryptoTraderServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GoCryptoTraderServiceClient) error { - - mux.Handle("GET", pattern_GoCryptoTraderService_GetInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetInfo", runtime.WithHTTPPathPattern("/v1/getinfo")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetInfo", runtime.WithHTTPPathPattern("/v1/getinfo")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6584,18 +5749,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetSubsystems_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetSubsystems_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetSubsystems", runtime.WithHTTPPathPattern("/v1/getsubsystems")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetSubsystems", runtime.WithHTTPPathPattern("/v1/getsubsystems")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6606,18 +5766,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetSubsystems_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_EnableSubsystem_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_EnableSubsystem_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/EnableSubsystem", runtime.WithHTTPPathPattern("/v1/enablesubsystem")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/EnableSubsystem", runtime.WithHTTPPathPattern("/v1/enablesubsystem")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6628,18 +5783,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_EnableSubsystem_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_DisableSubsystem_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_DisableSubsystem_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/DisableSubsystem", runtime.WithHTTPPathPattern("/v1/disablesubsystem")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/DisableSubsystem", runtime.WithHTTPPathPattern("/v1/disablesubsystem")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6650,18 +5800,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_DisableSubsystem_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetRPCEndpoints_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetRPCEndpoints_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetRPCEndpoints", runtime.WithHTTPPathPattern("/v1/getrpcendpoints")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetRPCEndpoints", runtime.WithHTTPPathPattern("/v1/getrpcendpoints")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6672,18 +5817,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetRPCEndpoints_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetCommunicationRelayers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetCommunicationRelayers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCommunicationRelayers", runtime.WithHTTPPathPattern("/v1/getcommunicationrelayers")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCommunicationRelayers", runtime.WithHTTPPathPattern("/v1/getcommunicationrelayers")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6694,18 +5834,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCommunicationRelayers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetExchanges_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetExchanges_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchanges", runtime.WithHTTPPathPattern("/v1/getexchanges")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchanges", runtime.WithHTTPPathPattern("/v1/getexchanges")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6716,18 +5851,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchanges_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_DisableExchange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_DisableExchange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/DisableExchange", runtime.WithHTTPPathPattern("/v1/disableexchange")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/DisableExchange", runtime.WithHTTPPathPattern("/v1/disableexchange")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6738,18 +5868,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_DisableExchange_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetExchangeInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetExchangeInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeInfo", runtime.WithHTTPPathPattern("/v1/getexchangeinfo")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeInfo", runtime.WithHTTPPathPattern("/v1/getexchangeinfo")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6760,18 +5885,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetExchangeOTPCode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetExchangeOTPCode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeOTPCode", runtime.WithHTTPPathPattern("/v1/getexchangeotp")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeOTPCode", runtime.WithHTTPPathPattern("/v1/getexchangeotp")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6782,18 +5902,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeOTPCode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetExchangeOTPCodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetExchangeOTPCodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeOTPCodes", runtime.WithHTTPPathPattern("/v1/getexchangeotps")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeOTPCodes", runtime.WithHTTPPathPattern("/v1/getexchangeotps")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6804,18 +5919,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeOTPCodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_EnableExchange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_EnableExchange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/EnableExchange", runtime.WithHTTPPathPattern("/v1/enableexchange")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/EnableExchange", runtime.WithHTTPPathPattern("/v1/enableexchange")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6826,18 +5936,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_EnableExchange_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GetTicker_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GetTicker_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTicker", runtime.WithHTTPPathPattern("/v1/getticker")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTicker", runtime.WithHTTPPathPattern("/v1/getticker")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6848,18 +5953,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetTicker_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetTickers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetTickers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTickers", runtime.WithHTTPPathPattern("/v1/gettickers")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTickers", runtime.WithHTTPPathPattern("/v1/gettickers")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6870,18 +5970,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetTickers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GetOrderbook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GetOrderbook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbook", runtime.WithHTTPPathPattern("/v1/getorderbook")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbook", runtime.WithHTTPPathPattern("/v1/getorderbook")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6892,18 +5987,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetOrderbooks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetOrderbooks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbooks", runtime.WithHTTPPathPattern("/v1/getorderbooks")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbooks", runtime.WithHTTPPathPattern("/v1/getorderbooks")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6914,18 +6004,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbooks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetAccountBalances_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetAccountBalances_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAccountBalances", runtime.WithHTTPPathPattern("/v1/getaccountbalances")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAccountBalances", runtime.WithHTTPPathPattern("/v1/getaccountbalances")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6936,18 +6021,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetAccountBalances_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_UpdateAccountBalances_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_UpdateAccountBalances_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateAccountBalances", runtime.WithHTTPPathPattern("/v1/updateaccountbalances")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateAccountBalances", runtime.WithHTTPPathPattern("/v1/updateaccountbalances")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6958,18 +6038,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_UpdateAccountBalances_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetAccountBalancesStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetAccountBalancesStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAccountBalancesStream", runtime.WithHTTPPathPattern("/v1/getaccountbalancesstream")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAccountBalancesStream", runtime.WithHTTPPathPattern("/v1/getaccountbalancesstream")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -6980,18 +6055,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetAccountBalancesStream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetConfig", runtime.WithHTTPPathPattern("/v1/getconfig")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetConfig", runtime.WithHTTPPathPattern("/v1/getconfig")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7002,18 +6072,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetPortfolio_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetPortfolio_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetPortfolio", runtime.WithHTTPPathPattern("/v1/getportfolio")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetPortfolio", runtime.WithHTTPPathPattern("/v1/getportfolio")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7024,18 +6089,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetPortfolio_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetPortfolioSummary_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetPortfolioSummary_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetPortfolioSummary", runtime.WithHTTPPathPattern("/v1/getportfoliosummary")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetPortfolioSummary", runtime.WithHTTPPathPattern("/v1/getportfoliosummary")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7046,18 +6106,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetPortfolioSummary_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_AddPortfolioAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_AddPortfolioAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/AddPortfolioAddress", runtime.WithHTTPPathPattern("/v1/addportfolioaddress")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/AddPortfolioAddress", runtime.WithHTTPPathPattern("/v1/addportfolioaddress")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7068,18 +6123,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_AddPortfolioAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_RemovePortfolioAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_RemovePortfolioAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/RemovePortfolioAddress", runtime.WithHTTPPathPattern("/v1/removeportfolioaddress")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/RemovePortfolioAddress", runtime.WithHTTPPathPattern("/v1/removeportfolioaddress")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7090,18 +6140,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_RemovePortfolioAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetForexProviders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetForexProviders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetForexProviders", runtime.WithHTTPPathPattern("/v1/getforexproviders")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetForexProviders", runtime.WithHTTPPathPattern("/v1/getforexproviders")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7112,18 +6157,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetForexProviders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetForexRates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetForexRates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetForexRates", runtime.WithHTTPPathPattern("/v1/getforexrates")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetForexRates", runtime.WithHTTPPathPattern("/v1/getforexrates")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7134,18 +6174,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetForexRates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GetOrders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GetOrders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrders", runtime.WithHTTPPathPattern("/v1/getorders")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrders", runtime.WithHTTPPathPattern("/v1/getorders")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7156,18 +6191,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GetOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GetOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrder", runtime.WithHTTPPathPattern("/v1/getorder")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrder", runtime.WithHTTPPathPattern("/v1/getorder")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7178,18 +6208,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_SubmitOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_SubmitOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SubmitOrder", runtime.WithHTTPPathPattern("/v1/submitorder")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SubmitOrder", runtime.WithHTTPPathPattern("/v1/submitorder")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7200,18 +6225,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SubmitOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_SimulateOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_SimulateOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SimulateOrder", runtime.WithHTTPPathPattern("/v1/simulateorder")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SimulateOrder", runtime.WithHTTPPathPattern("/v1/simulateorder")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7222,18 +6242,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SimulateOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_WhaleBomb_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_WhaleBomb_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WhaleBomb", runtime.WithHTTPPathPattern("/v1/whalebomb")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WhaleBomb", runtime.WithHTTPPathPattern("/v1/whalebomb")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7244,18 +6259,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WhaleBomb_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_CancelOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_CancelOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelOrder", runtime.WithHTTPPathPattern("/v1/cancelorder")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelOrder", runtime.WithHTTPPathPattern("/v1/cancelorder")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7266,18 +6276,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CancelOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_CancelBatchOrders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_CancelBatchOrders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelBatchOrders", runtime.WithHTTPPathPattern("/v1/cancelbatchorders")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelBatchOrders", runtime.WithHTTPPathPattern("/v1/cancelbatchorders")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7288,18 +6293,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CancelBatchOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_CancelAllOrders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_CancelAllOrders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelAllOrders", runtime.WithHTTPPathPattern("/v1/cancelallorders")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelAllOrders", runtime.WithHTTPPathPattern("/v1/cancelallorders")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7310,18 +6310,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CancelAllOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetEvents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetEvents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetEvents", runtime.WithHTTPPathPattern("/v1/getevents")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetEvents", runtime.WithHTTPPathPattern("/v1/getevents")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7332,18 +6327,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetEvents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_AddEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_AddEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/AddEvent", runtime.WithHTTPPathPattern("/v1/addevent")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/AddEvent", runtime.WithHTTPPathPattern("/v1/addevent")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7354,18 +6344,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_AddEvent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_RemoveEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_RemoveEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/RemoveEvent", runtime.WithHTTPPathPattern("/v1/removeevent")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/RemoveEvent", runtime.WithHTTPPathPattern("/v1/removeevent")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7376,18 +6361,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_RemoveEvent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GetCryptocurrencyDepositAddresses_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GetCryptocurrencyDepositAddresses_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCryptocurrencyDepositAddresses", runtime.WithHTTPPathPattern("/v1/getcryptodepositaddresses")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCryptocurrencyDepositAddresses", runtime.WithHTTPPathPattern("/v1/getcryptodepositaddresses")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7398,18 +6378,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCryptocurrencyDepositAddresses_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCryptocurrencyDepositAddress", runtime.WithHTTPPathPattern("/v1/getcryptodepositaddress")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCryptocurrencyDepositAddress", runtime.WithHTTPPathPattern("/v1/getcryptodepositaddress")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7420,18 +6395,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GetAvailableTransferChains_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GetAvailableTransferChains_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAvailableTransferChains", runtime.WithHTTPPathPattern("/v1/getavailabletransferchains")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAvailableTransferChains", runtime.WithHTTPPathPattern("/v1/getavailabletransferchains")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7442,18 +6412,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetAvailableTransferChains_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_WithdrawFiatFunds_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_WithdrawFiatFunds_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawFiatFunds", runtime.WithHTTPPathPattern("/v1/withdrawfiatfunds")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawFiatFunds", runtime.WithHTTPPathPattern("/v1/withdrawfiatfunds")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7464,18 +6429,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawFiatFunds_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawCryptocurrencyFunds", runtime.WithHTTPPathPattern("/v1/withdrawithdrawcryptofundswfiatfunds")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawCryptocurrencyFunds", runtime.WithHTTPPathPattern("/v1/withdrawithdrawcryptofundswfiatfunds")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7486,18 +6446,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_WithdrawalEventByID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_WithdrawalEventByID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventByID", runtime.WithHTTPPathPattern("/v1/withdrawaleventbyid")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventByID", runtime.WithHTTPPathPattern("/v1/withdrawaleventbyid")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7508,18 +6463,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawalEventByID_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_WithdrawalEventsByExchange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_WithdrawalEventsByExchange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventsByExchange", runtime.WithHTTPPathPattern("/v1/withdrawaleventbyexchange")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventsByExchange", runtime.WithHTTPPathPattern("/v1/withdrawaleventbyexchange")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7530,18 +6480,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawalEventsByExchange_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_WithdrawalEventsByDate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_WithdrawalEventsByDate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventsByDate", runtime.WithHTTPPathPattern("/v1/withdrawaleventbydate")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventsByDate", runtime.WithHTTPPathPattern("/v1/withdrawaleventbydate")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7552,18 +6497,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawalEventsByDate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetLoggerDetails_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetLoggerDetails_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLoggerDetails", runtime.WithHTTPPathPattern("/v1/getloggerdetails")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLoggerDetails", runtime.WithHTTPPathPattern("/v1/getloggerdetails")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7574,18 +6514,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetLoggerDetails_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_SetLoggerDetails_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_SetLoggerDetails_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetLoggerDetails", runtime.WithHTTPPathPattern("/v1/setloggerdetails")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetLoggerDetails", runtime.WithHTTPPathPattern("/v1/setloggerdetails")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7596,18 +6531,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetLoggerDetails_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GetExchangePairs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GetExchangePairs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangePairs", runtime.WithHTTPPathPattern("/v1/getexchangepairs")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangePairs", runtime.WithHTTPPathPattern("/v1/getexchangepairs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7618,18 +6548,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangePairs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_SetExchangePair_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_SetExchangePair_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangePair", runtime.WithHTTPPathPattern("/v1/setexchangepair")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangePair", runtime.WithHTTPPathPattern("/v1/setexchangepair")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7640,18 +6565,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetExchangePair_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetOrderbookStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetOrderbookStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookStream", runtime.WithHTTPPathPattern("/v1/getorderbookstream")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookStream", runtime.WithHTTPPathPattern("/v1/getorderbookstream")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7662,18 +6582,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbookStream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetExchangeOrderbookStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetExchangeOrderbookStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeOrderbookStream", runtime.WithHTTPPathPattern("/v1/getexchangeorderbookstream")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeOrderbookStream", runtime.WithHTTPPathPattern("/v1/getexchangeorderbookstream")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7684,18 +6599,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeOrderbookStream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetTickerStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetTickerStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTickerStream", runtime.WithHTTPPathPattern("/v1/gettickerstream")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTickerStream", runtime.WithHTTPPathPattern("/v1/gettickerstream")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7706,18 +6616,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetTickerStream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetExchangeTickerStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetExchangeTickerStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeTickerStream", runtime.WithHTTPPathPattern("/v1/getexchangetickerstream")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeTickerStream", runtime.WithHTTPPathPattern("/v1/getexchangetickerstream")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7728,18 +6633,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeTickerStream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetAuditEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetAuditEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAuditEvent", runtime.WithHTTPPathPattern("/v1/getauditevent")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAuditEvent", runtime.WithHTTPPathPattern("/v1/getauditevent")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7750,18 +6650,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetAuditEvent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GCTScriptExecute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GCTScriptExecute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptExecute", runtime.WithHTTPPathPattern("/v1/gctscript/execute")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptExecute", runtime.WithHTTPPathPattern("/v1/gctscript/execute")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7772,18 +6667,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptExecute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GCTScriptUpload_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GCTScriptUpload_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptUpload", runtime.WithHTTPPathPattern("/v1/gctscript/upload")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptUpload", runtime.WithHTTPPathPattern("/v1/gctscript/upload")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7794,18 +6684,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptUpload_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GCTScriptReadScript_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GCTScriptReadScript_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptReadScript", runtime.WithHTTPPathPattern("/v1/gctscript/read")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptReadScript", runtime.WithHTTPPathPattern("/v1/gctscript/read")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7816,18 +6701,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptReadScript_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GCTScriptStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GCTScriptStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStatus", runtime.WithHTTPPathPattern("/v1/gctscript/status")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStatus", runtime.WithHTTPPathPattern("/v1/gctscript/status")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7838,18 +6718,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GCTScriptQuery_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GCTScriptQuery_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptQuery", runtime.WithHTTPPathPattern("/v1/gctscript/query")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptQuery", runtime.WithHTTPPathPattern("/v1/gctscript/query")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7860,18 +6735,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptQuery_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GCTScriptStop_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GCTScriptStop_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStop", runtime.WithHTTPPathPattern("/v1/gctscript/stop")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStop", runtime.WithHTTPPathPattern("/v1/gctscript/stop")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7882,18 +6752,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptStop_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GCTScriptStopAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GCTScriptStopAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStopAll", runtime.WithHTTPPathPattern("/v1/gctscript/stopall")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStopAll", runtime.WithHTTPPathPattern("/v1/gctscript/stopall")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7904,18 +6769,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptStopAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GCTScriptListAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GCTScriptListAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptListAll", runtime.WithHTTPPathPattern("/v1/gctscript/list")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptListAll", runtime.WithHTTPPathPattern("/v1/gctscript/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7926,18 +6786,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptListAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GCTScriptAutoLoadToggle_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GCTScriptAutoLoadToggle_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptAutoLoadToggle", runtime.WithHTTPPathPattern("/v1/gctscript/autoload")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptAutoLoadToggle", runtime.WithHTTPPathPattern("/v1/gctscript/autoload")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7948,18 +6803,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptAutoLoadToggle_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetHistoricCandles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetHistoricCandles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetHistoricCandles", runtime.WithHTTPPathPattern("/v1/gethistoriccandles")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetHistoricCandles", runtime.WithHTTPPathPattern("/v1/gethistoriccandles")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7970,18 +6820,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetHistoricCandles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_SetExchangeAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_SetExchangeAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangeAsset", runtime.WithHTTPPathPattern("/v1/setexchangeasset")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangeAsset", runtime.WithHTTPPathPattern("/v1/setexchangeasset")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -7992,18 +6837,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetExchangeAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_SetAllExchangePairs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_SetAllExchangePairs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetAllExchangePairs", runtime.WithHTTPPathPattern("/v1/setallexchangepairs")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetAllExchangePairs", runtime.WithHTTPPathPattern("/v1/setallexchangepairs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8014,18 +6854,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetAllExchangePairs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_UpdateExchangeSupportedPairs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_UpdateExchangeSupportedPairs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateExchangeSupportedPairs", runtime.WithHTTPPathPattern("/v1/updateexchangesupportedpairs")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateExchangeSupportedPairs", runtime.WithHTTPPathPattern("/v1/updateexchangesupportedpairs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8036,18 +6871,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_UpdateExchangeSupportedPairs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetExchangeAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetExchangeAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeAssets", runtime.WithHTTPPathPattern("/v1/getexchangeassets")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeAssets", runtime.WithHTTPPathPattern("/v1/getexchangeassets")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8058,18 +6888,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeAssets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_WebsocketGetInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_WebsocketGetInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketGetInfo", runtime.WithHTTPPathPattern("/v1/websocketgetinfo")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketGetInfo", runtime.WithHTTPPathPattern("/v1/websocketgetinfo")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8080,18 +6905,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketGetInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_WebsocketSetEnabled_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_WebsocketSetEnabled_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetEnabled", runtime.WithHTTPPathPattern("/v1/websocketsetenabled")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetEnabled", runtime.WithHTTPPathPattern("/v1/websocketsetenabled")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8102,18 +6922,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketSetEnabled_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_WebsocketGetSubscriptions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_WebsocketGetSubscriptions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketGetSubscriptions", runtime.WithHTTPPathPattern("/v1/websocketgetsubscriptions")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketGetSubscriptions", runtime.WithHTTPPathPattern("/v1/websocketgetsubscriptions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8124,18 +6939,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketGetSubscriptions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_WebsocketSetProxy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_WebsocketSetProxy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetProxy", runtime.WithHTTPPathPattern("/v1/websocketsetproxy")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetProxy", runtime.WithHTTPPathPattern("/v1/websocketsetproxy")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8146,18 +6956,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketSetProxy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_WebsocketSetURL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_WebsocketSetURL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetURL", runtime.WithHTTPPathPattern("/v1/websocketseturl")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetURL", runtime.WithHTTPPathPattern("/v1/websocketseturl")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8168,18 +6973,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketSetURL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetRecentTrades_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetRecentTrades_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetRecentTrades", runtime.WithHTTPPathPattern("/v1/getrecenttrades")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetRecentTrades", runtime.WithHTTPPathPattern("/v1/getrecenttrades")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8190,18 +6990,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetRecentTrades_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetHistoricTrades_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetHistoricTrades_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetHistoricTrades", runtime.WithHTTPPathPattern("/v1/gethistorictrades")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetHistoricTrades", runtime.WithHTTPPathPattern("/v1/gethistorictrades")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8212,18 +7007,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetHistoricTrades_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetSavedTrades_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetSavedTrades_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetSavedTrades", runtime.WithHTTPPathPattern("/v1/getsavedtrades")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetSavedTrades", runtime.WithHTTPPathPattern("/v1/getsavedtrades")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8234,18 +7024,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetSavedTrades_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_ConvertTradesToCandles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_ConvertTradesToCandles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ConvertTradesToCandles", runtime.WithHTTPPathPattern("/v1/converttradestocandles")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ConvertTradesToCandles", runtime.WithHTTPPathPattern("/v1/converttradestocandles")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8256,18 +7041,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_ConvertTradesToCandles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_FindMissingSavedCandleIntervals_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_FindMissingSavedCandleIntervals_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/FindMissingSavedCandleIntervals", runtime.WithHTTPPathPattern("/v1/findmissingsavedcandleintervals")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/FindMissingSavedCandleIntervals", runtime.WithHTTPPathPattern("/v1/findmissingsavedcandleintervals")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8278,18 +7058,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_FindMissingSavedCandleIntervals_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_FindMissingSavedTradeIntervals_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_FindMissingSavedTradeIntervals_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/FindMissingSavedTradeIntervals", runtime.WithHTTPPathPattern("/v1/findmissingsavedtradeintervals")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/FindMissingSavedTradeIntervals", runtime.WithHTTPPathPattern("/v1/findmissingsavedtradeintervals")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8300,18 +7075,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_FindMissingSavedTradeIntervals_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_SetExchangeTradeProcessing_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_SetExchangeTradeProcessing_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangeTradeProcessing", runtime.WithHTTPPathPattern("/v1/setexchangetradeprocessing")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangeTradeProcessing", runtime.WithHTTPPathPattern("/v1/setexchangetradeprocessing")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8322,18 +7092,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetExchangeTradeProcessing_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_UpsertDataHistoryJob_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_UpsertDataHistoryJob_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpsertDataHistoryJob", runtime.WithHTTPPathPattern("/v1/upsertdatahistoryjob")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpsertDataHistoryJob", runtime.WithHTTPPathPattern("/v1/upsertdatahistoryjob")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8344,18 +7109,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_UpsertDataHistoryJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetDataHistoryJobDetails_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetDataHistoryJobDetails_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobDetails", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobdetails")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobDetails", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobdetails")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8366,18 +7126,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetDataHistoryJobDetails_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetActiveDataHistoryJobs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetActiveDataHistoryJobs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetActiveDataHistoryJobs", runtime.WithHTTPPathPattern("/v1/getactivedatahistoryjobs")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetActiveDataHistoryJobs", runtime.WithHTTPPathPattern("/v1/getactivedatahistoryjobs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8388,18 +7143,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetActiveDataHistoryJobs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetDataHistoryJobsBetween_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetDataHistoryJobsBetween_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobsBetween", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobsbetween")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobsBetween", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobsbetween")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8410,18 +7160,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetDataHistoryJobsBetween_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetDataHistoryJobSummary_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetDataHistoryJobSummary_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobSummary", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobsummary")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobSummary", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobsummary")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8432,18 +7177,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetDataHistoryJobSummary_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_SetDataHistoryJobStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_SetDataHistoryJobStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetDataHistoryJobStatus", runtime.WithHTTPPathPattern("/v1/setdatahistoryjobstatus")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetDataHistoryJobStatus", runtime.WithHTTPPathPattern("/v1/setdatahistoryjobstatus")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8454,18 +7194,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetDataHistoryJobStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateDataHistoryJobPrerequisite", runtime.WithHTTPPathPattern("/v1/updatedatahistoryjobprerequisite")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateDataHistoryJobPrerequisite", runtime.WithHTTPPathPattern("/v1/updatedatahistoryjobprerequisite")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8476,18 +7211,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_GetManagedOrders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_GetManagedOrders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetManagedOrders", runtime.WithHTTPPathPattern("/v1/getmanagedorders")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetManagedOrders", runtime.WithHTTPPathPattern("/v1/getmanagedorders")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8498,18 +7228,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetManagedOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_ModifyOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_ModifyOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ModifyOrder", runtime.WithHTTPPathPattern("/v1/modifyorder")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ModifyOrder", runtime.WithHTTPPathPattern("/v1/modifyorder")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8520,18 +7245,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_ModifyOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_CurrencyStateGetAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_CurrencyStateGetAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateGetAll", runtime.WithHTTPPathPattern("/v1/currencystategetall")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateGetAll", runtime.WithHTTPPathPattern("/v1/currencystategetall")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8542,18 +7262,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateGetAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_CurrencyStateTrading_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_CurrencyStateTrading_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateTrading", runtime.WithHTTPPathPattern("/v1/currencystatetrading")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateTrading", runtime.WithHTTPPathPattern("/v1/currencystatetrading")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8564,18 +7279,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateTrading_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_CurrencyStateDeposit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_CurrencyStateDeposit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateDeposit", runtime.WithHTTPPathPattern("/v1/currencystatedeposit")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateDeposit", runtime.WithHTTPPathPattern("/v1/currencystatedeposit")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8586,18 +7296,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateDeposit_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_CurrencyStateWithdraw_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_CurrencyStateWithdraw_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateWithdraw", runtime.WithHTTPPathPattern("/v1/currencystatewithdraw")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateWithdraw", runtime.WithHTTPPathPattern("/v1/currencystatewithdraw")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8608,18 +7313,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateWithdraw_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_CurrencyStateTradingPair_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_CurrencyStateTradingPair_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateTradingPair", runtime.WithHTTPPathPattern("/v1/currencystatetradingpair")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateTradingPair", runtime.WithHTTPPathPattern("/v1/currencystatetradingpair")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8630,18 +7330,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateTradingPair_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetFuturesPositionsSummary_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetFuturesPositionsSummary_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFuturesPositionsSummary", runtime.WithHTTPPathPattern("/v1/getfuturespositionssummary")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFuturesPositionsSummary", runtime.WithHTTPPathPattern("/v1/getfuturespositionssummary")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8652,18 +7347,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetFuturesPositionsSummary_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetFuturesPositionsOrders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetFuturesPositionsOrders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFuturesPositionsOrders", runtime.WithHTTPPathPattern("/v1/getfuturespositionsorders")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFuturesPositionsOrders", runtime.WithHTTPPathPattern("/v1/getfuturespositionsorders")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8674,18 +7364,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetFuturesPositionsOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetCollateral_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetCollateral_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCollateral", runtime.WithHTTPPathPattern("/v1/getcollateral")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCollateral", runtime.WithHTTPPathPattern("/v1/getcollateral")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8696,18 +7381,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCollateral_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_Shutdown_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_Shutdown_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/Shutdown", runtime.WithHTTPPathPattern("/v1/shutdown")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/Shutdown", runtime.WithHTTPPathPattern("/v1/shutdown")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8718,18 +7398,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_Shutdown_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetTechnicalAnalysis_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetTechnicalAnalysis_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTechnicalAnalysis", runtime.WithHTTPPathPattern("/v1/gettechnicalanalysis")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTechnicalAnalysis", runtime.WithHTTPPathPattern("/v1/gettechnicalanalysis")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8740,18 +7415,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetTechnicalAnalysis_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetMarginRatesHistory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetMarginRatesHistory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetMarginRatesHistory", runtime.WithHTTPPathPattern("/v1/getmarginrateshistory")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetMarginRatesHistory", runtime.WithHTTPPathPattern("/v1/getmarginrateshistory")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8762,18 +7432,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetMarginRatesHistory_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetManagedPosition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetManagedPosition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetManagedPosition", runtime.WithHTTPPathPattern("/v1/getmanagedposition")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetManagedPosition", runtime.WithHTTPPathPattern("/v1/getmanagedposition")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8784,18 +7449,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetManagedPosition_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetAllManagedPositions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetAllManagedPositions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAllManagedPositions", runtime.WithHTTPPathPattern("/v1/getallmanagedpositions")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAllManagedPositions", runtime.WithHTTPPathPattern("/v1/getallmanagedpositions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8806,18 +7466,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetAllManagedPositions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetFundingRates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetFundingRates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFundingRates", runtime.WithHTTPPathPattern("/v1/getfundingrates")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFundingRates", runtime.WithHTTPPathPattern("/v1/getfundingrates")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8828,18 +7483,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetFundingRates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetLatestFundingRate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetLatestFundingRate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLatestFundingRate", runtime.WithHTTPPathPattern("/v1/getlatestfundingrate")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLatestFundingRate", runtime.WithHTTPPathPattern("/v1/getlatestfundingrate")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8850,18 +7500,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetLatestFundingRate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetOrderbookMovement_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetOrderbookMovement_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookMovement", runtime.WithHTTPPathPattern("/v1/getorderbookmovement")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookMovement", runtime.WithHTTPPathPattern("/v1/getorderbookmovement")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8872,18 +7517,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbookMovement_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetOrderbookAmountByNominal_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetOrderbookAmountByNominal_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookAmountByNominal", runtime.WithHTTPPathPattern("/v1/getorderbookamountbynominal")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookAmountByNominal", runtime.WithHTTPPathPattern("/v1/getorderbookamountbynominal")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8894,18 +7534,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbookAmountByNominal_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetOrderbookAmountByImpact_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetOrderbookAmountByImpact_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookAmountByImpact", runtime.WithHTTPPathPattern("/v1/getorderbookamountbyimpact")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookAmountByImpact", runtime.WithHTTPPathPattern("/v1/getorderbookamountbyimpact")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8916,18 +7551,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbookAmountByImpact_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetCollateralMode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetCollateralMode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCollateralMode", runtime.WithHTTPPathPattern("/v1/getcollateralmode")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCollateralMode", runtime.WithHTTPPathPattern("/v1/getcollateralmode")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8938,18 +7568,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCollateralMode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetLeverage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetLeverage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLeverage", runtime.WithHTTPPathPattern("/v1/getleverage")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLeverage", runtime.WithHTTPPathPattern("/v1/getleverage")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8960,18 +7585,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetLeverage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_SetCollateralMode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_SetCollateralMode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetCollateralMode", runtime.WithHTTPPathPattern("/v1/getcollateralmode")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetCollateralMode", runtime.WithHTTPPathPattern("/v1/getcollateralmode")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -8982,18 +7602,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetCollateralMode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_SetMarginType_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_SetMarginType_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetMarginType", runtime.WithHTTPPathPattern("/v1/getmargintype")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetMarginType", runtime.WithHTTPPathPattern("/v1/getmargintype")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -9004,18 +7619,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetMarginType_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_SetLeverage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_SetLeverage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetLeverage", runtime.WithHTTPPathPattern("/v1/getleverage")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetLeverage", runtime.WithHTTPPathPattern("/v1/getleverage")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -9026,18 +7636,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetLeverage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_GoCryptoTraderService_ChangePositionMargin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_GoCryptoTraderService_ChangePositionMargin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ChangePositionMargin", runtime.WithHTTPPathPattern("/v1/changepositionmargin")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ChangePositionMargin", runtime.WithHTTPPathPattern("/v1/changepositionmargin")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -9048,18 +7653,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_ChangePositionMargin_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetOpenInterest_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetOpenInterest_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOpenInterest", runtime.WithHTTPPathPattern("/v1/getopeninterest")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOpenInterest", runtime.WithHTTPPathPattern("/v1/getopeninterest")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -9070,18 +7670,13 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOpenInterest_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_GoCryptoTraderService_GetCurrencyTradeURL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_GoCryptoTraderService_GetCurrencyTradeURL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCurrencyTradeURL", runtime.WithHTTPPathPattern("/v1/getcurrencytradeurl")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCurrencyTradeURL", runtime.WithHTTPPathPattern("/v1/getcurrencytradeurl")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -9092,474 +7687,243 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCurrencyTradeURL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } var ( - pattern_GoCryptoTraderService_GetInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getinfo"}, "")) - - pattern_GoCryptoTraderService_GetSubsystems_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getsubsystems"}, "")) - - pattern_GoCryptoTraderService_EnableSubsystem_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "enablesubsystem"}, "")) - - pattern_GoCryptoTraderService_DisableSubsystem_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "disablesubsystem"}, "")) - - pattern_GoCryptoTraderService_GetRPCEndpoints_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getrpcendpoints"}, "")) - - pattern_GoCryptoTraderService_GetCommunicationRelayers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getcommunicationrelayers"}, "")) - - pattern_GoCryptoTraderService_GetExchanges_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getexchanges"}, "")) - - pattern_GoCryptoTraderService_DisableExchange_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "disableexchange"}, "")) - - pattern_GoCryptoTraderService_GetExchangeInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getexchangeinfo"}, "")) - - pattern_GoCryptoTraderService_GetExchangeOTPCode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getexchangeotp"}, "")) - - pattern_GoCryptoTraderService_GetExchangeOTPCodes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getexchangeotps"}, "")) - - pattern_GoCryptoTraderService_EnableExchange_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "enableexchange"}, "")) - - pattern_GoCryptoTraderService_GetTicker_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getticker"}, "")) - - pattern_GoCryptoTraderService_GetTickers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "gettickers"}, "")) - - pattern_GoCryptoTraderService_GetOrderbook_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getorderbook"}, "")) - - pattern_GoCryptoTraderService_GetOrderbooks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getorderbooks"}, "")) - - pattern_GoCryptoTraderService_GetAccountBalances_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getaccountbalances"}, "")) - - pattern_GoCryptoTraderService_UpdateAccountBalances_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "updateaccountbalances"}, "")) - - pattern_GoCryptoTraderService_GetAccountBalancesStream_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getaccountbalancesstream"}, "")) - - pattern_GoCryptoTraderService_GetConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getconfig"}, "")) - - pattern_GoCryptoTraderService_GetPortfolio_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getportfolio"}, "")) - - pattern_GoCryptoTraderService_GetPortfolioSummary_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getportfoliosummary"}, "")) - - pattern_GoCryptoTraderService_AddPortfolioAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "addportfolioaddress"}, "")) - - pattern_GoCryptoTraderService_RemovePortfolioAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "removeportfolioaddress"}, "")) - - pattern_GoCryptoTraderService_GetForexProviders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getforexproviders"}, "")) - - pattern_GoCryptoTraderService_GetForexRates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getforexrates"}, "")) - - pattern_GoCryptoTraderService_GetOrders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getorders"}, "")) - - pattern_GoCryptoTraderService_GetOrder_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getorder"}, "")) - - pattern_GoCryptoTraderService_SubmitOrder_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "submitorder"}, "")) - - pattern_GoCryptoTraderService_SimulateOrder_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "simulateorder"}, "")) - - pattern_GoCryptoTraderService_WhaleBomb_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "whalebomb"}, "")) - - pattern_GoCryptoTraderService_CancelOrder_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "cancelorder"}, "")) - - pattern_GoCryptoTraderService_CancelBatchOrders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "cancelbatchorders"}, "")) - - pattern_GoCryptoTraderService_CancelAllOrders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "cancelallorders"}, "")) - - pattern_GoCryptoTraderService_GetEvents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getevents"}, "")) - - pattern_GoCryptoTraderService_AddEvent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "addevent"}, "")) - - pattern_GoCryptoTraderService_RemoveEvent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "removeevent"}, "")) - + pattern_GoCryptoTraderService_GetInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getinfo"}, "")) + pattern_GoCryptoTraderService_GetSubsystems_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getsubsystems"}, "")) + pattern_GoCryptoTraderService_EnableSubsystem_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "enablesubsystem"}, "")) + pattern_GoCryptoTraderService_DisableSubsystem_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "disablesubsystem"}, "")) + pattern_GoCryptoTraderService_GetRPCEndpoints_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getrpcendpoints"}, "")) + pattern_GoCryptoTraderService_GetCommunicationRelayers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getcommunicationrelayers"}, "")) + pattern_GoCryptoTraderService_GetExchanges_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getexchanges"}, "")) + pattern_GoCryptoTraderService_DisableExchange_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "disableexchange"}, "")) + pattern_GoCryptoTraderService_GetExchangeInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getexchangeinfo"}, "")) + pattern_GoCryptoTraderService_GetExchangeOTPCode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getexchangeotp"}, "")) + pattern_GoCryptoTraderService_GetExchangeOTPCodes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getexchangeotps"}, "")) + pattern_GoCryptoTraderService_EnableExchange_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "enableexchange"}, "")) + pattern_GoCryptoTraderService_GetTicker_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getticker"}, "")) + pattern_GoCryptoTraderService_GetTickers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "gettickers"}, "")) + pattern_GoCryptoTraderService_GetOrderbook_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getorderbook"}, "")) + pattern_GoCryptoTraderService_GetOrderbooks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getorderbooks"}, "")) + pattern_GoCryptoTraderService_GetAccountBalances_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getaccountbalances"}, "")) + pattern_GoCryptoTraderService_UpdateAccountBalances_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "updateaccountbalances"}, "")) + pattern_GoCryptoTraderService_GetAccountBalancesStream_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getaccountbalancesstream"}, "")) + pattern_GoCryptoTraderService_GetConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getconfig"}, "")) + pattern_GoCryptoTraderService_GetPortfolio_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getportfolio"}, "")) + pattern_GoCryptoTraderService_GetPortfolioSummary_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getportfoliosummary"}, "")) + pattern_GoCryptoTraderService_AddPortfolioAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "addportfolioaddress"}, "")) + pattern_GoCryptoTraderService_RemovePortfolioAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "removeportfolioaddress"}, "")) + pattern_GoCryptoTraderService_GetForexProviders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getforexproviders"}, "")) + pattern_GoCryptoTraderService_GetForexRates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getforexrates"}, "")) + pattern_GoCryptoTraderService_GetOrders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getorders"}, "")) + pattern_GoCryptoTraderService_GetOrder_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getorder"}, "")) + pattern_GoCryptoTraderService_SubmitOrder_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "submitorder"}, "")) + pattern_GoCryptoTraderService_SimulateOrder_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "simulateorder"}, "")) + pattern_GoCryptoTraderService_WhaleBomb_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "whalebomb"}, "")) + pattern_GoCryptoTraderService_CancelOrder_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "cancelorder"}, "")) + pattern_GoCryptoTraderService_CancelBatchOrders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "cancelbatchorders"}, "")) + pattern_GoCryptoTraderService_CancelAllOrders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "cancelallorders"}, "")) + pattern_GoCryptoTraderService_GetEvents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getevents"}, "")) + pattern_GoCryptoTraderService_AddEvent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "addevent"}, "")) + pattern_GoCryptoTraderService_RemoveEvent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "removeevent"}, "")) pattern_GoCryptoTraderService_GetCryptocurrencyDepositAddresses_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getcryptodepositaddresses"}, "")) - - pattern_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getcryptodepositaddress"}, "")) - - pattern_GoCryptoTraderService_GetAvailableTransferChains_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getavailabletransferchains"}, "")) - - pattern_GoCryptoTraderService_WithdrawFiatFunds_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "withdrawfiatfunds"}, "")) - - pattern_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "withdrawithdrawcryptofundswfiatfunds"}, "")) - - pattern_GoCryptoTraderService_WithdrawalEventByID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "withdrawaleventbyid"}, "")) - - pattern_GoCryptoTraderService_WithdrawalEventsByExchange_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "withdrawaleventbyexchange"}, "")) - - pattern_GoCryptoTraderService_WithdrawalEventsByDate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "withdrawaleventbydate"}, "")) - - pattern_GoCryptoTraderService_GetLoggerDetails_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getloggerdetails"}, "")) - - pattern_GoCryptoTraderService_SetLoggerDetails_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "setloggerdetails"}, "")) - - pattern_GoCryptoTraderService_GetExchangePairs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getexchangepairs"}, "")) - - pattern_GoCryptoTraderService_SetExchangePair_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "setexchangepair"}, "")) - - pattern_GoCryptoTraderService_GetOrderbookStream_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getorderbookstream"}, "")) - - pattern_GoCryptoTraderService_GetExchangeOrderbookStream_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getexchangeorderbookstream"}, "")) - - pattern_GoCryptoTraderService_GetTickerStream_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "gettickerstream"}, "")) - - pattern_GoCryptoTraderService_GetExchangeTickerStream_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getexchangetickerstream"}, "")) - - pattern_GoCryptoTraderService_GetAuditEvent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getauditevent"}, "")) - - pattern_GoCryptoTraderService_GCTScriptExecute_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "gctscript", "execute"}, "")) - - pattern_GoCryptoTraderService_GCTScriptUpload_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "gctscript", "upload"}, "")) - - pattern_GoCryptoTraderService_GCTScriptReadScript_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "gctscript", "read"}, "")) - - pattern_GoCryptoTraderService_GCTScriptStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "gctscript", "status"}, "")) - - pattern_GoCryptoTraderService_GCTScriptQuery_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "gctscript", "query"}, "")) - - pattern_GoCryptoTraderService_GCTScriptStop_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "gctscript", "stop"}, "")) - - pattern_GoCryptoTraderService_GCTScriptStopAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "gctscript", "stopall"}, "")) - - pattern_GoCryptoTraderService_GCTScriptListAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "gctscript", "list"}, "")) - - pattern_GoCryptoTraderService_GCTScriptAutoLoadToggle_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "gctscript", "autoload"}, "")) - - pattern_GoCryptoTraderService_GetHistoricCandles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "gethistoriccandles"}, "")) - - pattern_GoCryptoTraderService_SetExchangeAsset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "setexchangeasset"}, "")) - - pattern_GoCryptoTraderService_SetAllExchangePairs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "setallexchangepairs"}, "")) - - pattern_GoCryptoTraderService_UpdateExchangeSupportedPairs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "updateexchangesupportedpairs"}, "")) - - pattern_GoCryptoTraderService_GetExchangeAssets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getexchangeassets"}, "")) - - pattern_GoCryptoTraderService_WebsocketGetInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "websocketgetinfo"}, "")) - - pattern_GoCryptoTraderService_WebsocketSetEnabled_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "websocketsetenabled"}, "")) - - pattern_GoCryptoTraderService_WebsocketGetSubscriptions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "websocketgetsubscriptions"}, "")) - - pattern_GoCryptoTraderService_WebsocketSetProxy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "websocketsetproxy"}, "")) - - pattern_GoCryptoTraderService_WebsocketSetURL_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "websocketseturl"}, "")) - - pattern_GoCryptoTraderService_GetRecentTrades_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getrecenttrades"}, "")) - - pattern_GoCryptoTraderService_GetHistoricTrades_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "gethistorictrades"}, "")) - - pattern_GoCryptoTraderService_GetSavedTrades_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getsavedtrades"}, "")) - - pattern_GoCryptoTraderService_ConvertTradesToCandles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "converttradestocandles"}, "")) - - pattern_GoCryptoTraderService_FindMissingSavedCandleIntervals_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "findmissingsavedcandleintervals"}, "")) - - pattern_GoCryptoTraderService_FindMissingSavedTradeIntervals_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "findmissingsavedtradeintervals"}, "")) - - pattern_GoCryptoTraderService_SetExchangeTradeProcessing_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "setexchangetradeprocessing"}, "")) - - pattern_GoCryptoTraderService_UpsertDataHistoryJob_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "upsertdatahistoryjob"}, "")) - - pattern_GoCryptoTraderService_GetDataHistoryJobDetails_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getdatahistoryjobdetails"}, "")) - - pattern_GoCryptoTraderService_GetActiveDataHistoryJobs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getactivedatahistoryjobs"}, "")) - - pattern_GoCryptoTraderService_GetDataHistoryJobsBetween_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getdatahistoryjobsbetween"}, "")) - - pattern_GoCryptoTraderService_GetDataHistoryJobSummary_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getdatahistoryjobsummary"}, "")) - - pattern_GoCryptoTraderService_SetDataHistoryJobStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "setdatahistoryjobstatus"}, "")) - - pattern_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "updatedatahistoryjobprerequisite"}, "")) - - pattern_GoCryptoTraderService_GetManagedOrders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getmanagedorders"}, "")) - - pattern_GoCryptoTraderService_ModifyOrder_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "modifyorder"}, "")) - - pattern_GoCryptoTraderService_CurrencyStateGetAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "currencystategetall"}, "")) - - pattern_GoCryptoTraderService_CurrencyStateTrading_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "currencystatetrading"}, "")) - - pattern_GoCryptoTraderService_CurrencyStateDeposit_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "currencystatedeposit"}, "")) - - pattern_GoCryptoTraderService_CurrencyStateWithdraw_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "currencystatewithdraw"}, "")) - - pattern_GoCryptoTraderService_CurrencyStateTradingPair_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "currencystatetradingpair"}, "")) - - pattern_GoCryptoTraderService_GetFuturesPositionsSummary_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getfuturespositionssummary"}, "")) - - pattern_GoCryptoTraderService_GetFuturesPositionsOrders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getfuturespositionsorders"}, "")) - - pattern_GoCryptoTraderService_GetCollateral_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getcollateral"}, "")) - - pattern_GoCryptoTraderService_Shutdown_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "shutdown"}, "")) - - pattern_GoCryptoTraderService_GetTechnicalAnalysis_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "gettechnicalanalysis"}, "")) - - pattern_GoCryptoTraderService_GetMarginRatesHistory_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getmarginrateshistory"}, "")) - - pattern_GoCryptoTraderService_GetManagedPosition_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getmanagedposition"}, "")) - - pattern_GoCryptoTraderService_GetAllManagedPositions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getallmanagedpositions"}, "")) - - pattern_GoCryptoTraderService_GetFundingRates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getfundingrates"}, "")) - - pattern_GoCryptoTraderService_GetLatestFundingRate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getlatestfundingrate"}, "")) - - pattern_GoCryptoTraderService_GetOrderbookMovement_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getorderbookmovement"}, "")) - - pattern_GoCryptoTraderService_GetOrderbookAmountByNominal_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getorderbookamountbynominal"}, "")) - - pattern_GoCryptoTraderService_GetOrderbookAmountByImpact_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getorderbookamountbyimpact"}, "")) - - pattern_GoCryptoTraderService_GetCollateralMode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getcollateralmode"}, "")) - - pattern_GoCryptoTraderService_GetLeverage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getleverage"}, "")) - - pattern_GoCryptoTraderService_SetCollateralMode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getcollateralmode"}, "")) - - pattern_GoCryptoTraderService_SetMarginType_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getmargintype"}, "")) - - pattern_GoCryptoTraderService_SetLeverage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getleverage"}, "")) - - pattern_GoCryptoTraderService_ChangePositionMargin_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "changepositionmargin"}, "")) - - pattern_GoCryptoTraderService_GetOpenInterest_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getopeninterest"}, "")) - - pattern_GoCryptoTraderService_GetCurrencyTradeURL_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getcurrencytradeurl"}, "")) + pattern_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getcryptodepositaddress"}, "")) + pattern_GoCryptoTraderService_GetAvailableTransferChains_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getavailabletransferchains"}, "")) + pattern_GoCryptoTraderService_WithdrawFiatFunds_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "withdrawfiatfunds"}, "")) + pattern_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "withdrawithdrawcryptofundswfiatfunds"}, "")) + pattern_GoCryptoTraderService_WithdrawalEventByID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "withdrawaleventbyid"}, "")) + pattern_GoCryptoTraderService_WithdrawalEventsByExchange_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "withdrawaleventbyexchange"}, "")) + pattern_GoCryptoTraderService_WithdrawalEventsByDate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "withdrawaleventbydate"}, "")) + pattern_GoCryptoTraderService_GetLoggerDetails_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getloggerdetails"}, "")) + pattern_GoCryptoTraderService_SetLoggerDetails_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "setloggerdetails"}, "")) + pattern_GoCryptoTraderService_GetExchangePairs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getexchangepairs"}, "")) + pattern_GoCryptoTraderService_SetExchangePair_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "setexchangepair"}, "")) + pattern_GoCryptoTraderService_GetOrderbookStream_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getorderbookstream"}, "")) + pattern_GoCryptoTraderService_GetExchangeOrderbookStream_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getexchangeorderbookstream"}, "")) + pattern_GoCryptoTraderService_GetTickerStream_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "gettickerstream"}, "")) + pattern_GoCryptoTraderService_GetExchangeTickerStream_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getexchangetickerstream"}, "")) + pattern_GoCryptoTraderService_GetAuditEvent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getauditevent"}, "")) + pattern_GoCryptoTraderService_GCTScriptExecute_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "gctscript", "execute"}, "")) + pattern_GoCryptoTraderService_GCTScriptUpload_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "gctscript", "upload"}, "")) + pattern_GoCryptoTraderService_GCTScriptReadScript_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "gctscript", "read"}, "")) + pattern_GoCryptoTraderService_GCTScriptStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "gctscript", "status"}, "")) + pattern_GoCryptoTraderService_GCTScriptQuery_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "gctscript", "query"}, "")) + pattern_GoCryptoTraderService_GCTScriptStop_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "gctscript", "stop"}, "")) + pattern_GoCryptoTraderService_GCTScriptStopAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "gctscript", "stopall"}, "")) + pattern_GoCryptoTraderService_GCTScriptListAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "gctscript", "list"}, "")) + pattern_GoCryptoTraderService_GCTScriptAutoLoadToggle_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "gctscript", "autoload"}, "")) + pattern_GoCryptoTraderService_GetHistoricCandles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "gethistoriccandles"}, "")) + pattern_GoCryptoTraderService_SetExchangeAsset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "setexchangeasset"}, "")) + pattern_GoCryptoTraderService_SetAllExchangePairs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "setallexchangepairs"}, "")) + pattern_GoCryptoTraderService_UpdateExchangeSupportedPairs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "updateexchangesupportedpairs"}, "")) + pattern_GoCryptoTraderService_GetExchangeAssets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getexchangeassets"}, "")) + pattern_GoCryptoTraderService_WebsocketGetInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "websocketgetinfo"}, "")) + pattern_GoCryptoTraderService_WebsocketSetEnabled_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "websocketsetenabled"}, "")) + pattern_GoCryptoTraderService_WebsocketGetSubscriptions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "websocketgetsubscriptions"}, "")) + pattern_GoCryptoTraderService_WebsocketSetProxy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "websocketsetproxy"}, "")) + pattern_GoCryptoTraderService_WebsocketSetURL_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "websocketseturl"}, "")) + pattern_GoCryptoTraderService_GetRecentTrades_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getrecenttrades"}, "")) + pattern_GoCryptoTraderService_GetHistoricTrades_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "gethistorictrades"}, "")) + pattern_GoCryptoTraderService_GetSavedTrades_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getsavedtrades"}, "")) + pattern_GoCryptoTraderService_ConvertTradesToCandles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "converttradestocandles"}, "")) + pattern_GoCryptoTraderService_FindMissingSavedCandleIntervals_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "findmissingsavedcandleintervals"}, "")) + pattern_GoCryptoTraderService_FindMissingSavedTradeIntervals_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "findmissingsavedtradeintervals"}, "")) + pattern_GoCryptoTraderService_SetExchangeTradeProcessing_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "setexchangetradeprocessing"}, "")) + pattern_GoCryptoTraderService_UpsertDataHistoryJob_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "upsertdatahistoryjob"}, "")) + pattern_GoCryptoTraderService_GetDataHistoryJobDetails_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getdatahistoryjobdetails"}, "")) + pattern_GoCryptoTraderService_GetActiveDataHistoryJobs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getactivedatahistoryjobs"}, "")) + pattern_GoCryptoTraderService_GetDataHistoryJobsBetween_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getdatahistoryjobsbetween"}, "")) + pattern_GoCryptoTraderService_GetDataHistoryJobSummary_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getdatahistoryjobsummary"}, "")) + pattern_GoCryptoTraderService_SetDataHistoryJobStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "setdatahistoryjobstatus"}, "")) + pattern_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "updatedatahistoryjobprerequisite"}, "")) + pattern_GoCryptoTraderService_GetManagedOrders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getmanagedorders"}, "")) + pattern_GoCryptoTraderService_ModifyOrder_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "modifyorder"}, "")) + pattern_GoCryptoTraderService_CurrencyStateGetAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "currencystategetall"}, "")) + pattern_GoCryptoTraderService_CurrencyStateTrading_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "currencystatetrading"}, "")) + pattern_GoCryptoTraderService_CurrencyStateDeposit_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "currencystatedeposit"}, "")) + pattern_GoCryptoTraderService_CurrencyStateWithdraw_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "currencystatewithdraw"}, "")) + pattern_GoCryptoTraderService_CurrencyStateTradingPair_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "currencystatetradingpair"}, "")) + pattern_GoCryptoTraderService_GetFuturesPositionsSummary_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getfuturespositionssummary"}, "")) + pattern_GoCryptoTraderService_GetFuturesPositionsOrders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getfuturespositionsorders"}, "")) + pattern_GoCryptoTraderService_GetCollateral_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getcollateral"}, "")) + pattern_GoCryptoTraderService_Shutdown_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "shutdown"}, "")) + pattern_GoCryptoTraderService_GetTechnicalAnalysis_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "gettechnicalanalysis"}, "")) + pattern_GoCryptoTraderService_GetMarginRatesHistory_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getmarginrateshistory"}, "")) + pattern_GoCryptoTraderService_GetManagedPosition_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getmanagedposition"}, "")) + pattern_GoCryptoTraderService_GetAllManagedPositions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getallmanagedpositions"}, "")) + pattern_GoCryptoTraderService_GetFundingRates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getfundingrates"}, "")) + pattern_GoCryptoTraderService_GetLatestFundingRate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getlatestfundingrate"}, "")) + pattern_GoCryptoTraderService_GetOrderbookMovement_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getorderbookmovement"}, "")) + pattern_GoCryptoTraderService_GetOrderbookAmountByNominal_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getorderbookamountbynominal"}, "")) + pattern_GoCryptoTraderService_GetOrderbookAmountByImpact_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getorderbookamountbyimpact"}, "")) + pattern_GoCryptoTraderService_GetCollateralMode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getcollateralmode"}, "")) + pattern_GoCryptoTraderService_GetLeverage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getleverage"}, "")) + pattern_GoCryptoTraderService_SetCollateralMode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getcollateralmode"}, "")) + pattern_GoCryptoTraderService_SetMarginType_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getmargintype"}, "")) + pattern_GoCryptoTraderService_SetLeverage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getleverage"}, "")) + pattern_GoCryptoTraderService_ChangePositionMargin_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "changepositionmargin"}, "")) + pattern_GoCryptoTraderService_GetOpenInterest_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getopeninterest"}, "")) + pattern_GoCryptoTraderService_GetCurrencyTradeURL_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getcurrencytradeurl"}, "")) ) var ( - forward_GoCryptoTraderService_GetInfo_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetSubsystems_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_EnableSubsystem_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_DisableSubsystem_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetRPCEndpoints_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetCommunicationRelayers_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetExchanges_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_DisableExchange_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetExchangeInfo_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetExchangeOTPCode_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetExchangeOTPCodes_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_EnableExchange_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetTicker_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetTickers_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetOrderbook_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetOrderbooks_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetAccountBalances_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_UpdateAccountBalances_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetAccountBalancesStream_0 = runtime.ForwardResponseStream - - forward_GoCryptoTraderService_GetConfig_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetPortfolio_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetPortfolioSummary_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_AddPortfolioAddress_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_RemovePortfolioAddress_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetForexProviders_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetForexRates_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetOrders_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetOrder_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_SubmitOrder_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_SimulateOrder_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_WhaleBomb_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_CancelOrder_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_CancelBatchOrders_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_CancelAllOrders_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetEvents_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_AddEvent_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_RemoveEvent_0 = runtime.ForwardResponseMessage - + forward_GoCryptoTraderService_GetInfo_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetSubsystems_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_EnableSubsystem_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_DisableSubsystem_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetRPCEndpoints_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetCommunicationRelayers_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetExchanges_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_DisableExchange_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetExchangeInfo_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetExchangeOTPCode_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetExchangeOTPCodes_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_EnableExchange_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetTicker_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetTickers_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetOrderbook_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetOrderbooks_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetAccountBalances_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_UpdateAccountBalances_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetAccountBalancesStream_0 = runtime.ForwardResponseStream + forward_GoCryptoTraderService_GetConfig_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetPortfolio_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetPortfolioSummary_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_AddPortfolioAddress_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_RemovePortfolioAddress_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetForexProviders_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetForexRates_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetOrders_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetOrder_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_SubmitOrder_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_SimulateOrder_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_WhaleBomb_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_CancelOrder_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_CancelBatchOrders_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_CancelAllOrders_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetEvents_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_AddEvent_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_RemoveEvent_0 = runtime.ForwardResponseMessage forward_GoCryptoTraderService_GetCryptocurrencyDepositAddresses_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetAvailableTransferChains_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_WithdrawFiatFunds_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_WithdrawalEventByID_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_WithdrawalEventsByExchange_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_WithdrawalEventsByDate_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetLoggerDetails_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_SetLoggerDetails_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetExchangePairs_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_SetExchangePair_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetOrderbookStream_0 = runtime.ForwardResponseStream - - forward_GoCryptoTraderService_GetExchangeOrderbookStream_0 = runtime.ForwardResponseStream - - forward_GoCryptoTraderService_GetTickerStream_0 = runtime.ForwardResponseStream - - forward_GoCryptoTraderService_GetExchangeTickerStream_0 = runtime.ForwardResponseStream - - forward_GoCryptoTraderService_GetAuditEvent_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GCTScriptExecute_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GCTScriptUpload_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GCTScriptReadScript_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GCTScriptStatus_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GCTScriptQuery_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GCTScriptStop_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GCTScriptStopAll_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GCTScriptListAll_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GCTScriptAutoLoadToggle_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetHistoricCandles_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_SetExchangeAsset_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_SetAllExchangePairs_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_UpdateExchangeSupportedPairs_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetExchangeAssets_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_WebsocketGetInfo_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_WebsocketSetEnabled_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_WebsocketGetSubscriptions_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_WebsocketSetProxy_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_WebsocketSetURL_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetRecentTrades_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetHistoricTrades_0 = runtime.ForwardResponseStream - - forward_GoCryptoTraderService_GetSavedTrades_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_ConvertTradesToCandles_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_FindMissingSavedCandleIntervals_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_FindMissingSavedTradeIntervals_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_SetExchangeTradeProcessing_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_UpsertDataHistoryJob_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetDataHistoryJobDetails_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetActiveDataHistoryJobs_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetDataHistoryJobsBetween_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetDataHistoryJobSummary_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_SetDataHistoryJobStatus_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetManagedOrders_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_ModifyOrder_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_CurrencyStateGetAll_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_CurrencyStateTrading_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_CurrencyStateDeposit_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_CurrencyStateWithdraw_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_CurrencyStateTradingPair_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetFuturesPositionsSummary_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetFuturesPositionsOrders_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetCollateral_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_Shutdown_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetTechnicalAnalysis_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetMarginRatesHistory_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetManagedPosition_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetAllManagedPositions_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetFundingRates_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetLatestFundingRate_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetOrderbookMovement_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetOrderbookAmountByNominal_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetOrderbookAmountByImpact_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetCollateralMode_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetLeverage_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_SetCollateralMode_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_SetMarginType_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_SetLeverage_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_ChangePositionMargin_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetOpenInterest_0 = runtime.ForwardResponseMessage - - forward_GoCryptoTraderService_GetCurrencyTradeURL_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetAvailableTransferChains_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_WithdrawFiatFunds_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_WithdrawalEventByID_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_WithdrawalEventsByExchange_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_WithdrawalEventsByDate_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetLoggerDetails_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_SetLoggerDetails_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetExchangePairs_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_SetExchangePair_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetOrderbookStream_0 = runtime.ForwardResponseStream + forward_GoCryptoTraderService_GetExchangeOrderbookStream_0 = runtime.ForwardResponseStream + forward_GoCryptoTraderService_GetTickerStream_0 = runtime.ForwardResponseStream + forward_GoCryptoTraderService_GetExchangeTickerStream_0 = runtime.ForwardResponseStream + forward_GoCryptoTraderService_GetAuditEvent_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GCTScriptExecute_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GCTScriptUpload_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GCTScriptReadScript_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GCTScriptStatus_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GCTScriptQuery_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GCTScriptStop_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GCTScriptStopAll_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GCTScriptListAll_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GCTScriptAutoLoadToggle_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetHistoricCandles_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_SetExchangeAsset_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_SetAllExchangePairs_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_UpdateExchangeSupportedPairs_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetExchangeAssets_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_WebsocketGetInfo_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_WebsocketSetEnabled_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_WebsocketGetSubscriptions_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_WebsocketSetProxy_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_WebsocketSetURL_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetRecentTrades_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetHistoricTrades_0 = runtime.ForwardResponseStream + forward_GoCryptoTraderService_GetSavedTrades_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_ConvertTradesToCandles_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_FindMissingSavedCandleIntervals_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_FindMissingSavedTradeIntervals_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_SetExchangeTradeProcessing_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_UpsertDataHistoryJob_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetDataHistoryJobDetails_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetActiveDataHistoryJobs_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetDataHistoryJobsBetween_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetDataHistoryJobSummary_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_SetDataHistoryJobStatus_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetManagedOrders_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_ModifyOrder_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_CurrencyStateGetAll_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_CurrencyStateTrading_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_CurrencyStateDeposit_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_CurrencyStateWithdraw_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_CurrencyStateTradingPair_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetFuturesPositionsSummary_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetFuturesPositionsOrders_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetCollateral_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_Shutdown_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetTechnicalAnalysis_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetMarginRatesHistory_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetManagedPosition_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetAllManagedPositions_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetFundingRates_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetLatestFundingRate_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetOrderbookMovement_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetOrderbookAmountByNominal_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetOrderbookAmountByImpact_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetCollateralMode_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetLeverage_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_SetCollateralMode_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_SetMarginType_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_SetLeverage_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_ChangePositionMargin_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetOpenInterest_0 = runtime.ForwardResponseMessage + forward_GoCryptoTraderService_GetCurrencyTradeURL_0 = runtime.ForwardResponseMessage ) diff --git a/gctrpc/rpc.proto b/gctrpc/rpc.proto index e649d39844b..e930766acf1 100644 --- a/gctrpc/rpc.proto +++ b/gctrpc/rpc.proto @@ -36,7 +36,7 @@ message GenericSubsystemRequest { message GetSubsystemsRequest {} -message GetSusbsytemsResponse { +message GetSubsystemsResponse { map subsystems_status = 1; } @@ -554,13 +554,13 @@ message WithdrawalEventsByExchangeResponse { message WithdrawalEventResponse { string id = 2; - WithdrawlExchangeEvent exchange = 3; + WithdrawalExchangeEvent exchange = 3; WithdrawalRequestEvent request = 4; google.protobuf.Timestamp created_at = 5; google.protobuf.Timestamp updated_at = 6; } -message WithdrawlExchangeEvent { +message WithdrawalExchangeEvent { string name = 1; string id = 2; string status = 3; @@ -1536,7 +1536,7 @@ service GoCryptoTraderService { option (google.api.http) = {get: "/v1/getinfo"}; } - rpc GetSubsystems(GetSubsystemsRequest) returns (GetSusbsytemsResponse) { + rpc GetSubsystems(GetSubsystemsRequest) returns (GetSubsystemsResponse) { option (google.api.http) = {get: "/v1/getsubsystems"}; } diff --git a/gctrpc/rpc.swagger.json b/gctrpc/rpc.swagger.json index 35656ff8844..af8fd17bda9 100644 --- a/gctrpc/rpc.swagger.json +++ b/gctrpc/rpc.swagger.json @@ -3564,7 +3564,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/gctrpcGetSusbsytemsResponse" + "$ref": "#/definitions/gctrpcGetSubsystemsResponse" } }, "default": { @@ -6672,7 +6672,7 @@ } } }, - "gctrpcGetSusbsytemsResponse": { + "gctrpcGetSubsystemsResponse": { "type": "object", "properties": { "subsystemsStatus": { @@ -7758,7 +7758,7 @@ "type": "string" }, "exchange": { - "$ref": "#/definitions/gctrpcWithdrawlExchangeEvent" + "$ref": "#/definitions/gctrpcWithdrawalExchangeEvent" }, "request": { "$ref": "#/definitions/gctrpcWithdrawalRequestEvent" @@ -7824,6 +7824,20 @@ } } }, + "gctrpcWithdrawalExchangeEvent": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "id": { + "type": "string" + }, + "status": { + "type": "string" + } + } + }, "gctrpcWithdrawalRequestEvent": { "type": "object", "properties": { @@ -7849,20 +7863,6 @@ } } }, - "gctrpcWithdrawlExchangeEvent": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "id": { - "type": "string" - }, - "status": { - "type": "string" - } - } - }, "protobufAny": { "type": "object", "properties": { diff --git a/gctrpc/rpc_grpc.pb.go b/gctrpc/rpc_grpc.pb.go index a5052f3b99c..e96e1923a61 100644 --- a/gctrpc/rpc_grpc.pb.go +++ b/gctrpc/rpc_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.6.1 // - protoc (unknown) // source: rpc.proto @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( GoCryptoTraderService_GetInfo_FullMethodName = "/gctrpc.GoCryptoTraderService/GetInfo" @@ -141,7 +141,7 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type GoCryptoTraderServiceClient interface { GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error) - GetSubsystems(ctx context.Context, in *GetSubsystemsRequest, opts ...grpc.CallOption) (*GetSusbsytemsResponse, error) + GetSubsystems(ctx context.Context, in *GetSubsystemsRequest, opts ...grpc.CallOption) (*GetSubsystemsResponse, error) EnableSubsystem(ctx context.Context, in *GenericSubsystemRequest, opts ...grpc.CallOption) (*GenericResponse, error) DisableSubsystem(ctx context.Context, in *GenericSubsystemRequest, opts ...grpc.CallOption) (*GenericResponse, error) GetRPCEndpoints(ctx context.Context, in *GetRPCEndpointsRequest, opts ...grpc.CallOption) (*GetRPCEndpointsResponse, error) @@ -158,7 +158,7 @@ type GoCryptoTraderServiceClient interface { GetOrderbooks(ctx context.Context, in *GetOrderbooksRequest, opts ...grpc.CallOption) (*GetOrderbooksResponse, error) GetAccountBalances(ctx context.Context, in *GetAccountBalancesRequest, opts ...grpc.CallOption) (*GetAccountBalancesResponse, error) UpdateAccountBalances(ctx context.Context, in *GetAccountBalancesRequest, opts ...grpc.CallOption) (*GetAccountBalancesResponse, error) - GetAccountBalancesStream(ctx context.Context, in *GetAccountBalancesRequest, opts ...grpc.CallOption) (GoCryptoTraderService_GetAccountBalancesStreamClient, error) + GetAccountBalancesStream(ctx context.Context, in *GetAccountBalancesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[GetAccountBalancesResponse], error) GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error) GetPortfolio(ctx context.Context, in *GetPortfolioRequest, opts ...grpc.CallOption) (*GetPortfolioResponse, error) GetPortfolioSummary(ctx context.Context, in *GetPortfolioSummaryRequest, opts ...grpc.CallOption) (*GetPortfolioSummaryResponse, error) @@ -189,10 +189,10 @@ type GoCryptoTraderServiceClient interface { SetLoggerDetails(ctx context.Context, in *SetLoggerDetailsRequest, opts ...grpc.CallOption) (*GetLoggerDetailsResponse, error) GetExchangePairs(ctx context.Context, in *GetExchangePairsRequest, opts ...grpc.CallOption) (*GetExchangePairsResponse, error) SetExchangePair(ctx context.Context, in *SetExchangePairRequest, opts ...grpc.CallOption) (*GenericResponse, error) - GetOrderbookStream(ctx context.Context, in *GetOrderbookStreamRequest, opts ...grpc.CallOption) (GoCryptoTraderService_GetOrderbookStreamClient, error) - GetExchangeOrderbookStream(ctx context.Context, in *GetExchangeOrderbookStreamRequest, opts ...grpc.CallOption) (GoCryptoTraderService_GetExchangeOrderbookStreamClient, error) - GetTickerStream(ctx context.Context, in *GetTickerStreamRequest, opts ...grpc.CallOption) (GoCryptoTraderService_GetTickerStreamClient, error) - GetExchangeTickerStream(ctx context.Context, in *GetExchangeTickerStreamRequest, opts ...grpc.CallOption) (GoCryptoTraderService_GetExchangeTickerStreamClient, error) + GetOrderbookStream(ctx context.Context, in *GetOrderbookStreamRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[OrderbookResponse], error) + GetExchangeOrderbookStream(ctx context.Context, in *GetExchangeOrderbookStreamRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[OrderbookResponse], error) + GetTickerStream(ctx context.Context, in *GetTickerStreamRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[TickerResponse], error) + GetExchangeTickerStream(ctx context.Context, in *GetExchangeTickerStreamRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[TickerResponse], error) GetAuditEvent(ctx context.Context, in *GetAuditEventRequest, opts ...grpc.CallOption) (*GetAuditEventResponse, error) GCTScriptExecute(ctx context.Context, in *GCTScriptExecuteRequest, opts ...grpc.CallOption) (*GenericResponse, error) GCTScriptUpload(ctx context.Context, in *GCTScriptUploadRequest, opts ...grpc.CallOption) (*GenericResponse, error) @@ -214,7 +214,7 @@ type GoCryptoTraderServiceClient interface { WebsocketSetProxy(ctx context.Context, in *WebsocketSetProxyRequest, opts ...grpc.CallOption) (*GenericResponse, error) WebsocketSetURL(ctx context.Context, in *WebsocketSetURLRequest, opts ...grpc.CallOption) (*GenericResponse, error) GetRecentTrades(ctx context.Context, in *GetSavedTradesRequest, opts ...grpc.CallOption) (*SavedTradesResponse, error) - GetHistoricTrades(ctx context.Context, in *GetSavedTradesRequest, opts ...grpc.CallOption) (GoCryptoTraderService_GetHistoricTradesClient, error) + GetHistoricTrades(ctx context.Context, in *GetSavedTradesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SavedTradesResponse], error) GetSavedTrades(ctx context.Context, in *GetSavedTradesRequest, opts ...grpc.CallOption) (*SavedTradesResponse, error) ConvertTradesToCandles(ctx context.Context, in *ConvertTradesToCandlesRequest, opts ...grpc.CallOption) (*GetHistoricCandlesResponse, error) FindMissingSavedCandleIntervals(ctx context.Context, in *FindMissingCandlePeriodsRequest, opts ...grpc.CallOption) (*FindMissingIntervalsResponse, error) @@ -266,17 +266,19 @@ func NewGoCryptoTraderServiceClient(cc grpc.ClientConnInterface) GoCryptoTraderS } func (c *goCryptoTraderServiceClient) GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetInfoResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetInfo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetInfo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *goCryptoTraderServiceClient) GetSubsystems(ctx context.Context, in *GetSubsystemsRequest, opts ...grpc.CallOption) (*GetSusbsytemsResponse, error) { - out := new(GetSusbsytemsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetSubsystems_FullMethodName, in, out, opts...) +func (c *goCryptoTraderServiceClient) GetSubsystems(ctx context.Context, in *GetSubsystemsRequest, opts ...grpc.CallOption) (*GetSubsystemsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetSubsystemsResponse) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetSubsystems_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -284,8 +286,9 @@ func (c *goCryptoTraderServiceClient) GetSubsystems(ctx context.Context, in *Get } func (c *goCryptoTraderServiceClient) EnableSubsystem(ctx context.Context, in *GenericSubsystemRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_EnableSubsystem_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_EnableSubsystem_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -293,8 +296,9 @@ func (c *goCryptoTraderServiceClient) EnableSubsystem(ctx context.Context, in *G } func (c *goCryptoTraderServiceClient) DisableSubsystem(ctx context.Context, in *GenericSubsystemRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_DisableSubsystem_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_DisableSubsystem_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -302,8 +306,9 @@ func (c *goCryptoTraderServiceClient) DisableSubsystem(ctx context.Context, in * } func (c *goCryptoTraderServiceClient) GetRPCEndpoints(ctx context.Context, in *GetRPCEndpointsRequest, opts ...grpc.CallOption) (*GetRPCEndpointsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetRPCEndpointsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetRPCEndpoints_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetRPCEndpoints_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -311,8 +316,9 @@ func (c *goCryptoTraderServiceClient) GetRPCEndpoints(ctx context.Context, in *G } func (c *goCryptoTraderServiceClient) GetCommunicationRelayers(ctx context.Context, in *GetCommunicationRelayersRequest, opts ...grpc.CallOption) (*GetCommunicationRelayersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetCommunicationRelayersResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetCommunicationRelayers_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetCommunicationRelayers_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -320,8 +326,9 @@ func (c *goCryptoTraderServiceClient) GetCommunicationRelayers(ctx context.Conte } func (c *goCryptoTraderServiceClient) GetExchanges(ctx context.Context, in *GetExchangesRequest, opts ...grpc.CallOption) (*GetExchangesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetExchangesResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetExchanges_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetExchanges_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -329,8 +336,9 @@ func (c *goCryptoTraderServiceClient) GetExchanges(ctx context.Context, in *GetE } func (c *goCryptoTraderServiceClient) DisableExchange(ctx context.Context, in *GenericExchangeNameRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_DisableExchange_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_DisableExchange_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -338,8 +346,9 @@ func (c *goCryptoTraderServiceClient) DisableExchange(ctx context.Context, in *G } func (c *goCryptoTraderServiceClient) GetExchangeInfo(ctx context.Context, in *GenericExchangeNameRequest, opts ...grpc.CallOption) (*GetExchangeInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetExchangeInfoResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetExchangeInfo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetExchangeInfo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -347,8 +356,9 @@ func (c *goCryptoTraderServiceClient) GetExchangeInfo(ctx context.Context, in *G } func (c *goCryptoTraderServiceClient) GetExchangeOTPCode(ctx context.Context, in *GenericExchangeNameRequest, opts ...grpc.CallOption) (*GetExchangeOTPResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetExchangeOTPResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetExchangeOTPCode_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetExchangeOTPCode_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -356,8 +366,9 @@ func (c *goCryptoTraderServiceClient) GetExchangeOTPCode(ctx context.Context, in } func (c *goCryptoTraderServiceClient) GetExchangeOTPCodes(ctx context.Context, in *GetExchangeOTPsRequest, opts ...grpc.CallOption) (*GetExchangeOTPsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetExchangeOTPsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetExchangeOTPCodes_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetExchangeOTPCodes_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -365,8 +376,9 @@ func (c *goCryptoTraderServiceClient) GetExchangeOTPCodes(ctx context.Context, i } func (c *goCryptoTraderServiceClient) EnableExchange(ctx context.Context, in *GenericExchangeNameRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_EnableExchange_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_EnableExchange_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -374,8 +386,9 @@ func (c *goCryptoTraderServiceClient) EnableExchange(ctx context.Context, in *Ge } func (c *goCryptoTraderServiceClient) GetTicker(ctx context.Context, in *GetTickerRequest, opts ...grpc.CallOption) (*TickerResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(TickerResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetTicker_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetTicker_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -383,8 +396,9 @@ func (c *goCryptoTraderServiceClient) GetTicker(ctx context.Context, in *GetTick } func (c *goCryptoTraderServiceClient) GetTickers(ctx context.Context, in *GetTickersRequest, opts ...grpc.CallOption) (*GetTickersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetTickersResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetTickers_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetTickers_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -392,8 +406,9 @@ func (c *goCryptoTraderServiceClient) GetTickers(ctx context.Context, in *GetTic } func (c *goCryptoTraderServiceClient) GetOrderbook(ctx context.Context, in *GetOrderbookRequest, opts ...grpc.CallOption) (*OrderbookResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(OrderbookResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrderbook_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrderbook_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -401,8 +416,9 @@ func (c *goCryptoTraderServiceClient) GetOrderbook(ctx context.Context, in *GetO } func (c *goCryptoTraderServiceClient) GetOrderbooks(ctx context.Context, in *GetOrderbooksRequest, opts ...grpc.CallOption) (*GetOrderbooksResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetOrderbooksResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrderbooks_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrderbooks_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -410,8 +426,9 @@ func (c *goCryptoTraderServiceClient) GetOrderbooks(ctx context.Context, in *Get } func (c *goCryptoTraderServiceClient) GetAccountBalances(ctx context.Context, in *GetAccountBalancesRequest, opts ...grpc.CallOption) (*GetAccountBalancesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetAccountBalancesResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetAccountBalances_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetAccountBalances_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -419,20 +436,22 @@ func (c *goCryptoTraderServiceClient) GetAccountBalances(ctx context.Context, in } func (c *goCryptoTraderServiceClient) UpdateAccountBalances(ctx context.Context, in *GetAccountBalancesRequest, opts ...grpc.CallOption) (*GetAccountBalancesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetAccountBalancesResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_UpdateAccountBalances_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_UpdateAccountBalances_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *goCryptoTraderServiceClient) GetAccountBalancesStream(ctx context.Context, in *GetAccountBalancesRequest, opts ...grpc.CallOption) (GoCryptoTraderService_GetAccountBalancesStreamClient, error) { - stream, err := c.cc.NewStream(ctx, &GoCryptoTraderService_ServiceDesc.Streams[0], GoCryptoTraderService_GetAccountBalancesStream_FullMethodName, opts...) +func (c *goCryptoTraderServiceClient) GetAccountBalancesStream(ctx context.Context, in *GetAccountBalancesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[GetAccountBalancesResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &GoCryptoTraderService_ServiceDesc.Streams[0], GoCryptoTraderService_GetAccountBalancesStream_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &goCryptoTraderServiceGetAccountBalancesStreamClient{stream} + x := &grpc.GenericClientStream[GetAccountBalancesRequest, GetAccountBalancesResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -442,26 +461,13 @@ func (c *goCryptoTraderServiceClient) GetAccountBalancesStream(ctx context.Conte return x, nil } -type GoCryptoTraderService_GetAccountBalancesStreamClient interface { - Recv() (*GetAccountBalancesResponse, error) - grpc.ClientStream -} - -type goCryptoTraderServiceGetAccountBalancesStreamClient struct { - grpc.ClientStream -} - -func (x *goCryptoTraderServiceGetAccountBalancesStreamClient) Recv() (*GetAccountBalancesResponse, error) { - m := new(GetAccountBalancesResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type GoCryptoTraderService_GetAccountBalancesStreamClient = grpc.ServerStreamingClient[GetAccountBalancesResponse] func (c *goCryptoTraderServiceClient) GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetConfigResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetConfig_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetConfig_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -469,8 +475,9 @@ func (c *goCryptoTraderServiceClient) GetConfig(ctx context.Context, in *GetConf } func (c *goCryptoTraderServiceClient) GetPortfolio(ctx context.Context, in *GetPortfolioRequest, opts ...grpc.CallOption) (*GetPortfolioResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetPortfolioResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetPortfolio_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetPortfolio_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -478,8 +485,9 @@ func (c *goCryptoTraderServiceClient) GetPortfolio(ctx context.Context, in *GetP } func (c *goCryptoTraderServiceClient) GetPortfolioSummary(ctx context.Context, in *GetPortfolioSummaryRequest, opts ...grpc.CallOption) (*GetPortfolioSummaryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetPortfolioSummaryResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetPortfolioSummary_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetPortfolioSummary_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -487,8 +495,9 @@ func (c *goCryptoTraderServiceClient) GetPortfolioSummary(ctx context.Context, i } func (c *goCryptoTraderServiceClient) AddPortfolioAddress(ctx context.Context, in *AddPortfolioAddressRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_AddPortfolioAddress_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_AddPortfolioAddress_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -496,8 +505,9 @@ func (c *goCryptoTraderServiceClient) AddPortfolioAddress(ctx context.Context, i } func (c *goCryptoTraderServiceClient) RemovePortfolioAddress(ctx context.Context, in *RemovePortfolioAddressRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_RemovePortfolioAddress_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_RemovePortfolioAddress_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -505,8 +515,9 @@ func (c *goCryptoTraderServiceClient) RemovePortfolioAddress(ctx context.Context } func (c *goCryptoTraderServiceClient) GetForexProviders(ctx context.Context, in *GetForexProvidersRequest, opts ...grpc.CallOption) (*GetForexProvidersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetForexProvidersResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetForexProviders_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetForexProviders_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -514,8 +525,9 @@ func (c *goCryptoTraderServiceClient) GetForexProviders(ctx context.Context, in } func (c *goCryptoTraderServiceClient) GetForexRates(ctx context.Context, in *GetForexRatesRequest, opts ...grpc.CallOption) (*GetForexRatesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetForexRatesResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetForexRates_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetForexRates_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -523,8 +535,9 @@ func (c *goCryptoTraderServiceClient) GetForexRates(ctx context.Context, in *Get } func (c *goCryptoTraderServiceClient) GetOrders(ctx context.Context, in *GetOrdersRequest, opts ...grpc.CallOption) (*GetOrdersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetOrdersResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrders_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrders_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -532,8 +545,9 @@ func (c *goCryptoTraderServiceClient) GetOrders(ctx context.Context, in *GetOrde } func (c *goCryptoTraderServiceClient) GetOrder(ctx context.Context, in *GetOrderRequest, opts ...grpc.CallOption) (*OrderDetails, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(OrderDetails) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrder_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrder_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -541,8 +555,9 @@ func (c *goCryptoTraderServiceClient) GetOrder(ctx context.Context, in *GetOrder } func (c *goCryptoTraderServiceClient) SubmitOrder(ctx context.Context, in *SubmitOrderRequest, opts ...grpc.CallOption) (*SubmitOrderResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SubmitOrderResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_SubmitOrder_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_SubmitOrder_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -550,8 +565,9 @@ func (c *goCryptoTraderServiceClient) SubmitOrder(ctx context.Context, in *Submi } func (c *goCryptoTraderServiceClient) SimulateOrder(ctx context.Context, in *SimulateOrderRequest, opts ...grpc.CallOption) (*SimulateOrderResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SimulateOrderResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_SimulateOrder_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_SimulateOrder_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -559,8 +575,9 @@ func (c *goCryptoTraderServiceClient) SimulateOrder(ctx context.Context, in *Sim } func (c *goCryptoTraderServiceClient) WhaleBomb(ctx context.Context, in *WhaleBombRequest, opts ...grpc.CallOption) (*SimulateOrderResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SimulateOrderResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_WhaleBomb_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_WhaleBomb_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -568,8 +585,9 @@ func (c *goCryptoTraderServiceClient) WhaleBomb(ctx context.Context, in *WhaleBo } func (c *goCryptoTraderServiceClient) CancelOrder(ctx context.Context, in *CancelOrderRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_CancelOrder_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_CancelOrder_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -577,8 +595,9 @@ func (c *goCryptoTraderServiceClient) CancelOrder(ctx context.Context, in *Cance } func (c *goCryptoTraderServiceClient) CancelBatchOrders(ctx context.Context, in *CancelBatchOrdersRequest, opts ...grpc.CallOption) (*CancelBatchOrdersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CancelBatchOrdersResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_CancelBatchOrders_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_CancelBatchOrders_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -586,8 +605,9 @@ func (c *goCryptoTraderServiceClient) CancelBatchOrders(ctx context.Context, in } func (c *goCryptoTraderServiceClient) CancelAllOrders(ctx context.Context, in *CancelAllOrdersRequest, opts ...grpc.CallOption) (*CancelAllOrdersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CancelAllOrdersResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_CancelAllOrders_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_CancelAllOrders_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -595,8 +615,9 @@ func (c *goCryptoTraderServiceClient) CancelAllOrders(ctx context.Context, in *C } func (c *goCryptoTraderServiceClient) GetEvents(ctx context.Context, in *GetEventsRequest, opts ...grpc.CallOption) (*GetEventsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetEventsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetEvents_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetEvents_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -604,8 +625,9 @@ func (c *goCryptoTraderServiceClient) GetEvents(ctx context.Context, in *GetEven } func (c *goCryptoTraderServiceClient) AddEvent(ctx context.Context, in *AddEventRequest, opts ...grpc.CallOption) (*AddEventResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AddEventResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_AddEvent_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_AddEvent_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -613,8 +635,9 @@ func (c *goCryptoTraderServiceClient) AddEvent(ctx context.Context, in *AddEvent } func (c *goCryptoTraderServiceClient) RemoveEvent(ctx context.Context, in *RemoveEventRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_RemoveEvent_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_RemoveEvent_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -622,8 +645,9 @@ func (c *goCryptoTraderServiceClient) RemoveEvent(ctx context.Context, in *Remov } func (c *goCryptoTraderServiceClient) GetCryptocurrencyDepositAddresses(ctx context.Context, in *GetCryptocurrencyDepositAddressesRequest, opts ...grpc.CallOption) (*GetCryptocurrencyDepositAddressesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetCryptocurrencyDepositAddressesResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetCryptocurrencyDepositAddresses_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetCryptocurrencyDepositAddresses_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -631,8 +655,9 @@ func (c *goCryptoTraderServiceClient) GetCryptocurrencyDepositAddresses(ctx cont } func (c *goCryptoTraderServiceClient) GetCryptocurrencyDepositAddress(ctx context.Context, in *GetCryptocurrencyDepositAddressRequest, opts ...grpc.CallOption) (*GetCryptocurrencyDepositAddressResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetCryptocurrencyDepositAddressResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetCryptocurrencyDepositAddress_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetCryptocurrencyDepositAddress_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -640,8 +665,9 @@ func (c *goCryptoTraderServiceClient) GetCryptocurrencyDepositAddress(ctx contex } func (c *goCryptoTraderServiceClient) GetAvailableTransferChains(ctx context.Context, in *GetAvailableTransferChainsRequest, opts ...grpc.CallOption) (*GetAvailableTransferChainsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetAvailableTransferChainsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetAvailableTransferChains_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetAvailableTransferChains_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -649,8 +675,9 @@ func (c *goCryptoTraderServiceClient) GetAvailableTransferChains(ctx context.Con } func (c *goCryptoTraderServiceClient) WithdrawFiatFunds(ctx context.Context, in *WithdrawFiatRequest, opts ...grpc.CallOption) (*WithdrawResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(WithdrawResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_WithdrawFiatFunds_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_WithdrawFiatFunds_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -658,8 +685,9 @@ func (c *goCryptoTraderServiceClient) WithdrawFiatFunds(ctx context.Context, in } func (c *goCryptoTraderServiceClient) WithdrawCryptocurrencyFunds(ctx context.Context, in *WithdrawCryptoRequest, opts ...grpc.CallOption) (*WithdrawResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(WithdrawResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_WithdrawCryptocurrencyFunds_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_WithdrawCryptocurrencyFunds_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -667,8 +695,9 @@ func (c *goCryptoTraderServiceClient) WithdrawCryptocurrencyFunds(ctx context.Co } func (c *goCryptoTraderServiceClient) WithdrawalEventByID(ctx context.Context, in *WithdrawalEventByIDRequest, opts ...grpc.CallOption) (*WithdrawalEventByIDResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(WithdrawalEventByIDResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_WithdrawalEventByID_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_WithdrawalEventByID_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -676,8 +705,9 @@ func (c *goCryptoTraderServiceClient) WithdrawalEventByID(ctx context.Context, i } func (c *goCryptoTraderServiceClient) WithdrawalEventsByExchange(ctx context.Context, in *WithdrawalEventsByExchangeRequest, opts ...grpc.CallOption) (*WithdrawalEventsByExchangeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(WithdrawalEventsByExchangeResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_WithdrawalEventsByExchange_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_WithdrawalEventsByExchange_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -685,8 +715,9 @@ func (c *goCryptoTraderServiceClient) WithdrawalEventsByExchange(ctx context.Con } func (c *goCryptoTraderServiceClient) WithdrawalEventsByDate(ctx context.Context, in *WithdrawalEventsByDateRequest, opts ...grpc.CallOption) (*WithdrawalEventsByExchangeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(WithdrawalEventsByExchangeResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_WithdrawalEventsByDate_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_WithdrawalEventsByDate_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -694,8 +725,9 @@ func (c *goCryptoTraderServiceClient) WithdrawalEventsByDate(ctx context.Context } func (c *goCryptoTraderServiceClient) GetLoggerDetails(ctx context.Context, in *GetLoggerDetailsRequest, opts ...grpc.CallOption) (*GetLoggerDetailsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetLoggerDetailsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetLoggerDetails_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetLoggerDetails_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -703,8 +735,9 @@ func (c *goCryptoTraderServiceClient) GetLoggerDetails(ctx context.Context, in * } func (c *goCryptoTraderServiceClient) SetLoggerDetails(ctx context.Context, in *SetLoggerDetailsRequest, opts ...grpc.CallOption) (*GetLoggerDetailsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetLoggerDetailsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_SetLoggerDetails_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_SetLoggerDetails_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -712,8 +745,9 @@ func (c *goCryptoTraderServiceClient) SetLoggerDetails(ctx context.Context, in * } func (c *goCryptoTraderServiceClient) GetExchangePairs(ctx context.Context, in *GetExchangePairsRequest, opts ...grpc.CallOption) (*GetExchangePairsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetExchangePairsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetExchangePairs_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetExchangePairs_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -721,20 +755,22 @@ func (c *goCryptoTraderServiceClient) GetExchangePairs(ctx context.Context, in * } func (c *goCryptoTraderServiceClient) SetExchangePair(ctx context.Context, in *SetExchangePairRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_SetExchangePair_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_SetExchangePair_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *goCryptoTraderServiceClient) GetOrderbookStream(ctx context.Context, in *GetOrderbookStreamRequest, opts ...grpc.CallOption) (GoCryptoTraderService_GetOrderbookStreamClient, error) { - stream, err := c.cc.NewStream(ctx, &GoCryptoTraderService_ServiceDesc.Streams[1], GoCryptoTraderService_GetOrderbookStream_FullMethodName, opts...) +func (c *goCryptoTraderServiceClient) GetOrderbookStream(ctx context.Context, in *GetOrderbookStreamRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[OrderbookResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &GoCryptoTraderService_ServiceDesc.Streams[1], GoCryptoTraderService_GetOrderbookStream_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &goCryptoTraderServiceGetOrderbookStreamClient{stream} + x := &grpc.GenericClientStream[GetOrderbookStreamRequest, OrderbookResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -744,29 +780,16 @@ func (c *goCryptoTraderServiceClient) GetOrderbookStream(ctx context.Context, in return x, nil } -type GoCryptoTraderService_GetOrderbookStreamClient interface { - Recv() (*OrderbookResponse, error) - grpc.ClientStream -} - -type goCryptoTraderServiceGetOrderbookStreamClient struct { - grpc.ClientStream -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type GoCryptoTraderService_GetOrderbookStreamClient = grpc.ServerStreamingClient[OrderbookResponse] -func (x *goCryptoTraderServiceGetOrderbookStreamClient) Recv() (*OrderbookResponse, error) { - m := new(OrderbookResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *goCryptoTraderServiceClient) GetExchangeOrderbookStream(ctx context.Context, in *GetExchangeOrderbookStreamRequest, opts ...grpc.CallOption) (GoCryptoTraderService_GetExchangeOrderbookStreamClient, error) { - stream, err := c.cc.NewStream(ctx, &GoCryptoTraderService_ServiceDesc.Streams[2], GoCryptoTraderService_GetExchangeOrderbookStream_FullMethodName, opts...) +func (c *goCryptoTraderServiceClient) GetExchangeOrderbookStream(ctx context.Context, in *GetExchangeOrderbookStreamRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[OrderbookResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &GoCryptoTraderService_ServiceDesc.Streams[2], GoCryptoTraderService_GetExchangeOrderbookStream_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &goCryptoTraderServiceGetExchangeOrderbookStreamClient{stream} + x := &grpc.GenericClientStream[GetExchangeOrderbookStreamRequest, OrderbookResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -776,29 +799,16 @@ func (c *goCryptoTraderServiceClient) GetExchangeOrderbookStream(ctx context.Con return x, nil } -type GoCryptoTraderService_GetExchangeOrderbookStreamClient interface { - Recv() (*OrderbookResponse, error) - grpc.ClientStream -} - -type goCryptoTraderServiceGetExchangeOrderbookStreamClient struct { - grpc.ClientStream -} - -func (x *goCryptoTraderServiceGetExchangeOrderbookStreamClient) Recv() (*OrderbookResponse, error) { - m := new(OrderbookResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type GoCryptoTraderService_GetExchangeOrderbookStreamClient = grpc.ServerStreamingClient[OrderbookResponse] -func (c *goCryptoTraderServiceClient) GetTickerStream(ctx context.Context, in *GetTickerStreamRequest, opts ...grpc.CallOption) (GoCryptoTraderService_GetTickerStreamClient, error) { - stream, err := c.cc.NewStream(ctx, &GoCryptoTraderService_ServiceDesc.Streams[3], GoCryptoTraderService_GetTickerStream_FullMethodName, opts...) +func (c *goCryptoTraderServiceClient) GetTickerStream(ctx context.Context, in *GetTickerStreamRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[TickerResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &GoCryptoTraderService_ServiceDesc.Streams[3], GoCryptoTraderService_GetTickerStream_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &goCryptoTraderServiceGetTickerStreamClient{stream} + x := &grpc.GenericClientStream[GetTickerStreamRequest, TickerResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -808,29 +818,16 @@ func (c *goCryptoTraderServiceClient) GetTickerStream(ctx context.Context, in *G return x, nil } -type GoCryptoTraderService_GetTickerStreamClient interface { - Recv() (*TickerResponse, error) - grpc.ClientStream -} - -type goCryptoTraderServiceGetTickerStreamClient struct { - grpc.ClientStream -} - -func (x *goCryptoTraderServiceGetTickerStreamClient) Recv() (*TickerResponse, error) { - m := new(TickerResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type GoCryptoTraderService_GetTickerStreamClient = grpc.ServerStreamingClient[TickerResponse] -func (c *goCryptoTraderServiceClient) GetExchangeTickerStream(ctx context.Context, in *GetExchangeTickerStreamRequest, opts ...grpc.CallOption) (GoCryptoTraderService_GetExchangeTickerStreamClient, error) { - stream, err := c.cc.NewStream(ctx, &GoCryptoTraderService_ServiceDesc.Streams[4], GoCryptoTraderService_GetExchangeTickerStream_FullMethodName, opts...) +func (c *goCryptoTraderServiceClient) GetExchangeTickerStream(ctx context.Context, in *GetExchangeTickerStreamRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[TickerResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &GoCryptoTraderService_ServiceDesc.Streams[4], GoCryptoTraderService_GetExchangeTickerStream_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &goCryptoTraderServiceGetExchangeTickerStreamClient{stream} + x := &grpc.GenericClientStream[GetExchangeTickerStreamRequest, TickerResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -840,26 +837,13 @@ func (c *goCryptoTraderServiceClient) GetExchangeTickerStream(ctx context.Contex return x, nil } -type GoCryptoTraderService_GetExchangeTickerStreamClient interface { - Recv() (*TickerResponse, error) - grpc.ClientStream -} - -type goCryptoTraderServiceGetExchangeTickerStreamClient struct { - grpc.ClientStream -} - -func (x *goCryptoTraderServiceGetExchangeTickerStreamClient) Recv() (*TickerResponse, error) { - m := new(TickerResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type GoCryptoTraderService_GetExchangeTickerStreamClient = grpc.ServerStreamingClient[TickerResponse] func (c *goCryptoTraderServiceClient) GetAuditEvent(ctx context.Context, in *GetAuditEventRequest, opts ...grpc.CallOption) (*GetAuditEventResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetAuditEventResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetAuditEvent_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetAuditEvent_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -867,8 +851,9 @@ func (c *goCryptoTraderServiceClient) GetAuditEvent(ctx context.Context, in *Get } func (c *goCryptoTraderServiceClient) GCTScriptExecute(ctx context.Context, in *GCTScriptExecuteRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptExecute_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptExecute_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -876,8 +861,9 @@ func (c *goCryptoTraderServiceClient) GCTScriptExecute(ctx context.Context, in * } func (c *goCryptoTraderServiceClient) GCTScriptUpload(ctx context.Context, in *GCTScriptUploadRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptUpload_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptUpload_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -885,8 +871,9 @@ func (c *goCryptoTraderServiceClient) GCTScriptUpload(ctx context.Context, in *G } func (c *goCryptoTraderServiceClient) GCTScriptReadScript(ctx context.Context, in *GCTScriptReadScriptRequest, opts ...grpc.CallOption) (*GCTScriptQueryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GCTScriptQueryResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptReadScript_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptReadScript_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -894,8 +881,9 @@ func (c *goCryptoTraderServiceClient) GCTScriptReadScript(ctx context.Context, i } func (c *goCryptoTraderServiceClient) GCTScriptStatus(ctx context.Context, in *GCTScriptStatusRequest, opts ...grpc.CallOption) (*GCTScriptStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GCTScriptStatusResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptStatus_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptStatus_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -903,8 +891,9 @@ func (c *goCryptoTraderServiceClient) GCTScriptStatus(ctx context.Context, in *G } func (c *goCryptoTraderServiceClient) GCTScriptQuery(ctx context.Context, in *GCTScriptQueryRequest, opts ...grpc.CallOption) (*GCTScriptQueryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GCTScriptQueryResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptQuery_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptQuery_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -912,8 +901,9 @@ func (c *goCryptoTraderServiceClient) GCTScriptQuery(ctx context.Context, in *GC } func (c *goCryptoTraderServiceClient) GCTScriptStop(ctx context.Context, in *GCTScriptStopRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptStop_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptStop_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -921,8 +911,9 @@ func (c *goCryptoTraderServiceClient) GCTScriptStop(ctx context.Context, in *GCT } func (c *goCryptoTraderServiceClient) GCTScriptStopAll(ctx context.Context, in *GCTScriptStopAllRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptStopAll_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptStopAll_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -930,8 +921,9 @@ func (c *goCryptoTraderServiceClient) GCTScriptStopAll(ctx context.Context, in * } func (c *goCryptoTraderServiceClient) GCTScriptListAll(ctx context.Context, in *GCTScriptListAllRequest, opts ...grpc.CallOption) (*GCTScriptStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GCTScriptStatusResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptListAll_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptListAll_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -939,8 +931,9 @@ func (c *goCryptoTraderServiceClient) GCTScriptListAll(ctx context.Context, in * } func (c *goCryptoTraderServiceClient) GCTScriptAutoLoadToggle(ctx context.Context, in *GCTScriptAutoLoadRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptAutoLoadToggle_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptAutoLoadToggle_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -948,8 +941,9 @@ func (c *goCryptoTraderServiceClient) GCTScriptAutoLoadToggle(ctx context.Contex } func (c *goCryptoTraderServiceClient) GetHistoricCandles(ctx context.Context, in *GetHistoricCandlesRequest, opts ...grpc.CallOption) (*GetHistoricCandlesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetHistoricCandlesResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetHistoricCandles_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetHistoricCandles_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -957,8 +951,9 @@ func (c *goCryptoTraderServiceClient) GetHistoricCandles(ctx context.Context, in } func (c *goCryptoTraderServiceClient) SetExchangeAsset(ctx context.Context, in *SetExchangeAssetRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_SetExchangeAsset_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_SetExchangeAsset_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -966,8 +961,9 @@ func (c *goCryptoTraderServiceClient) SetExchangeAsset(ctx context.Context, in * } func (c *goCryptoTraderServiceClient) SetAllExchangePairs(ctx context.Context, in *SetExchangeAllPairsRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_SetAllExchangePairs_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_SetAllExchangePairs_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -975,8 +971,9 @@ func (c *goCryptoTraderServiceClient) SetAllExchangePairs(ctx context.Context, i } func (c *goCryptoTraderServiceClient) UpdateExchangeSupportedPairs(ctx context.Context, in *UpdateExchangeSupportedPairsRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_UpdateExchangeSupportedPairs_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_UpdateExchangeSupportedPairs_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -984,8 +981,9 @@ func (c *goCryptoTraderServiceClient) UpdateExchangeSupportedPairs(ctx context.C } func (c *goCryptoTraderServiceClient) GetExchangeAssets(ctx context.Context, in *GetExchangeAssetsRequest, opts ...grpc.CallOption) (*GetExchangeAssetsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetExchangeAssetsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetExchangeAssets_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetExchangeAssets_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -993,8 +991,9 @@ func (c *goCryptoTraderServiceClient) GetExchangeAssets(ctx context.Context, in } func (c *goCryptoTraderServiceClient) WebsocketGetInfo(ctx context.Context, in *WebsocketGetInfoRequest, opts ...grpc.CallOption) (*WebsocketGetInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(WebsocketGetInfoResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_WebsocketGetInfo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_WebsocketGetInfo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1002,8 +1001,9 @@ func (c *goCryptoTraderServiceClient) WebsocketGetInfo(ctx context.Context, in * } func (c *goCryptoTraderServiceClient) WebsocketSetEnabled(ctx context.Context, in *WebsocketSetEnabledRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_WebsocketSetEnabled_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_WebsocketSetEnabled_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1011,8 +1011,9 @@ func (c *goCryptoTraderServiceClient) WebsocketSetEnabled(ctx context.Context, i } func (c *goCryptoTraderServiceClient) WebsocketGetSubscriptions(ctx context.Context, in *WebsocketGetSubscriptionsRequest, opts ...grpc.CallOption) (*WebsocketGetSubscriptionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(WebsocketGetSubscriptionsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_WebsocketGetSubscriptions_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_WebsocketGetSubscriptions_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1020,8 +1021,9 @@ func (c *goCryptoTraderServiceClient) WebsocketGetSubscriptions(ctx context.Cont } func (c *goCryptoTraderServiceClient) WebsocketSetProxy(ctx context.Context, in *WebsocketSetProxyRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_WebsocketSetProxy_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_WebsocketSetProxy_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1029,8 +1031,9 @@ func (c *goCryptoTraderServiceClient) WebsocketSetProxy(ctx context.Context, in } func (c *goCryptoTraderServiceClient) WebsocketSetURL(ctx context.Context, in *WebsocketSetURLRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_WebsocketSetURL_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_WebsocketSetURL_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1038,20 +1041,22 @@ func (c *goCryptoTraderServiceClient) WebsocketSetURL(ctx context.Context, in *W } func (c *goCryptoTraderServiceClient) GetRecentTrades(ctx context.Context, in *GetSavedTradesRequest, opts ...grpc.CallOption) (*SavedTradesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SavedTradesResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetRecentTrades_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetRecentTrades_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *goCryptoTraderServiceClient) GetHistoricTrades(ctx context.Context, in *GetSavedTradesRequest, opts ...grpc.CallOption) (GoCryptoTraderService_GetHistoricTradesClient, error) { - stream, err := c.cc.NewStream(ctx, &GoCryptoTraderService_ServiceDesc.Streams[5], GoCryptoTraderService_GetHistoricTrades_FullMethodName, opts...) +func (c *goCryptoTraderServiceClient) GetHistoricTrades(ctx context.Context, in *GetSavedTradesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SavedTradesResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &GoCryptoTraderService_ServiceDesc.Streams[5], GoCryptoTraderService_GetHistoricTrades_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &goCryptoTraderServiceGetHistoricTradesClient{stream} + x := &grpc.GenericClientStream[GetSavedTradesRequest, SavedTradesResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -1061,26 +1066,13 @@ func (c *goCryptoTraderServiceClient) GetHistoricTrades(ctx context.Context, in return x, nil } -type GoCryptoTraderService_GetHistoricTradesClient interface { - Recv() (*SavedTradesResponse, error) - grpc.ClientStream -} - -type goCryptoTraderServiceGetHistoricTradesClient struct { - grpc.ClientStream -} - -func (x *goCryptoTraderServiceGetHistoricTradesClient) Recv() (*SavedTradesResponse, error) { - m := new(SavedTradesResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type GoCryptoTraderService_GetHistoricTradesClient = grpc.ServerStreamingClient[SavedTradesResponse] func (c *goCryptoTraderServiceClient) GetSavedTrades(ctx context.Context, in *GetSavedTradesRequest, opts ...grpc.CallOption) (*SavedTradesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SavedTradesResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetSavedTrades_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetSavedTrades_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1088,8 +1080,9 @@ func (c *goCryptoTraderServiceClient) GetSavedTrades(ctx context.Context, in *Ge } func (c *goCryptoTraderServiceClient) ConvertTradesToCandles(ctx context.Context, in *ConvertTradesToCandlesRequest, opts ...grpc.CallOption) (*GetHistoricCandlesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetHistoricCandlesResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_ConvertTradesToCandles_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_ConvertTradesToCandles_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1097,8 +1090,9 @@ func (c *goCryptoTraderServiceClient) ConvertTradesToCandles(ctx context.Context } func (c *goCryptoTraderServiceClient) FindMissingSavedCandleIntervals(ctx context.Context, in *FindMissingCandlePeriodsRequest, opts ...grpc.CallOption) (*FindMissingIntervalsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(FindMissingIntervalsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_FindMissingSavedCandleIntervals_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_FindMissingSavedCandleIntervals_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1106,8 +1100,9 @@ func (c *goCryptoTraderServiceClient) FindMissingSavedCandleIntervals(ctx contex } func (c *goCryptoTraderServiceClient) FindMissingSavedTradeIntervals(ctx context.Context, in *FindMissingTradePeriodsRequest, opts ...grpc.CallOption) (*FindMissingIntervalsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(FindMissingIntervalsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_FindMissingSavedTradeIntervals_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_FindMissingSavedTradeIntervals_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1115,8 +1110,9 @@ func (c *goCryptoTraderServiceClient) FindMissingSavedTradeIntervals(ctx context } func (c *goCryptoTraderServiceClient) SetExchangeTradeProcessing(ctx context.Context, in *SetExchangeTradeProcessingRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_SetExchangeTradeProcessing_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_SetExchangeTradeProcessing_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1124,8 +1120,9 @@ func (c *goCryptoTraderServiceClient) SetExchangeTradeProcessing(ctx context.Con } func (c *goCryptoTraderServiceClient) UpsertDataHistoryJob(ctx context.Context, in *UpsertDataHistoryJobRequest, opts ...grpc.CallOption) (*UpsertDataHistoryJobResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpsertDataHistoryJobResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_UpsertDataHistoryJob_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_UpsertDataHistoryJob_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1133,8 +1130,9 @@ func (c *goCryptoTraderServiceClient) UpsertDataHistoryJob(ctx context.Context, } func (c *goCryptoTraderServiceClient) GetDataHistoryJobDetails(ctx context.Context, in *GetDataHistoryJobDetailsRequest, opts ...grpc.CallOption) (*DataHistoryJob, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DataHistoryJob) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetDataHistoryJobDetails_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetDataHistoryJobDetails_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1142,8 +1140,9 @@ func (c *goCryptoTraderServiceClient) GetDataHistoryJobDetails(ctx context.Conte } func (c *goCryptoTraderServiceClient) GetActiveDataHistoryJobs(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*DataHistoryJobs, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DataHistoryJobs) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetActiveDataHistoryJobs_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetActiveDataHistoryJobs_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1151,8 +1150,9 @@ func (c *goCryptoTraderServiceClient) GetActiveDataHistoryJobs(ctx context.Conte } func (c *goCryptoTraderServiceClient) GetDataHistoryJobsBetween(ctx context.Context, in *GetDataHistoryJobsBetweenRequest, opts ...grpc.CallOption) (*DataHistoryJobs, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DataHistoryJobs) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetDataHistoryJobsBetween_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetDataHistoryJobsBetween_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1160,8 +1160,9 @@ func (c *goCryptoTraderServiceClient) GetDataHistoryJobsBetween(ctx context.Cont } func (c *goCryptoTraderServiceClient) GetDataHistoryJobSummary(ctx context.Context, in *GetDataHistoryJobDetailsRequest, opts ...grpc.CallOption) (*DataHistoryJob, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DataHistoryJob) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetDataHistoryJobSummary_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetDataHistoryJobSummary_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1169,8 +1170,9 @@ func (c *goCryptoTraderServiceClient) GetDataHistoryJobSummary(ctx context.Conte } func (c *goCryptoTraderServiceClient) SetDataHistoryJobStatus(ctx context.Context, in *SetDataHistoryJobStatusRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_SetDataHistoryJobStatus_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_SetDataHistoryJobStatus_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1178,8 +1180,9 @@ func (c *goCryptoTraderServiceClient) SetDataHistoryJobStatus(ctx context.Contex } func (c *goCryptoTraderServiceClient) UpdateDataHistoryJobPrerequisite(ctx context.Context, in *UpdateDataHistoryJobPrerequisiteRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1187,8 +1190,9 @@ func (c *goCryptoTraderServiceClient) UpdateDataHistoryJobPrerequisite(ctx conte } func (c *goCryptoTraderServiceClient) GetManagedOrders(ctx context.Context, in *GetOrdersRequest, opts ...grpc.CallOption) (*GetOrdersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetOrdersResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetManagedOrders_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetManagedOrders_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1196,8 +1200,9 @@ func (c *goCryptoTraderServiceClient) GetManagedOrders(ctx context.Context, in * } func (c *goCryptoTraderServiceClient) ModifyOrder(ctx context.Context, in *ModifyOrderRequest, opts ...grpc.CallOption) (*ModifyOrderResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ModifyOrderResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_ModifyOrder_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_ModifyOrder_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1205,8 +1210,9 @@ func (c *goCryptoTraderServiceClient) ModifyOrder(ctx context.Context, in *Modif } func (c *goCryptoTraderServiceClient) CurrencyStateGetAll(ctx context.Context, in *CurrencyStateGetAllRequest, opts ...grpc.CallOption) (*CurrencyStateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CurrencyStateResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_CurrencyStateGetAll_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_CurrencyStateGetAll_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1214,8 +1220,9 @@ func (c *goCryptoTraderServiceClient) CurrencyStateGetAll(ctx context.Context, i } func (c *goCryptoTraderServiceClient) CurrencyStateTrading(ctx context.Context, in *CurrencyStateTradingRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_CurrencyStateTrading_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_CurrencyStateTrading_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1223,8 +1230,9 @@ func (c *goCryptoTraderServiceClient) CurrencyStateTrading(ctx context.Context, } func (c *goCryptoTraderServiceClient) CurrencyStateDeposit(ctx context.Context, in *CurrencyStateDepositRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_CurrencyStateDeposit_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_CurrencyStateDeposit_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1232,8 +1240,9 @@ func (c *goCryptoTraderServiceClient) CurrencyStateDeposit(ctx context.Context, } func (c *goCryptoTraderServiceClient) CurrencyStateWithdraw(ctx context.Context, in *CurrencyStateWithdrawRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_CurrencyStateWithdraw_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_CurrencyStateWithdraw_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1241,8 +1250,9 @@ func (c *goCryptoTraderServiceClient) CurrencyStateWithdraw(ctx context.Context, } func (c *goCryptoTraderServiceClient) CurrencyStateTradingPair(ctx context.Context, in *CurrencyStateTradingPairRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_CurrencyStateTradingPair_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_CurrencyStateTradingPair_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1250,8 +1260,9 @@ func (c *goCryptoTraderServiceClient) CurrencyStateTradingPair(ctx context.Conte } func (c *goCryptoTraderServiceClient) GetFuturesPositionsSummary(ctx context.Context, in *GetFuturesPositionsSummaryRequest, opts ...grpc.CallOption) (*GetFuturesPositionsSummaryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetFuturesPositionsSummaryResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetFuturesPositionsSummary_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetFuturesPositionsSummary_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1259,8 +1270,9 @@ func (c *goCryptoTraderServiceClient) GetFuturesPositionsSummary(ctx context.Con } func (c *goCryptoTraderServiceClient) GetFuturesPositionsOrders(ctx context.Context, in *GetFuturesPositionsOrdersRequest, opts ...grpc.CallOption) (*GetFuturesPositionsOrdersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetFuturesPositionsOrdersResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetFuturesPositionsOrders_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetFuturesPositionsOrders_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1268,8 +1280,9 @@ func (c *goCryptoTraderServiceClient) GetFuturesPositionsOrders(ctx context.Cont } func (c *goCryptoTraderServiceClient) GetCollateral(ctx context.Context, in *GetCollateralRequest, opts ...grpc.CallOption) (*GetCollateralResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetCollateralResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetCollateral_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetCollateral_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1277,8 +1290,9 @@ func (c *goCryptoTraderServiceClient) GetCollateral(ctx context.Context, in *Get } func (c *goCryptoTraderServiceClient) Shutdown(ctx context.Context, in *ShutdownRequest, opts ...grpc.CallOption) (*ShutdownResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ShutdownResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_Shutdown_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_Shutdown_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1286,8 +1300,9 @@ func (c *goCryptoTraderServiceClient) Shutdown(ctx context.Context, in *Shutdown } func (c *goCryptoTraderServiceClient) GetTechnicalAnalysis(ctx context.Context, in *GetTechnicalAnalysisRequest, opts ...grpc.CallOption) (*GetTechnicalAnalysisResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetTechnicalAnalysisResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetTechnicalAnalysis_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetTechnicalAnalysis_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1295,8 +1310,9 @@ func (c *goCryptoTraderServiceClient) GetTechnicalAnalysis(ctx context.Context, } func (c *goCryptoTraderServiceClient) GetMarginRatesHistory(ctx context.Context, in *GetMarginRatesHistoryRequest, opts ...grpc.CallOption) (*GetMarginRatesHistoryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetMarginRatesHistoryResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetMarginRatesHistory_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetMarginRatesHistory_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1304,8 +1320,9 @@ func (c *goCryptoTraderServiceClient) GetMarginRatesHistory(ctx context.Context, } func (c *goCryptoTraderServiceClient) GetManagedPosition(ctx context.Context, in *GetManagedPositionRequest, opts ...grpc.CallOption) (*GetManagedPositionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetManagedPositionsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetManagedPosition_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetManagedPosition_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1313,8 +1330,9 @@ func (c *goCryptoTraderServiceClient) GetManagedPosition(ctx context.Context, in } func (c *goCryptoTraderServiceClient) GetAllManagedPositions(ctx context.Context, in *GetAllManagedPositionsRequest, opts ...grpc.CallOption) (*GetManagedPositionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetManagedPositionsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetAllManagedPositions_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetAllManagedPositions_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1322,8 +1340,9 @@ func (c *goCryptoTraderServiceClient) GetAllManagedPositions(ctx context.Context } func (c *goCryptoTraderServiceClient) GetFundingRates(ctx context.Context, in *GetFundingRatesRequest, opts ...grpc.CallOption) (*GetFundingRatesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetFundingRatesResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetFundingRates_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetFundingRates_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1331,8 +1350,9 @@ func (c *goCryptoTraderServiceClient) GetFundingRates(ctx context.Context, in *G } func (c *goCryptoTraderServiceClient) GetLatestFundingRate(ctx context.Context, in *GetLatestFundingRateRequest, opts ...grpc.CallOption) (*GetLatestFundingRateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetLatestFundingRateResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetLatestFundingRate_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetLatestFundingRate_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1340,8 +1360,9 @@ func (c *goCryptoTraderServiceClient) GetLatestFundingRate(ctx context.Context, } func (c *goCryptoTraderServiceClient) GetOrderbookMovement(ctx context.Context, in *GetOrderbookMovementRequest, opts ...grpc.CallOption) (*GetOrderbookMovementResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetOrderbookMovementResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrderbookMovement_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrderbookMovement_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1349,8 +1370,9 @@ func (c *goCryptoTraderServiceClient) GetOrderbookMovement(ctx context.Context, } func (c *goCryptoTraderServiceClient) GetOrderbookAmountByNominal(ctx context.Context, in *GetOrderbookAmountByNominalRequest, opts ...grpc.CallOption) (*GetOrderbookAmountByNominalResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetOrderbookAmountByNominalResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrderbookAmountByNominal_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrderbookAmountByNominal_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1358,8 +1380,9 @@ func (c *goCryptoTraderServiceClient) GetOrderbookAmountByNominal(ctx context.Co } func (c *goCryptoTraderServiceClient) GetOrderbookAmountByImpact(ctx context.Context, in *GetOrderbookAmountByImpactRequest, opts ...grpc.CallOption) (*GetOrderbookAmountByImpactResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetOrderbookAmountByImpactResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrderbookAmountByImpact_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrderbookAmountByImpact_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1367,8 +1390,9 @@ func (c *goCryptoTraderServiceClient) GetOrderbookAmountByImpact(ctx context.Con } func (c *goCryptoTraderServiceClient) GetCollateralMode(ctx context.Context, in *GetCollateralModeRequest, opts ...grpc.CallOption) (*GetCollateralModeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetCollateralModeResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetCollateralMode_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetCollateralMode_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1376,8 +1400,9 @@ func (c *goCryptoTraderServiceClient) GetCollateralMode(ctx context.Context, in } func (c *goCryptoTraderServiceClient) GetLeverage(ctx context.Context, in *GetLeverageRequest, opts ...grpc.CallOption) (*GetLeverageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetLeverageResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetLeverage_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetLeverage_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1385,8 +1410,9 @@ func (c *goCryptoTraderServiceClient) GetLeverage(ctx context.Context, in *GetLe } func (c *goCryptoTraderServiceClient) SetCollateralMode(ctx context.Context, in *SetCollateralModeRequest, opts ...grpc.CallOption) (*SetCollateralModeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetCollateralModeResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_SetCollateralMode_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_SetCollateralMode_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1394,8 +1420,9 @@ func (c *goCryptoTraderServiceClient) SetCollateralMode(ctx context.Context, in } func (c *goCryptoTraderServiceClient) SetMarginType(ctx context.Context, in *SetMarginTypeRequest, opts ...grpc.CallOption) (*SetMarginTypeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetMarginTypeResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_SetMarginType_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_SetMarginType_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1403,8 +1430,9 @@ func (c *goCryptoTraderServiceClient) SetMarginType(ctx context.Context, in *Set } func (c *goCryptoTraderServiceClient) SetLeverage(ctx context.Context, in *SetLeverageRequest, opts ...grpc.CallOption) (*SetLeverageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetLeverageResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_SetLeverage_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_SetLeverage_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1412,8 +1440,9 @@ func (c *goCryptoTraderServiceClient) SetLeverage(ctx context.Context, in *SetLe } func (c *goCryptoTraderServiceClient) ChangePositionMargin(ctx context.Context, in *ChangePositionMarginRequest, opts ...grpc.CallOption) (*ChangePositionMarginResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ChangePositionMarginResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_ChangePositionMargin_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_ChangePositionMargin_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1421,8 +1450,9 @@ func (c *goCryptoTraderServiceClient) ChangePositionMargin(ctx context.Context, } func (c *goCryptoTraderServiceClient) GetOpenInterest(ctx context.Context, in *GetOpenInterestRequest, opts ...grpc.CallOption) (*GetOpenInterestResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetOpenInterestResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOpenInterest_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOpenInterest_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1430,8 +1460,9 @@ func (c *goCryptoTraderServiceClient) GetOpenInterest(ctx context.Context, in *G } func (c *goCryptoTraderServiceClient) GetCurrencyTradeURL(ctx context.Context, in *GetCurrencyTradeURLRequest, opts ...grpc.CallOption) (*GetCurrencyTradeURLResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetCurrencyTradeURLResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetCurrencyTradeURL_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetCurrencyTradeURL_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1440,10 +1471,10 @@ func (c *goCryptoTraderServiceClient) GetCurrencyTradeURL(ctx context.Context, i // GoCryptoTraderServiceServer is the server API for GoCryptoTraderService service. // All implementations must embed UnimplementedGoCryptoTraderServiceServer -// for forward compatibility +// for forward compatibility. type GoCryptoTraderServiceServer interface { GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error) - GetSubsystems(context.Context, *GetSubsystemsRequest) (*GetSusbsytemsResponse, error) + GetSubsystems(context.Context, *GetSubsystemsRequest) (*GetSubsystemsResponse, error) EnableSubsystem(context.Context, *GenericSubsystemRequest) (*GenericResponse, error) DisableSubsystem(context.Context, *GenericSubsystemRequest) (*GenericResponse, error) GetRPCEndpoints(context.Context, *GetRPCEndpointsRequest) (*GetRPCEndpointsResponse, error) @@ -1460,7 +1491,7 @@ type GoCryptoTraderServiceServer interface { GetOrderbooks(context.Context, *GetOrderbooksRequest) (*GetOrderbooksResponse, error) GetAccountBalances(context.Context, *GetAccountBalancesRequest) (*GetAccountBalancesResponse, error) UpdateAccountBalances(context.Context, *GetAccountBalancesRequest) (*GetAccountBalancesResponse, error) - GetAccountBalancesStream(*GetAccountBalancesRequest, GoCryptoTraderService_GetAccountBalancesStreamServer) error + GetAccountBalancesStream(*GetAccountBalancesRequest, grpc.ServerStreamingServer[GetAccountBalancesResponse]) error GetConfig(context.Context, *GetConfigRequest) (*GetConfigResponse, error) GetPortfolio(context.Context, *GetPortfolioRequest) (*GetPortfolioResponse, error) GetPortfolioSummary(context.Context, *GetPortfolioSummaryRequest) (*GetPortfolioSummaryResponse, error) @@ -1491,10 +1522,10 @@ type GoCryptoTraderServiceServer interface { SetLoggerDetails(context.Context, *SetLoggerDetailsRequest) (*GetLoggerDetailsResponse, error) GetExchangePairs(context.Context, *GetExchangePairsRequest) (*GetExchangePairsResponse, error) SetExchangePair(context.Context, *SetExchangePairRequest) (*GenericResponse, error) - GetOrderbookStream(*GetOrderbookStreamRequest, GoCryptoTraderService_GetOrderbookStreamServer) error - GetExchangeOrderbookStream(*GetExchangeOrderbookStreamRequest, GoCryptoTraderService_GetExchangeOrderbookStreamServer) error - GetTickerStream(*GetTickerStreamRequest, GoCryptoTraderService_GetTickerStreamServer) error - GetExchangeTickerStream(*GetExchangeTickerStreamRequest, GoCryptoTraderService_GetExchangeTickerStreamServer) error + GetOrderbookStream(*GetOrderbookStreamRequest, grpc.ServerStreamingServer[OrderbookResponse]) error + GetExchangeOrderbookStream(*GetExchangeOrderbookStreamRequest, grpc.ServerStreamingServer[OrderbookResponse]) error + GetTickerStream(*GetTickerStreamRequest, grpc.ServerStreamingServer[TickerResponse]) error + GetExchangeTickerStream(*GetExchangeTickerStreamRequest, grpc.ServerStreamingServer[TickerResponse]) error GetAuditEvent(context.Context, *GetAuditEventRequest) (*GetAuditEventResponse, error) GCTScriptExecute(context.Context, *GCTScriptExecuteRequest) (*GenericResponse, error) GCTScriptUpload(context.Context, *GCTScriptUploadRequest) (*GenericResponse, error) @@ -1516,7 +1547,7 @@ type GoCryptoTraderServiceServer interface { WebsocketSetProxy(context.Context, *WebsocketSetProxyRequest) (*GenericResponse, error) WebsocketSetURL(context.Context, *WebsocketSetURLRequest) (*GenericResponse, error) GetRecentTrades(context.Context, *GetSavedTradesRequest) (*SavedTradesResponse, error) - GetHistoricTrades(*GetSavedTradesRequest, GoCryptoTraderService_GetHistoricTradesServer) error + GetHistoricTrades(*GetSavedTradesRequest, grpc.ServerStreamingServer[SavedTradesResponse]) error GetSavedTrades(context.Context, *GetSavedTradesRequest) (*SavedTradesResponse, error) ConvertTradesToCandles(context.Context, *ConvertTradesToCandlesRequest) (*GetHistoricCandlesResponse, error) FindMissingSavedCandleIntervals(context.Context, *FindMissingCandlePeriodsRequest) (*FindMissingIntervalsResponse, error) @@ -1560,356 +1591,360 @@ type GoCryptoTraderServiceServer interface { mustEmbedUnimplementedGoCryptoTraderServiceServer() } -// UnimplementedGoCryptoTraderServiceServer must be embedded to have forward compatible implementations. -type UnimplementedGoCryptoTraderServiceServer struct { -} +// UnimplementedGoCryptoTraderServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedGoCryptoTraderServiceServer struct{} func (UnimplementedGoCryptoTraderServiceServer) GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented") + return nil, status.Error(codes.Unimplemented, "method GetInfo not implemented") } -func (UnimplementedGoCryptoTraderServiceServer) GetSubsystems(context.Context, *GetSubsystemsRequest) (*GetSusbsytemsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSubsystems not implemented") +func (UnimplementedGoCryptoTraderServiceServer) GetSubsystems(context.Context, *GetSubsystemsRequest) (*GetSubsystemsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetSubsystems not implemented") } func (UnimplementedGoCryptoTraderServiceServer) EnableSubsystem(context.Context, *GenericSubsystemRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EnableSubsystem not implemented") + return nil, status.Error(codes.Unimplemented, "method EnableSubsystem not implemented") } func (UnimplementedGoCryptoTraderServiceServer) DisableSubsystem(context.Context, *GenericSubsystemRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DisableSubsystem not implemented") + return nil, status.Error(codes.Unimplemented, "method DisableSubsystem not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetRPCEndpoints(context.Context, *GetRPCEndpointsRequest) (*GetRPCEndpointsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetRPCEndpoints not implemented") + return nil, status.Error(codes.Unimplemented, "method GetRPCEndpoints not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetCommunicationRelayers(context.Context, *GetCommunicationRelayersRequest) (*GetCommunicationRelayersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetCommunicationRelayers not implemented") + return nil, status.Error(codes.Unimplemented, "method GetCommunicationRelayers not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetExchanges(context.Context, *GetExchangesRequest) (*GetExchangesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetExchanges not implemented") + return nil, status.Error(codes.Unimplemented, "method GetExchanges not implemented") } func (UnimplementedGoCryptoTraderServiceServer) DisableExchange(context.Context, *GenericExchangeNameRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DisableExchange not implemented") + return nil, status.Error(codes.Unimplemented, "method DisableExchange not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetExchangeInfo(context.Context, *GenericExchangeNameRequest) (*GetExchangeInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetExchangeInfo not implemented") + return nil, status.Error(codes.Unimplemented, "method GetExchangeInfo not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetExchangeOTPCode(context.Context, *GenericExchangeNameRequest) (*GetExchangeOTPResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetExchangeOTPCode not implemented") + return nil, status.Error(codes.Unimplemented, "method GetExchangeOTPCode not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetExchangeOTPCodes(context.Context, *GetExchangeOTPsRequest) (*GetExchangeOTPsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetExchangeOTPCodes not implemented") + return nil, status.Error(codes.Unimplemented, "method GetExchangeOTPCodes not implemented") } func (UnimplementedGoCryptoTraderServiceServer) EnableExchange(context.Context, *GenericExchangeNameRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EnableExchange not implemented") + return nil, status.Error(codes.Unimplemented, "method EnableExchange not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetTicker(context.Context, *GetTickerRequest) (*TickerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTicker not implemented") + return nil, status.Error(codes.Unimplemented, "method GetTicker not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetTickers(context.Context, *GetTickersRequest) (*GetTickersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTickers not implemented") + return nil, status.Error(codes.Unimplemented, "method GetTickers not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetOrderbook(context.Context, *GetOrderbookRequest) (*OrderbookResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetOrderbook not implemented") + return nil, status.Error(codes.Unimplemented, "method GetOrderbook not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetOrderbooks(context.Context, *GetOrderbooksRequest) (*GetOrderbooksResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetOrderbooks not implemented") + return nil, status.Error(codes.Unimplemented, "method GetOrderbooks not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetAccountBalances(context.Context, *GetAccountBalancesRequest) (*GetAccountBalancesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAccountBalances not implemented") + return nil, status.Error(codes.Unimplemented, "method GetAccountBalances not implemented") } func (UnimplementedGoCryptoTraderServiceServer) UpdateAccountBalances(context.Context, *GetAccountBalancesRequest) (*GetAccountBalancesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateAccountBalances not implemented") + return nil, status.Error(codes.Unimplemented, "method UpdateAccountBalances not implemented") } -func (UnimplementedGoCryptoTraderServiceServer) GetAccountBalancesStream(*GetAccountBalancesRequest, GoCryptoTraderService_GetAccountBalancesStreamServer) error { - return status.Errorf(codes.Unimplemented, "method GetAccountBalancesStream not implemented") +func (UnimplementedGoCryptoTraderServiceServer) GetAccountBalancesStream(*GetAccountBalancesRequest, grpc.ServerStreamingServer[GetAccountBalancesResponse]) error { + return status.Error(codes.Unimplemented, "method GetAccountBalancesStream not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetConfig(context.Context, *GetConfigRequest) (*GetConfigResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetConfig not implemented") + return nil, status.Error(codes.Unimplemented, "method GetConfig not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetPortfolio(context.Context, *GetPortfolioRequest) (*GetPortfolioResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPortfolio not implemented") + return nil, status.Error(codes.Unimplemented, "method GetPortfolio not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetPortfolioSummary(context.Context, *GetPortfolioSummaryRequest) (*GetPortfolioSummaryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPortfolioSummary not implemented") + return nil, status.Error(codes.Unimplemented, "method GetPortfolioSummary not implemented") } func (UnimplementedGoCryptoTraderServiceServer) AddPortfolioAddress(context.Context, *AddPortfolioAddressRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddPortfolioAddress not implemented") + return nil, status.Error(codes.Unimplemented, "method AddPortfolioAddress not implemented") } func (UnimplementedGoCryptoTraderServiceServer) RemovePortfolioAddress(context.Context, *RemovePortfolioAddressRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RemovePortfolioAddress not implemented") + return nil, status.Error(codes.Unimplemented, "method RemovePortfolioAddress not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetForexProviders(context.Context, *GetForexProvidersRequest) (*GetForexProvidersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetForexProviders not implemented") + return nil, status.Error(codes.Unimplemented, "method GetForexProviders not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetForexRates(context.Context, *GetForexRatesRequest) (*GetForexRatesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetForexRates not implemented") + return nil, status.Error(codes.Unimplemented, "method GetForexRates not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetOrders(context.Context, *GetOrdersRequest) (*GetOrdersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetOrders not implemented") + return nil, status.Error(codes.Unimplemented, "method GetOrders not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetOrder(context.Context, *GetOrderRequest) (*OrderDetails, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetOrder not implemented") + return nil, status.Error(codes.Unimplemented, "method GetOrder not implemented") } func (UnimplementedGoCryptoTraderServiceServer) SubmitOrder(context.Context, *SubmitOrderRequest) (*SubmitOrderResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitOrder not implemented") + return nil, status.Error(codes.Unimplemented, "method SubmitOrder not implemented") } func (UnimplementedGoCryptoTraderServiceServer) SimulateOrder(context.Context, *SimulateOrderRequest) (*SimulateOrderResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SimulateOrder not implemented") + return nil, status.Error(codes.Unimplemented, "method SimulateOrder not implemented") } func (UnimplementedGoCryptoTraderServiceServer) WhaleBomb(context.Context, *WhaleBombRequest) (*SimulateOrderResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WhaleBomb not implemented") + return nil, status.Error(codes.Unimplemented, "method WhaleBomb not implemented") } func (UnimplementedGoCryptoTraderServiceServer) CancelOrder(context.Context, *CancelOrderRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CancelOrder not implemented") + return nil, status.Error(codes.Unimplemented, "method CancelOrder not implemented") } func (UnimplementedGoCryptoTraderServiceServer) CancelBatchOrders(context.Context, *CancelBatchOrdersRequest) (*CancelBatchOrdersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CancelBatchOrders not implemented") + return nil, status.Error(codes.Unimplemented, "method CancelBatchOrders not implemented") } func (UnimplementedGoCryptoTraderServiceServer) CancelAllOrders(context.Context, *CancelAllOrdersRequest) (*CancelAllOrdersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CancelAllOrders not implemented") + return nil, status.Error(codes.Unimplemented, "method CancelAllOrders not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetEvents(context.Context, *GetEventsRequest) (*GetEventsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetEvents not implemented") + return nil, status.Error(codes.Unimplemented, "method GetEvents not implemented") } func (UnimplementedGoCryptoTraderServiceServer) AddEvent(context.Context, *AddEventRequest) (*AddEventResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddEvent not implemented") + return nil, status.Error(codes.Unimplemented, "method AddEvent not implemented") } func (UnimplementedGoCryptoTraderServiceServer) RemoveEvent(context.Context, *RemoveEventRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RemoveEvent not implemented") + return nil, status.Error(codes.Unimplemented, "method RemoveEvent not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetCryptocurrencyDepositAddresses(context.Context, *GetCryptocurrencyDepositAddressesRequest) (*GetCryptocurrencyDepositAddressesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetCryptocurrencyDepositAddresses not implemented") + return nil, status.Error(codes.Unimplemented, "method GetCryptocurrencyDepositAddresses not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetCryptocurrencyDepositAddress(context.Context, *GetCryptocurrencyDepositAddressRequest) (*GetCryptocurrencyDepositAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetCryptocurrencyDepositAddress not implemented") + return nil, status.Error(codes.Unimplemented, "method GetCryptocurrencyDepositAddress not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetAvailableTransferChains(context.Context, *GetAvailableTransferChainsRequest) (*GetAvailableTransferChainsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAvailableTransferChains not implemented") + return nil, status.Error(codes.Unimplemented, "method GetAvailableTransferChains not implemented") } func (UnimplementedGoCryptoTraderServiceServer) WithdrawFiatFunds(context.Context, *WithdrawFiatRequest) (*WithdrawResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WithdrawFiatFunds not implemented") + return nil, status.Error(codes.Unimplemented, "method WithdrawFiatFunds not implemented") } func (UnimplementedGoCryptoTraderServiceServer) WithdrawCryptocurrencyFunds(context.Context, *WithdrawCryptoRequest) (*WithdrawResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WithdrawCryptocurrencyFunds not implemented") + return nil, status.Error(codes.Unimplemented, "method WithdrawCryptocurrencyFunds not implemented") } func (UnimplementedGoCryptoTraderServiceServer) WithdrawalEventByID(context.Context, *WithdrawalEventByIDRequest) (*WithdrawalEventByIDResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WithdrawalEventByID not implemented") + return nil, status.Error(codes.Unimplemented, "method WithdrawalEventByID not implemented") } func (UnimplementedGoCryptoTraderServiceServer) WithdrawalEventsByExchange(context.Context, *WithdrawalEventsByExchangeRequest) (*WithdrawalEventsByExchangeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WithdrawalEventsByExchange not implemented") + return nil, status.Error(codes.Unimplemented, "method WithdrawalEventsByExchange not implemented") } func (UnimplementedGoCryptoTraderServiceServer) WithdrawalEventsByDate(context.Context, *WithdrawalEventsByDateRequest) (*WithdrawalEventsByExchangeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WithdrawalEventsByDate not implemented") + return nil, status.Error(codes.Unimplemented, "method WithdrawalEventsByDate not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetLoggerDetails(context.Context, *GetLoggerDetailsRequest) (*GetLoggerDetailsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetLoggerDetails not implemented") + return nil, status.Error(codes.Unimplemented, "method GetLoggerDetails not implemented") } func (UnimplementedGoCryptoTraderServiceServer) SetLoggerDetails(context.Context, *SetLoggerDetailsRequest) (*GetLoggerDetailsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetLoggerDetails not implemented") + return nil, status.Error(codes.Unimplemented, "method SetLoggerDetails not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetExchangePairs(context.Context, *GetExchangePairsRequest) (*GetExchangePairsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetExchangePairs not implemented") + return nil, status.Error(codes.Unimplemented, "method GetExchangePairs not implemented") } func (UnimplementedGoCryptoTraderServiceServer) SetExchangePair(context.Context, *SetExchangePairRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetExchangePair not implemented") + return nil, status.Error(codes.Unimplemented, "method SetExchangePair not implemented") } -func (UnimplementedGoCryptoTraderServiceServer) GetOrderbookStream(*GetOrderbookStreamRequest, GoCryptoTraderService_GetOrderbookStreamServer) error { - return status.Errorf(codes.Unimplemented, "method GetOrderbookStream not implemented") +func (UnimplementedGoCryptoTraderServiceServer) GetOrderbookStream(*GetOrderbookStreamRequest, grpc.ServerStreamingServer[OrderbookResponse]) error { + return status.Error(codes.Unimplemented, "method GetOrderbookStream not implemented") } -func (UnimplementedGoCryptoTraderServiceServer) GetExchangeOrderbookStream(*GetExchangeOrderbookStreamRequest, GoCryptoTraderService_GetExchangeOrderbookStreamServer) error { - return status.Errorf(codes.Unimplemented, "method GetExchangeOrderbookStream not implemented") +func (UnimplementedGoCryptoTraderServiceServer) GetExchangeOrderbookStream(*GetExchangeOrderbookStreamRequest, grpc.ServerStreamingServer[OrderbookResponse]) error { + return status.Error(codes.Unimplemented, "method GetExchangeOrderbookStream not implemented") } -func (UnimplementedGoCryptoTraderServiceServer) GetTickerStream(*GetTickerStreamRequest, GoCryptoTraderService_GetTickerStreamServer) error { - return status.Errorf(codes.Unimplemented, "method GetTickerStream not implemented") +func (UnimplementedGoCryptoTraderServiceServer) GetTickerStream(*GetTickerStreamRequest, grpc.ServerStreamingServer[TickerResponse]) error { + return status.Error(codes.Unimplemented, "method GetTickerStream not implemented") } -func (UnimplementedGoCryptoTraderServiceServer) GetExchangeTickerStream(*GetExchangeTickerStreamRequest, GoCryptoTraderService_GetExchangeTickerStreamServer) error { - return status.Errorf(codes.Unimplemented, "method GetExchangeTickerStream not implemented") +func (UnimplementedGoCryptoTraderServiceServer) GetExchangeTickerStream(*GetExchangeTickerStreamRequest, grpc.ServerStreamingServer[TickerResponse]) error { + return status.Error(codes.Unimplemented, "method GetExchangeTickerStream not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetAuditEvent(context.Context, *GetAuditEventRequest) (*GetAuditEventResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAuditEvent not implemented") + return nil, status.Error(codes.Unimplemented, "method GetAuditEvent not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GCTScriptExecute(context.Context, *GCTScriptExecuteRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GCTScriptExecute not implemented") + return nil, status.Error(codes.Unimplemented, "method GCTScriptExecute not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GCTScriptUpload(context.Context, *GCTScriptUploadRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GCTScriptUpload not implemented") + return nil, status.Error(codes.Unimplemented, "method GCTScriptUpload not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GCTScriptReadScript(context.Context, *GCTScriptReadScriptRequest) (*GCTScriptQueryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GCTScriptReadScript not implemented") + return nil, status.Error(codes.Unimplemented, "method GCTScriptReadScript not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GCTScriptStatus(context.Context, *GCTScriptStatusRequest) (*GCTScriptStatusResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GCTScriptStatus not implemented") + return nil, status.Error(codes.Unimplemented, "method GCTScriptStatus not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GCTScriptQuery(context.Context, *GCTScriptQueryRequest) (*GCTScriptQueryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GCTScriptQuery not implemented") + return nil, status.Error(codes.Unimplemented, "method GCTScriptQuery not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GCTScriptStop(context.Context, *GCTScriptStopRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GCTScriptStop not implemented") + return nil, status.Error(codes.Unimplemented, "method GCTScriptStop not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GCTScriptStopAll(context.Context, *GCTScriptStopAllRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GCTScriptStopAll not implemented") + return nil, status.Error(codes.Unimplemented, "method GCTScriptStopAll not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GCTScriptListAll(context.Context, *GCTScriptListAllRequest) (*GCTScriptStatusResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GCTScriptListAll not implemented") + return nil, status.Error(codes.Unimplemented, "method GCTScriptListAll not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GCTScriptAutoLoadToggle(context.Context, *GCTScriptAutoLoadRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GCTScriptAutoLoadToggle not implemented") + return nil, status.Error(codes.Unimplemented, "method GCTScriptAutoLoadToggle not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetHistoricCandles(context.Context, *GetHistoricCandlesRequest) (*GetHistoricCandlesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetHistoricCandles not implemented") + return nil, status.Error(codes.Unimplemented, "method GetHistoricCandles not implemented") } func (UnimplementedGoCryptoTraderServiceServer) SetExchangeAsset(context.Context, *SetExchangeAssetRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetExchangeAsset not implemented") + return nil, status.Error(codes.Unimplemented, "method SetExchangeAsset not implemented") } func (UnimplementedGoCryptoTraderServiceServer) SetAllExchangePairs(context.Context, *SetExchangeAllPairsRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetAllExchangePairs not implemented") + return nil, status.Error(codes.Unimplemented, "method SetAllExchangePairs not implemented") } func (UnimplementedGoCryptoTraderServiceServer) UpdateExchangeSupportedPairs(context.Context, *UpdateExchangeSupportedPairsRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateExchangeSupportedPairs not implemented") + return nil, status.Error(codes.Unimplemented, "method UpdateExchangeSupportedPairs not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetExchangeAssets(context.Context, *GetExchangeAssetsRequest) (*GetExchangeAssetsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetExchangeAssets not implemented") + return nil, status.Error(codes.Unimplemented, "method GetExchangeAssets not implemented") } func (UnimplementedGoCryptoTraderServiceServer) WebsocketGetInfo(context.Context, *WebsocketGetInfoRequest) (*WebsocketGetInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WebsocketGetInfo not implemented") + return nil, status.Error(codes.Unimplemented, "method WebsocketGetInfo not implemented") } func (UnimplementedGoCryptoTraderServiceServer) WebsocketSetEnabled(context.Context, *WebsocketSetEnabledRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WebsocketSetEnabled not implemented") + return nil, status.Error(codes.Unimplemented, "method WebsocketSetEnabled not implemented") } func (UnimplementedGoCryptoTraderServiceServer) WebsocketGetSubscriptions(context.Context, *WebsocketGetSubscriptionsRequest) (*WebsocketGetSubscriptionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WebsocketGetSubscriptions not implemented") + return nil, status.Error(codes.Unimplemented, "method WebsocketGetSubscriptions not implemented") } func (UnimplementedGoCryptoTraderServiceServer) WebsocketSetProxy(context.Context, *WebsocketSetProxyRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WebsocketSetProxy not implemented") + return nil, status.Error(codes.Unimplemented, "method WebsocketSetProxy not implemented") } func (UnimplementedGoCryptoTraderServiceServer) WebsocketSetURL(context.Context, *WebsocketSetURLRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WebsocketSetURL not implemented") + return nil, status.Error(codes.Unimplemented, "method WebsocketSetURL not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetRecentTrades(context.Context, *GetSavedTradesRequest) (*SavedTradesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetRecentTrades not implemented") + return nil, status.Error(codes.Unimplemented, "method GetRecentTrades not implemented") } -func (UnimplementedGoCryptoTraderServiceServer) GetHistoricTrades(*GetSavedTradesRequest, GoCryptoTraderService_GetHistoricTradesServer) error { - return status.Errorf(codes.Unimplemented, "method GetHistoricTrades not implemented") +func (UnimplementedGoCryptoTraderServiceServer) GetHistoricTrades(*GetSavedTradesRequest, grpc.ServerStreamingServer[SavedTradesResponse]) error { + return status.Error(codes.Unimplemented, "method GetHistoricTrades not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetSavedTrades(context.Context, *GetSavedTradesRequest) (*SavedTradesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSavedTrades not implemented") + return nil, status.Error(codes.Unimplemented, "method GetSavedTrades not implemented") } func (UnimplementedGoCryptoTraderServiceServer) ConvertTradesToCandles(context.Context, *ConvertTradesToCandlesRequest) (*GetHistoricCandlesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ConvertTradesToCandles not implemented") + return nil, status.Error(codes.Unimplemented, "method ConvertTradesToCandles not implemented") } func (UnimplementedGoCryptoTraderServiceServer) FindMissingSavedCandleIntervals(context.Context, *FindMissingCandlePeriodsRequest) (*FindMissingIntervalsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FindMissingSavedCandleIntervals not implemented") + return nil, status.Error(codes.Unimplemented, "method FindMissingSavedCandleIntervals not implemented") } func (UnimplementedGoCryptoTraderServiceServer) FindMissingSavedTradeIntervals(context.Context, *FindMissingTradePeriodsRequest) (*FindMissingIntervalsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FindMissingSavedTradeIntervals not implemented") + return nil, status.Error(codes.Unimplemented, "method FindMissingSavedTradeIntervals not implemented") } func (UnimplementedGoCryptoTraderServiceServer) SetExchangeTradeProcessing(context.Context, *SetExchangeTradeProcessingRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetExchangeTradeProcessing not implemented") + return nil, status.Error(codes.Unimplemented, "method SetExchangeTradeProcessing not implemented") } func (UnimplementedGoCryptoTraderServiceServer) UpsertDataHistoryJob(context.Context, *UpsertDataHistoryJobRequest) (*UpsertDataHistoryJobResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpsertDataHistoryJob not implemented") + return nil, status.Error(codes.Unimplemented, "method UpsertDataHistoryJob not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetDataHistoryJobDetails(context.Context, *GetDataHistoryJobDetailsRequest) (*DataHistoryJob, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDataHistoryJobDetails not implemented") + return nil, status.Error(codes.Unimplemented, "method GetDataHistoryJobDetails not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetActiveDataHistoryJobs(context.Context, *GetInfoRequest) (*DataHistoryJobs, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetActiveDataHistoryJobs not implemented") + return nil, status.Error(codes.Unimplemented, "method GetActiveDataHistoryJobs not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetDataHistoryJobsBetween(context.Context, *GetDataHistoryJobsBetweenRequest) (*DataHistoryJobs, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDataHistoryJobsBetween not implemented") + return nil, status.Error(codes.Unimplemented, "method GetDataHistoryJobsBetween not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetDataHistoryJobSummary(context.Context, *GetDataHistoryJobDetailsRequest) (*DataHistoryJob, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDataHistoryJobSummary not implemented") + return nil, status.Error(codes.Unimplemented, "method GetDataHistoryJobSummary not implemented") } func (UnimplementedGoCryptoTraderServiceServer) SetDataHistoryJobStatus(context.Context, *SetDataHistoryJobStatusRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetDataHistoryJobStatus not implemented") + return nil, status.Error(codes.Unimplemented, "method SetDataHistoryJobStatus not implemented") } func (UnimplementedGoCryptoTraderServiceServer) UpdateDataHistoryJobPrerequisite(context.Context, *UpdateDataHistoryJobPrerequisiteRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateDataHistoryJobPrerequisite not implemented") + return nil, status.Error(codes.Unimplemented, "method UpdateDataHistoryJobPrerequisite not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetManagedOrders(context.Context, *GetOrdersRequest) (*GetOrdersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetManagedOrders not implemented") + return nil, status.Error(codes.Unimplemented, "method GetManagedOrders not implemented") } func (UnimplementedGoCryptoTraderServiceServer) ModifyOrder(context.Context, *ModifyOrderRequest) (*ModifyOrderResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModifyOrder not implemented") + return nil, status.Error(codes.Unimplemented, "method ModifyOrder not implemented") } func (UnimplementedGoCryptoTraderServiceServer) CurrencyStateGetAll(context.Context, *CurrencyStateGetAllRequest) (*CurrencyStateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CurrencyStateGetAll not implemented") + return nil, status.Error(codes.Unimplemented, "method CurrencyStateGetAll not implemented") } func (UnimplementedGoCryptoTraderServiceServer) CurrencyStateTrading(context.Context, *CurrencyStateTradingRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CurrencyStateTrading not implemented") + return nil, status.Error(codes.Unimplemented, "method CurrencyStateTrading not implemented") } func (UnimplementedGoCryptoTraderServiceServer) CurrencyStateDeposit(context.Context, *CurrencyStateDepositRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CurrencyStateDeposit not implemented") + return nil, status.Error(codes.Unimplemented, "method CurrencyStateDeposit not implemented") } func (UnimplementedGoCryptoTraderServiceServer) CurrencyStateWithdraw(context.Context, *CurrencyStateWithdrawRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CurrencyStateWithdraw not implemented") + return nil, status.Error(codes.Unimplemented, "method CurrencyStateWithdraw not implemented") } func (UnimplementedGoCryptoTraderServiceServer) CurrencyStateTradingPair(context.Context, *CurrencyStateTradingPairRequest) (*GenericResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CurrencyStateTradingPair not implemented") + return nil, status.Error(codes.Unimplemented, "method CurrencyStateTradingPair not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetFuturesPositionsSummary(context.Context, *GetFuturesPositionsSummaryRequest) (*GetFuturesPositionsSummaryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetFuturesPositionsSummary not implemented") + return nil, status.Error(codes.Unimplemented, "method GetFuturesPositionsSummary not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetFuturesPositionsOrders(context.Context, *GetFuturesPositionsOrdersRequest) (*GetFuturesPositionsOrdersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetFuturesPositionsOrders not implemented") + return nil, status.Error(codes.Unimplemented, "method GetFuturesPositionsOrders not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetCollateral(context.Context, *GetCollateralRequest) (*GetCollateralResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetCollateral not implemented") + return nil, status.Error(codes.Unimplemented, "method GetCollateral not implemented") } func (UnimplementedGoCryptoTraderServiceServer) Shutdown(context.Context, *ShutdownRequest) (*ShutdownResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Shutdown not implemented") + return nil, status.Error(codes.Unimplemented, "method Shutdown not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetTechnicalAnalysis(context.Context, *GetTechnicalAnalysisRequest) (*GetTechnicalAnalysisResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTechnicalAnalysis not implemented") + return nil, status.Error(codes.Unimplemented, "method GetTechnicalAnalysis not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetMarginRatesHistory(context.Context, *GetMarginRatesHistoryRequest) (*GetMarginRatesHistoryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetMarginRatesHistory not implemented") + return nil, status.Error(codes.Unimplemented, "method GetMarginRatesHistory not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetManagedPosition(context.Context, *GetManagedPositionRequest) (*GetManagedPositionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetManagedPosition not implemented") + return nil, status.Error(codes.Unimplemented, "method GetManagedPosition not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetAllManagedPositions(context.Context, *GetAllManagedPositionsRequest) (*GetManagedPositionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAllManagedPositions not implemented") + return nil, status.Error(codes.Unimplemented, "method GetAllManagedPositions not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetFundingRates(context.Context, *GetFundingRatesRequest) (*GetFundingRatesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetFundingRates not implemented") + return nil, status.Error(codes.Unimplemented, "method GetFundingRates not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetLatestFundingRate(context.Context, *GetLatestFundingRateRequest) (*GetLatestFundingRateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetLatestFundingRate not implemented") + return nil, status.Error(codes.Unimplemented, "method GetLatestFundingRate not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetOrderbookMovement(context.Context, *GetOrderbookMovementRequest) (*GetOrderbookMovementResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetOrderbookMovement not implemented") + return nil, status.Error(codes.Unimplemented, "method GetOrderbookMovement not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetOrderbookAmountByNominal(context.Context, *GetOrderbookAmountByNominalRequest) (*GetOrderbookAmountByNominalResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetOrderbookAmountByNominal not implemented") + return nil, status.Error(codes.Unimplemented, "method GetOrderbookAmountByNominal not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetOrderbookAmountByImpact(context.Context, *GetOrderbookAmountByImpactRequest) (*GetOrderbookAmountByImpactResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetOrderbookAmountByImpact not implemented") + return nil, status.Error(codes.Unimplemented, "method GetOrderbookAmountByImpact not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetCollateralMode(context.Context, *GetCollateralModeRequest) (*GetCollateralModeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetCollateralMode not implemented") + return nil, status.Error(codes.Unimplemented, "method GetCollateralMode not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetLeverage(context.Context, *GetLeverageRequest) (*GetLeverageResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetLeverage not implemented") + return nil, status.Error(codes.Unimplemented, "method GetLeverage not implemented") } func (UnimplementedGoCryptoTraderServiceServer) SetCollateralMode(context.Context, *SetCollateralModeRequest) (*SetCollateralModeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetCollateralMode not implemented") + return nil, status.Error(codes.Unimplemented, "method SetCollateralMode not implemented") } func (UnimplementedGoCryptoTraderServiceServer) SetMarginType(context.Context, *SetMarginTypeRequest) (*SetMarginTypeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetMarginType not implemented") + return nil, status.Error(codes.Unimplemented, "method SetMarginType not implemented") } func (UnimplementedGoCryptoTraderServiceServer) SetLeverage(context.Context, *SetLeverageRequest) (*SetLeverageResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetLeverage not implemented") + return nil, status.Error(codes.Unimplemented, "method SetLeverage not implemented") } func (UnimplementedGoCryptoTraderServiceServer) ChangePositionMargin(context.Context, *ChangePositionMarginRequest) (*ChangePositionMarginResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ChangePositionMargin not implemented") + return nil, status.Error(codes.Unimplemented, "method ChangePositionMargin not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetOpenInterest(context.Context, *GetOpenInterestRequest) (*GetOpenInterestResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetOpenInterest not implemented") + return nil, status.Error(codes.Unimplemented, "method GetOpenInterest not implemented") } func (UnimplementedGoCryptoTraderServiceServer) GetCurrencyTradeURL(context.Context, *GetCurrencyTradeURLRequest) (*GetCurrencyTradeURLResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetCurrencyTradeURL not implemented") + return nil, status.Error(codes.Unimplemented, "method GetCurrencyTradeURL not implemented") } func (UnimplementedGoCryptoTraderServiceServer) mustEmbedUnimplementedGoCryptoTraderServiceServer() {} +func (UnimplementedGoCryptoTraderServiceServer) testEmbeddedByValue() {} // UnsafeGoCryptoTraderServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to GoCryptoTraderServiceServer will @@ -1919,6 +1954,13 @@ type UnsafeGoCryptoTraderServiceServer interface { } func RegisterGoCryptoTraderServiceServer(s grpc.ServiceRegistrar, srv GoCryptoTraderServiceServer) { + // If the following call panics, it indicates UnimplementedGoCryptoTraderServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&GoCryptoTraderService_ServiceDesc, srv) } @@ -2251,21 +2293,11 @@ func _GoCryptoTraderService_GetAccountBalancesStream_Handler(srv interface{}, st if err := stream.RecvMsg(m); err != nil { return err } - return srv.(GoCryptoTraderServiceServer).GetAccountBalancesStream(m, &goCryptoTraderServiceGetAccountBalancesStreamServer{stream}) + return srv.(GoCryptoTraderServiceServer).GetAccountBalancesStream(m, &grpc.GenericServerStream[GetAccountBalancesRequest, GetAccountBalancesResponse]{ServerStream: stream}) } -type GoCryptoTraderService_GetAccountBalancesStreamServer interface { - Send(*GetAccountBalancesResponse) error - grpc.ServerStream -} - -type goCryptoTraderServiceGetAccountBalancesStreamServer struct { - grpc.ServerStream -} - -func (x *goCryptoTraderServiceGetAccountBalancesStreamServer) Send(m *GetAccountBalancesResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type GoCryptoTraderService_GetAccountBalancesStreamServer = grpc.ServerStreamingServer[GetAccountBalancesResponse] func _GoCryptoTraderService_GetConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetConfigRequest) @@ -2812,84 +2844,44 @@ func _GoCryptoTraderService_GetOrderbookStream_Handler(srv interface{}, stream g if err := stream.RecvMsg(m); err != nil { return err } - return srv.(GoCryptoTraderServiceServer).GetOrderbookStream(m, &goCryptoTraderServiceGetOrderbookStreamServer{stream}) + return srv.(GoCryptoTraderServiceServer).GetOrderbookStream(m, &grpc.GenericServerStream[GetOrderbookStreamRequest, OrderbookResponse]{ServerStream: stream}) } -type GoCryptoTraderService_GetOrderbookStreamServer interface { - Send(*OrderbookResponse) error - grpc.ServerStream -} - -type goCryptoTraderServiceGetOrderbookStreamServer struct { - grpc.ServerStream -} - -func (x *goCryptoTraderServiceGetOrderbookStreamServer) Send(m *OrderbookResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type GoCryptoTraderService_GetOrderbookStreamServer = grpc.ServerStreamingServer[OrderbookResponse] func _GoCryptoTraderService_GetExchangeOrderbookStream_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(GetExchangeOrderbookStreamRequest) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(GoCryptoTraderServiceServer).GetExchangeOrderbookStream(m, &goCryptoTraderServiceGetExchangeOrderbookStreamServer{stream}) + return srv.(GoCryptoTraderServiceServer).GetExchangeOrderbookStream(m, &grpc.GenericServerStream[GetExchangeOrderbookStreamRequest, OrderbookResponse]{ServerStream: stream}) } -type GoCryptoTraderService_GetExchangeOrderbookStreamServer interface { - Send(*OrderbookResponse) error - grpc.ServerStream -} - -type goCryptoTraderServiceGetExchangeOrderbookStreamServer struct { - grpc.ServerStream -} - -func (x *goCryptoTraderServiceGetExchangeOrderbookStreamServer) Send(m *OrderbookResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type GoCryptoTraderService_GetExchangeOrderbookStreamServer = grpc.ServerStreamingServer[OrderbookResponse] func _GoCryptoTraderService_GetTickerStream_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(GetTickerStreamRequest) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(GoCryptoTraderServiceServer).GetTickerStream(m, &goCryptoTraderServiceGetTickerStreamServer{stream}) + return srv.(GoCryptoTraderServiceServer).GetTickerStream(m, &grpc.GenericServerStream[GetTickerStreamRequest, TickerResponse]{ServerStream: stream}) } -type GoCryptoTraderService_GetTickerStreamServer interface { - Send(*TickerResponse) error - grpc.ServerStream -} - -type goCryptoTraderServiceGetTickerStreamServer struct { - grpc.ServerStream -} - -func (x *goCryptoTraderServiceGetTickerStreamServer) Send(m *TickerResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type GoCryptoTraderService_GetTickerStreamServer = grpc.ServerStreamingServer[TickerResponse] func _GoCryptoTraderService_GetExchangeTickerStream_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(GetExchangeTickerStreamRequest) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(GoCryptoTraderServiceServer).GetExchangeTickerStream(m, &goCryptoTraderServiceGetExchangeTickerStreamServer{stream}) -} - -type GoCryptoTraderService_GetExchangeTickerStreamServer interface { - Send(*TickerResponse) error - grpc.ServerStream + return srv.(GoCryptoTraderServiceServer).GetExchangeTickerStream(m, &grpc.GenericServerStream[GetExchangeTickerStreamRequest, TickerResponse]{ServerStream: stream}) } -type goCryptoTraderServiceGetExchangeTickerStreamServer struct { - grpc.ServerStream -} - -func (x *goCryptoTraderServiceGetExchangeTickerStreamServer) Send(m *TickerResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type GoCryptoTraderService_GetExchangeTickerStreamServer = grpc.ServerStreamingServer[TickerResponse] func _GoCryptoTraderService_GetAuditEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetAuditEventRequest) @@ -3274,21 +3266,11 @@ func _GoCryptoTraderService_GetHistoricTrades_Handler(srv interface{}, stream gr if err := stream.RecvMsg(m); err != nil { return err } - return srv.(GoCryptoTraderServiceServer).GetHistoricTrades(m, &goCryptoTraderServiceGetHistoricTradesServer{stream}) + return srv.(GoCryptoTraderServiceServer).GetHistoricTrades(m, &grpc.GenericServerStream[GetSavedTradesRequest, SavedTradesResponse]{ServerStream: stream}) } -type GoCryptoTraderService_GetHistoricTradesServer interface { - Send(*SavedTradesResponse) error - grpc.ServerStream -} - -type goCryptoTraderServiceGetHistoricTradesServer struct { - grpc.ServerStream -} - -func (x *goCryptoTraderServiceGetHistoricTradesServer) Send(m *SavedTradesResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type GoCryptoTraderService_GetHistoricTradesServer = grpc.ServerStreamingServer[SavedTradesResponse] func _GoCryptoTraderService_GetSavedTrades_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetSavedTradesRequest) diff --git a/gctscript/examples/account.gct b/gctscript/examples/account.gct index 60b91c9a3f8..863f44dffee 100644 --- a/gctscript/examples/account.gct +++ b/gctscript/examples/account.gct @@ -17,7 +17,7 @@ load := func() { // ctx = global.set_account(ctx, "api_key_str", "api_secret_str", "sub_account_str", "client_Id_str", "PEM_key_str", "OTP_Str") // Set sub account func allows the setting of just the individual sub - // account details while utilizing the configured config.json apikeys. + // account details while utilising the configured config.json apikeys. // ctx = global.set_sub_account(ctx, "sub_account_str") info := exch.accountinfo(ctx, "binance", "spot") diff --git a/gctscript/modules/ta/indicators/indicators_test.go b/gctscript/modules/ta/indicators/indicators_test.go index e0be85791d6..3053b9cd58b 100644 --- a/gctscript/modules/ta/indicators/indicators_test.go +++ b/gctscript/modules/ta/indicators/indicators_test.go @@ -23,7 +23,7 @@ var ( func TestMain(m *testing.M) { for x := range 100 { - v := rand.Float64() //nolint:gosec // no need to import crypo/rand for testing + v := rand.Float64() //nolint:gosec // no need to import crypto/rand for testing candle := &objects.Array{} candle.Value = append(candle.Value, &objects.Time{Value: time.Now()}, &objects.Float{Value: v}, diff --git a/gctscript/wrappers/validator/validator.go b/gctscript/wrappers/validator/validator.go index fc4743b3bf7..844d74b417f 100644 --- a/gctscript/wrappers/validator/validator.go +++ b/gctscript/wrappers/validator/validator.go @@ -257,7 +257,7 @@ func (w Wrapper) OHLCV(_ context.Context, exch string, p currency.Pair, a asset. }) for x := 1; x < 200; x++ { - r := validatorLow + rand.Float64()*(validatorHigh-validatorLow) //nolint:gosec // no need to import crypo/rand + r := validatorLow + rand.Float64()*(validatorHigh-validatorLow) //nolint:gosec // no need to import crypto/rand candle := kline.Candle{ Time: candles[x-1].Time.Add(-i.Duration()), Open: r, diff --git a/portfolio/portfolio_test.go b/portfolio/portfolio_test.go index 3cd49f29043..cef09b3b31c 100644 --- a/portfolio/portfolio_test.go +++ b/portfolio/portfolio_test.go @@ -373,7 +373,7 @@ func TestStartPortfolioWatcher(t *testing.T) { }, 10*time.Second, time.Second, "GetPersonalPortfolio should return a balance greater than 0.02") cancel2() - assert.ErrorIs(t, <-doneCh, context.Canceled, "StartPortfolioWatcher should return a context canceled error") + assert.ErrorIs(t, <-doneCh, context.Canceled, "StartPortfolioWatcher should return a context cancelled error") } func TestGetProvider(t *testing.T) { diff --git a/types/time.go b/types/time.go index dac255f0fdd..1ea199d44a7 100644 --- a/types/time.go +++ b/types/time.go @@ -11,7 +11,7 @@ import ( ) // Time represents a time.Time object that can be unmarshalled from a float64 or string. -// MarshalJSON serializes the time to JSON using RFC 3339 format. +// MarshalJSON serialises the time to JSON using RFC 3339 format. // Note: Not all exchanges may support RFC 3339 for outbound requests, so ensure compatibility with each exchange's time // format requirements. type Time time.Time @@ -19,7 +19,7 @@ type Time time.Time // ErrInvalidTimestampFormat indicates that a timestamp cannot be parsed into a supported format. var ErrInvalidTimestampFormat = errors.New("invalid timestamp format") -// UnmarshalJSON deserializes json, and timestamp information. +// UnmarshalJSON deserialises json and timestamp information. func (t *Time) UnmarshalJSON(data []byte) error { s := string(data) @@ -81,7 +81,7 @@ func (t Time) String() string { return t.Time().String() } -// MarshalJSON serializes the time to json using RFC 3339 format. +// MarshalJSON serialises the time to json using RFC 3339 format. func (t Time) MarshalJSON() ([]byte, error) { return t.Time().MarshalJSON() }