rycli

package module
v0.0.0-...-9fbf33c Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 13 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 {
	BaseURL string
	// contains filtered or unexported fields
}

Client basic struct that contains all method to work with RPC protocol

func NewClient

func NewClient() *Client

NewClient returns new configured Client to start work with JSON-RPC 2.0 protocol

func (*Client) Call

func (cl *Client) Call(fctx *app.RequestContext, method string, args, result interface{}) error

Call run remote procedure on JSON-RPC 2.0 API with parsing answer to provided structure or interface

func (*Client) DisableHeaderNamesNormalizing

func (cl *Client) DisableHeaderNamesNormalizing(fix bool)

DisableHeaderNamesNormalizing setting normalize headers or not

func (*Client) SetBaseURL

func (cl *Client) SetBaseURL(baseURL string)

SetBaseURL setting basic url for API

func (*Client) SetClientTimeout

func (cl *Client) SetClientTimeout(duration time.Duration)

SetClientTimeout this method sets globally for client its timeout

func (*Client) SetDebug

func (cl *Client) SetDebug(enabled bool)

SetDebug enables request logging for troubleshooting.

type ErrorCode

type ErrorCode int

ErrorCode type for error codes

type PBase

type PBase struct {
	Err  string
	Data []byte
}

PBase is the RPC response envelope.

Jump to

Keyboard shortcuts

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