Documentation ¶
Index ¶
- Variables
- func Authorizator(data interface{}, c *gin.Context) bool
- func GenerateAPIKey(n int) (string, error)
- func HashSHA512(str string) string
- func IdentityHandler(c *gin.Context) interface{}
- func PayloadFunc(data interface{}) jwt.MapClaims
- func Unauthorized(c *gin.Context, code int, message string)
- type APIKey
- type JWT
- type Middlewares
Constants ¶
This section is empty.
Variables ¶
View Source
var (
APIKeyHeader = "X-Api-Key"
)
Functions ¶
func Authorizator ¶
func GenerateAPIKey ¶
func HashSHA512 ¶
func IdentityHandler ¶
func PayloadFunc ¶
Types ¶
type APIKey ¶
func (*APIKey) MiddlewareFunc ¶
func (a *APIKey) MiddlewareFunc() gin.HandlerFunc
type Middlewares ¶
func NewMiddlewares ¶
func NewMiddlewares(dbClient *database.Client) (*Middlewares, error)
Click to show internal directories.
Click to hide internal directories.