Documentation ¶
Index ¶
- Variables
- type APIBuilder
- func (builder *APIBuilder) APIKey(key string) (_builder *APIBuilder)
- func (builder *APIBuilder) APISecretkey(key string) (_builder *APIBuilder)
- func (builder *APIBuilder) ApiPassphrase(apiPassphrase string) (_builder *APIBuilder)
- func (builder *APIBuilder) Build(exName string) (api API)
- func (builder *APIBuilder) BuildFuture(exName string) (api FutureRestAPI)
- func (builder *APIBuilder) BuildFuturesWs(exName string) (FuturesWsApi, error)
- func (builder *APIBuilder) BuildSpotWs(exName string) (SpotWsApi, error)
- func (builder *APIBuilder) BuildWallet(exName string) (WalletApi, error)
- func (builder *APIBuilder) ClientID(id string) (_builder *APIBuilder)
- func (builder *APIBuilder) Endpoint(endpoint string) (_builer *APIBuilder)
- func (builder *APIBuilder) FuturesEndpoint(endpoint string) (_builder *APIBuilder)
- func (builder *APIBuilder) FuturesLever(lever float64) (_builder *APIBuilder)
- func (builder *APIBuilder) GetHttpClient() *http.Client
- func (builder *APIBuilder) GetHttpClientConfig() *HttpClientConfig
- func (builder *APIBuilder) HttpProxy(proxyUrl string) (_builder *APIBuilder)
- func (builder *APIBuilder) HttpTimeout(timeout time.Duration) (_builder *APIBuilder)
- type HttpClientConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultHttpClientConfig = &HttpClientConfig{ Proxy: nil, HttpTimeout: 5 * time.Second, MaxIdleConns: 10} DefaultAPIBuilder = NewAPIBuilder() )
Functions ¶
This section is empty.
Types ¶
type APIBuilder ¶
type APIBuilder struct { HttpClientConfig *HttpClientConfig // contains filtered or unexported fields }
func NewAPIBuilder ¶
func NewAPIBuilder() (builder *APIBuilder)
func NewAPIBuilder2 ¶
func NewAPIBuilder2(config *HttpClientConfig) *APIBuilder
func NewCustomAPIBuilder ¶
func NewCustomAPIBuilder(client *http.Client) (builder *APIBuilder)
func (*APIBuilder) APIKey ¶
func (builder *APIBuilder) APIKey(key string) (_builder *APIBuilder)
func (*APIBuilder) APISecretkey ¶
func (builder *APIBuilder) APISecretkey(key string) (_builder *APIBuilder)
func (*APIBuilder) ApiPassphrase ¶
func (builder *APIBuilder) ApiPassphrase(apiPassphrase string) (_builder *APIBuilder)
func (*APIBuilder) Build ¶
func (builder *APIBuilder) Build(exName string) (api API)
func (*APIBuilder) BuildFuture ¶
func (builder *APIBuilder) BuildFuture(exName string) (api FutureRestAPI)
func (*APIBuilder) BuildFuturesWs ¶
func (builder *APIBuilder) BuildFuturesWs(exName string) (FuturesWsApi, error)
func (*APIBuilder) BuildSpotWs ¶
func (builder *APIBuilder) BuildSpotWs(exName string) (SpotWsApi, error)
func (*APIBuilder) BuildWallet ¶
func (builder *APIBuilder) BuildWallet(exName string) (WalletApi, error)
func (*APIBuilder) ClientID ¶
func (builder *APIBuilder) ClientID(id string) (_builder *APIBuilder)
func (*APIBuilder) Endpoint ¶
func (builder *APIBuilder) Endpoint(endpoint string) (_builer *APIBuilder)
func (*APIBuilder) FuturesEndpoint ¶
func (builder *APIBuilder) FuturesEndpoint(endpoint string) (_builder *APIBuilder)
func (*APIBuilder) FuturesLever ¶
func (builder *APIBuilder) FuturesLever(lever float64) (_builder *APIBuilder)
func (*APIBuilder) GetHttpClient ¶
func (builder *APIBuilder) GetHttpClient() *http.Client
func (*APIBuilder) GetHttpClientConfig ¶
func (builder *APIBuilder) GetHttpClientConfig() *HttpClientConfig
func (*APIBuilder) HttpProxy ¶
func (builder *APIBuilder) HttpProxy(proxyUrl string) (_builder *APIBuilder)
func (*APIBuilder) HttpTimeout ¶
func (builder *APIBuilder) HttpTimeout(timeout time.Duration) (_builder *APIBuilder)
type HttpClientConfig ¶
func (*HttpClientConfig) SetHttpTimeout ¶
func (c *HttpClientConfig) SetHttpTimeout(timeout time.Duration) *HttpClientConfig
func (*HttpClientConfig) SetMaxIdleConns ¶
func (c *HttpClientConfig) SetMaxIdleConns(max int) *HttpClientConfig
func (*HttpClientConfig) SetProxyUrl ¶
func (c *HttpClientConfig) SetProxyUrl(proxyUrl string) *HttpClientConfig
func (HttpClientConfig) String ¶
func (c HttpClientConfig) String() string
Click to show internal directories.
Click to hide internal directories.