rycli

package module
v0.0.0-...-eaee43e Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pbase_proto protoreflect.FileDescriptor

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 JSON-RPC 2.0 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 *fasthttp.RequestCtx, 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

type ErrorCode

type ErrorCode int

ErrorCode type for error codes

type PBase

type PBase struct {
	Err  string `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"`
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*PBase) Descriptor deprecated

func (*PBase) Descriptor() ([]byte, []int)

Deprecated: Use PBase.ProtoReflect.Descriptor instead.

func (*PBase) GetData

func (x *PBase) GetData() []byte

func (*PBase) GetErr

func (x *PBase) GetErr() string

func (*PBase) ProtoMessage

func (*PBase) ProtoMessage()

func (*PBase) ProtoReflect

func (x *PBase) ProtoReflect() protoreflect.Message

func (*PBase) Reset

func (x *PBase) Reset()

func (*PBase) String

func (x *PBase) String() string

Jump to

Keyboard shortcuts

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