Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCode = errors.New("Case statement in code is not correct.") ErrNoResult = errors.New("Result not found.") )
Functions ¶
func UserCreate ¶
UserCreate creates user
Types ¶
type User ¶
type User struct {
ObjectId bson.ObjectId `bson:"_id"`
Id uint32 `db:"id" bson:"id,omitempty"` // Don't use Id, use ID() instead for consistency with MongoDB
First_name string `db:"first_name" bson:"first_name"`
Last_name string `db:"last_name" bson:"last_name"`
Email string `db:"email" bson:"email"`
Password string `db:"password" bson:"password"`
Status_id uint8 `db:"status_id" bson:"status_id"`
Created_at time.Time `db:"created_at" bson:"created_at"`
Updated_at time.Time `db:"updated_at" bson:"updated_at"`
Deleted uint8 `db:"deleted" bson:"deleted"`
}
User table contains the information for each user
func UserByEmail ¶
UserByEmail gets user information from email
type User_status ¶
type User_status struct {
Id uint8 `db:"id" bson:"id"`
Status string `db:"status" bson:"status"`
Created_at time.Time `db:"created_at" bson:"created_at"`
Updated_at time.Time `db:"updated_at" bson:"updated_at"`
Deleted uint8 `db:"deleted" bson:"deleted"`
}
User_status table contains every possible user status (active/inactive)
Click to show internal directories.
Click to hide internal directories.