test

package
v1.32.2-hotfix.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClientInput

type HTTPClientInput struct {
	Context           context.Context
	TokenSourceSource oauth.TokenSourceSource
}

type HTTPClientOutput

type HTTPClientOutput struct {
	HTTPClient *http.Client
	Error      error
}

type HTTPClientSource

type HTTPClientSource struct {
	HTTPClientInvocations int
	HTTPClientInputs      []HTTPClientInput
	HTTPClientStub        func(ctx context.Context, tokenSourceSource oauth.TokenSourceSource) (*http.Client, error)
	HTTPClientOutputs     []HTTPClientOutput
	HTTPClientOutput      *HTTPClientOutput
}

func NewHTTPClientSource

func NewHTTPClientSource() *HTTPClientSource

func (*HTTPClientSource) AssertOutputsEmpty

func (h *HTTPClientSource) AssertOutputsEmpty()

func (*HTTPClientSource) HTTPClient

func (h *HTTPClientSource) HTTPClient(ctx context.Context, tokenSourceSource oauth.TokenSourceSource) (*http.Client, error)

type RefreshedTokenOutput

type RefreshedTokenOutput struct {
	Token *oauth.Token
	Error error
}

type TokenSource

type TokenSource struct {
	*HTTPClientSource
	RefreshedTokenInvocations int
	RefreshedTokenStub        func() (*oauth.Token, error)
	RefreshedTokenOutputs     []RefreshedTokenOutput
	RefreshedTokenOutput      *RefreshedTokenOutput
	ExpireTokenInvocations    int
	ExpireTokenStub           func()
}

func NewTokenSource

func NewTokenSource() *TokenSource

func (*TokenSource) AssertOutputsEmpty

func (t *TokenSource) AssertOutputsEmpty()

func (*TokenSource) ExpireToken

func (t *TokenSource) ExpireToken()

func (*TokenSource) RefreshedToken

func (t *TokenSource) RefreshedToken() (*oauth.Token, error)

type TokenSourceInput

type TokenSourceInput struct {
	Context context.Context
	Token   *oauth.Token
}

type TokenSourceOutput

type TokenSourceOutput struct {
	TokenSource oauth2.TokenSource
	Error       error
}

type TokenSourceSource

type TokenSourceSource struct {
	TokenSourceInvocations int
	TokenSourceInputs      []TokenSourceInput
	TokenSourceStub        func(ctx context.Context, token *oauth.Token) (oauth2.TokenSource, error)
	TokenSourceOutputs     []TokenSourceOutput
	TokenSourceOutput      *TokenSourceOutput
}

func NewTokenSourceSource

func NewTokenSourceSource() *TokenSourceSource

func (*TokenSourceSource) AssertOutputsEmpty

func (t *TokenSourceSource) AssertOutputsEmpty()

func (*TokenSourceSource) TokenSource

func (t *TokenSourceSource) TokenSource(ctx context.Context, token *oauth.Token) (oauth2.TokenSource, error)

Jump to

Keyboard shortcuts

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