base

package
v0.0.0-...-0aae09f Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 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 BaseClient

type BaseClient struct {
	BaseURL *url.URL
	Client  *http.Client
	// Reuse a single struct instead of allocating one for each service on the heap.
	Common Service
}

func (*BaseClient) Do

func (c *BaseClient) Do(ctx context.Context, req *http.Request, v interface{}) (*http.Response, error)

Do sends an API request and returns the API response

func (*BaseClient) NewRequest

func (c *BaseClient) NewRequest(method, urlStr string, opt interface{}, body interface{}) (*http.Request, error)

type Service

type Service struct {
	Client *BaseClient
}

Jump to

Keyboard shortcuts

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