Documentation
¶
Overview ¶
Package users ...
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entity ¶
type Entity struct {
ID uint64 `json:"id" xorm:"'id' pk index autoincr"`
Created uint64 `json:"created" xorm:"'created'"`
Updated uint64 `json:"updated" xorm:"'updated'"`
Login string `json:"login" xorm:"index unique"`
Email string `json:"email" xorm:"'email'"`
Password string `json:"-"`
GroupID uint64 `json:"group_id" xorm:"'group_id' index"`
Group groups.Entity `json:"group" xorm:"-"`
}
Entity represents user
func FindByParams ¶
FindByParams users in database
func (*Entity) ExtractFrom ¶
ExtractFrom extracts user from database
type Handler ¶
Handler is a container for handlers and app data
func (*Handler) CreateUser ¶
CreateUser is a POST /users handler swagger:operation POST /users users CreateUser
Create new user and save it in storage ¶
--- responses:
201:
description: return created user
schema:
$ref: '#/definitions/UserEntity'
func (*Handler) DeleteUser ¶
DeleteUser is a DELETE /users/{ID} handler swagger:operation DELETE /users/{ID} users DeleteUser
Delete user by ID ¶
--- responses:
204: description: OK 400: $ref: '#/responses/badRequest'
func (*Handler) GetUsers ¶
GetUsers is a GET /users handler swagger:operation GET /users users GetUsers
Returns users list ¶
--- responses:
200:
description: returns array of users
schema:
type: array
items:
$ref: '#/definitions/UserEntity'
Click to show internal directories.
Click to hide internal directories.