shared

package
v0.9.30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2015 License: LGPL-2.1-or-later Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDecodeParamError

func NewDecodeParamError(errstr string) error

func NewRpcResponse

func NewRpcResponse(id interface{}, jsonrpcver string, reply interface{}, err error) *interface{}

func NewValidationError

func NewValidationError(param string, msg string) error

Types

type DecodeParamError

type DecodeParamError struct {
	// contains filtered or unexported fields
}

func (*DecodeParamError) Error

func (e *DecodeParamError) Error() string

type ErrorObject

type ErrorObject struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

RPC error response details

type ErrorResponse

type ErrorResponse struct {
	Id      interface{}  `json:"id"`
	Jsonrpc string       `json:"jsonrpc"`
	Error   *ErrorObject `json:"error"`
}

RPC error response

type InsufficientParamsError

type InsufficientParamsError struct {
	// contains filtered or unexported fields
}

func NewInsufficientParamsError

func NewInsufficientParamsError(have int, want int) *InsufficientParamsError

func (*InsufficientParamsError) Error

func (e *InsufficientParamsError) Error() string

type InvalidTypeError

type InvalidTypeError struct {
	// contains filtered or unexported fields
}

func NewInvalidTypeError

func NewInvalidTypeError(method, msg string) *InvalidTypeError

func (*InvalidTypeError) Error

func (e *InvalidTypeError) Error() string

type NotAvailableError

type NotAvailableError struct {
	Method string
	Reason string
}

func NewNotAvailableError

func NewNotAvailableError(method string, reason string) *NotAvailableError

func (*NotAvailableError) Error

func (e *NotAvailableError) Error() string

type NotImplementedError

type NotImplementedError struct {
	Method string
}

func NewNotImplementedError

func NewNotImplementedError(method string) *NotImplementedError

func (*NotImplementedError) Error

func (e *NotImplementedError) Error() string

type Request

type Request struct {
	Id      interface{}     `json:"id"`
	Jsonrpc string          `json:"jsonrpc"`
	Method  string          `json:"method"`
	Params  json.RawMessage `json:"params"`
}

RPC request

type Response

type Response struct {
	Id      interface{} `json:"id"`
	Jsonrpc string      `json:"jsonrpc"`
}

RPC response

type SuccessResponse

type SuccessResponse struct {
	Id      interface{} `json:"id"`
	Jsonrpc string      `json:"jsonrpc"`
	Result  interface{} `json:"result"`
}

RPC success response

type ValidationError

type ValidationError struct {
	ParamName string
	// contains filtered or unexported fields
}

func (*ValidationError) Error

func (e *ValidationError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL