Documentation
¶
Index ¶
- type MockAuthenticator
- func (_m *MockAuthenticator) EXPECT() *MockAuthenticator_Expecter
- func (_m *MockAuthenticator) TouchSessionAsync(jti string)
- func (_m *MockAuthenticator) ValidateAPIKey(ctx context.Context, key string) (*ent.User, error)
- func (_m *MockAuthenticator) ValidateSession(ctx context.Context, jti string) error
- func (_m *MockAuthenticator) ValidateToken(token string) (*auth.Claims, error)
- type MockAuthenticator_Expecter
- func (_e *MockAuthenticator_Expecter) TouchSessionAsync(jti interface{}) *MockAuthenticator_TouchSessionAsync_Call
- func (_e *MockAuthenticator_Expecter) ValidateAPIKey(ctx interface{}, key interface{}) *MockAuthenticator_ValidateAPIKey_Call
- func (_e *MockAuthenticator_Expecter) ValidateSession(ctx interface{}, jti interface{}) *MockAuthenticator_ValidateSession_Call
- func (_e *MockAuthenticator_Expecter) ValidateToken(token interface{}) *MockAuthenticator_ValidateToken_Call
- type MockAuthenticator_TouchSessionAsync_Call
- func (_c *MockAuthenticator_TouchSessionAsync_Call) Return() *MockAuthenticator_TouchSessionAsync_Call
- func (_c *MockAuthenticator_TouchSessionAsync_Call) Run(run func(jti string)) *MockAuthenticator_TouchSessionAsync_Call
- func (_c *MockAuthenticator_TouchSessionAsync_Call) RunAndReturn(run func(string)) *MockAuthenticator_TouchSessionAsync_Call
- type MockAuthenticator_ValidateAPIKey_Call
- func (_c *MockAuthenticator_ValidateAPIKey_Call) Return(_a0 *ent.User, _a1 error) *MockAuthenticator_ValidateAPIKey_Call
- func (_c *MockAuthenticator_ValidateAPIKey_Call) Run(run func(ctx context.Context, key string)) *MockAuthenticator_ValidateAPIKey_Call
- func (_c *MockAuthenticator_ValidateAPIKey_Call) RunAndReturn(run func(context.Context, string) (*ent.User, error)) *MockAuthenticator_ValidateAPIKey_Call
- type MockAuthenticator_ValidateSession_Call
- func (_c *MockAuthenticator_ValidateSession_Call) Return(_a0 error) *MockAuthenticator_ValidateSession_Call
- func (_c *MockAuthenticator_ValidateSession_Call) Run(run func(ctx context.Context, jti string)) *MockAuthenticator_ValidateSession_Call
- func (_c *MockAuthenticator_ValidateSession_Call) RunAndReturn(run func(context.Context, string) error) *MockAuthenticator_ValidateSession_Call
- type MockAuthenticator_ValidateToken_Call
- func (_c *MockAuthenticator_ValidateToken_Call) Return(_a0 *auth.Claims, _a1 error) *MockAuthenticator_ValidateToken_Call
- func (_c *MockAuthenticator_ValidateToken_Call) Run(run func(token string)) *MockAuthenticator_ValidateToken_Call
- func (_c *MockAuthenticator_ValidateToken_Call) RunAndReturn(run func(string) (*auth.Claims, error)) *MockAuthenticator_ValidateToken_Call
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) EXPECT ¶
func (_m *MockAuthenticator) EXPECT() *MockAuthenticator_Expecter
func (*MockAuthenticator) TouchSessionAsync ¶
func (_m *MockAuthenticator) TouchSessionAsync(jti string)
TouchSessionAsync provides a mock function with given fields: jti
func (*MockAuthenticator) ValidateAPIKey ¶
ValidateAPIKey provides a mock function with given fields: ctx, key
func (*MockAuthenticator) ValidateSession ¶
func (_m *MockAuthenticator) ValidateSession(ctx context.Context, jti string) error
ValidateSession provides a mock function with given fields: ctx, jti
func (*MockAuthenticator) ValidateToken ¶
func (_m *MockAuthenticator) ValidateToken(token string) (*auth.Claims, error)
ValidateToken provides a mock function with given fields: token
type MockAuthenticator_Expecter ¶
type MockAuthenticator_Expecter struct {
// contains filtered or unexported fields
}
func (*MockAuthenticator_Expecter) TouchSessionAsync ¶
func (_e *MockAuthenticator_Expecter) TouchSessionAsync(jti interface{}) *MockAuthenticator_TouchSessionAsync_Call
TouchSessionAsync is a helper method to define mock.On call
- jti string
func (*MockAuthenticator_Expecter) ValidateAPIKey ¶
func (_e *MockAuthenticator_Expecter) ValidateAPIKey(ctx interface{}, key interface{}) *MockAuthenticator_ValidateAPIKey_Call
ValidateAPIKey is a helper method to define mock.On call
- ctx context.Context
- key string
func (*MockAuthenticator_Expecter) ValidateSession ¶
func (_e *MockAuthenticator_Expecter) ValidateSession(ctx interface{}, jti interface{}) *MockAuthenticator_ValidateSession_Call
ValidateSession is a helper method to define mock.On call
- ctx context.Context
- jti string
func (*MockAuthenticator_Expecter) ValidateToken ¶
func (_e *MockAuthenticator_Expecter) ValidateToken(token interface{}) *MockAuthenticator_ValidateToken_Call
ValidateToken is a helper method to define mock.On call
- token string
type MockAuthenticator_TouchSessionAsync_Call ¶
MockAuthenticator_TouchSessionAsync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TouchSessionAsync'
func (*MockAuthenticator_TouchSessionAsync_Call) Return ¶
func (_c *MockAuthenticator_TouchSessionAsync_Call) Return() *MockAuthenticator_TouchSessionAsync_Call
func (*MockAuthenticator_TouchSessionAsync_Call) Run ¶
func (_c *MockAuthenticator_TouchSessionAsync_Call) Run(run func(jti string)) *MockAuthenticator_TouchSessionAsync_Call
func (*MockAuthenticator_TouchSessionAsync_Call) RunAndReturn ¶
func (_c *MockAuthenticator_TouchSessionAsync_Call) RunAndReturn(run func(string)) *MockAuthenticator_TouchSessionAsync_Call
type MockAuthenticator_ValidateAPIKey_Call ¶
MockAuthenticator_ValidateAPIKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateAPIKey'
func (*MockAuthenticator_ValidateAPIKey_Call) Return ¶
func (_c *MockAuthenticator_ValidateAPIKey_Call) Return(_a0 *ent.User, _a1 error) *MockAuthenticator_ValidateAPIKey_Call
func (*MockAuthenticator_ValidateAPIKey_Call) Run ¶
func (_c *MockAuthenticator_ValidateAPIKey_Call) Run(run func(ctx context.Context, key string)) *MockAuthenticator_ValidateAPIKey_Call
func (*MockAuthenticator_ValidateAPIKey_Call) RunAndReturn ¶
func (_c *MockAuthenticator_ValidateAPIKey_Call) RunAndReturn(run func(context.Context, string) (*ent.User, error)) *MockAuthenticator_ValidateAPIKey_Call
type MockAuthenticator_ValidateSession_Call ¶
MockAuthenticator_ValidateSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateSession'
func (*MockAuthenticator_ValidateSession_Call) Return ¶
func (_c *MockAuthenticator_ValidateSession_Call) Return(_a0 error) *MockAuthenticator_ValidateSession_Call
func (*MockAuthenticator_ValidateSession_Call) Run ¶
func (_c *MockAuthenticator_ValidateSession_Call) Run(run func(ctx context.Context, jti string)) *MockAuthenticator_ValidateSession_Call
func (*MockAuthenticator_ValidateSession_Call) RunAndReturn ¶
func (_c *MockAuthenticator_ValidateSession_Call) RunAndReturn(run func(context.Context, string) error) *MockAuthenticator_ValidateSession_Call
type MockAuthenticator_ValidateToken_Call ¶
MockAuthenticator_ValidateToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateToken'
func (*MockAuthenticator_ValidateToken_Call) Return ¶
func (_c *MockAuthenticator_ValidateToken_Call) Return(_a0 *auth.Claims, _a1 error) *MockAuthenticator_ValidateToken_Call
func (*MockAuthenticator_ValidateToken_Call) Run ¶
func (_c *MockAuthenticator_ValidateToken_Call) Run(run func(token string)) *MockAuthenticator_ValidateToken_Call
func (*MockAuthenticator_ValidateToken_Call) RunAndReturn ¶
func (_c *MockAuthenticator_ValidateToken_Call) RunAndReturn(run func(string) (*auth.Claims, error)) *MockAuthenticator_ValidateToken_Call