rest

package
v0.1.28811 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 12 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 {
	BaseURL *url.URL
	// contains filtered or unexported fields
}

func New

func New(baseURL *url.URL, token string, httpClient *http.Client) *Client

func NewFromConfig added in v0.1.24705

func NewFromConfig(host string, config *settings.Config) *Client

func (*Client) DoRequest

func (c *Client) DoRequest(req *http.Request, resp interface{}) (int, error)

func (*Client) NewRequest

func (c *Client) NewRequest(method string, u *url.URL, payload interface{}) (req *http.Request, err error)

type HTTPError

type HTTPError struct {
	Code    int
	Message string
}

func (*HTTPError) Error

func (e *HTTPError) Error() string

Jump to

Keyboard shortcuts

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