Documentation
¶
Index ¶
- func ApplyToConfig(base *config.Config, runtime *RuntimeSettings) *config.Config
- func ValidateArrIntegrations(integrations []ArrIntegrationRuntimeSettings) error
- type ArrIntegrationRuntimeSettings
- type DownloadRuntimeSettings
- type IndexerRuntimeSettings
- type IndexingRuntimeSettings
- type RuntimeSettings
- type RuntimeSettingsPatch
- type ServerRuntimeSettings
- type Store
- func (s *Store) Close() error
- func (s *Store) CountAuthUsers(ctx context.Context) (int, error)
- func (s *Store) CreateAuthSession(ctx context.Context, session auth.Session) error
- func (s *Store) CreateAuthToken(ctx context.Context, token auth.StoredToken) error
- func (s *Store) CreateInitialAuthUser(ctx context.Context, user auth.StoredUser, roleIDs []string) error
- func (s *Store) DeleteAuthRole(ctx context.Context, roleID string) error
- func (s *Store) DeleteAuthSession(ctx context.Context, sessionID string) error
- func (s *Store) DeleteAuthUser(ctx context.Context, userID string) error
- func (s *Store) EnsureAuthDefaults(ctx context.Context, roles []auth.Role) error
- func (s *Store) ExpectedSchemaVersion() int
- func (s *Store) GetAuthSession(ctx context.Context, sessionID string) (*auth.Session, error)
- func (s *Store) GetAuthTokenByHash(ctx context.Context, tokenHash string) (*auth.StoredToken, error)
- func (s *Store) GetAuthTokenByID(ctx context.Context, tokenID string) (*auth.StoredToken, error)
- func (s *Store) GetAuthUserByID(ctx context.Context, userID string) (*auth.StoredUser, error)
- func (s *Store) GetAuthUserByUsername(ctx context.Context, username string) (*auth.StoredUser, error)
- func (s *Store) GetRuntimeSettings(ctx context.Context, base ...*config.Config) (*RuntimeSettings, error)
- func (s *Store) ListAuthRoles(ctx context.Context) ([]auth.Role, error)
- func (s *Store) ListAuthTokens(ctx context.Context) ([]auth.Token, error)
- func (s *Store) ListAuthTokensByUserID(ctx context.Context, userID string) ([]auth.Token, error)
- func (s *Store) ListAuthUserRoleIDs(ctx context.Context, userID string) ([]string, error)
- func (s *Store) ListAuthUsers(ctx context.Context) ([]auth.StoredUser, error)
- func (s *Store) LoadEffectiveSettings(ctx context.Context, base *config.Config) (*config.Config, error)
- func (s *Store) Ping(ctx context.Context) error
- func (s *Store) ReplaceAuthUserRoles(ctx context.Context, userID string, roleIDs []string) error
- func (s *Store) RevokeAuthToken(ctx context.Context, tokenID string) error
- func (s *Store) RunMigrations() error
- func (s *Store) SchemaVersion(ctx context.Context) (int, error)
- func (s *Store) TouchAuthSession(ctx context.Context, sessionID string, seenAt time.Time) error
- func (s *Store) TouchAuthToken(ctx context.Context, tokenID string, seenAt time.Time) error
- func (s *Store) UpdateSettings(ctx context.Context, next *RuntimeSettings) error
- func (s *Store) UpsertAuthRole(ctx context.Context, role auth.Role) error
- func (s *Store) UpsertAuthUser(ctx context.Context, user auth.StoredUser) error
- func (s *Store) ValidateSchema(ctx context.Context) error
- func (s *Store) WatchSettingsChanges(ctx context.Context) (<-chan struct{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyToConfig ¶
func ApplyToConfig(base *config.Config, runtime *RuntimeSettings) *config.Config
apply runtime-editable settings on top of bootstrap config.
func ValidateArrIntegrations ¶
func ValidateArrIntegrations(integrations []ArrIntegrationRuntimeSettings) error
Types ¶
type ArrIntegrationRuntimeSettings ¶
type ArrIntegrationRuntimeSettings = app.ArrIntegrationRuntimeSettings
type DownloadRuntimeSettings ¶
type DownloadRuntimeSettings = app.DownloadRuntimeSettings
type IndexerRuntimeSettings ¶
type IndexerRuntimeSettings = app.IndexerRuntimeSettings
type IndexingRuntimeSettings ¶
type IndexingRuntimeSettings = app.IndexingRuntimeSettings
type RuntimeSettings ¶
type RuntimeSettings = app.RuntimeSettings
runtime-editable settings model for Milestone 8.X chunk 1. Bootstrap-only fields stay in config.yaml/env and are not represented here.
func ApplyPatch ¶
func ApplyPatch(current *RuntimeSettings, patch *RuntimeSettingsPatch) *RuntimeSettings
exported patch helper for admin API preview/validation path.
func CloneRuntimeSettings ¶
func CloneRuntimeSettings(in *RuntimeSettings) *RuntimeSettings
explicit clone used when persisting a validated full snapshot.
func FromConfig ¶
func FromConfig(cfg *config.Config) *RuntimeSettings
derive editable runtime state from current effective config.
func RedactedCopy ¶
func RedactedCopy(in *RuntimeSettings) *RuntimeSettings
redact runtime secrets before returning settings through API.
type RuntimeSettingsPatch ¶
type RuntimeSettingsPatch = app.RuntimeSettingsPatch
type ServerRuntimeSettings ¶
type ServerRuntimeSettings = app.ServerRuntimeSettings
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) CountAuthUsers ¶ added in v0.7.0
func (*Store) CreateAuthSession ¶ added in v0.7.0
func (*Store) CreateAuthToken ¶ added in v0.7.0
func (*Store) CreateInitialAuthUser ¶ added in v0.7.0
func (*Store) DeleteAuthRole ¶ added in v0.7.0
func (*Store) DeleteAuthSession ¶ added in v0.7.0
func (*Store) DeleteAuthUser ¶ added in v0.7.0
func (*Store) EnsureAuthDefaults ¶ added in v0.7.0
func (*Store) ExpectedSchemaVersion ¶
func (*Store) GetAuthSession ¶ added in v0.7.0
func (*Store) GetAuthTokenByHash ¶ added in v0.7.0
func (*Store) GetAuthTokenByID ¶ added in v0.7.0
func (*Store) GetAuthUserByID ¶ added in v0.7.0
func (*Store) GetAuthUserByUsername ¶ added in v0.7.0
func (*Store) GetRuntimeSettings ¶
func (s *Store) GetRuntimeSettings(ctx context.Context, base ...*config.Config) (*RuntimeSettings, error)
return the latest persisted runtime settings revision. If no row exists yet, fall back to bootstrap-derived defaults.
func (*Store) ListAuthRoles ¶ added in v0.7.0
func (*Store) ListAuthTokens ¶ added in v0.7.0
func (*Store) ListAuthTokensByUserID ¶ added in v0.7.0
func (*Store) ListAuthUserRoleIDs ¶ added in v0.7.0
func (*Store) ListAuthUsers ¶ added in v0.7.0
func (*Store) LoadEffectiveSettings ¶
func (s *Store) LoadEffectiveSettings(ctx context.Context, base *config.Config) (*config.Config, error)
load latest runtime settings revision and overlay it onto bootstrap config.
func (*Store) ReplaceAuthUserRoles ¶ added in v0.7.0
func (*Store) RevokeAuthToken ¶ added in v0.7.0
func (*Store) RunMigrations ¶
func (*Store) TouchAuthSession ¶ added in v0.7.0
func (*Store) TouchAuthToken ¶ added in v0.7.0
func (*Store) UpdateSettings ¶
func (s *Store) UpdateSettings(ctx context.Context, next *RuntimeSettings) error
patch and persist the latest runtime settings state as a new atomic revision.