Documentation ¶
Index ¶
Constants ¶
View Source
const ( CodeParseError int = -32700 CodeInvalidRequest int = -32600 CodeMethodNotFound int = -32601 CodeInvalidParameters int = -32602 CodeInternalError int = -32603 )
Error codes generated by a JSONRPC Server
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MethodInterface ¶
type MethodInterface interface { Params() ParametersInterface Action(request *http.Request, params ParametersInterface) (response interface{}, err error) }
type ParametersInterface ¶
type ParametersInterface interface {
Validate() error
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService() *Service
func (*Service) RegisterMethod ¶
func (service *Service) RegisterMethod(name string, method MethodInterface) (err error)
Click to show internal directories.
Click to hide internal directories.