Documentation
¶
Overview ¶
Package controllers REST-ful (endpoints) конечные точки REST веб-сервиса.
Package controllers REST-ful (endpoints) конечные точки REST веб-сервиса.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
func GetAuthController ¶
func GetAuthController(prop env.Properties) *Auth
GetAuthController — потокобезопасное (thread-safe) создание REST веб-сервиса аутентификации.
func (*Auth) SignInUser ¶
SignInUser handler
@Summary аутентификация @Description аутентификация пользователя @Tags Auth @Accept json @Produce json @Security none @Param request body dto.SignInRequest true "Формат запроса JSON (body)" @Success 200 {object} dto.SignInRequest "пользователь успешно аутентифицирован" @Failure 400 {object} dto.SignInRequest "неверный формат запроса" @Failure 401 {object} dto.SignInRequest "неверная пара логин/пароль" @Failure 500 {string} string "Internal Server Error" @Router /api/auth/login [post]
type Favorites ¶
type Favorites struct {
// contains filtered or unexported fields
}
func GetFavoritesController ¶
func GetFavoritesController(prop env.Properties) *Favorites
GetFavoritesController — потокобезопасное (thread-safe) создание REST веб-сервиса основной бизнес логики.
func (*Favorites) Get ¶
Get handler
@Summary избранное @Description избранное получения инструмента для пользователя @Tags Favorites @Accept json @Produce json @Security none @Param request body dto.Favorites true "Формат запроса JSON (body)" @Success 200 {object} dto.Favorites "получение инструмента" @Failure 400 {object} string "неверный формат запроса" @Failure 401 {object} string "пользователь не авторизован" @Failure 500 {string} string "Internal Server Error" @Router /api/favorites/get [post]
func (*Favorites) GetForUser ¶
GetForUser handler
@Summary избранное @Description избранное получения инструментов для пользователя @Security Bearer @Tags Favorites @Accept json @Produce json @Security BearerAuth @Success 200 {array} []dto.Favorites "успешная обработка запроса" @Failure 401 {object} string "пользователь не авторизован" @Failure 500 {string} string "Internal Server Error" @Router /api/favorites/get [get]
func (*Favorites) Set ¶
Set handler
@Summary избранное @Description избранное сохранение инструмента для пользователя @Tags Favorites @Accept json @Produce json @Security none @Param request body dto.Favorites true "Формат запроса JSON (body)" @Success 200 {object} dto.Favorites "получение инструмента" @Failure 400 {object} string "неверный формат запроса" @Failure 401 {object} string "пользователь не авторизован" @Failure 500 {string} string "Internal Server Error" @Router /api/favorites/set [post]
Click to show internal directories.
Click to hide internal directories.