Documentation ¶
Index ¶
Constants ¶
View Source
const SESSION_VALIDITY_IN_DAYS = 60
View Source
const TOKEN_RAND_SIZE = 32
Variables ¶
View Source
var ( UserNotFound = errors.New("User not found") InvalidPassword = errors.New("Invalid password") )
Functions ¶
func GenerateRandomToken ¶
func GenerateRandomToken() []byte
Types ¶
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(db queries.DBTX) UserService
func (*UserService) AuthenticateUserByEmailPassword ¶
func (*UserService) RegisterUser ¶
func (s *UserService) RegisterUser(ctx context.Context, params types.NewUserParams) (*queries.User, error, validate.Errors)
type UserTokenService ¶
type UserTokenService struct {
// contains filtered or unexported fields
}
func NewUserTokenService ¶
func NewUserTokenService(db queries.DBTX) UserTokenService
func (*UserTokenService) GenerateUserSessionToken ¶
func (*UserTokenService) GetUserBySessionToken ¶
Click to show internal directories.
Click to hide internal directories.