Documentation
¶
Index ¶
- Variables
- type Caller
- type Client
- func (c *Client) FindPairs(ctx context.Context, params types.FindPairsParams) ([]*types.Pair, error)
- func (c *Client) FindTokens(ctx context.Context, params types.FindTokensParams) ([]*types.Token, error)
- func (c *Client) GetBlockAtTimestamp(ctx context.Context, params types.GetBlockAtTimestampParams) (*types.BlockTimestamp, error)
- func (c *Client) GetBlockNumber(ctx context.Context) (map[int64]int64, error)
- func (c *Client) GetBlockTimestamps(ctx context.Context, params types.GetBlockTimestampsParams) ([]*types.BlockTimestamp, error)
- func (c *Client) GetChains(ctx context.Context) ([]types.Chain, error)
- func (c *Client) GetHeight(ctx context.Context, chainID int64) (*types.Heights, error)
- func (c *Client) GetPairCount(ctx context.Context, chainID int64) (int64, error)
- func (c *Client) GetTokenCount(ctx context.Context, chainID int64) (int64, error)
- func (c *Client) WithAPIKey(key string) *Client
- func (c *Client) WithDebug() *Client
- func (c *Client) WithEndpoint(endpoint string) *Client
- func (c *Client) WithTimeout(timeout time.Duration) *Client
- type FastHTTPCaller
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultFastHTTPCaller = &FastHTTPCaller{ Client: &fasthttp.Client{}, debug: true, }
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Endpoint string // contains filtered or unexported fields }
func (*Client) FindTokens ¶
func (*Client) GetBlockAtTimestamp ¶
func (c *Client) GetBlockAtTimestamp(ctx context.Context, params types.GetBlockAtTimestampParams) (*types.BlockTimestamp, error)
func (*Client) GetBlockNumber ¶
func (*Client) GetBlockTimestamps ¶
func (c *Client) GetBlockTimestamps(ctx context.Context, params types.GetBlockTimestampsParams) ([]*types.BlockTimestamp, error)
func (*Client) GetPairCount ¶
func (*Client) GetTokenCount ¶
func (*Client) WithAPIKey ¶
func (*Client) WithEndpoint ¶
update endpoint
type FastHTTPCaller ¶
func (FastHTTPCaller) Call ¶
func (a FastHTTPCaller) Call(ctx context.Context, url string, jreq *types.JRPCRequest, jres interface{}) error
func (*FastHTTPCaller) WithDebug ¶
func (a *FastHTTPCaller) WithDebug()
Click to show internal directories.
Click to hide internal directories.