Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init(c *Config) gin.HandlerFunc
Types ¶
type Config ¶
type Config struct {
Enabled bool `json:"enabled" yaml:"enabled"`
Type AuthType `json:"type" yaml:"type"`
MaxAge int `json:"maxage" yaml:"maxage"` // Expire(MaxAge)
// Cookie
Secret string `json:"secret" yaml:"secret"` // Cookie Secret
// Token | Redis
Host string `json:"host" yaml:"host"` // Redis Address
Port int `json:"port" yaml:"port"` // Redis Port
Pass string `json:"pass" yaml:"pass"` // Redis Password
DB int `json:"db" yaml:"db"` // Redis DB
}
func (*Config) WithMaxAge ¶
Click to show internal directories.
Click to hide internal directories.