Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Domain string `env:"DOMAIN" json:"domain"`
CookieName string `env:"COOKIE_NAME" json:"cookieName"`
Base64EncodedHashKey string `env:"HASH_KEY" json:"base64EncodedHashKey"`
Base64EncodedBlockKey string `env:"BLOCK_KEY" json:"base64EncodedBlockKey"`
Lifetime time.Duration `env:"LIFETIME" json:"lifetime"`
SecureOnly bool `env:"SECURE_ONLY" json:"secureOnly"`
}
type Manager ¶
type Manager interface {
Encode(ctx context.Context, name string, value any) (string, error)
Decode(ctx context.Context, name, value string, dst any) error
}
func NewCookieManager ¶
func NewCookieManager(cfg *Config, tracerProvider tracing.TracerProvider) (Manager, error)
NewCookieManager returns a new Manager.
Click to show internal directories.
Click to hide internal directories.