Documentation ¶
Index ¶
- type Connector
- func (c *Connector) AttachToHandler(mux *http.ServeMux)
- func (c *Connector) CheckMissingTransactions(w http.ResponseWriter, req *http.Request)
- func (c *Connector) GetAccountBalance(w http.ResponseWriter, req *http.Request)
- func (c *Connector) GetMissingTransactions(w http.ResponseWriter, req *http.Request)
- func (c *Connector) GetRewardAPR(w http.ResponseWriter, req *http.Request)
- func (c *Connector) GetRewards(w http.ResponseWriter, req *http.Request)
- func (c *Connector) GetRunningTransactions(w http.ResponseWriter, req *http.Request)
- func (c *Connector) GetTransactions(w http.ResponseWriter, req *http.Request)
- func (c *Connector) InsertTransactions(w http.ResponseWriter, req *http.Request)
- func (c *Connector) ScrapeLatest(w http.ResponseWriter, req *http.Request)
- func (c *Connector) SearchTransactions(w http.ResponseWriter, req *http.Request)
- func (c *Connector) StopRunningTransactions(w http.ResponseWriter, req *http.Request)
- type MissingTransactionsResponse
- type TransactionSearch
- type ValidationError
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 client.ClientContractor) *Connector
NewConnector is Connector constructor
func (*Connector) AttachToHandler ¶
AttachToHandler attaches handlers to http server's mux
func (*Connector) CheckMissingTransactions ¶
func (c *Connector) CheckMissingTransactions(w http.ResponseWriter, req *http.Request)
CheckMissingTransactions is http handler for CheckMissingTransactions method
func (*Connector) GetAccountBalance ¶ added in v0.1.0
func (c *Connector) GetAccountBalance(w http.ResponseWriter, req *http.Request)
GetAccountBalance calculates daily balance for provided address
func (*Connector) GetMissingTransactions ¶
func (c *Connector) GetMissingTransactions(w http.ResponseWriter, req *http.Request)
GetMissingTransactions is http handler for GetMissingTransactions method
func (*Connector) GetRewardAPR ¶ added in v0.3.1
func (c *Connector) GetRewardAPR(w http.ResponseWriter, req *http.Request)
GetRewardAPR calculates daily reward annual percentage rates for provided address
func (*Connector) GetRewards ¶ added in v0.0.9
func (c *Connector) GetRewards(w http.ResponseWriter, req *http.Request)
GetRewards calculates daily rewards for provided address
func (*Connector) GetRunningTransactions ¶
func (c *Connector) GetRunningTransactions(w http.ResponseWriter, req *http.Request)
GetRunningTransactions gets currently running transactions
func (*Connector) GetTransactions ¶
func (c *Connector) GetTransactions(w http.ResponseWriter, req *http.Request)
GetTransactions is http handler for GetTransactions method
func (*Connector) InsertTransactions ¶
func (c *Connector) InsertTransactions(w http.ResponseWriter, req *http.Request)
InsertTransactions is http handler for InsertTransactions method
func (*Connector) ScrapeLatest ¶
func (c *Connector) ScrapeLatest(w http.ResponseWriter, req *http.Request)
ScrapeLatest is http handler for ScrapeLatest method
func (*Connector) SearchTransactions ¶
func (c *Connector) SearchTransactions(w http.ResponseWriter, req *http.Request)
SearchTransactions is http handler for SearchTransactions method
func (*Connector) StopRunningTransactions ¶ added in v0.0.7
func (c *Connector) StopRunningTransactions(w http.ResponseWriter, req *http.Request)
StopRunningTransactions stops currently running transactions
type MissingTransactionsResponse ¶
type MissingTransactionsResponse struct { MissingTransactions [][2]uint64 `json:"missing_transactions"` MissingBlocks [][2]uint64 `json:"missing_blocks"` }
MissingTransactionsResponse the response
type TransactionSearch ¶
type TransactionSearch struct { // Network identifier to search in // // required: true // example: cosmos Network string `json:"network"` // ChainID to search in // // required: true // items.unique: true // example: ['cosmoshub-3'] ChainIDs []string `json:"chain_ids"` // Epoch of transaction // // required: true Epoch string `json:"epoch"` // Height of the transactions to get // // min: 0 Height uint64 `json:"height"` // AfterHeight gets all transaction bigger than given height // Has to be bigger than BeforeHeight // // min: 0 AfterHeight uint64 `json:"after_height"` // BeforeHeight gets all transaction lower than given height // Has to be lesser than AfterHeight // // min: 0 BeforeHeight uint64 `json:"before_height"` // Type - the list of types of transactions // // items.pattern: \w+ // items.unique: true Type []string `json:"type"` // BlockHash - the hash of block to get transaction from BlockHash string `json:"block_hash"` // Hash - the hash of transaction Hash string `json:"hash"` // Account - the account identifier to look for // This searches for all accounts id which exists in transaction including senders, recipients, validators, feeders etc etc // // items.pattern: \w+ // items.unique: true Account []string `json:"account"` // Sender looks for transactions that includes given accountIDs // // items.pattern: \w+ // items.unique: true Sender []string `json:"sender"` // Receiver looks for transactions that includes given accountIDs // // items.pattern: \w+ // items.unique: true Receiver []string `json:"receiver"` // Memo sets full text search for memo field Memo string `json:"memo"` // The time of transaction (if not given by chain API, the same as block) AfterTime time.Time `json:"after_time"` // The time of transaction (if not given by chain API, the same as block) BeforeTime time.Time `json:"before_time"` // Limit of how many requests to get in one request // // default: 100 // max: 1000 Limit uint64 `json:"limit"` // Offset the offset number or Offset uint64 `json:"offset"` // WithRaw - include base64 raw request in search response // default: false WithRaw bool `json:"with_raw"` // WithRawLog - include raw log data in search response // default: false WithRawLog bool `json:"with_raw_log"` }
TransactionSearch - A set of fields used as params for search swagger:model
type ValidationError ¶
type ValidationError struct {
Msg string `json:"error"`
}
ValidationError structure as formated error
func (ValidationError) Error ¶
func (ve ValidationError) Error() string