Documentation
¶
Index ¶
- func APIResponse(ctx *gin.Context, message string, statusCode int, method string, ...)
- func ComparePassword(hashPassword string, password string) error
- func ErrorResponse(ctx *gin.Context, message string, statusCode int, method string, ...)
- func GetSliceFromMap(input bson.M, key string) []interface{}
- func GetStringFromMap(input bson.M, key string) string
- func GodotEnv(key string) string
- func HashPassword(password string) (string, error)
- func InterfaceSliceToStringSlice(slice []interface{}) []string
- func Sign(data map[string]interface{}, secretPublicKeyEnvName string, ...) (string, error)
- func Validator(s interface{}, tagName string) error
- func VerifyToken(accessToken, SecretPublicKeyEnvName string) (*jwt.Token, error)
- func VerifyTokenHeader(ctx *gin.Context, SecretPublicKeyEnvName string) (*jwt.Token, error)
- type AccessToken
- type BaseError
- type ErrorResponseEntity
- type MetaToken
- type ResponsesEntity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIResponse ¶
func ComparePassword ¶
func ErrorResponse ¶
func GetSliceFromMap ¶
func HashPassword ¶
func InterfaceSliceToStringSlice ¶
func InterfaceSliceToStringSlice(slice []interface{}) []string
func VerifyToken ¶
Types ¶
type AccessToken ¶
type AccessToken struct {
Claims MetaToken
}
func DecodeToken ¶
func DecodeToken(accessToken *jwt.Token) (AccessToken, error)
type BaseError ¶
BaseError defines a standard error structure for the application.
func NewBaseError ¶
NewBaseError creates a new instance of BaseError.
type ErrorResponseEntity ¶
type ResponsesEntity ¶
Click to show internal directories.
Click to hide internal directories.