Documentation
¶
Overview ¶
Package web provides a web UI module with server-rendered HTML pages.
Index ¶
Constants ¶
View Source
const Name = "web"
Variables ¶
This section is empty.
Functions ¶
func InitForE2E ¶
func InitForE2E(configData json.RawMessage) error
InitForE2E initializes the web module handler for e2e testing. It calls the package-level handler.Init with the provided JSON config, bypassing the uber/fx dependency injection used in production.
func MountForE2E ¶
MountForE2E mounts web module routes onto the given Fiber app.
func SetLoginRateLimiterCache ¶
func SetLoginRateLimiterCache(s *cache.RedisStore)
SetLoginRateLimiterCache sets the cache backend for the login rate limiter. Must be called after Init if BruteForce is enabled.
Types ¶
type AuthConfig ¶
type AuthConfig struct {
Username string `json:"username"`
Password string `json:"password"`
BruteForce BruteForceConfig `json:"brute_force"`
}
AuthConfig holds web login authentication credentials read from the module config.
type BruteForceConfig ¶
type BruteForceConfig struct {
Enabled bool `json:"enabled"`
MaxAttempts int64 `json:"max_attempts"`
LockoutAttempts int64 `json:"lockout_attempts"`
LockoutDuration string `json:"lockout_duration"`
WindowDuration string `json:"window_duration"`
}
BruteForceConfig holds brute force protection settings for the login endpoint.
Click to show internal directories.
Click to hide internal directories.