client

package
v1.0.0-alpha-40 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2020 License: MIT Imports: 9 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 {
	// contains filtered or unexported fields
}

Client is a client for the oauth library

func NewClient

func NewClient(id, secret string, opts ...Option) *Client

NewClient returns a new oauth client, the defaults are primarily for testing purposes

func (*Client) Token

func (c *Client) Token(scope oauth.Permissions, audience string) (*oauth.BearerToken, error)

Token returns a client credentials token

type Option

type Option func(*Client)

Option is a client option method used to set proprties of the oauth client

func WithBasePath

func WithBasePath(basePath string) Option

WithBasePath sets the client basepath

func WithClient

func WithClient(h *http.Client) Option

WithClient sets the http client for the carmack api client

func WithHost

func WithHost(host string) Option

WithHost sets the host address

func WithScheme

func WithScheme(scheme string) Option

WithScheme sets the client scheme

Jump to

Keyboard shortcuts

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