Documentation
¶
Index ¶
- type AuthUser
- type DeployerAuditAdapter
- type Server
- func (s *Server) EnqueueGitCommit(paths []string, reason string)
- func (s *Server) GitSyncPushing() bool
- func (s *Server) Handler() http.Handler
- func (s *Server) InitDBBackupSchedule()
- func (s *Server) ListenAndServe(ctx context.Context) error
- func (s *Server) ReloadGitSync(ctx context.Context) (*gitsync.Status, error)
- func (s *Server) SetAppsDir(dir string)
- func (s *Server) SetAudit(a *audit.Recorder)
- func (s *Server) SetBackupScheduler(sched *backup.Scheduler)
- func (s *Server) SetBindAddr(addr string)
- func (s *Server) SetBuildInfo(version, commit, date string)
- func (s *Server) SetBus(b *events.Bus)
- func (s *Server) SetConfig(cfg *config.Config, path string)
- func (s *Server) SetConfigSync(cs *configsync.Syncer)
- func (s *Server) SetDBPath(path string)
- func (s *Server) SetDataDir(dir string)
- func (s *Server) SetDocker(dc docker.Client)
- func (s *Server) SetGitSync(gs *gitsync.Syncer)
- func (s *Server) SetLockout(l *auth.LoginLockout)
- func (s *Server) SetLogBuffer(lb *logbuf.Buffer)
- func (s *Server) SetLoginLimiter(rl *auth.RateLimiter)
- func (s *Server) SetMasterSecret(secret string)
- func (s *Server) SetProxyReloader(p proxyReloader)
- func (s *Server) SetRecipesCache(c *recipes.Cache)
- func (s *Server) SetReconciler(rec reconciler)
- func (s *Server) SetReconcilerRef(r gitsync.Reconciler)
- func (s *Server) SetReservedDomains(domains ...string)
- func (s *Server) SetTLSMode(mode string)
- func (s *Server) SetTrustedProxies(proxies []string)
- func (s *Server) SetUIFS(fsys fs.FS)
- func (s *Server) SetWebhookDispatcher(d *alerts.WebhookDispatcher)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthUser ¶
func GetAuthUser ¶
type DeployerAuditAdapter ¶
DeployerAuditAdapter converts deployer.DeployAuditEvent to audit.RecordReq and forwards it to the audit.Recorder. It is the concrete impl of deployer.AuditEmitter injected at startup so internal/deployer stays decoupled from internal/audit.
func (*DeployerAuditAdapter) RecordDeploy ¶
func (a *DeployerAuditAdapter) RecordDeploy(ctx context.Context, e deployer.DeployAuditEvent)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(port int, st *store.Store, jwtMgr *auth.JWTManager, rl *auth.RateLimiter) *Server
func (*Server) EnqueueGitCommit ¶
EnqueueGitCommit enqueues a commit for paths if gitsync is enabled. No-op when nil.
func (*Server) GitSyncPushing ¶ added in v1.4.5
GitSyncPushing reports whether git sync is running and pushes changes. The audit recorder uses it to mark rows pending only when a push will stamp them. Lock-free, since audit rows may be recorded under gsMu.
func (*Server) InitDBBackupSchedule ¶
func (s *Server) InitDBBackupSchedule()
func (*Server) ReloadGitSync ¶
ReloadGitSync stops the current syncer (if any), rebuilds config from DB+YAML, and starts a new syncer. Returns the new status or an error.
func (*Server) SetAppsDir ¶
func (*Server) SetBackupScheduler ¶
SetBackupScheduler sets the backup scheduler (can be nil).
func (*Server) SetBindAddr ¶
SetBindAddr sets the listener bind address (default "" = all interfaces). Use "127.0.0.1" to keep the dashboard local-only when not fronted by Caddy.
func (*Server) SetBuildInfo ¶
SetBuildInfo sets the build version, commit, and date.
func (*Server) SetConfig ¶
SetConfig sets the active config and the path it was loaded from, enabling system settings endpoints to persist changes back to disk.
func (*Server) SetConfigSync ¶
func (s *Server) SetConfigSync(cs *configsync.Syncer)
SetConfigSync sets the configsync.Syncer (nil disables sidecar cleanup on delete).
func (*Server) SetDataDir ¶
func (*Server) SetGitSync ¶
SetGitSync sets the gitsync.Syncer (nil disables git endpoints).
func (*Server) SetLockout ¶
func (s *Server) SetLockout(l *auth.LoginLockout)
SetLockout sets the login lockout tracker.
func (*Server) SetLogBuffer ¶
SetLogBuffer sets the log buffer for system log streaming.
func (*Server) SetLoginLimiter ¶
func (s *Server) SetLoginLimiter(rl *auth.RateLimiter)
SetLoginLimiter installs a dedicated rate limiter for the login endpoint so login abuse cannot deplete the global request budget.
func (*Server) SetMasterSecret ¶
SetMasterSecret sets the master secret for encrypting registry credentials.
func (*Server) SetProxyReloader ¶ added in v1.4.1
func (s *Server) SetProxyReloader(p proxyReloader)
SetProxyReloader sets the proxy used to apply cert changes.
func (*Server) SetRecipesCache ¶
SetRecipesCache enables /api/recipes/community endpoints. nil disables them.
func (*Server) SetReconciler ¶
func (s *Server) SetReconciler(rec reconciler)
func (*Server) SetReconcilerRef ¶
func (s *Server) SetReconcilerRef(r gitsync.Reconciler)
SetReconcilerRef sets the reconciler callback used when reloading gitsync.
func (*Server) SetReservedDomains ¶ added in v1.4.3
SetReservedDomains marks domains app endpoints may not use, e.g. the dashboard's config `domain`. Empty entries are ignored.
func (*Server) SetTLSMode ¶
func (*Server) SetTrustedProxies ¶
SetTrustedProxies sets the trusted proxy IPs for X-Forwarded-For parsing.
func (*Server) SetWebhookDispatcher ¶
func (s *Server) SetWebhookDispatcher(d *alerts.WebhookDispatcher)
SetWebhookDispatcher sets the webhook dispatcher for test webhook functionality.
Source Files
¶
- access.go
- actions.go
- activity.go
- alerts.go
- apps.go
- apps_archive.go
- audit_compose.go
- audit_helpers.go
- auth.go
- backups.go
- bundle.go
- cancel.go
- cert.go
- deploy.go
- deploy_logs.go
- deployer_audit.go
- docker.go
- domain.go
- env.go
- events_ws.go
- git_handler.go
- gitsync_config_handler.go
- gitsync_test_connection.go
- logs.go
- metrics.go
- middleware.go
- ram_linux.go
- recipes.go
- registries.go
- reqstats.go
- server.go
- system.go
- system_linux.go
- trust.go
- users.go