Documentation ¶
Index ¶
- func SetGinDefaults(cfg *config.Config)
- type BlockResponse
- type HealthResponse
- type HeightResponse
- type LedgerRequest
- type LedgerResponse
- type Server
- func (s *Server) GetAccount(c *gin.Context)
- func (s *Server) GetBlock(c *gin.Context)
- func (s *Server) GetBlockStats(c *gin.Context)
- func (s *Server) GetBlockTimes(c *gin.Context)
- func (s *Server) GetBlockTransactions(c *gin.Context)
- func (s *Server) GetBlocks(c *gin.Context)
- func (s *Server) GetCurrentBlock(c *gin.Context)
- func (s *Server) GetCurrentHeight(c *gin.Context)
- func (s *Server) GetDelegations(c *gin.Context)
- func (s Server) GetHealth(c *gin.Context)
- func (s *Server) GetLedger(c *gin.Context)
- func (s *Server) GetLedgers(c *gin.Context)
- func (s *Server) GetPendingTransactions(c *gin.Context)
- func (s *Server) GetSnarkers(c *gin.Context)
- func (s Server) GetStatus(c *gin.Context)
- func (s *Server) GetTransaction(c *gin.Context)
- func (s *Server) GetTransactions(c *gin.Context)
- func (s *Server) GetValidator(c *gin.Context)
- func (s *Server) GetValidatorStats(c *gin.Context)
- func (s *Server) GetValidators(c *gin.Context)
- type StatusResponse
- type ValidatorResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetGinDefaults ¶
SetGinDefaults changes Gin behavior base on application environment
Types ¶
type BlockResponse ¶
type HealthResponse ¶
type HealthResponse struct {
Healthy bool `json:"healthy"`
}
type HeightResponse ¶
type LedgerRequest ¶ added in v0.7.0
type LedgerRequest struct {
Epoch *int `form:"epoch"`
}
type LedgerResponse ¶
type LedgerResponse struct { Ledger *model.Ledger `json:"ledger"` Records []model.LedgerEntry `json:"entries"` }
type Server ¶
Server handles HTTP requests
func (*Server) GetAccount ¶
GetAccount returns account for by hash or ID
func (*Server) GetBlockStats ¶
GetBlockStats returns block stats for an interval
func (*Server) GetBlockTimes ¶
GetBlockTimes returns avg block times info
func (*Server) GetBlockTransactions ¶
func (*Server) GetCurrentBlock ¶
GetCurrentBlock returns the current blockchain height
func (*Server) GetCurrentHeight ¶
GetCurrentHeight returns the current blockchain height
func (*Server) GetDelegations ¶
GetDelegations rendes all existing delegations
func (*Server) GetLedgers ¶ added in v0.7.0
GetLedgers returns a list of all existing ledgers
func (*Server) GetPendingTransactions ¶ added in v0.9.3
GetPendingTransactions returns transactions by height
func (*Server) GetSnarkers ¶
GetSnarkers renders all existing snarkers
func (*Server) GetTransaction ¶
GetTransaction returns a single transaction details
func (*Server) GetTransactions ¶
GetTransactions returns transactions by height
func (*Server) GetValidator ¶
GetValidator renders the validator details
func (*Server) GetValidatorStats ¶
GetValidatorStats renders validator stats for a given time bucket
func (*Server) GetValidators ¶
GetValidators rendes all existing validators
type StatusResponse ¶
type StatusResponse struct { AppName string `json:"app_name"` AppVersion string `json:"app_version"` GitCommit string `json:"git_commit"` GoVersion string `json:"go_version"` NodeVersion string `json:"node_version,omitempty"` NodeStatus string `json:"node_status,omitempty"` NodeError bool `json:"node_error"` SyncStatus string `json:"sync_status"` LastBlockTime time.Time `json:"last_block_time"` LastBlockHeight uint64 `json:"last_block_height"` }
type ValidatorResponse ¶
type ValidatorResponse struct { Validator *model.Validator `json:"validator"` Account *model.Account `json:"account"` Delegations []model.Delegation `json:"delegations"` Stats []model.ValidatorStat `json:"stats"` StatsHourly []model.ValidatorStat `json:"stats_hourly"` StatsDaily []model.ValidatorStat `json:"stats_daily"` }