Documentation ¶
Index ¶
- Variables
- type Client
- func (cl *Client) Call(method string, args, result interface{}) error
- func (cl *Client) DisableHeaderNamesNormalizing(fix bool)
- func (cl *Client) SetBaseURL(baseURL string)
- func (cl *Client) SetBasicAuthHeader(login string, password string)
- func (cl *Client) SetClientTimeout(duration time.Duration)
- func (cl *Client) SetCustomAuthHeader(authType string, authData string)
- func (cl *Client) SetCustomHeader(headerName, headerValue string)
- type ErrorCode
- type PBase
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 ¶
Call run remote procedure on JSON-RPC 2.0 API with parsing answer to provided structure or interface
func (*Client) DisableHeaderNamesNormalizing ¶
DisableHeaderNamesNormalizing setting normalize headers or not
func (*Client) SetBaseURL ¶
SetBaseURL setting basic url for API
func (*Client) SetBasicAuthHeader ¶
// DeleteCustomHeader delete custom header
func (cl *Client) DeleteCustomHeader(headerName string) { delete(cl.customHeaders, headerName) }
SetBasicAuthHeader setting basic auth header
func (*Client) SetClientTimeout ¶
SetClientTimeout this method sets globally for client its timeout
func (*Client) SetCustomAuthHeader ¶
SetCustomAuthHeader setting custom auth header with type of auth and auth data
func (*Client) SetCustomHeader ¶
SetCustomHeader setting custom header
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) ProtoMessage ¶
func (*PBase) ProtoMessage()
func (*PBase) ProtoReflect ¶
func (x *PBase) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.