httpapi

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

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

func New

func New(params *Params) *APIClient

func (APIClient) Call

func (r APIClient) Call(
	ctx context.Context, params *CallParams,
) error

func (APIClient) Get

func (r APIClient) Get(ctx context.Context, params *RequestParams) (json.RawMessage, error)

type CallParams

type CallParams struct {
	Module  string
	Action  string
	Request interface{}
	Result  interface{}
}

type Params

type Params struct {
	APIKey  string
	BaseURL *url.URL
	HTTP    *http.Client
}

Params are construction parameters for the API client.

type RequestParams

type RequestParams struct {
	Module string
	Action string
	Other  map[string]string
}

Jump to

Keyboard shortcuts

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