cookies

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

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"`
}

func (*Config) ValidateWithContext

func (c *Config) ValidateWithContext(ctx context.Context) error

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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