client

package
v0.0.0-...-78e7222 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2019 License: AGPL-3.0 Imports: 3 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 interface {
	Post(request *Request) (*Response, error)
	JsonRpcRequest(method string, request, response interface{}) error
	Login(jsonRpcServerAuthenticator.LoginRequest) error
	Logout()
	Claims() claims.Claims
	SetJWT(jwt string) error
	GetJWT() string
	SetURL(url string)
	GetURL() string
	LoggedIn() bool
	RefreshLogin() error
	MaintainLogin() error
}

type Request

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

func NewRequest

func NewRequest(id, method string, params interface{}) Request

type Response

type Response struct {
	Id      string          `json:"id"`
	JsonRpc string          `json:"jsonrpc"`
	Result  json.RawMessage `json:"result"`
	Error   string          `json:"error"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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