Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsPasswordValid ¶
Types ¶
type Booking ¶
type Booking struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"` RoomID primitive.ObjectID `bson:"room_id" json:"room_id"` UserID primitive.ObjectID `bson:"user_id" json:"user_id"` FromDate time.Time `bson:"from_date" json:"from_date"` TillDate time.Time `bson:"till_date" json:"till_date"` NumPersons int `bson:"num_persons" json:"num_person"` }
type CreateUserParams ¶
type CreateUserParams struct { FirstName string `json:"first_name"` LastName string `json:"last_name"` Email string `json:"email"` Password string `json:"password"` }
func (*CreateUserParams) Validate ¶
func (p *CreateUserParams) Validate() map[string]string
type UpdateHotelParams ¶
type UpdateHotelParams struct{}
type UpdateRoomParams ¶
type UpdateRoomParams struct{}
type UpdateUserParams ¶
type UpdateUserParams struct { FirstName string `json:"first_name"` LastName string `json:"last_name"` }
func (UpdateUserParams) ToBSON ¶
func (params UpdateUserParams) ToBSON() bson.M
type User ¶
type User struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"` FirstName string `bson:"first_name" json:"first_name"` LastName string `bson:"last_name" json:"last_name"` Email string `bson:"email" json:"email"` Password string `bson:"password" json:"-"` IsAdmin bool `bson:"admin" json:"admin"` }
func NewUserFromParams ¶
func NewUserFromParams(params CreateUserParams) (*User, error)
Click to show internal directories.
Click to hide internal directories.