Documentation
¶
Index ¶
- type AuthManager
- func (_mock *AuthManager) CreateNewPair(ctx context.Context, user models.User) (*auth.TokenPair, error)
- func (_m *AuthManager) EXPECT() *AuthManager_Expecter
- func (_mock *AuthManager) Parse(tokenStr string) (*auth.Claims, error)
- func (_mock *AuthManager) Refresh(ctx context.Context, refreshToken string) (*auth.TokenPair, error)
- func (_mock *AuthManager) RevokeAllUserTokens(ctx context.Context, userID uuid.UUID) error
- type AuthManager_CreateNewPair_Call
- func (_c *AuthManager_CreateNewPair_Call) Return(tokenPair *auth.TokenPair, err error) *AuthManager_CreateNewPair_Call
- func (_c *AuthManager_CreateNewPair_Call) Run(run func(ctx context.Context, user models.User)) *AuthManager_CreateNewPair_Call
- func (_c *AuthManager_CreateNewPair_Call) RunAndReturn(run func(ctx context.Context, user models.User) (*auth.TokenPair, error)) *AuthManager_CreateNewPair_Call
- type AuthManager_Expecter
- func (_e *AuthManager_Expecter) CreateNewPair(ctx interface{}, user interface{}) *AuthManager_CreateNewPair_Call
- func (_e *AuthManager_Expecter) Parse(tokenStr interface{}) *AuthManager_Parse_Call
- func (_e *AuthManager_Expecter) Refresh(ctx interface{}, refreshToken interface{}) *AuthManager_Refresh_Call
- func (_e *AuthManager_Expecter) RevokeAllUserTokens(ctx interface{}, userID interface{}) *AuthManager_RevokeAllUserTokens_Call
- type AuthManager_Parse_Call
- func (_c *AuthManager_Parse_Call) Return(claims *auth.Claims, err error) *AuthManager_Parse_Call
- func (_c *AuthManager_Parse_Call) Run(run func(tokenStr string)) *AuthManager_Parse_Call
- func (_c *AuthManager_Parse_Call) RunAndReturn(run func(tokenStr string) (*auth.Claims, error)) *AuthManager_Parse_Call
- type AuthManager_Refresh_Call
- func (_c *AuthManager_Refresh_Call) Return(tokenPair *auth.TokenPair, err error) *AuthManager_Refresh_Call
- func (_c *AuthManager_Refresh_Call) Run(run func(ctx context.Context, refreshToken string)) *AuthManager_Refresh_Call
- func (_c *AuthManager_Refresh_Call) RunAndReturn(run func(ctx context.Context, refreshToken string) (*auth.TokenPair, error)) *AuthManager_Refresh_Call
- type AuthManager_RevokeAllUserTokens_Call
- func (_c *AuthManager_RevokeAllUserTokens_Call) Return(err error) *AuthManager_RevokeAllUserTokens_Call
- func (_c *AuthManager_RevokeAllUserTokens_Call) Run(run func(ctx context.Context, userID uuid.UUID)) *AuthManager_RevokeAllUserTokens_Call
- func (_c *AuthManager_RevokeAllUserTokens_Call) RunAndReturn(run func(ctx context.Context, userID uuid.UUID) error) *AuthManager_RevokeAllUserTokens_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthManager ¶
AuthManager is an autogenerated mock type for the AuthManager type
func NewAuthManager ¶
func NewAuthManager(t interface {
mock.TestingT
Cleanup(func())
}) *AuthManager
NewAuthManager creates a new instance of AuthManager. 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 (*AuthManager) CreateNewPair ¶
func (_mock *AuthManager) CreateNewPair(ctx context.Context, user models.User) (*auth.TokenPair, error)
CreateNewPair provides a mock function for the type AuthManager
func (*AuthManager) EXPECT ¶
func (_m *AuthManager) EXPECT() *AuthManager_Expecter
func (*AuthManager) Parse ¶
func (_mock *AuthManager) Parse(tokenStr string) (*auth.Claims, error)
Parse provides a mock function for the type AuthManager
func (*AuthManager) Refresh ¶
func (_mock *AuthManager) Refresh(ctx context.Context, refreshToken string) (*auth.TokenPair, error)
Refresh provides a mock function for the type AuthManager
func (*AuthManager) RevokeAllUserTokens ¶
RevokeAllUserTokens provides a mock function for the type AuthManager
type AuthManager_CreateNewPair_Call ¶
AuthManager_CreateNewPair_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateNewPair'
func (*AuthManager_CreateNewPair_Call) Return ¶
func (_c *AuthManager_CreateNewPair_Call) Return(tokenPair *auth.TokenPair, err error) *AuthManager_CreateNewPair_Call
func (*AuthManager_CreateNewPair_Call) Run ¶
func (_c *AuthManager_CreateNewPair_Call) Run(run func(ctx context.Context, user models.User)) *AuthManager_CreateNewPair_Call
func (*AuthManager_CreateNewPair_Call) RunAndReturn ¶
func (_c *AuthManager_CreateNewPair_Call) RunAndReturn(run func(ctx context.Context, user models.User) (*auth.TokenPair, error)) *AuthManager_CreateNewPair_Call
type AuthManager_Expecter ¶
type AuthManager_Expecter struct {
// contains filtered or unexported fields
}
func (*AuthManager_Expecter) CreateNewPair ¶
func (_e *AuthManager_Expecter) CreateNewPair(ctx interface{}, user interface{}) *AuthManager_CreateNewPair_Call
CreateNewPair is a helper method to define mock.On call
- ctx context.Context
- user models.User
func (*AuthManager_Expecter) Parse ¶
func (_e *AuthManager_Expecter) Parse(tokenStr interface{}) *AuthManager_Parse_Call
Parse is a helper method to define mock.On call
- tokenStr string
func (*AuthManager_Expecter) Refresh ¶
func (_e *AuthManager_Expecter) Refresh(ctx interface{}, refreshToken interface{}) *AuthManager_Refresh_Call
Refresh is a helper method to define mock.On call
- ctx context.Context
- refreshToken string
func (*AuthManager_Expecter) RevokeAllUserTokens ¶
func (_e *AuthManager_Expecter) RevokeAllUserTokens(ctx interface{}, userID interface{}) *AuthManager_RevokeAllUserTokens_Call
RevokeAllUserTokens is a helper method to define mock.On call
- ctx context.Context
- userID uuid.UUID
type AuthManager_Parse_Call ¶
AuthManager_Parse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Parse'
func (*AuthManager_Parse_Call) Return ¶
func (_c *AuthManager_Parse_Call) Return(claims *auth.Claims, err error) *AuthManager_Parse_Call
func (*AuthManager_Parse_Call) Run ¶
func (_c *AuthManager_Parse_Call) Run(run func(tokenStr string)) *AuthManager_Parse_Call
func (*AuthManager_Parse_Call) RunAndReturn ¶
func (_c *AuthManager_Parse_Call) RunAndReturn(run func(tokenStr string) (*auth.Claims, error)) *AuthManager_Parse_Call
type AuthManager_Refresh_Call ¶
AuthManager_Refresh_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Refresh'
func (*AuthManager_Refresh_Call) Return ¶
func (_c *AuthManager_Refresh_Call) Return(tokenPair *auth.TokenPair, err error) *AuthManager_Refresh_Call
func (*AuthManager_Refresh_Call) Run ¶
func (_c *AuthManager_Refresh_Call) Run(run func(ctx context.Context, refreshToken string)) *AuthManager_Refresh_Call
func (*AuthManager_Refresh_Call) RunAndReturn ¶
func (_c *AuthManager_Refresh_Call) RunAndReturn(run func(ctx context.Context, refreshToken string) (*auth.TokenPair, error)) *AuthManager_Refresh_Call
type AuthManager_RevokeAllUserTokens_Call ¶
AuthManager_RevokeAllUserTokens_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RevokeAllUserTokens'
func (*AuthManager_RevokeAllUserTokens_Call) Return ¶
func (_c *AuthManager_RevokeAllUserTokens_Call) Return(err error) *AuthManager_RevokeAllUserTokens_Call
func (*AuthManager_RevokeAllUserTokens_Call) Run ¶
func (_c *AuthManager_RevokeAllUserTokens_Call) Run(run func(ctx context.Context, userID uuid.UUID)) *AuthManager_RevokeAllUserTokens_Call
func (*AuthManager_RevokeAllUserTokens_Call) RunAndReturn ¶
func (_c *AuthManager_RevokeAllUserTokens_Call) RunAndReturn(run func(ctx context.Context, userID uuid.UUID) error) *AuthManager_RevokeAllUserTokens_Call