Documentation ¶
Index ¶
Constants ¶
View Source
const ( MinFirstNameLength = 2 MinLastNameLength = 2 MinPasswordLength = 7 )
Variables ¶
This section is empty.
Functions ¶
func IsValidPassword ¶
Types ¶
type Booking ¶
type Booking struct { ID primitive.ObjectID `json:"id,omitempty" bson:"_id,omitempty"` UserID primitive.ObjectID `json:"userID,omitempty" bson:"userID,omitempty"` RoomID primitive.ObjectID `json:"roomID,omitempty" bson:"roomID,omitempty"` FromDate time.Time `json:"fromDate,omitempty" bson:"fromDate,omitempty"` TillDate time.Time `json:"tillDate,omitempty" bson:"tillDate,omitempty"` NumPersons int `json:"numPersons,omitempty" bson:"numPersons,omitempty"` Cancelled bool `json:"cancelled" bson:"cancelled"` }
type CreateUserParams ¶
type CreateUserParams struct { FirstName string `json:"firstName" bson:"firstName" ` LastName string `json:"lastName" bson:"lastName"` Email string `json:"email" bson:"email"` Password string `json:"password" bson:"password"` }
func (CreateUserParams) ValidateUsers ¶
func (params CreateUserParams) ValidateUsers() map[string]string
type UpdateUserParams ¶
type User ¶
type User struct { ID primitive.ObjectID `json:"id,omitempty" bson:"_id,omitempty"` FirstName string `json:"firstName" bson:"firstName"` LastName string `json:"lastName" bson:"lastName"` Email string `json:"email" bson:"email"` EncryptedPassword string `json:"-" bson:"EncryptedPassword"` IsAdmin bool `json:"isAdmin" bson:"isAdmin"` }
func NewUserFromParams ¶
func NewUserFromParams(params CreateUserParams) (*User, error)
Click to show internal directories.
Click to hide internal directories.