types

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Body

type Body struct {
	Jsonrpc string `json:"jsonrpc,omitempty"`
	ID      any    `json:"id,omitempty"`
	Method  string `json:"method,omitempty"`
	Params  any    `json:"params,omitempty"`
}

type HTTPRequest

type HTTPRequest struct {
	URL     string
	Method  string
	Headers map[string]string
	Query   any
	Body    *Body
	Debug   bool
}

type JsonError

type JsonError struct {
	Code    int64  `json:"code"`
	Message string `json:"message"`
}

func (*JsonError) Error

func (e *JsonError) Error() string

type JsonrpcMessage

type JsonrpcMessage struct {
	Jsonrpc string          `json:"jsonrpc,omitempty"`
	ID      any             `json:"id,omitempty"`
	Error   *JsonError      `json:"error,omitempty"`
	Result  json.RawMessage `json:"result,omitempty"`
	UsIn    int64           `json:"usIn,omitempty"`
	UsOut   int64           `json:"usOut,omitempty"`
	UsDiff  int64           `json:"usDiff,omitempty"`
	TestNet bool            `json:"testnet,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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