api

package
Version: v0.0.0-...-86f6781 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

type NewClientConfig

type NewClientConfig struct {
	// Requests to the Vercel API must provide an API token.
	// You can get one here: https://vercel.com/account/tokens
	Token string

	// Optionally set a userAgent that is sent with every request.
	// Defaults to `chronark/vercel-go`
	UserAgent string

	// Use a custom HTTPClient.
	// This is mainly used for testing
	// Omit to use the default `net/http` implementation
	HTTPClient HTTPClient
}

type VercelClient

type VercelClient interface {
	Call(method string, path string, requestBody interface{}, responseTarget interface{}) error
}

func New

func New(config NewClientConfig) VercelClient

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