Documentation ¶
Index ¶
- Variables
- func LogSkipper(c echo.Context) bool
- type GetCountByAddressAndEventNameResp
- type NewServerOpts
- type Server
- func (srv *Server) GetAssignedBlocksByProverAddress(c echo.Context) error
- func (srv *Server) GetBlockProposedBy(c echo.Context) error
- func (srv *Server) GetBlockProvenBy(c echo.Context) error
- func (srv *Server) GetByAddressAndEventName(c echo.Context) error
- func (srv *Server) GetChartByTask(c echo.Context) error
- func (srv *Server) GetCountByAddressAndEventName(c echo.Context) error
- func (srv *Server) GetERC20BalancesByAddressAndChainID(c echo.Context) error
- func (srv *Server) GetNFTBalancesByAddressAndChainID(c echo.Context) error
- func (srv *Server) GetUniqueProposers(c echo.Context) error
- func (srv *Server) GetUniqueProvers(c echo.Context) error
- func (srv *Server) Health(c echo.Context) error
- func (srv *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (srv *Server) Shutdown(ctx context.Context) error
- func (srv *Server) Start(address string) error
- func (srv *Server) UserBridged(c echo.Context) error
- func (srv *Server) UserProposedBlock(c echo.Context) error
- func (srv *Server) UserProvedBlock(c echo.Context) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CacheKeyUniqueProposers = "unique-proposers" CacheKeyUniqueProvers = "unique-provers" CacheKeyStats = "stats" CacheKeyPOSStats = "pos-stats" CacheKeyCurrentProvers = "current-provers" CacheKeyTotalTransactions = "total-transactions" )
View Source
var ( ErrNoHTTPFramework = errors.Validation.NewWithKeyAndDetail( "ERR_NO_HTTP_ENGINE", "HTTP framework required", ) ErrNoRewarder = errors.Validation.NewWithKeyAndDetail( "ERR_NO_REWARDER", "Rewarder is required", ) )
Functions ¶
func LogSkipper ¶
Types ¶
type GetCountByAddressAndEventNameResp ¶
type GetCountByAddressAndEventNameResp struct {
Count int `json:"count"`
}
GetCountByAddressAndEventName
returns count of events by user address and event name @Summary Get count of events by user address and event name @ID get-charts-by-task @Param address query string true "address to query" @Param event query string true "event name to query" @Accept json @Produce json @Success 200 {object} GetCountByAddressAndEventNameResp @Router /eventByAddress [get]
type NewServerOpts ¶
type NewServerOpts struct { Echo *echo.Echo EventRepo eventindexer.EventRepository NFTBalanceRepo eventindexer.NFTBalanceRepository ERC20BalanceRepo eventindexer.ERC20BalanceRepository ChartRepo eventindexer.ChartRepository EthClient *ethclient.Client CorsOrigins []string }
func (NewServerOpts) Validate ¶
func (opts NewServerOpts) Validate() error
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
@host eventindexer.hekla.taiko.xyz Server represents an eventindexer http server instance.
func NewServer ¶
func NewServer(opts NewServerOpts) (*Server, error)
func (*Server) GetAssignedBlocksByProverAddress ¶
GetAssignedBlocksByProverAddress
returns the assigned blocks for a given prover address. @Summary Get assigned blocks by prover address @ID get-assigned-blocks-by-prover-address @Param address query string true "address to query" @Accept json @Produce json @Success 200 {object} paginate.Page @Router /assignedBlocks [get]
func (*Server) GetBlockProposedBy ¶
GetBlockProposedBy
returns events by address and name of the event @Summary Get block proposed by @ID get-block-proposed-by @Param blockID query string true "blockID to query" @Accept json @Produce json @Success 200 {object} []eventindexer.Event @Router /blockProposedBy [get]
func (*Server) GetBlockProvenBy ¶
GetBlockProvenBy
returns events by address and name of the event @Summary Get block proven by @ID get-block-proven-by @Param blockID query string true "blockID to query" @Accept json @Produce json @Success 200 {object} []eventindexer.Event @Router /blockProvenBy [get]
func (*Server) GetByAddressAndEventName ¶
GetByAddressAndEventName
returns events by address and name of the event @Summary Get events by address and event name @ID get-events-by-address-and-event-name @Param address query string true "address to query" @Param event query string true "event name to query" @Accept json @Produce json @Success 200 {object} paginate.Page @Router /events [get]
func (*Server) GetChartByTask ¶
GetChartByTask
returns time series data for displaying charts @Summary Get time series data for displaying charts @ID get-charts-by-task @Param task query string true "task to query" @Param start query string true "start date" @Param end query string true "end date" @Accept json @Produce json @Success 200 {object} eventindexer.ChartResponse @Router /chart/chartByTask [get]
func (*Server) GetCountByAddressAndEventName ¶
func (*Server) GetERC20BalancesByAddressAndChainID ¶
GetERC20BalancesByAddressAndChainID
returns erc20 balances by address and chain ID @Summary Get erc20 balances by address and chain ID @ID get-erc20-balances-by-address-and-chain-id @Param address query string true "address to query" @Param chainID query string true "chainID to query" @Accept json @Produce json @Success 200 {object} paginate.Page @Router /erc20sByAddress [get]
func (*Server) GetNFTBalancesByAddressAndChainID ¶
GetNFTBalancesByAddressAndChainID
returns nft balances by address and chain ID @Summary Get nft balances by address and chain ID @ID get-nft-balances-by-address-and-chain-id @Param address query string true "address to query" @Param chainID query string true "chainID to query" @Accept json @Produce json @Success 200 {object} paginate.Page @Router /nftsByAddress [get]
func (*Server) GetUniqueProposers ¶
GetUniqueProposers
returns all unique proposers @Summary Get unique proposers @ID get-unique-proposers @Accept json @Produce json @Success 200 {object} uniqueProposersResp @Router /uniqueProposers [get]
func (*Server) GetUniqueProvers ¶
GetUniqueProvers
returns all unique provers @Summary Get unique provers @ID get-unique-provers @Accept json @Produce json @Success 200 {object} uniqueProversResp @Router /uniqueProvers [get]
func (*Server) ServeHTTP ¶
func (srv *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements the `http.Handler` interface which serves HTTP requests
func (*Server) UserBridged ¶
func (*Server) UserProposedBlock ¶
func (*Server) UserProvedBlock ¶
Source Files ¶
- cache.go
- errors.go
- galaxe.go
- get_assigned_blocks_by_prover_address.go
- get_block_proposed_by.go
- get_block_proven_by.go
- get_by_address_and_event.go
- get_chart_by_task.go
- get_count_by_address_and_event.go
- get_erc20_balances_by_address_and_chain_id.go
- get_nft_balances_by_address_and_chain_id.go
- get_unique_proposers.go
- get_unique_provers.go
- routes.go
- server.go
- user_bridged.go
- user_proposed_block.go
- user_proved_block.go
Click to show internal directories.
Click to hide internal directories.