Documentation ¶
Index ¶
- Constants
- Variables
- func FormatCommands(commands []*cli.Command) ([]*cli.Command, error)
- func FormatToAllowed(name string) (formattedName string, err error)
- func NewID() string
- type DataError
- type Error
- type InternalServerError
- type InvalidMessageError
- type InvalidParamsError
- type InvalidRequestError
- type MethodNotFoundError
- type ModuleFlags
- type NotificationsUnsupportedError
- type ParseError
Constants ¶
View Source
const ( Vsn = "1.0" ServiceMethodSeparator = "_" ResponseMethodSuffix = "_response" )
JSON RPC constants
View Source
const ( RPCDefaultErrorCode = -32000 RPCTimeoutErrorCode = -32001 RPCUnmarshalErrorCode = -32002 RPCInternalErrorCode = -32500 )
Variables ¶
View Source
var ( ErrCoreRunning = fmt.Errorf("core is already running") ErrCoreStopped = fmt.Errorf("core is stopped") )
View Source
var DefaultModuleNames = []string{
builderApiModuleName,
relayModuleName,
blockAggregatorName,
proxyModuleName,
}
Functions ¶
func FormatToAllowed ¶
Types ¶
type DataError ¶
type DataError interface { Error() string // returns the message ErrorData() interface{} // returns the error data }
A DataError contains some data in addition to the error message.
type InternalServerError ¶
InternalServerError is used for server errors during request processing.
func (*InternalServerError) Error ¶
func (e *InternalServerError) Error() string
func (*InternalServerError) ErrorCode ¶
func (e *InternalServerError) ErrorCode() int
type InvalidMessageError ¶
type InvalidMessageError struct{ Message string }
received message is invalid
func (*InvalidMessageError) Error ¶
func (e *InvalidMessageError) Error() string
func (*InvalidMessageError) ErrorCode ¶
func (e *InvalidMessageError) ErrorCode() int
type InvalidParamsError ¶
type InvalidParamsError struct{ Message string }
unable to decode supplied params, or an invalid number of parameters
func (*InvalidParamsError) Error ¶
func (e *InvalidParamsError) Error() string
func (*InvalidParamsError) ErrorCode ¶
func (e *InvalidParamsError) ErrorCode() int
type InvalidRequestError ¶
type InvalidRequestError struct{ Message string }
received message isn't a valid request
func (*InvalidRequestError) Error ¶
func (e *InvalidRequestError) Error() string
func (*InvalidRequestError) ErrorCode ¶
func (e *InvalidRequestError) ErrorCode() int
type MethodNotFoundError ¶
type MethodNotFoundError struct{ Method string }
func (*MethodNotFoundError) Error ¶
func (e *MethodNotFoundError) Error() string
func (*MethodNotFoundError) ErrorCode ¶
func (e *MethodNotFoundError) ErrorCode() int
type ModuleFlags ¶
type NotificationsUnsupportedError ¶
type NotificationsUnsupportedError struct{}
func (NotificationsUnsupportedError) Error ¶
func (e NotificationsUnsupportedError) Error() string
func (NotificationsUnsupportedError) ErrorCode ¶
func (e NotificationsUnsupportedError) ErrorCode() int
func (NotificationsUnsupportedError) Is ¶
func (e NotificationsUnsupportedError) Is(other error) bool
type ParseError ¶
type ParseError struct{ Message string }
Invalid JSON was received by the server.
func (*ParseError) Error ¶
func (e *ParseError) Error() string
func (*ParseError) ErrorCode ¶
func (e *ParseError) ErrorCode() int
Click to show internal directories.
Click to hide internal directories.