Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
func Initialize() (err error)
Initialize creates a copy of the mongodb connection and then uses that connection to create the Users collection in mongodb. Then, it ensures that there is a unique index on the uuid key and the username key in this collection, creating the indexes if necessary.
Types ¶
type User ¶
type User struct { Uuid string `bson:"uuid" json:"uuid"` Username string `bson:"username" json:"username"` Fullname string `bson:"fullname" json:"fullname"` Email string `bson:"email" json:"email"` Password string `bson:"password" json:"-"` Admin bool `bson:"shock_admin" json:"shock_admin"` }
User struct
func FindByUsernamePassword ¶
func FindByUuid ¶
func (*User) SetMongoInfo ¶
Click to show internal directories.
Click to hide internal directories.