Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidPassword ¶
would return true if the it was nil, if there were an error it would return false
Types ¶
type Booking ¶
type Booking struct {
ID primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"`
UserID primitive.ObjectID `bson:"userID,omitempty" json:"UserID,omitempty"`
RoomID primitive.ObjectID `bson:"roomID,omitempty" json:"roomID,omitempty"`
NumPersons int `bson:"numPersons,omitempty" json:"numPersons,omitempty"`
FromDate time.Time `bson:"fromDate,omitempty" json:"fromDate,omitempty"`
TillDate time.Time `bson:"tillDate,omitempty" json:"tillDate,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 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"`
}
func NewUserFromParams ¶
func NewUserFromParams(params CreateUserParams) (*User, error)
Click to show internal directories.
Click to hide internal directories.