Documentation
¶
Overview ¶
Package auth is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockService ¶
type MockService struct {
// contains filtered or unexported fields
}
MockService is a mock of Service interface.
func NewMockService ¶
func NewMockService(ctrl *gomock.Controller) *MockService
NewMockService creates a new mock instance.
func (*MockService) EXPECT ¶
func (m *MockService) EXPECT() *MockServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockService) GenerateToken ¶
func (m *MockService) GenerateToken(userID uint) (string, error)
GenerateToken mocks base method.
func (*MockService) ValidateToken ¶
func (m *MockService) ValidateToken(token string) (*jwt.Token, error)
ValidateToken mocks base method.
type MockServiceMockRecorder ¶
type MockServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockServiceMockRecorder is the mock recorder for MockService.
func (*MockServiceMockRecorder) GenerateToken ¶
func (mr *MockServiceMockRecorder) GenerateToken(userID interface{}) *gomock.Call
GenerateToken indicates an expected call of GenerateToken.
func (*MockServiceMockRecorder) ValidateToken ¶
func (mr *MockServiceMockRecorder) ValidateToken(token interface{}) *gomock.Call
ValidateToken indicates an expected call of ValidateToken.
type Service ¶
type Service interface { GenerateToken(userID uint) (string, error) ValidateToken(token string) (*jwt.Token, error) }
Service represents an auth service. It provides methods to auth token generation and validation etc.
func NewService ¶
func NewService(tokenConfig TokenConfig) Service
NewService creates and returns a new auth service.
type TokenConfig ¶
TokenConfig fields will be used to generate & parse the JWT token.