utils

package
v0.0.0-...-d6508de Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSecretKey

func GetSecretKey() string

func GetTokenString

func GetTokenString(context *gin.Context) string

func GetUserIDFromToken

func GetUserIDFromToken(tokenString string) (uint, error)

func ValidateToken

func ValidateToken(tokenString string) (*jwt.Token, error)

Types

type Response

type Response struct {
	Status bool        `json:"status"`
	Errors interface{} `json:"errors"`
	Data   interface{} `json:"data"`
}

func GetErrorResponse

func GetErrorResponse(err string) Response

func GetResponse

func GetResponse(data interface{}) Response

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL