clientcredtokenprovider

package
v0.4.42 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientCredentialsTokenProvider

type ClientCredentialsTokenProvider struct {
	// contains filtered or unexported fields
}

Caches the access token on the struct. Retrieves a new one once it has expired, within the token exp buffer limit

func New

func New(tokenurl, clientId, clientSecret string, tokenExpirationBuffer time.Duration, logger *slog.Logger) *ClientCredentialsTokenProvider

func (*ClientCredentialsTokenProvider) GetToken

Returns an always valid access token

type MocktokenProvider

type MocktokenProvider struct {
	mock.Mock
}

MocktokenProvider is an autogenerated mock type for the tokenProvider type

func NewMocktokenProvider

func NewMocktokenProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *MocktokenProvider

NewMocktokenProvider creates a new instance of MocktokenProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MocktokenProvider) EXPECT

func (*MocktokenProvider) GetToken

GetToken provides a mock function with given fields: _a0

type MocktokenProvider_Expecter

type MocktokenProvider_Expecter struct {
	// contains filtered or unexported fields
}

func (*MocktokenProvider_Expecter) GetToken

func (_e *MocktokenProvider_Expecter) GetToken(_a0 interface{}) *MocktokenProvider_GetToken_Call

GetToken is a helper method to define mock.On call

  • _a0 context.Context

type MocktokenProvider_GetToken_Call

type MocktokenProvider_GetToken_Call struct {
	*mock.Call
}

MocktokenProvider_GetToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetToken'

func (*MocktokenProvider_GetToken_Call) Return

func (*MocktokenProvider_GetToken_Call) Run

func (*MocktokenProvider_GetToken_Call) RunAndReturn

Jump to

Keyboard shortcuts

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