Documentation ¶
Index ¶
- func APIResponse(ctx *gin.Context, Message string, StatusCode int, Method string, ...)
- func APIResponsePagination(ctx *gin.Context, Message string, StatusCode int, Method string, ...)
- func ComparePassword(hashPassword string, password string) error
- func GodotEnv(key string) string
- func HashPassword(password string) string
- func ParseHtml(fileName string, data map[string]string) string
- func SendGridMail(name, email, subject, fileName, token string) (*rest.Response, error)
- func Sign(Data map[string]interface{}, SecrePublicKeyEnvName string, ...) (string, error)
- func Validator(s interface{}) (interface{}, error)
- func ValidatorErrorResponse(ctx *gin.Context, StatusCode int, Method string, Error interface{})
- func VerifyToken(accessToken, SecrePublicKeyEnvName string) (*jwt.Token, error)
- func VerifyTokenHeader(ctx *gin.Context, SecrePublicKeyEnvName string) (*jwt.Token, error)
- type AccessToken
- type BodyRequest
- type ErrorResponse
- type MetaToken
- type Paginate
- type PaginateScope
- type Responses
- type ResponsesPagination
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIResponse ¶
func APIResponsePagination ¶
func ComparePassword ¶
func HashPassword ¶
func SendGridMail ¶
func Validator ¶
func Validator(s interface{}) (interface{}, error)
Validation request from struct field
func ValidatorErrorResponse ¶
func VerifyToken ¶
Types ¶
type AccessToken ¶
type AccessToken struct {
Claims MetaToken
}
func DecodeToken ¶
func DecodeToken(accessToken *jwt.Token) AccessToken
type BodyRequest ¶
type ErrorResponse ¶
type Paginate ¶
func NewPaginate ¶
type PaginateScope ¶
return db.Offset(int(offset)).Limit(int(limit)) } }
type ResponsesPagination ¶
type ResponsesPagination struct { Pagination interface{} `json:"pagination"` Responses }
Click to show internal directories.
Click to hide internal directories.