Documentation
¶
Index ¶
- type MockAuthenticator
- type MockAuthenticator_AuthenticateToken_Call
- func (_c *MockAuthenticator_AuthenticateToken_Call) Return(principal auth.Principal, err error) *MockAuthenticator_AuthenticateToken_Call
- func (_c *MockAuthenticator_AuthenticateToken_Call) Run(run func(ctx context.Context, token string)) *MockAuthenticator_AuthenticateToken_Call
- func (_c *MockAuthenticator_AuthenticateToken_Call) RunAndReturn(run func(ctx context.Context, token string) (auth.Principal, error)) *MockAuthenticator_AuthenticateToken_Call
- type MockAuthenticator_Authenticate_Call
- func (_c *MockAuthenticator_Authenticate_Call) Return(principal auth.Principal, err error) *MockAuthenticator_Authenticate_Call
- func (_c *MockAuthenticator_Authenticate_Call) Run(run func(ctx context.Context, token string)) *MockAuthenticator_Authenticate_Call
- func (_c *MockAuthenticator_Authenticate_Call) RunAndReturn(run func(ctx context.Context, token string) (auth.Principal, error)) *MockAuthenticator_Authenticate_Call
- type MockAuthenticator_Expecter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockAuthenticator ¶
MockAuthenticator is an autogenerated mock type for the Authenticator type
func NewMockAuthenticator ¶
func NewMockAuthenticator(t interface {
mock.TestingT
Cleanup(func())
}) *MockAuthenticator
NewMockAuthenticator creates a new instance of MockAuthenticator. 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 (*MockAuthenticator) Authenticate ¶
func (_mock *MockAuthenticator) Authenticate(ctx context.Context, token string) (auth.Principal, error)
Authenticate provides a mock function for the type MockAuthenticator
func (*MockAuthenticator) AuthenticateToken ¶
func (_mock *MockAuthenticator) AuthenticateToken(ctx context.Context, token string) (auth.Principal, error)
AuthenticateToken provides a mock function for the type MockAuthenticator
func (*MockAuthenticator) EXPECT ¶
func (_m *MockAuthenticator) EXPECT() *MockAuthenticator_Expecter
type MockAuthenticator_AuthenticateToken_Call ¶
MockAuthenticator_AuthenticateToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AuthenticateToken'
func (*MockAuthenticator_AuthenticateToken_Call) Return ¶
func (_c *MockAuthenticator_AuthenticateToken_Call) Return(principal auth.Principal, err error) *MockAuthenticator_AuthenticateToken_Call
func (*MockAuthenticator_AuthenticateToken_Call) Run ¶
func (_c *MockAuthenticator_AuthenticateToken_Call) Run(run func(ctx context.Context, token string)) *MockAuthenticator_AuthenticateToken_Call
func (*MockAuthenticator_AuthenticateToken_Call) RunAndReturn ¶
func (_c *MockAuthenticator_AuthenticateToken_Call) RunAndReturn(run func(ctx context.Context, token string) (auth.Principal, error)) *MockAuthenticator_AuthenticateToken_Call
type MockAuthenticator_Authenticate_Call ¶
MockAuthenticator_Authenticate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Authenticate'
func (*MockAuthenticator_Authenticate_Call) Return ¶
func (_c *MockAuthenticator_Authenticate_Call) Return(principal auth.Principal, err error) *MockAuthenticator_Authenticate_Call
func (*MockAuthenticator_Authenticate_Call) Run ¶
func (_c *MockAuthenticator_Authenticate_Call) Run(run func(ctx context.Context, token string)) *MockAuthenticator_Authenticate_Call
func (*MockAuthenticator_Authenticate_Call) RunAndReturn ¶
func (_c *MockAuthenticator_Authenticate_Call) RunAndReturn(run func(ctx context.Context, token string) (auth.Principal, error)) *MockAuthenticator_Authenticate_Call
type MockAuthenticator_Expecter ¶
type MockAuthenticator_Expecter struct {
// contains filtered or unexported fields
}
func (*MockAuthenticator_Expecter) Authenticate ¶
func (_e *MockAuthenticator_Expecter) Authenticate(ctx any, token any) *MockAuthenticator_Authenticate_Call
Authenticate is a helper method to define mock.On call
- ctx context.Context
- token string
func (*MockAuthenticator_Expecter) AuthenticateToken ¶
func (_e *MockAuthenticator_Expecter) AuthenticateToken(ctx any, token any) *MockAuthenticator_AuthenticateToken_Call
AuthenticateToken is a helper method to define mock.On call
- ctx context.Context
- token string