Documentation ¶
Index ¶
Constants ¶
View Source
const (
ResponseMessageOk = "ok!"
)
constants
Variables ¶
This section is empty.
Functions ¶
func GetDurataionUsers ¶
func GetDurataionUsers(c echo.Context) error
GetDurataionUsers - Return users retrived with pkg/model/duration_data
Types ¶
type JwtCustomClaims ¶
type JwtCustomClaims struct { Name string `json:"name"` jwt.StandardClaims }
JwtCustomClaims - Define custom claims for token generation
type Response ¶
type Response interface { GetCode() int GetSuccess() bool GetMessage() string GetContent() echo.Map }
Response - Generalizes a resposne for web/api
func FailedResponse ¶
FailedResponse - Returns a failed Response
func NewResponse ¶
NewResponse - Returns a new resposne based on the echo context
func SuccessResponse ¶
func SuccessResponse(c echo.Context, content echo.Map) Response
SuccessResponse - Returns a success Response
type ResponseAPI ¶
type ResponseAPI struct { Data ResponseData `json:"data"` Content echo.Map `json:"content,omitempty"` }
ResponseAPI - Definea a standard struct response
func NewResponseAPI ¶
func NewResponseAPI(success bool, code int, message string, content echo.Map) ResponseAPI
NewResponseAPI - Returns a new response api
func (ResponseAPI) GetCode ¶
func (r ResponseAPI) GetCode() int
GetCode - Returns the api code response
func (ResponseAPI) GetContent ¶
func (r ResponseAPI) GetContent() echo.Map
GetContent - Returns the content of the response
func (ResponseAPI) GetMessage ¶
func (r ResponseAPI) GetMessage() string
GetMessage - Returns the response message
func (ResponseAPI) GetSuccess ¶
func (r ResponseAPI) GetSuccess() bool
GetSuccess - Returns the outcome of the request
type ResponseData ¶
type ResponseData struct { Code int `json:"code"` Success bool `json:"success"` Message string `json:"message"` }
ResponseData - Defines response data
Click to show internal directories.
Click to hide internal directories.