Documentation ¶
Index ¶
- func CreateOne(Name string, Lastname string, Password string, Email string, Username string, ...) (result interface{}, err error)
- func DeleteOne(filter bson.M) (result bson.M, err error)
- func FindOne(filter bson.M) (result bson.M, err error)
- func List(filter interface{}, page, limit int64) (result *utils.Result, err error)
- func UpdateOne(filter bson.M, update bson.M) (result bson.M, err error)
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type User ¶
type User struct { Id primitive.ObjectID `json:"id,omitempty" bson:"_id,omitempty"` Username string `json:"username,omitempty" bson:"username,omitempty" validate:"required,min=3,max=60"` Email string `json:"email,omitempty" bson:"email,omitempty" validate:"required,email"` Password string `json:"password,omitempty" bson:"password,omitempty" validate:"required,password,min=10,max=60"` Name string `json:"name,omitempty" bson:"name,omitempty" validate:"required,min=3,max=60"` Lastname string `json:"lastname,omitempty" bson:"lastname,omitempty" validate:"required,min=3,max=60"` Roles []string `json:"roles" bson:"roles" default:"['user']" validate:"required,min=3,max=60"` }
Click to show internal directories.
Click to hide internal directories.