Documentation ¶
Index ¶
- Constants
- func ChainInjector(srv *Manager) echo.MiddlewareFunc
- func Chunk() echo.MiddlewareFunc
- func HTTPErrorHandler(err error, c echo.Context)
- func JsonRpc() echo.MiddlewareFunc
- func NoneMiddlewareFunc(next echo.HandlerFunc) echo.HandlerFunc
- func Redoc(opts RedocOpts) echo.HandlerFunc
- func Unauthorized(readOnly bool) echo.MiddlewareFunc
- type BTPNotification
- type BTPRequest
- type BlockNotification
- type BlockRequest
- type Config
- type EventFilter
- type EventFilters
- type EventNotification
- type EventRequest
- type Manager
- func (srv *Manager) AdminEchoGroup(m ...echo.MiddlewareFunc) *echo.Group
- func (srv *Manager) BatchLimit() int
- func (srv *Manager) Chain(channel string) module.Chain
- func (srv *Manager) CheckDebug() echo.MiddlewareFunc
- func (srv *Manager) CheckRPC() echo.MiddlewareFunc
- func (srv *Manager) CheckRosetta() echo.MiddlewareFunc
- func (srv *Manager) DisableRPC() bool
- func (srv *Manager) IncludeDebug() bool
- func (srv *Manager) MessageDump() bool
- func (srv *Manager) RegisterAPIHandler(g *echo.Group)
- func (srv *Manager) RegisterMetricsHandler(g *echo.Group)
- func (srv *Manager) RemoveChain(channel string)
- func (srv *Manager) Rosetta() bool
- func (srv *Manager) SetBatchLimit(limitOfBatch int)
- func (srv *Manager) SetChain(channel string, chain module.Chain)
- func (srv *Manager) SetDefaultChannel(jsonrpcDefaultChannel string)
- func (srv *Manager) SetDisableRPC(enable bool)
- func (srv *Manager) SetIncludeDebug(enable bool)
- func (srv *Manager) SetMessageDump(enable bool)
- func (srv *Manager) SetRosetta(enable bool)
- func (srv *Manager) SetWSMaxSession(limit int)
- func (srv *Manager) Start() error
- func (srv *Manager) Stop() error
- type ProgressNotification
- type RedocOpts
- type WSResponse
- type WebSocketConn
- type WebSocketUpgrader
Constants ¶
View Source
const ( DefaultWSMaxSession = 10 DefaultWSMaxReadLimit = 16 * 1024 // 16kB )
View Source
const (
UrlAdmin = "/admin"
)
Variables ¶
This section is empty.
Functions ¶
func ChainInjector ¶
func ChainInjector(srv *Manager) echo.MiddlewareFunc
func HTTPErrorHandler ¶
func HTTPErrorHandler(err error, c echo.Context)
func NoneMiddlewareFunc ¶
func NoneMiddlewareFunc(next echo.HandlerFunc) echo.HandlerFunc
func Unauthorized ¶
func Unauthorized(readOnly bool) echo.MiddlewareFunc
Types ¶
type BTPNotification ¶ added in v1.3.0
type BTPRequest ¶ added in v1.3.0
type BlockNotification ¶
type BlockRequest ¶
type BlockRequest struct { Height common.HexInt64 `json:"height"` EventFilters []*EventFilter `json:"eventFilters,omitempty"` Logs common.HexBool `json:"logs,omitempty"` // contains filtered or unexported fields }
func (*BlockRequest) Compile ¶ added in v1.3.0
func (r *BlockRequest) Compile() error
type EventFilter ¶
type EventFilter struct { Addr *common.Address `json:"addr,omitempty"` Signature string `json:"event"` Indexed []*string `json:"indexed,omitempty"` Data []*string `json:"data,omitempty"` // contains filtered or unexported fields }
func (*EventFilter) Compile ¶ added in v1.3.0
func (f *EventFilter) Compile() error
func (*EventFilter) MatchEvents ¶ added in v1.3.0
type EventFilters ¶ added in v1.3.0
type EventFilters []*EventFilter
func (EventFilters) FilteredByLogBloom ¶ added in v1.3.0
func (fs EventFilters) FilteredByLogBloom(lb module.LogsBloom) (EventFilters, bool)
FilteredByLogBloom returns applicable event filters. If there is no event filters, then it returns false along with filters.
type EventNotification ¶
type EventRequest ¶
type EventRequest struct { EventFilter Height common.HexInt64 `json:"height"` Logs common.HexBool `json:"logs,omitempty"` ProgressInterval common.HexInt64 `json:"progressInterval,omitempty"` Filters EventFilters `json:"eventFilters,omitempty"` }
func (*EventRequest) Compile ¶ added in v1.3.0
func (f *EventRequest) Compile() (EventFilters, error)
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) AdminEchoGroup ¶
func (srv *Manager) AdminEchoGroup(m ...echo.MiddlewareFunc) *echo.Group
func (*Manager) BatchLimit ¶ added in v1.2.0
func (*Manager) CheckDebug ¶
func (srv *Manager) CheckDebug() echo.MiddlewareFunc
func (*Manager) CheckRosetta ¶ added in v1.2.13
func (srv *Manager) CheckRosetta() echo.MiddlewareFunc
func (*Manager) DisableRPC ¶ added in v1.4.0
func (*Manager) IncludeDebug ¶
func (*Manager) MessageDump ¶
func (*Manager) RegisterAPIHandler ¶ added in v0.9.6
func (srv *Manager) RegisterAPIHandler(g *echo.Group)
func (*Manager) RegisterMetricsHandler ¶ added in v0.9.6
func (srv *Manager) RegisterMetricsHandler(g *echo.Group)
func (*Manager) RemoveChain ¶
func (*Manager) SetBatchLimit ¶ added in v1.2.0
func (*Manager) SetDefaultChannel ¶
func (*Manager) SetDisableRPC ¶ added in v1.4.0
func (*Manager) SetIncludeDebug ¶
func (*Manager) SetMessageDump ¶
func (*Manager) SetRosetta ¶ added in v1.2.13
func (*Manager) SetWSMaxSession ¶ added in v1.2.14
type ProgressNotification ¶ added in v1.3.5
ProgressNotification is used to notify the height of the processed block If it's enabled, then it would be sent on every interval. If there are some notifications to be sent, it would be also sent regardless of the interval.
type RedocOpts ¶
type RedocOpts struct { // BasePath for the UI path, defaults to: / BasePath string // Path combines with BasePath for the full UI path, defaults to: docs Path string // SpecURL the url to find the spec for SpecURL string // RedocURL for the js that generates the redoc site, defaults to: https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js RedocURL string // Title for the documentation site, default to: API documentation Title string }
func (*RedocOpts) EnsureDefaults ¶
func (r *RedocOpts) EnsureDefaults()
type WSResponse ¶
type WebSocketConn ¶ added in v1.3.0
type WebSocketUpgrader ¶ added in v1.3.0
type WebSocketUpgrader interface {
Upgrade(ctx echo.Context) (WebSocketConn, error)
}
func NewWebSocketUpgrader ¶ added in v1.3.0
func NewWebSocketUpgrader() WebSocketUpgrader
Source Files ¶
Click to show internal directories.
Click to hide internal directories.