api

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultUserAgent string

Functions

func ConfigureOAuth2 added in v1.2.3

func ConfigureOAuth2(cfg *viper.Viper, ctx context.Context, transport http.RoundTripper) (http.RoundTripper, error)

ConfigureOAuth2 checks the supplied to configuration to see if the (possibly nil) transport needs to be wrapped to perform authentication. The context is used for token management if necessary.

func DefaultConfig

func DefaultConfig() (*viper.Viper, error)

func GetAddress added in v1.2.3

func GetAddress(cfg *viper.Viper) (*url.URL, error)

GetAddress returns the URL representation of the address configuration parameter

Types

type Client

type Client interface {
	URL(endpoint string) *url.URL
	Do(context.Context, *http.Request) (*http.Response, []byte, error)
}

func NewClient

func NewClient(cfg *viper.Viper, ctx context.Context, transport http.RoundTripper) (Client, error)

Directories

Path Synopsis
redsky

Jump to

Keyboard shortcuts

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