Documentation ¶
Index ¶
- type ProviderMock
- func (_m *ProviderMock) EXPECT() *ProviderMock_Expecter
- func (_m *ProviderMock) ExchangeCodeToToken(ctx context.Context, code string, redirectUrl string) (*oauth2.Token, error)
- func (_m *ProviderMock) GetConsentPageUrl(redirectUrl string) (string, string)
- func (_m *ProviderMock) GetUserInfo(ctx context.Context, token *oauth2.Token) (oauth.UserInfo, error)
- type ProviderMock_ExchangeCodeToToken_Call
- func (_c *ProviderMock_ExchangeCodeToToken_Call) Return(_a0 *oauth2.Token, _a1 error) *ProviderMock_ExchangeCodeToToken_Call
- func (_c *ProviderMock_ExchangeCodeToToken_Call) Run(run func(ctx context.Context, code string, redirectUrl string)) *ProviderMock_ExchangeCodeToToken_Call
- func (_c *ProviderMock_ExchangeCodeToToken_Call) RunAndReturn(run func(context.Context, string, string) (*oauth2.Token, error)) *ProviderMock_ExchangeCodeToToken_Call
- type ProviderMock_Expecter
- func (_e *ProviderMock_Expecter) ExchangeCodeToToken(ctx interface{}, code interface{}, redirectUrl interface{}) *ProviderMock_ExchangeCodeToToken_Call
- func (_e *ProviderMock_Expecter) GetConsentPageUrl(redirectUrl interface{}) *ProviderMock_GetConsentPageUrl_Call
- func (_e *ProviderMock_Expecter) GetUserInfo(ctx interface{}, token interface{}) *ProviderMock_GetUserInfo_Call
- type ProviderMock_GetConsentPageUrl_Call
- func (_c *ProviderMock_GetConsentPageUrl_Call) Return(_a0 string, _a1 string) *ProviderMock_GetConsentPageUrl_Call
- func (_c *ProviderMock_GetConsentPageUrl_Call) Run(run func(redirectUrl string)) *ProviderMock_GetConsentPageUrl_Call
- func (_c *ProviderMock_GetConsentPageUrl_Call) RunAndReturn(run func(string) (string, string)) *ProviderMock_GetConsentPageUrl_Call
- type ProviderMock_GetUserInfo_Call
- func (_c *ProviderMock_GetUserInfo_Call) Return(_a0 oauth.UserInfo, _a1 error) *ProviderMock_GetUserInfo_Call
- func (_c *ProviderMock_GetUserInfo_Call) Run(run func(ctx context.Context, token *oauth2.Token)) *ProviderMock_GetUserInfo_Call
- func (_c *ProviderMock_GetUserInfo_Call) RunAndReturn(run func(context.Context, *oauth2.Token) (oauth.UserInfo, error)) *ProviderMock_GetUserInfo_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProviderMock ¶
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 ¶
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 (_c *ProviderMock_ExchangeCodeToToken_Call) Return(_a0 *oauth2.Token, _a1 error) *ProviderMock_ExchangeCodeToToken_Call
func (*ProviderMock_ExchangeCodeToToken_Call) Run ¶
func (_c *ProviderMock_ExchangeCodeToToken_Call) Run(run func(ctx context.Context, code string, redirectUrl string)) *ProviderMock_ExchangeCodeToToken_Call
func (*ProviderMock_ExchangeCodeToToken_Call) RunAndReturn ¶
func (_c *ProviderMock_ExchangeCodeToToken_Call) RunAndReturn(run func(context.Context, string, string) (*oauth2.Token, error)) *ProviderMock_ExchangeCodeToToken_Call
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 ¶
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 (_c *ProviderMock_GetConsentPageUrl_Call) Return(_a0 string, _a1 string) *ProviderMock_GetConsentPageUrl_Call
func (*ProviderMock_GetConsentPageUrl_Call) Run ¶
func (_c *ProviderMock_GetConsentPageUrl_Call) Run(run func(redirectUrl string)) *ProviderMock_GetConsentPageUrl_Call
func (*ProviderMock_GetConsentPageUrl_Call) RunAndReturn ¶
func (_c *ProviderMock_GetConsentPageUrl_Call) RunAndReturn(run func(string) (string, string)) *ProviderMock_GetConsentPageUrl_Call
type ProviderMock_GetUserInfo_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 (_c *ProviderMock_GetUserInfo_Call) Return(_a0 oauth.UserInfo, _a1 error) *ProviderMock_GetUserInfo_Call
func (*ProviderMock_GetUserInfo_Call) Run ¶
func (_c *ProviderMock_GetUserInfo_Call) Run(run func(ctx context.Context, token *oauth2.Token)) *ProviderMock_GetUserInfo_Call
func (*ProviderMock_GetUserInfo_Call) RunAndReturn ¶
func (_c *ProviderMock_GetUserInfo_Call) RunAndReturn(run func(context.Context, *oauth2.Token) (oauth.UserInfo, error)) *ProviderMock_GetUserInfo_Call