Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidPassword ¶
Types ¶
type Booking ¶
type Booking struct { ID string `bson:"_id,omitempty" json:"id,omitempty"` UserID string `bson:"userID,omitempty" json:"userID,omitempty"` RoomID string `bson:"roomID,omitempty" json:"roomID,omitempty"` NumPersons int `bson:"numPersons,omitempty" json:"numPersons,omitempty"` FromDate time.Time `bson:"fromDate,omitempty" json:"fromDate,omitempty"` UntilDate time.Time `bson:"untilDate,omitempty" json:"untilDate,omitempty"` Canceled bool `bson:"canceled" json:"canceled"` }
type CreateUserParams ¶
type CreateUserParams struct { FirstName string `json:"firstName"` LastName string `json:"lastName"` Email string `json:"email"` Password string `json:"password"` }
func (CreateUserParams) Validate ¶
func (params CreateUserParams) Validate() map[string]string
type UpdateUserParams ¶
type UpdateUserParams struct { FirstName string `json:"firstName"` LastName string `json:"lastName"` }
func (UpdateUserParams) ToBSON ¶
func (p UpdateUserParams) ToBSON() bson.M
type User ¶
type User struct { ID string `bson:"_id,omitempty" json:"id,omitempty"` FirstName string `bson:"firstName" json:"firstName"` LastName string `bson:"lastName" json:"lastName"` Email string `bson:"email" json:"email"` EncryptedPassword string `bson:"encyptedPassword" json:"-"` IsAdmin bool `bson:"isAdmin" json:"isAdmin"` }
func NewUserFromParams ¶
func NewUserFromParams(p CreateUserParams) (*User, error)
Click to show internal directories.
Click to hide internal directories.