Documentation
¶
Index ¶
- type Account
- type AccountListReq
- type AccountListResp
- type AccountResp
- type CurrentPriceResp
- type HttpClient
- type Ndau
- func (n *Ndau) DoWithContext(ctx context.Context, method, api string, params interface{}) ([]byte, error)
- func (n *Ndau) GetData(api string, params interface{}) ([]byte, error)
- func (n *Ndau) GetDataWithContext(ctx context.Context, api string, params interface{}) ([]byte, error)
- func (n *Ndau) PostData(api string, params interface{}) ([]byte, error)
- func (n *Ndau) PostDataWithContext(ctx context.Context, api string, params interface{}) ([]byte, error)
- type NdauConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { CurrencySeatDate time.Time `json:"CurrencySeatDate"` Id string `json:"id"` Balance int `json:"balance"` }
Account ...
type AccountListReq ¶
type AccountListResp ¶
type AccountListResp struct { NumAccounts int `json:"NumAccounts"` FirstIndex int `json:"FirstIndex"` After string `json:"After"` NextAfter string `json:NextAfter"` Accounts []string `json:Accounts"` }
AccountListResp
type CurrentPriceResp ¶
type CurrentPriceResp struct { MarketPrice int `json:"marketPrice"` TargetPrice int `json:"targetPrice"` FloorPrice int `json:"floorPrice"` TotalReleased int `json:"totalReleased"` TotalIssued int `json:"totalIssued"` TotalNdau int `json:"totalNdau"` TotalBurned int `json:"totalBurned"` SIB int `json:"sib"` }
CurrentPriceResp
type Ndau ¶
type Ndau struct { Config *NdauConfig Client HttpClient Log logger.Logger }
func New ¶
func New(client HttpClient, config *NdauConfig, loggers ...logger.Logger) (*Ndau, error)
New creates a new Ndau client
func (*Ndau) DoWithContext ¶
func (n *Ndau) DoWithContext(ctx context.Context, method, api string, params interface{}) ([]byte, error)
DoWithContext is a general-purpose http POST/GET helper
func (*Ndau) GetDataWithContext ¶
func (n *Ndau) GetDataWithContext(ctx context.Context, api string, params interface{}) ([]byte, error)
GetDataWithContext is a general-purpose query helper
type NdauConfig ¶
Click to show internal directories.
Click to hide internal directories.