Documentation ¶
Index ¶
- func ResponseCreated(c *fiber.Ctx, message interface{}) error
- func ResponseDeleted(c *fiber.Ctx, message interface{}) error
- func ResponseError(c *fiber.Ctx, message interface{}, statusCode int) error
- func ResponseFailValidation(c *fiber.Ctx, message interface{})
- func ResponseJSON(c *fiber.Ctx, data interface{}) error
- func ResponseMethodNotAllowed(c *fiber.Ctx, message string)
- func ResponseNotFound(c *fiber.Ctx, message string)
- func ResponsePagination(c *fiber.Ctx, data Pagination) error
- func ResponseRedirect(c *fiber.Ctx, url string)
- func ResponseUnauthorized(c *fiber.Ctx, message string)
- func ResponseUpdated(c *fiber.Ctx, message interface{}) error
- type JwtCustomClaims
- type Pagination
- type ReqCreateDiary
- type ReqUpdateDiary
- type ReqUserLogin
- type ReqUserRegister
- type ResponseErrors
- type ResponseSuccess
- type ResponseSuccessArray
- type UserClaims
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResponseCreated ¶
func ResponseCreated(c *fiber.Ctx, message interface{}) error
ResponseCreated Set response for created process
func ResponseDeleted ¶
func ResponseDeleted(c *fiber.Ctx, message interface{}) error
ResponseDeleted Set response for delete process
func ResponseError ¶
ResponseError Set response for delete process
func ResponseFailValidation ¶
func ResponseFailValidation(c *fiber.Ctx, message interface{})
ResponseFailValidation Set response for fail validation
func ResponseMethodNotAllowed ¶
func ResponseMethodNotAllowed(c *fiber.Ctx, message string)
func ResponseNotFound ¶
func ResponseNotFound(c *fiber.Ctx, message string)
func ResponsePagination ¶
func ResponsePagination(c *fiber.Ctx, data Pagination) error
ResponsePagination ...
func ResponseRedirect ¶
func ResponseRedirect(c *fiber.Ctx, url string)
func ResponseUnauthorized ¶
func ResponseUnauthorized(c *fiber.Ctx, message string)
func ResponseUpdated ¶
func ResponseUpdated(c *fiber.Ctx, message interface{}) error
ResponseUpdated Set response for update process
Types ¶
type Pagination ¶
type Pagination struct { TotalRecords int `json:"totalRecords"` TotalPages int `json:"totalPages"` Data interface{} `json:"data"` Offset int `json:"offset"` Limit int `json:"Limit"` Page int `json:"page"` PrevPage int `json:"prevPage"` NextPage int `json:"nextPage"` }
Pagination
type ReqCreateDiary ¶
type ReqUpdateDiary ¶
type ReqUserLogin ¶
type ReqUserLogin struct { Username string `json:"username" binding:"required"` Password string `json:"password" binding:"required"` DeviceID string `json:"deviceID" binding:"required"` }
ReqUserLogin ...
type ReqUserRegister ¶
type ReqUserRegister struct { Username string `json:"username" binding:"required"` Password string `json:"password" binding:"required"` Email string `json:"email" binding:"required"` Birthday string `json:"birthday" binding:"required"` Fullname string `json:"fullname" binding:"required"` }
ReqUserRegister ...
type ResponseErrors ¶
type ResponseErrors struct {
Error errorResponse `json:"error"`
}
ResponseErrors model for swagger
type ResponseSuccess ¶
type ResponseSuccess struct {
Data struct{} `json:"data"`
}
ResponseSuccess model for swagger
type ResponseSuccessArray ¶
type ResponseSuccessArray struct {
Data []struct{} `json:"data"`
}
ResponseSuccessArray model for swagger
type UserClaims ¶
type UserClaims struct { ID int64 `json:"userID"` Username string `json:"username"` jwt.StandardClaims }
UserClaims ...
Click to show internal directories.
Click to hide internal directories.