Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
Handler is a container for handlers and app data
func NewHandler ¶
func (*Handler) DeleteUser ¶
DeleteUser is a DELETE /users/{id} handler
func (*Handler) GetAllUsers ¶
GetAllUsers is a GET /users handler
type PostBody ¶
type PostBody struct { Email string `json:"email"` Password string `json:"password"` DisplayName string `json:"displayName"` PasswordURL *string `json:"passwordUrl"` PasswordEtime uint64 `json:"passwordEtime"` }
PostBody represents payload data format
type User ¶
type User struct { ID uint64 `xorm:"'id' pk autoincr unique notnull" json:"id"` Email string `xorm:"'email' text index not null unique" json:"email"` DisplayName string `xorm:"'display_name' text" json:"displayName"` Password string `xorm:"'password' text not null" json:"-"` PasswordEtime uint64 `xorm:"'password_etime'" json:"passwordEtime"` PasswordURL sql.NullString `xorm:"'password_url' text unique" json:"passwordUrl"` Created uint64 `xorm:"created" json:"created"` Updated uint64 `xorm:"updated" json:"updated"` }
User is an entity (here are DB definitions)
func NewUser ¶
NewUser creates user from request body returns *User with data from body returns nil if error occurred
Click to show internal directories.
Click to hide internal directories.