gotools/internal/jsonrpc2_v2/messages.go

type ID

type Message

type Request

type Response

// StringID creates a new string request identifier.
func StringID(s string) ID {}

// Int64ID creates a new integer request identifier.
func Int64ID(i int64) ID {}

// IsValid returns true if the ID is a valid identifier.
// The default value for ID will return false.
func (id ID) IsValid() bool {}

// Raw returns the underlying value of the ID.
func (id ID) Raw() interface{}

// NewNotification constructs a new Notification message for the supplied
// method and parameters.
func NewNotification(method string, params interface{}

// NewCall constructs a new Call message for the supplied ID, method and
// parameters.
func NewCall(id ID, method string, params interface{}

func (msg *Request) IsCall() bool {}

func (msg *Request) marshal(to *wireCombined) {}

// NewResponse constructs a new Response message that is a reply to the
// supplied. If err is set result may be ignored.
func NewResponse(id ID, result interface{}

func (msg *Response) marshal(to *wireCombined) {}

func toWireError(err error) *WireError {}

func EncodeMessage(msg Message) ([]byte, error) {}

func DecodeMessage(data []byte) (Message, error) {}

func marshalToRaw(obj interface{}