api

package
v1.2.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultUserAgent string

Functions

This section is empty.

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 Config) (Client, error)

type Config

type Config struct {
	Address string   `json:"address,omitempty"`
	OAuth2  *OAuth2  `json:"oauth2,omitempty"`
	Manager *Manager `json:"manager,omitempty"`
}

func DefaultConfig

func DefaultConfig() (*Config, error)

func NewConfig added in v1.2.2

func NewConfig(v *viper.Viper) (*Config, error)

type Manager added in v1.2.2

type Manager struct {
	Environment []ManagerEnvVar `json:"env,omitempty"`
}

type ManagerEnvVar added in v1.2.2

type ManagerEnvVar struct {
	Name  string `json:"name" mapstructure:"name"`
	Value string `json:"value" mapstructure:"value"`
}

type OAuth2

type OAuth2 struct {
	ClientID     string `json:"client_id,omitempty"`
	ClientSecret string `json:"client_secret,omitempty"`
	TokenURL     string `json:"token_url,omitempty"`

	Token string `json:"token,omitempty"`
}

Directories

Path Synopsis
redsky

Jump to

Keyboard shortcuts

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