mock

package
v0.0.0-rc8 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProviderMock

type ProviderMock struct {
	mock.Mock
}

ProviderMock is an autogenerated mock type for the Provider type

func NewProviderMock

func NewProviderMock(t interface {
	mock.TestingT
	Cleanup(func())
}) *ProviderMock

NewProviderMock creates a new instance of ProviderMock. 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 (*ProviderMock) EXPECT

func (_m *ProviderMock) EXPECT() *ProviderMock_Expecter

func (*ProviderMock) ExchangeCodeToToken

func (_m *ProviderMock) ExchangeCodeToToken(ctx context.Context, code string, redirectUrl string) (*oauth2.Token, error)

ExchangeCodeToToken provides a mock function with given fields: ctx, code, redirectUrl

func (*ProviderMock) GetConsentPageUrl

func (_m *ProviderMock) GetConsentPageUrl(redirectUrl string) (string, string)

GetConsentPageUrl provides a mock function with given fields: redirectUrl

func (*ProviderMock) GetUserInfo

func (_m *ProviderMock) GetUserInfo(ctx context.Context, token *oauth2.Token) (oauth.UserInfo, error)

GetUserInfo provides a mock function with given fields: ctx, token

type ProviderMock_ExchangeCodeToToken_Call

type ProviderMock_ExchangeCodeToToken_Call struct {
	*mock.Call
}

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

func (*ProviderMock_ExchangeCodeToToken_Call) Return

func (*ProviderMock_ExchangeCodeToToken_Call) Run

func (*ProviderMock_ExchangeCodeToToken_Call) RunAndReturn

type ProviderMock_Expecter

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

func (*ProviderMock_Expecter) ExchangeCodeToToken

func (_e *ProviderMock_Expecter) ExchangeCodeToToken(ctx interface{}, code interface{}, redirectUrl interface{}) *ProviderMock_ExchangeCodeToToken_Call

ExchangeCodeToToken is a helper method to define mock.On call

  • ctx context.Context
  • code string
  • redirectUrl string

func (*ProviderMock_Expecter) GetConsentPageUrl

func (_e *ProviderMock_Expecter) GetConsentPageUrl(redirectUrl interface{}) *ProviderMock_GetConsentPageUrl_Call

GetConsentPageUrl is a helper method to define mock.On call

  • redirectUrl string

func (*ProviderMock_Expecter) GetUserInfo

func (_e *ProviderMock_Expecter) GetUserInfo(ctx interface{}, token interface{}) *ProviderMock_GetUserInfo_Call

GetUserInfo is a helper method to define mock.On call

  • ctx context.Context
  • token *oauth2.Token

type ProviderMock_GetConsentPageUrl_Call

type ProviderMock_GetConsentPageUrl_Call struct {
	*mock.Call
}

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

func (*ProviderMock_GetConsentPageUrl_Call) Return

func (*ProviderMock_GetConsentPageUrl_Call) Run

func (*ProviderMock_GetConsentPageUrl_Call) RunAndReturn

type ProviderMock_GetUserInfo_Call

type ProviderMock_GetUserInfo_Call struct {
	*mock.Call
}

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

func (*ProviderMock_GetUserInfo_Call) Return

func (*ProviderMock_GetUserInfo_Call) Run

func (*ProviderMock_GetUserInfo_Call) RunAndReturn

Jump to

Keyboard shortcuts

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