Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActivateUser ¶
func ActivateUser(c echo.Context) error
@Title activate user @Summary activate or deactivate a user @Description @Tags Admin @Accept multipart/form-data @Produce json @Param uname formData string true "unique user name" @Param flag formData string true "true: activate, false: deactivate" @Success 200 "OK - action successfully" @Failure 400 "Fail - invalid true/false flag" @Failure 401 "Fail - unauthorized error" @Failure 500 "Fail - internal error" @Router /api/admin/activate [put] @Security ApiKeyAuth
func ListOnlineUser ¶
func ListOnlineUser(c echo.Context) error
@Title list online users @Summary get all online users @Description @Tags Admin @Accept json @Produce json @Param uname query string false "user filter with uname wildcard(*)" @Success 200 "OK - list successfully" @Failure 401 "Fail - unauthorized error" @Failure 500 "Fail - internal error" @Router /api/admin/onlines [get] @Security ApiKeyAuth
func ListUser ¶
func ListUser(c echo.Context) error
@Title list all users @Summary get all users' info @Description @Tags Admin @Accept json @Produce json @Param uname query string false "user filter with uname wildcard(*)" @Param name query string false "user filter with name wildcard(*)" @Param active query string false "user filter with active status" @Success 200 "OK - list successfully" @Failure 401 "Fail - unauthorized error" @Failure 500 "Fail - internal error" @Router /api/admin/users [get] @Security ApiKeyAuth
func Menu ¶ added in v0.0.3
func Menu(c echo.Context) error
@Title get side menu @Summary get tailored side menu for different user group @Description @Tags Admin @Accept json @Produce json @Success 200 "OK - get menu successfully" @Failure 500 "Fail - internal error" @Router /api/admin/spa/menu [get] @Security ApiKeyAuth
func OfficializeUser ¶
func OfficializeUser(c echo.Context) error
@Title officialize user @Summary officialize or un-officialize a user @Description @Tags Admin @Accept multipart/form-data @Produce json @Param uname formData string true "unique user name" @Param flag formData string true "true: officialize, false: un-officialize" @Success 200 "OK - action successfully" @Failure 400 "Fail - invalid true/false flag" @Failure 401 "Fail - unauthorized error" @Failure 500 "Fail - internal error" @Router /api/admin/officialize [put] @Security ApiKeyAuth
func UserAvatar ¶ added in v0.0.5
func UserAvatar(c echo.Context) error
@Title get avatar of a user @Summary get a user's avatar src as base64 @Description @Tags Admin @Accept json @Produce json @Param uname query string true "uname for its avatar" @Success 200 "OK - get avatar src base64" @Failure 400 "Fail - user does not exist" @Failure 404 "Fail - avatar is empty" @Router /api/admin/avatar [get] @Security ApiKeyAuth
Types ¶
This section is empty.