Documentation ¶
Index ¶
- func GetNonce() int64
- func GetNonceStr() string
- func ParseUint16(s string) (uint16, error)
- type Balance
- type Client
- func (c *Client) GetBalance() (responses *Balance, err error)
- func (c *Client) GetRentalDetails(id int64) (*RentalDetails, error)
- func (c *Client) GetRigDetails(id int64) (*RigDetails, error)
- func (c *Client) ListMyRentals() ([]MyRentals, error)
- func (c *Client) ListMyRigs() ([]MyRigs, error)
- func (c *Client) ListRigs(algotype string) ([]RigList, *RigListInfo, error)
- func (c *Client) Request(httpmethod string, apimethod string, params map[string]string, ...) (res *http.Response, err error)
- type Error
- type MyRentals
- type MyRentalsHashRateAdvertised
- type MyRentalsHashRateAverage
- type MyRentalsHashRateCurrent
- type MyRentalsResponse
- type MyRigs
- type MyRigsResponse
- type RentalDetails
- type RentalHashrate
- type Response
- type RigDetails
- type RigHashRate
- type RigList
- type RigListInfo
- type RigListInfoPrice
- type RigListInfoStats
- type RigListResponse
- type Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNonceStr ¶
func GetNonceStr() string
func ParseUint16 ¶
Types ¶
type Client ¶
func (*Client) GetBalance ¶
func (*Client) GetRentalDetails ¶
func (c *Client) GetRentalDetails(id int64) (*RentalDetails, error)
func (*Client) GetRigDetails ¶
func (c *Client) GetRigDetails(id int64) (*RigDetails, error)
func (*Client) ListMyRentals ¶
func (*Client) ListMyRigs ¶
type MyRentals ¶
type MyRentals struct { Id uint64 `json:"id,string"` RigId uint64 `json:"rigid,string"` Name string `json:"name"` StartTime Time `json:"start_time,string"` Type string Online uint8 `json:"online,string"` Price float64 `json:"price,string"` AvailableInHours float64 `json:"available_in_hours,string"` Status string Advertised MyRentalsHashRateAdvertised `json:"advertised"` Current MyRentalsHashRateCurrent `json:"current"` Average MyRentalsHashRateAverage `json:"average"` }
type MyRentalsResponse ¶
type MyRentalsResponse struct {
Records []MyRentals `json:"records"`
}
type MyRigs ¶
type MyRigs struct { Id uint64 `json:"id,string"` Name string `json:"name"` Rpi string Type string Online uint8 `json:"online,string"` Price float64 `json:"price,string"` PriceHour float64 `json:"price_hr,string"` MinHours uint16 `json:"minhrs,string"` MaxHours uint16 `json:"maxhrs,string"` Status string HashRate uint64 `json:"hashrate,string"` HashRateNice string `json:"hashrate_nice"` }
type MyRigsResponse ¶
type MyRigsResponse struct {
Records []MyRigs `json:"records"`
}
type RentalDetails ¶
type RentalDetails struct { Id uint64 `json:"id,string"` RigId uint64 `json:"rigid,string"` Name string `json:"name"` StartTime Time `json:"start_time,string"` Owner string Renter string Region string Type string HashRate RentalHashrate `json:"hashrate"` Price float64 `json:"price,string"` Length uint64 `json:"length,string"` Left float64 `json:"left,string"` Status string }
type RentalHashrate ¶
type Response ¶
type Response struct { Success bool `json:"success"` Version int64 `json:"version,string"` Message string `json:"message"` Data json.RawMessage `json:"data"` }
type RigDetails ¶
type RigDetails struct { Id uint64 `json:"id,string"` Name string `json:"name"` RentalId uint64 `json:"rentalid,string,omitempty"` Rpi string Owner string StartTime Time `json:"start_time,string"` Region string Type string Price float64 `json:"price,string"` Status string HashRate RigHashRate `json:"hashrate"` MinHours uint16 MaxHours uint16 AvailableInHours float64 `json:"available_in_hours,string,omitempty"` }
func (*RigDetails) UnmarshalJSON ¶
func (a *RigDetails) UnmarshalJSON(b []byte) error
type RigHashRate ¶
type RigList ¶
type RigList struct { Id uint64 `json:"id,string"` Name string `json:"name"` Rpi string Type string Online uint8 `json:"online,string"` Price float64 `json:"price,string"` PriceHour float64 `json:"price_hr,string"` MinHours uint16 `json:"minhrs,string"` MaxHours uint16 `json:"maxhrs,string"` Rating float64 `json:"rating,string"` Status string HashRate uint64 `json:"hashrate,string"` HashRateNice string `json:"hashrate_nice"` }
type RigListInfo ¶
type RigListInfo struct { Start uint32 `json:"start_num"` End uint32 `json:"end_num"` Total uint32 `json:"total,string"` Available RigListInfoStats `json:"available"` Rented RigListInfoStats `json:"rented"` Price RigListInfoPrice `json:"price"` }
type RigListInfoPrice ¶
type RigListInfoStats ¶
type RigListResponse ¶
type RigListResponse struct { Records []RigList `json:"records"` Info RigListInfo `json:"info"` }
Click to show internal directories.
Click to hide internal directories.