Documentation
¶
Index ¶
Constants ¶
View Source
const ( ErrCodeParseError = -32700 ErrCodeInvalidRequest = -32600 ErrCodeMethodNotFound = -32601 ErrCodeInvalidParams = -32602 ErrCodeInternalError = -32603 ErrCodeServerError = -32000 ErrCodeTimeout = -32001 )
Variables ¶
View Source
var ( ErrCodeContextNil = -32010 ErrCodeContextTimeout = -32011 ErrCodeContextCancel = -32012 DefaultMinTimeout = 100 * time.Millisecond DefaultMaxTimeout = 5 * time.Minute )
Functions ¶
func ValidateContext ¶
Types ¶
type ContextError ¶
func NewContextError ¶
func NewContextError(code int, message string) *ContextError
func (*ContextError) Error ¶
func (e *ContextError) Error() string
func (*ContextError) Unwrap ¶
func (e *ContextError) Unwrap() error
func (*ContextError) WithCause ¶
func (e *ContextError) WithCause(cause error) *ContextError
type JSONRPCError ¶
type JSONRPCError struct {
Code int `json:"code"`
Message string `json:"message"`
Data json.RawMessage `json:"data,omitempty"`
}
func NewJSONRPCError ¶
func NewJSONRPCError(code int, message string) *JSONRPCError
func (*JSONRPCError) Error ¶
func (e *JSONRPCError) Error() string
Click to show internal directories.
Click to hide internal directories.