Versions in this module Expand all Collapse all v0 v0.7.2 Dec 13, 2021 Changes in this version + func CorsMiddleware(next http.Handler) http.Handler + func EncodeJSONResponse(i interface{}, status int, w http.ResponseWriter) + func LoggerMiddleware(inner http.Handler) http.Handler + func NewRouter(routers ...Router) http.Handler + type AccountAPIController struct + func (c *AccountAPIController) AccountBalance(w http.ResponseWriter, r *http.Request) + func (c *AccountAPIController) AccountCoins(w http.ResponseWriter, r *http.Request) + func (c *AccountAPIController) Routes() Routes + type AccountAPIRouter interface + AccountBalance func(http.ResponseWriter, *http.Request) + AccountCoins func(http.ResponseWriter, *http.Request) + type AccountAPIServicer interface + AccountBalance func(context.Context, *types.AccountBalanceRequest) (*types.AccountBalanceResponse, *types.Error) + AccountCoins func(context.Context, *types.AccountCoinsRequest) (*types.AccountCoinsResponse, *types.Error) + type BlockAPIController struct + func (c *BlockAPIController) Block(w http.ResponseWriter, r *http.Request) + func (c *BlockAPIController) BlockTransaction(w http.ResponseWriter, r *http.Request) + func (c *BlockAPIController) Routes() Routes + type BlockAPIRouter interface + Block func(http.ResponseWriter, *http.Request) + BlockTransaction func(http.ResponseWriter, *http.Request) + type BlockAPIServicer interface + Block func(context.Context, *types.BlockRequest) (*types.BlockResponse, *types.Error) + BlockTransaction func(context.Context, *types.BlockTransactionRequest) (*types.BlockTransactionResponse, *types.Error) + type CallAPIController struct + func (c *CallAPIController) Call(w http.ResponseWriter, r *http.Request) + func (c *CallAPIController) Routes() Routes + type CallAPIRouter interface + Call func(http.ResponseWriter, *http.Request) + type CallAPIServicer interface + Call func(context.Context, *types.CallRequest) (*types.CallResponse, *types.Error) + type ConstructionAPIController struct + func (c *ConstructionAPIController) ConstructionCombine(w http.ResponseWriter, r *http.Request) + func (c *ConstructionAPIController) ConstructionDerive(w http.ResponseWriter, r *http.Request) + func (c *ConstructionAPIController) ConstructionHash(w http.ResponseWriter, r *http.Request) + func (c *ConstructionAPIController) ConstructionMetadata(w http.ResponseWriter, r *http.Request) + func (c *ConstructionAPIController) ConstructionParse(w http.ResponseWriter, r *http.Request) + func (c *ConstructionAPIController) ConstructionPayloads(w http.ResponseWriter, r *http.Request) + func (c *ConstructionAPIController) ConstructionPreprocess(w http.ResponseWriter, r *http.Request) + func (c *ConstructionAPIController) ConstructionSubmit(w http.ResponseWriter, r *http.Request) + func (c *ConstructionAPIController) Routes() Routes + type ConstructionAPIRouter interface + ConstructionCombine func(http.ResponseWriter, *http.Request) + ConstructionDerive func(http.ResponseWriter, *http.Request) + ConstructionHash func(http.ResponseWriter, *http.Request) + ConstructionMetadata func(http.ResponseWriter, *http.Request) + ConstructionParse func(http.ResponseWriter, *http.Request) + ConstructionPayloads func(http.ResponseWriter, *http.Request) + ConstructionPreprocess func(http.ResponseWriter, *http.Request) + ConstructionSubmit func(http.ResponseWriter, *http.Request) + type ConstructionAPIServicer interface + ConstructionCombine func(context.Context, *types.ConstructionCombineRequest) (*types.ConstructionCombineResponse, *types.Error) + ConstructionDerive func(context.Context, *types.ConstructionDeriveRequest) (*types.ConstructionDeriveResponse, *types.Error) + ConstructionHash func(context.Context, *types.ConstructionHashRequest) (*types.TransactionIdentifierResponse, *types.Error) + ConstructionMetadata func(context.Context, *types.ConstructionMetadataRequest) (*types.ConstructionMetadataResponse, *types.Error) + ConstructionParse func(context.Context, *types.ConstructionParseRequest) (*types.ConstructionParseResponse, *types.Error) + ConstructionPayloads func(context.Context, *types.ConstructionPayloadsRequest) (*types.ConstructionPayloadsResponse, *types.Error) + ConstructionPreprocess func(context.Context, *types.ConstructionPreprocessRequest) (*types.ConstructionPreprocessResponse, *types.Error) + ConstructionSubmit func(context.Context, *types.ConstructionSubmitRequest) (*types.TransactionIdentifierResponse, *types.Error) + type EventsAPIController struct + func (c *EventsAPIController) EventsBlocks(w http.ResponseWriter, r *http.Request) + func (c *EventsAPIController) Routes() Routes + type EventsAPIRouter interface + EventsBlocks func(http.ResponseWriter, *http.Request) + type EventsAPIServicer interface + EventsBlocks func(context.Context, *types.EventsBlocksRequest) (*types.EventsBlocksResponse, *types.Error) + type MempoolAPIController struct + func (c *MempoolAPIController) Mempool(w http.ResponseWriter, r *http.Request) + func (c *MempoolAPIController) MempoolTransaction(w http.ResponseWriter, r *http.Request) + func (c *MempoolAPIController) Routes() Routes + type MempoolAPIRouter interface + Mempool func(http.ResponseWriter, *http.Request) + MempoolTransaction func(http.ResponseWriter, *http.Request) + type MempoolAPIServicer interface + Mempool func(context.Context, *types.NetworkRequest) (*types.MempoolResponse, *types.Error) + MempoolTransaction func(context.Context, *types.MempoolTransactionRequest) (*types.MempoolTransactionResponse, *types.Error) + type NetworkAPIController struct + func (c *NetworkAPIController) NetworkList(w http.ResponseWriter, r *http.Request) + func (c *NetworkAPIController) NetworkOptions(w http.ResponseWriter, r *http.Request) + func (c *NetworkAPIController) NetworkStatus(w http.ResponseWriter, r *http.Request) + func (c *NetworkAPIController) Routes() Routes + type NetworkAPIRouter interface + NetworkList func(http.ResponseWriter, *http.Request) + NetworkOptions func(http.ResponseWriter, *http.Request) + NetworkStatus func(http.ResponseWriter, *http.Request) + type NetworkAPIServicer interface + NetworkList func(context.Context, *types.MetadataRequest) (*types.NetworkListResponse, *types.Error) + NetworkOptions func(context.Context, *types.NetworkRequest) (*types.NetworkOptionsResponse, *types.Error) + NetworkStatus func(context.Context, *types.NetworkRequest) (*types.NetworkStatusResponse, *types.Error) + type Route struct + HandlerFunc http.HandlerFunc + Method string + Name string + Pattern string + type Router interface + Routes func() Routes + func NewAccountAPIController(s AccountAPIServicer, asserter *asserter.Asserter) Router + func NewBlockAPIController(s BlockAPIServicer, asserter *asserter.Asserter) Router + func NewCallAPIController(s CallAPIServicer, asserter *asserter.Asserter) Router + func NewConstructionAPIController(s ConstructionAPIServicer, asserter *asserter.Asserter) Router + func NewEventsAPIController(s EventsAPIServicer, asserter *asserter.Asserter) Router + func NewMempoolAPIController(s MempoolAPIServicer, asserter *asserter.Asserter) Router + func NewNetworkAPIController(s NetworkAPIServicer, asserter *asserter.Asserter) Router + func NewSearchAPIController(s SearchAPIServicer, asserter *asserter.Asserter) Router + type Routes []Route + type SearchAPIController struct + func (c *SearchAPIController) Routes() Routes + func (c *SearchAPIController) SearchTransactions(w http.ResponseWriter, r *http.Request) + type SearchAPIRouter interface + SearchTransactions func(http.ResponseWriter, *http.Request) + type SearchAPIServicer interface + SearchTransactions func(context.Context, *types.SearchTransactionsRequest) (*types.SearchTransactionsResponse, *types.Error)