mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
Lowercased the remaining config values for the config/all endpoint
This commit is contained in:
@@ -138,7 +138,7 @@ type ExchangeConfig struct {
|
||||
// BankAccount holds differing bank account details by supported funding
|
||||
// currency
|
||||
type BankAccount struct {
|
||||
Enabled bool `json:",omitempty"`
|
||||
Enabled bool `json:"enabled,omitempty"`
|
||||
BankName string `json:"bankName"`
|
||||
BankAddress string `json:"bankAddress"`
|
||||
AccountName string `json:"accountName"`
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -6,18 +6,18 @@ import (
|
||||
|
||||
// Settings enforces standard variables across the provider packages
|
||||
type Settings struct {
|
||||
Name string
|
||||
Enabled bool
|
||||
Verbose bool
|
||||
RESTPollingDelay time.Duration
|
||||
APIKey string
|
||||
APIKeyLvl int
|
||||
PrimaryProvider bool
|
||||
Name string `json:"name"`
|
||||
Enabled bool `json:"enabled"`
|
||||
Verbose bool `json:"verbose"`
|
||||
RESTPollingDelay time.Duration `json:"restPollingDelay"`
|
||||
APIKey string `json:"apiKey"`
|
||||
APIKeyLvl int `json:"apiKeyLvl"`
|
||||
PrimaryProvider bool `json:"primaryProvider"`
|
||||
}
|
||||
|
||||
// Base enforces standard variables across the provider packages
|
||||
type Base struct {
|
||||
Settings
|
||||
Settings `json:"settings"`
|
||||
}
|
||||
|
||||
// GetName returns name of provider
|
||||
|
||||
@@ -884,7 +884,7 @@ type TradeGetBucketedParams struct {
|
||||
Start int32 `json:"start,omitempty"`
|
||||
|
||||
// StartTime - Starting date filter for results.
|
||||
StartTime string `json:"symbol,omitempty"`
|
||||
StartTime string `json:"startTime,omitempty"`
|
||||
|
||||
// Symbol - Instrument symbol. Send a bare series (e.g. XBU) to get data for
|
||||
// the nearest expiring contract in that series.You can also send a timeframe,
|
||||
|
||||
@@ -41,11 +41,11 @@ type AllEnabledExchangeAccounts struct {
|
||||
Data []exchange.AccountInfo `json:"data"`
|
||||
}
|
||||
|
||||
// RESTfulJSONResponse outputs a JSON response of the req interface
|
||||
func RESTfulJSONResponse(w http.ResponseWriter, r *http.Request, req interface{}) error {
|
||||
// RESTfulJSONResponse outputs a JSON response of the response interface
|
||||
func RESTfulJSONResponse(w http.ResponseWriter, r *http.Request, response interface{}) error {
|
||||
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
|
||||
w.WriteHeader(http.StatusOK)
|
||||
return json.NewEncoder(w).Encode(req)
|
||||
return json.NewEncoder(w).Encode(response)
|
||||
}
|
||||
|
||||
// RESTfulError prints the REST method and error
|
||||
|
||||
56
testdata/configtest.json
vendored
56
testdata/configtest.json
vendored
@@ -5,40 +5,40 @@
|
||||
"currencyConfig": {
|
||||
"forexProviders": [
|
||||
{
|
||||
"Name": "CurrencyConverter",
|
||||
"Enabled": true,
|
||||
"Verbose": false,
|
||||
"RESTPollingDelay": 600,
|
||||
"APIKey": "",
|
||||
"APIKeyLvl": 0,
|
||||
"PrimaryProvider": true
|
||||
"name": "CurrencyConverter",
|
||||
"enabled": true,
|
||||
"verbose": false,
|
||||
"restPollingDelay": 600,
|
||||
"apiKey": "",
|
||||
"apiKeyLvl": 0,
|
||||
"primaryProvider": true
|
||||
},
|
||||
{
|
||||
"Name": "CurrencyLayer",
|
||||
"Enabled": false,
|
||||
"Verbose": false,
|
||||
"RESTPollingDelay": 600,
|
||||
"APIKey": "Key",
|
||||
"APIKeyLvl": -1,
|
||||
"PrimaryProvider": false
|
||||
"name": "CurrencyLayer",
|
||||
"enabled": false,
|
||||
"verbose": false,
|
||||
"restPollingDelay": 600,
|
||||
"apiKey": "Key",
|
||||
"apiKeyLvl": -1,
|
||||
"primaryProvider": false
|
||||
},
|
||||
{
|
||||
"Name": "Fixer",
|
||||
"Enabled": false,
|
||||
"Verbose": false,
|
||||
"RESTPollingDelay": 600,
|
||||
"APIKey": "Key",
|
||||
"APIKeyLvl": -1,
|
||||
"PrimaryProvider": false
|
||||
"name": "Fixer",
|
||||
"enabled": false,
|
||||
"verbose": false,
|
||||
"restPollingDelay": 600,
|
||||
"apiKey": "Key",
|
||||
"apiKeyLvl": -1,
|
||||
"primaryProvider": false
|
||||
},
|
||||
{
|
||||
"Name": "OpenExchangeRates",
|
||||
"Enabled": false,
|
||||
"Verbose": false,
|
||||
"RESTPollingDelay": 600,
|
||||
"APIKey": "Key",
|
||||
"APIKeyLvl": -1,
|
||||
"PrimaryProvider": false
|
||||
"name": "OpenExchangeRates",
|
||||
"enabled": false,
|
||||
"verbose": false,
|
||||
"restPollingDelay": 600,
|
||||
"apiKey": "Key",
|
||||
"apiKeyLvl": -1,
|
||||
"primaryProvider": false
|
||||
}
|
||||
],
|
||||
"cryptocurrencies": "BTC,LTC,ETH,DOGE,DASH,XRP,XMR",
|
||||
|
||||
Reference in New Issue
Block a user