Versions in this module Expand all Collapse all v1 v1.3.0 Jun 8, 2026 v1.2.0 Jun 5, 2026 Changes in this version + var ErrDuplicate = errors.New("store: duplicate") type Host + Disabled bool + type Project struct + ComposeFile string + CreatedAt time.Time + CreatedBy string + ID int64 + Name string + Slug string + UpdatedAt time.Time type Store + func (s *Store) CreateProject(ctx context.Context, p *Project) (int64, error) + func (s *Store) DeleteProject(ctx context.Context, id int64) error + func (s *Store) ListProjects(ctx context.Context) ([]Project, error) + func (s *Store) ProjectByID(ctx context.Context, id int64) (*Project, error) + func (s *Store) SetHostDisabled(ctx context.Context, id int64, disabled bool) error + func (s *Store) TouchProject(ctx context.Context, id int64) error + func (s *Store) UpdateProjectName(ctx context.Context, id int64, name string) error v1.1.0 Jun 4, 2026 Changes in this version type Store + func (s *Store) Ping(ctx context.Context) error + func (s *Store) SetUserPrefs(ctx context.Context, userID int64, prefs string) error + func (s *Store) UserPrefs(ctx context.Context, userID int64) (string, error) v1.0.0 Jun 2, 2026 Changes in this version + var ErrNotFound = errors.New("store: not found") + var Sections = []string + func NormalizeRegistryHost(host string) string + func ValidSection(key string) bool + type AlertEvent struct + Acknowledged bool + ContainerID string + ContainerName string + CreatedAt time.Time + HostID int64 + HostName string + ID int64 + Message string + RuleID int64 + RuleName string + Severity string + Type string + Value *float64 + type AlertRule struct + Config string + CooldownSec int + CreatedAt time.Time + Email bool + Enabled bool + ID int64 + Name string + Severity string + Target string + Type string + WebhookID *int64 + type AuditEntry struct + Action string + CreatedAt time.Time + Detail string + ID int64 + IP string + Target string + UserID int64 + Username string + type Host struct + Address string + AlertEmail string + CreatedAt time.Time + HostKey string + ID int64 + Kind string + Name string + TLSCA string + TLSCert string + TLSKey string + type LDAPConfig struct + AdminGroupDN string + BindDN string + BindPassword string + Enabled bool + StartTLS bool + URL string + UserBaseDN string + UserFilter string + func (c LDAPConfig) Configured() bool + type ParseRule struct + CreatedAt time.Time + ID int64 + Name string + Pattern string + type Registry struct + Address string + CreatedAt time.Time + ID int64 + Name string + Username string + type RegistryAuth struct + Address string + Password string + Username string + type SMTPConfig struct + From string + Host string + Password string + Port int + TLS bool + To string + Username string + func (c SMTPConfig) Configured() bool + type Store struct + func Open(path string) (*Store, error) + func (s *Store) AckAlertEvent(ctx context.Context, id int64) error + func (s *Store) Audit(ctx context.Context, e AuditEntry) error + func (s *Store) AuthByID(ctx context.Context, id int64) (*RegistryAuth, error) + func (s *Store) AuthForHost(ctx context.Context, host string) (*RegistryAuth, error) + func (s *Store) Close() error + func (s *Store) CountAdmins(ctx context.Context) (int, error) + func (s *Store) CountUnacknowledged(ctx context.Context) (int, error) + func (s *Store) CountUsers(ctx context.Context) (int, error) + func (s *Store) CreateAlertRule(ctx context.Context, r *AlertRule) (int64, error) + func (s *Store) CreateHost(ctx context.Context, h *Host) (int64, error) + func (s *Store) CreateParseRule(ctx context.Context, name, pattern string) (int64, error) + func (s *Store) CreateRegistry(ctx context.Context, name, address, username, secret string) (int64, error) + func (s *Store) CreateUser(ctx context.Context, u *User) (int64, error) + func (s *Store) CreateWebhook(ctx context.Context, w *Webhook) (int64, error) + func (s *Store) DeleteAlertRule(ctx context.Context, id int64) error + func (s *Store) DeleteHost(ctx context.Context, id int64) error + func (s *Store) DeleteParseRule(ctx context.Context, id int64) error + func (s *Store) DeleteRegistry(ctx context.Context, id int64) error + func (s *Store) DeleteUser(ctx context.Context, id int64) error + func (s *Store) DeleteWebhook(ctx context.Context, id int64) error + func (s *Store) DisabledSections(ctx context.Context) ([]string, error) + func (s *Store) EnsureLocalHost(ctx context.Context) error + func (s *Store) GetLDAP(ctx context.Context) (LDAPConfig, error) + func (s *Store) GetSMTP(ctx context.Context) (SMTPConfig, error) + func (s *Store) HostByID(ctx context.Context, id int64) (*Host, error) + func (s *Store) InsertAlertEvent(ctx context.Context, e *AlertEvent) (int64, error) + func (s *Store) ListAlertEvents(ctx context.Context, limit int) ([]AlertEvent, error) + func (s *Store) ListAlertRules(ctx context.Context) ([]AlertRule, error) + func (s *Store) ListHosts(ctx context.Context) ([]Host, error) + func (s *Store) ListParseRules(ctx context.Context) ([]ParseRule, error) + func (s *Store) ListRegistries(ctx context.Context) ([]Registry, error) + func (s *Store) ListUsers(ctx context.Context) ([]User, error) + func (s *Store) ListWebhooks(ctx context.Context) ([]Webhook, error) + func (s *Store) LocalhostNo2FA(ctx context.Context) (bool, error) + func (s *Store) RecentAudit(ctx context.Context, limit int) ([]AuditEntry, error) + func (s *Store) SetAlertRuleEnabled(ctx context.Context, id int64, enabled bool) error + func (s *Store) SetCipher(c *crypto.Cipher) + func (s *Store) SetDisabledSections(ctx context.Context, keys []string) error + func (s *Store) SetHostAlertEmail(ctx context.Context, id int64, email string) error + func (s *Store) SetHostKey(ctx context.Context, id int64, key string) error + func (s *Store) SetLDAP(ctx context.Context, c LDAPConfig) error + func (s *Store) SetLocalhostNo2FA(ctx context.Context, on bool) error + func (s *Store) SetSMTP(ctx context.Context, c SMTPConfig) error + func (s *Store) SetSetting(ctx context.Context, key, value string) error + func (s *Store) SetTOTP(ctx context.Context, userID int64, secret string, enabled bool) error + func (s *Store) Setting(ctx context.Context, key string) (string, error) + func (s *Store) TouchLogin(ctx context.Context, userID int64) error + func (s *Store) UpdateAlertRule(ctx context.Context, id int64, r *AlertRule) error + func (s *Store) UpdatePassword(ctx context.Context, userID int64, hash string) error + func (s *Store) UpdateUserAccess(ctx context.Context, id int64, role string, readOnly bool, sections []string) error + func (s *Store) UserByID(ctx context.Context, id int64) (*User, error) + func (s *Store) UserByUsername(ctx context.Context, username string) (*User, error) + func (s *Store) WebhookByID(ctx context.Context, id int64) (*Webhook, error) + type User struct + AuthSource string + CreatedAt time.Time + ID int64 + LastLoginAt time.Time + PasswordHash string + ReadOnly bool + Role string + Sections []string + TOTPEnabled bool + TOTPSecret string + Username string + func (u *User) IsAdmin() bool + type Webhook struct + BodyTemplate string + CreatedAt time.Time + Headers map[string]string + ID int64 + Method string + Name string + URL string