client

package
v0.0.0-...-27f64c7 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2019 License: MIT Imports: 7 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 {
	Call(Request, Object) error
}

func NewClient

func NewClient(host string) (Client, error)

NewClient creates a new Client object with the given parameters.

type Error

type Error struct {
	Code    ErrorCode `json:"code"`
	Message string    `json:"message"`
}

func (Error) Error

func (e Error) Error() string

type ErrorCode

type ErrorCode int

type ErrorCodeMapper

type ErrorCodeMapper func(errCode ErrorCode) string

type Object

type Object interface {
}

type Request

type Request struct {
	CGIPath         string
	APIName         string
	Version         int
	Method          string
	Params          RequestParams
	ErrorCodeMapper ErrorCodeMapper
}

func NewRequest

func NewRequest(cgiPath, apiName string, version int, method string, params RequestParams, errorCodeMapper ErrorCodeMapper) Request

type RequestParams

type RequestParams map[string]string

Jump to

Keyboard shortcuts

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