rpc

package
v0.0.0-...-d1ec73e Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func Dial

func Dial(url string) (*Client, error)

func (*Client) Call

func (c *Client) Call(method string, params any, result any) error

func (*Client) Client

func (c *Client) Client() *http.Client

type Error

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

func (*Error) Error

func (e *Error) Error() string

type Request

type Request struct {
	Id      string `json:"id"`
	Method  string `json:"method"`
	Params  any    `json:"params,omitempty"`
	JsonRpc string `json:"jsonrpc"`
}

type Response

type Response struct {
	Id     string `json:"id"`
	Result any    `json:"result"`
	Error  *Error `json:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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