Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( UsernameMinLength = 2 PasswordMinLength = 6 )
View Source
var ( ErrBadCredentials = errors.New("email or password wrong combination") ErrNotFound = errors.New("not found") ErrValidation = errors.New("validation error") )
View Source
var ( ErrUsernameTaken = errors.New("username taken") ErrEmailTaken = errors.New("email taken") )
Functions ¶
This section is empty.
Types ¶
type AuthResponse ¶
type AuthService ¶
type AuthService interface { Register(ctx context.Context, input RegisterInput) (AuthResponse, error) Login(ctx context.Context, input LoginInput) (AuthResponse, error) }
type LoginInput ¶
func (*LoginInput) Sanitize ¶
func (in *LoginInput) Sanitize()
Sanitize will update the RegisterInput so we need pointer
func (LoginInput) Validate ¶
func (in LoginInput) Validate() error
Validate no need to change RegisterInput so we do not need pointer
type RegisterInput ¶
func (*RegisterInput) Sanitize ¶
func (in *RegisterInput) Sanitize()
Sanitize will update the RegisterInput so we need pointer
func (RegisterInput) Validate ¶
func (in RegisterInput) Validate() error
Validate no need to change RegisterInput so we do not need pointer
Click to show internal directories.
Click to hide internal directories.