config

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RateLimitConfig

type RateLimitConfig struct {
	Enabled         bool
	CleanupInterval time.Duration

	Register RateLimitRouteConfig
	Snapshot RateLimitRouteConfig
	Admin    RateLimitRouteConfig

	BruteForceThreshold int
	BruteForceBan       time.Duration
}

RateLimitConfig holds all rate limiting configuration

func LoadRateLimitConfig

func LoadRateLimitConfig() RateLimitConfig

LoadRateLimitConfig loads rate limiting configuration from environment variables

type RateLimitRouteConfig

type RateLimitRouteConfig struct {
	Requests int
	Period   time.Duration
	Burst    int
}

RateLimitRouteConfig holds configuration for a specific route type

Jump to

Keyboard shortcuts

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