Documentation ¶
Index ¶
- func Login(w http.ResponseWriter, r *http.Request)
- type User
- func (rs User) Create(w http.ResponseWriter, r *http.Request)
- func (rs User) Delete(w http.ResponseWriter, r *http.Request)
- func (rs User) Get(w http.ResponseWriter, r *http.Request)
- func (rs User) List(w http.ResponseWriter, r *http.Request)
- func (rs User) Routes() chi.Router
- func (rs User) Update(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type User ¶
type User struct { ID primitive.ObjectID `bson:"_id" json:"id"` Name string `bson:"name" json:"name" validate:"required"` Email string `bson:"email" json:"email" validate:"email,required"` Password string `bson:"password" json:"password" validate:"required,min=6"` Salt string `bson:"salt" json:"salt"` Roles []string `bson:"roles" json:"roles"` Active bool `bson:"active" json:"active"` CreatedAt time.Time `bson:"created_at"` UpdatedAt time.Time `bson:"updated_at"` }
Click to show internal directories.
Click to hide internal directories.