client

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package client provides utilities to make client calls to the Hexya server. This is mainly useful for tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hexya

type Hexya struct {
	http.Client
	Url string
}

Hexya wraps a http.Client

func NewHexyaClient

func NewHexyaClient(url string) *Hexya

NewHexyaClient returns a new Hexya Client to make requests from.

func (*Hexya) Login

func (hc *Hexya) Login(username, password string) error

Login to the Hexya server with the given username and password

func (*Hexya) RPC

func (hc *Hexya) RPC(uri, method string, params interface{}) (json.RawMessage, error)

RPC executes a RPC call to the given method on the given URI with the given params. params must be json serializable. Returned value is the result message.

Jump to

Keyboard shortcuts

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