Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Deps ¶
type Deps struct {
DB *gorm.DB
Storage storage.Storage
MaxUploadBytes int64
// UploadQuota is the per-account upload allowance; the zero value means
// none. See catalog.UploadQuota.
UploadQuota catalog.UploadQuota
// AllowedOrigins is the exact-match CORS allowlist for browser clients.
// Empty = dev mode (localhost / 127.0.0.1 origins only). See cors.
AllowedOrigins []string
// AllowPrivateLAN additionally permits RFC-1918 private-IP origins in dev
// mode (when AllowedOrigins is empty). Ignored otherwise.
AllowPrivateLAN bool
// JWTSecret signs access tokens (at least 32 bytes); JWTPreviousSecret
// still verifies them during a rotation. See auth.Config.
JWTSecret string
JWTPreviousSecret string
// Token lifetimes; zero means the auth package defaults.
AccessTokenTTL time.Duration
RefreshTokenTTL time.Duration
SessionMaxAge time.Duration
// VerifySessionOnAccess makes revocation immediate (one lookup per
// authenticated request). See auth.Config.
VerifySessionOnAccess bool
// LoadSubjectOnAccess makes role changes and disabled users take effect
// at once. See auth.Config.
LoadSubjectOnAccess bool
// Login throttles; nil means per-process in-memory limiters.
LoginLimiterPerAccount ratelimit.Limiter
LoginLimiterPerIP ratelimit.Limiter
// TrustedProxies whose X-Forwarded-For names the client IP (Kong).
TrustedProxies []netip.Prefix
// Mail sends password-reset and verification emails; the zero value
// means mail is off (requests are still answered as usual).
Mail auth.Mail
}
type ReadyResponse ¶
type ReadyResponse struct {
Status string `json:"status"` // "ready" | "unavailable"
Checks map[string]string `json:"checks"` // dependency -> "ok" | "unavailable"
}
ReadyResponse is the body of GET /ready.
Click to show internal directories.
Click to hide internal directories.