restclient

package
v0.11.7 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2020 License: Apache-2.0 Imports: 9 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 struct {
	ApiKey string
	// contains filtered or unexported fields
}

func (*Client) Get

func (c *Client) Get(ctx context.Context, path string, v interface{}, expected ...int) (int, error)

func (*Client) Post

func (c *Client) Post(ctx context.Context, path string, body interface{}, v interface{}, expected ...int) (int, error)

type RestClient

type RestClient interface {
	Post(ctx context.Context, path string, body interface{}, v interface{}, expected ...int) (int, error)

	Get(ctx context.Context, path string, v interface{}, expected ...int) (int, error)
}

func New

func New(apiKey string, logger log.Logger) RestClient

Jump to

Keyboard shortcuts

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