Documentation
¶
Overview ¶
Package geminiv1 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.
Index ¶
- func NewGetAllSymbolsRequest(server string) (*http.Request, error)
- func NewGetPriceFeedRequest(server string) (*http.Request, error)
- func NewGetSymbolDetailsRequest(server string, symbol string) (*http.Request, error)
- type Client
- func (c *Client) GetAllSymbols(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetPriceFeed(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetSymbolDetails(ctx context.Context, symbol string, reqEditors ...RequestEditorFn) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) GetAllSymbolsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAllSymbolsResponse, error)
- func (c *ClientWithResponses) GetPriceFeedWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetPriceFeedResponse, error)
- func (c *ClientWithResponses) GetSymbolDetailsWithResponse(ctx context.Context, symbol string, reqEditors ...RequestEditorFn) (*GetSymbolDetailsResponse, error)
- type ClientWithResponsesInterface
- type GetAllSymbolsResponse
- type GetPriceFeedResponse
- type GetSymbolDetailsResponse
- type HttpRequestDoer
- type PriceFeed
- type RequestEditorFn
- type Symbol
- type TradingPair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGetAllSymbolsRequest ¶
NewGetAllSymbolsRequest generates requests for GetAllSymbols
func NewGetPriceFeedRequest ¶
NewGetPriceFeedRequest generates requests for GetPriceFeed
Types ¶
type Client ¶
type Client struct { // The endpoint of the server conforming to this interface, with scheme, // https://api.deepmap.com for example. This can contain a path relative // to the server, such as https://api.deepmap.com/dev-test, and all the // paths in the swagger spec will be appended to the server. Server string // Doer for performing requests, typically a *http.Client with any // customized settings, such as certificate chains. Client HttpRequestDoer // A list of callbacks for modifying requests which are generated before sending over // the network. RequestEditors []RequestEditorFn }
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) GetAllSymbols ¶
func (*Client) GetPriceFeed ¶
func (*Client) GetSymbolDetails ¶
type ClientInterface ¶
type ClientInterface interface { // GetPriceFeed request GetPriceFeed(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // GetAllSymbols request GetAllSymbols(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // GetSymbolDetails request GetSymbolDetails(ctx context.Context, symbol string, reqEditors ...RequestEditorFn) (*http.Response, error) }
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) GetAllSymbolsWithResponse ¶
func (c *ClientWithResponses) GetAllSymbolsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAllSymbolsResponse, error)
GetAllSymbolsWithResponse request returning *GetAllSymbolsResponse
func (*ClientWithResponses) GetPriceFeedWithResponse ¶
func (c *ClientWithResponses) GetPriceFeedWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetPriceFeedResponse, error)
GetPriceFeedWithResponse request returning *GetPriceFeedResponse
func (*ClientWithResponses) GetSymbolDetailsWithResponse ¶
func (c *ClientWithResponses) GetSymbolDetailsWithResponse(ctx context.Context, symbol string, reqEditors ...RequestEditorFn) (*GetSymbolDetailsResponse, error)
GetSymbolDetailsWithResponse request returning *GetSymbolDetailsResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // GetPriceFeed request GetPriceFeedWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetPriceFeedResponse, error) // GetAllSymbols request GetAllSymbolsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAllSymbolsResponse, error) // GetSymbolDetails request GetSymbolDetailsWithResponse(ctx context.Context, symbol string, reqEditors ...RequestEditorFn) (*GetSymbolDetailsResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type GetAllSymbolsResponse ¶
func ParseGetAllSymbolsResponse ¶
func ParseGetAllSymbolsResponse(rsp *http.Response) (*GetAllSymbolsResponse, error)
ParseGetAllSymbolsResponse parses an HTTP response from a GetAllSymbolsWithResponse call
func (GetAllSymbolsResponse) Status ¶
func (r GetAllSymbolsResponse) Status() string
Status returns HTTPResponse.Status
func (GetAllSymbolsResponse) StatusCode ¶
func (r GetAllSymbolsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetPriceFeedResponse ¶
func ParseGetPriceFeedResponse ¶
func ParseGetPriceFeedResponse(rsp *http.Response) (*GetPriceFeedResponse, error)
ParseGetPriceFeedResponse parses an HTTP response from a GetPriceFeedWithResponse call
func (GetPriceFeedResponse) Status ¶
func (r GetPriceFeedResponse) Status() string
Status returns HTTPResponse.Status
func (GetPriceFeedResponse) StatusCode ¶
func (r GetPriceFeedResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSymbolDetailsResponse ¶
type GetSymbolDetailsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *TradingPair }
func ParseGetSymbolDetailsResponse ¶
func ParseGetSymbolDetailsResponse(rsp *http.Response) (*GetSymbolDetailsResponse, error)
ParseGetSymbolDetailsResponse parses an HTTP response from a GetSymbolDetailsWithResponse call
func (GetSymbolDetailsResponse) Status ¶
func (r GetSymbolDetailsResponse) Status() string
Status returns HTTPResponse.Status
func (GetSymbolDetailsResponse) StatusCode ¶
func (r GetSymbolDetailsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type PriceFeed ¶
type PriceFeed struct { Pair string `json:"pair"` PercentChange24h string `json:"percentChange24h"` Price string `json:"price"` AdditionalProperties map[string]interface{} `json:"-"` }
PriceFeed defines model for priceFeed.
func (PriceFeed) Get ¶
Getter for additional properties for PriceFeed. Returns the specified element and whether it was found
func (PriceFeed) MarshalJSON ¶
Override default JSON handling for PriceFeed to handle AdditionalProperties
func (*PriceFeed) UnmarshalJSON ¶
Override default JSON handling for PriceFeed to handle AdditionalProperties
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type TradingPair ¶
type TradingPair struct { BaseCurrency string `json:"base_currency"` MinOrderSize string `json:"min_order_size"` QuoteCurrency string `json:"quote_currency"` QuoteIncrement float64 `json:"quote_increment"` Status string `json:"status"` Symbol string `json:"symbol"` TickSize float64 `json:"tick_size"` WrapEnabled bool `json:"wrap_enabled"` AdditionalProperties map[string]interface{} `json:"-"` }
TradingPair defines model for tradingPair.
func (TradingPair) Get ¶
func (a TradingPair) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for TradingPair. Returns the specified element and whether it was found
func (TradingPair) MarshalJSON ¶
func (a TradingPair) MarshalJSON() ([]byte, error)
Override default JSON handling for TradingPair to handle AdditionalProperties
func (*TradingPair) Set ¶
func (a *TradingPair) Set(fieldName string, value interface{})
Setter for additional properties for TradingPair
func (*TradingPair) UnmarshalJSON ¶
func (a *TradingPair) UnmarshalJSON(b []byte) error
Override default JSON handling for TradingPair to handle AdditionalProperties