Documentation
¶
Index ¶
- Constants
- type Client
- type Err
- type Req
- func (req *Req) DecodeParams(params interface{}) error
- func (req *Req) Error(err error) *Res
- func (req *Req) InvalidMethod() *Res
- func (req *Req) InvalidParams(msg string) *Res
- func (req *Req) Result(result interface{}) *Res
- func (req *Req) ResultRaw(result cbor.RawMessage) *Res
- func (req *Req) String() string
- type Res
Constants ¶
View Source
const ( CodeParseError = -32700 CodeInvalidRequest = -32600 CodeMethodNotFound = -32601 CodeInvalidParams = -32602 CodeInternalError = -32603 CodeServerError = -32000 // -32000 to -32099 Server error, Reserved for implementation-defined server-errors. )
View Source
const ( MIMEApplicationCBOR = "application/cbor" MIMEApplicationCBORCharsetUTF8 = "application/cbor; charset=utf-8" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Err ¶
type Req ¶
type Req struct {
Method string `cbor:"method"`
Params cbor.RawMessage `cbor:"params,omitempty"`
}
func (*Req) DecodeParams ¶
func (*Req) InvalidMethod ¶
func (*Req) InvalidParams ¶
type Res ¶
type Res struct {
Error *Err `cbor:"error,omitempty"`
Result cbor.RawMessage `cbor:"result,omitempty"`
}
func (*Res) DecodeResult ¶
Click to show internal directories.
Click to hide internal directories.