Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizedResponse ¶
type AuthorizedResponse struct { Message string `json:"message"` User *models.User `json:"user"` Token string `json:"token"` }
Define a struct to return when user is authorized
type ErrorResponse ¶
type ErrorResponse struct {
Message string `json:"message"`
}
Define a struct to return when there is an error
type UserController ¶
type UserController struct {
beego.Controller
}
func (*UserController) IndexAll ¶
func (cont *UserController) IndexAll(authorization string)
@Title Index Users @Description Index all of users when request is authorized @Param authorization header string true "Authorization Token" @router /all [get]
func (*UserController) LoginUser ¶
func (cont *UserController) LoginUser()
@Title Login User @Description Log in an existing User with credentials @Param credentials body {BasicCredentials} true "User credentials" @router /login [post]
func (*UserController) RegisterUser ¶
func (cont *UserController) RegisterUser()
@Title Register User @Description Register a new User in system @Param user body {InputUser} true "User initial data" @router /register [post]
Click to show internal directories.
Click to hide internal directories.