api

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 14 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"`
}

func DefaultConfig

func DefaultConfig() (*Config, error)

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