Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
Connector is main HTTP connector for manager
func NewConnector ¶
func NewConnector(cli CosmosClienter, logger *zap.Logger) *Connector
NewConnector is Connector constructor
func (*Connector) AttachToHandler ¶
AttachToHandler attaches handlers to http server's mux
func (*Connector) GetRewardBalances ¶
func (c *Connector) GetRewardBalances(w http.ResponseWriter, req *http.Request)
GetReward is http handler for reward data in live mode
type CosmosClienter ¶
type CosmosClienter interface {
GetRewardBalances(ctx context.Context, ha []structs.HeightAccount) (rewardSummary map[uint64]structs.GetRewardResponse, err error)
}
type RewardData ¶
type RewardData struct { Rewards map[uint64]structs.GetRewardResponse `json:"rewards"` TxMessageTypes map[string][]string `json:"tx_msg_types"` }
RewardData
type ServiceError ¶
type ServiceError struct { Status int `json:"status"` Msg interface{} `json:"error"` }
ServiceError structure as formated error
func (ServiceError) Error ¶
func (ve ServiceError) Error() string
Click to show internal directories.
Click to hide internal directories.