Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthController ¶
type AuthController struct {
// contains filtered or unexported fields
}
func NewAuthController ¶
func (*AuthController) Signin ¶
func (ac *AuthController) Signin(ctx *gin.Context)
Signin godoc @Summary Login user. @Description login user with credentials. @Tags Auth @Accept application/json @Param request body forms.SigninRequest true "request body" @Produce json @Success 200 {object} utils.Response{data=forms.SigninResponse} @Failure 400 {object} utils.Response{data=object} @Failure 500 {object} utils.Response{data=object} @Router /api/v1/auth/signin [post]
func (*AuthController) Signup ¶
func (ac *AuthController) Signup(ctx *gin.Context)
Signup godoc @Summary Signup user. @Description register user. @Tags Auth @Accept application/json @Param request body forms.SignupRequest true "request body" @Produce json @Success 200 {object} utils.Response{data=forms.SignupResponse} @Failure 400 {object} utils.Response{data=object} @Failure 500 {object} utils.Response{data=object} @Router /api/v1/auth/signup [post]
type ServerController ¶
type ServerController struct {
// contains filtered or unexported fields
}
func NewServerController ¶
func NewServerController(config *config.Config, db *gorm.DB) *ServerController
func (*ServerController) HealthCheck ¶
func (s *ServerController) HealthCheck(c *gin.Context)
type UserController ¶
type UserController struct {
// contains filtered or unexported fields
}
func NewUserController ¶
func (*UserController) GetAllUsers ¶
func (ac *UserController) GetAllUsers(ctx *gin.Context)
GetAllUsers godoc @Summary Show all user. @Description get all users' data. @Tags Users @Accept */* @Produce json @Success 200 {object} utils.Response{data=object} @Failure 500 {object} utils.Response{data=object} @Security ApiKeyAuth @Param page query int false "Page" default(1) @Param limit query int false "Page Limit" default(10) @Param search query string false "Search" @Param email query string false "Email" @Param order_by query string false "Order by" @Router /api/v1/users [get]
func (*UserController) Me ¶
func (ac *UserController) Me(ctx *gin.Context)
Me godoc @Summary Show logged-in user. @Description get logged-in user data. @Tags Users @Accept */* @Produce json @Success 200 {object} utils.Response{data=forms.WhoAmIResponse} @Failure 500 {object} utils.Response{data=object} @Security ApiKeyAuth @Router /api/v1/users/me [get]