Documentation
¶
Index ¶
Constants ¶
This section is empty.
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"` NumPersons int `json:"numPersons,omitempty" bson:"numPersons,omitempty"` FromDate time.Time `json:"fromDate,omitempty" bson:"fromDate,omitempty"` TillDate time.Time `json:"tillDate,omitempty" bson:"tillDate,omitempty"` Canceled bool `json:"canceled" bson:"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 primitive.ObjectID `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:"encryptedPassword" json:"-"` IsAdmin bool `bson:"isAdmin" json:"isAdmin"` }
User is a struct that represents a user in the system
func NewUserFromParams ¶
func NewUserFromParams(params *CreateUserParams) (*User, error)
Click to show internal directories.
Click to hide internal directories.