Documentation ¶
Index ¶
Constants ¶
View Source
const ( AccessCookieName = "access-cookie" RefreshCookieName = "refresh-cookie" )
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrInvalidSigningMethod = errors.New("invalid signing method") ErrWrongTokenClaimType = errors.New("wrong token claim type") ErrUniqueViolation = errors.New("this user is already exist") ErrWrongCredentials = errors.New("invalid login or password") ErrNoSession = errors.New("there is no such session") ErrEmptyCookie = errors.New("empty cookie") )
Functions ¶
This section is empty.
Types ¶
type LoginInput ¶
type User ¶
type User struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"id" validate:"omitempty" example:""` Email string `bson:"email" json:"email" validate:"email" example:"admin@example.com"` Password string `bson:"password" json:"password" validate:"min=8" example:"password12345"` FirstName string `bson:"first_name" json:"first_name" validate:"omitempty" example:"Alex"` LastName string `bson:"last_name" json:"last_name" validate:"omitempty" example:"Johnson"` }
Click to show internal directories.
Click to hide internal directories.