jsonclient

package
Version: v0.0.0-...-30b4a77 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2016 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package jsonclient contains a JSON-RPC over HTTPS client for Mute.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrCertLoad signals a loading error of the certificate.
	ErrCertLoad = errors.New("jsonclient: certificate load failed")
)

Functions

This section is empty.

Types

type URLClient

type URLClient struct {
	// contains filtered or unexported fields
}

URLClient is a client for JSON-RPC over HTTPS calls.

func New

func New(URL string, cert []byte) (*URLClient, error)

New creates a new JSON-RPC over HTTPS client which uses the given certificate file to communicate with the server if the scheme of the URL is https.

func (*URLClient) JSONRPCRequest

func (c *URLClient) JSONRPCRequest(method string, args interface{}) (map[string]interface{}, error)

JSONRPCRequest calls the given method via JSON-RPC over HTTPS. It supplies the given JSON args to the called method.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL