client

package
v0.0.0-...-670b31e Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	APIEndpointURL string

	IDToken      *oidc.IDToken
	AccessToken  string
	RefreshToken string

	GSClientGen *gsclient.Gsclientgen
}

Client is our API client.

func New

func New(endpointURL string) (*Client, error)

New returns a fully conifgured API client and initiates the browser auth flow.

func (*Client) AuthHeaderWriter

func (c *Client) AuthHeaderWriter() (runtime.ClientAuthInfoWriter, error)

AuthHeaderWriter returns a function to write an authentication header.

func (*Client) GetToken

func (c *Client) GetToken() (string, error)

GetToken returns a token to use for the API client's Authorization header. If necessary, refreshes the token.

func (*Client) MustGetToken

func (c *Client) MustGetToken() string

MustGetToken returns a token and only prints errors.

Jump to

Keyboard shortcuts

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