Documentation
¶
Overview ¶
Package appconfig serves public and admin configuration endpoints.
Package appconfig holds admin-editable application settings (branding, sign-up policy, session lifetimes, email toggles) stored in the database and overlaid on internal/config env defaults.
Index ¶
Constants ¶
const ModuleName = "appconfig"
ModuleName identifies the appconfig module in the registry.
Variables ¶
This section is empty.
Functions ¶
func CIMDAllowlist ¶
CIMDAllowlist reads the operator-managed CIMD URL allowlist from the merged values (JSON array; default deny when unset).
Types ¶
type MailSender ¶
MailSender queues transactional email; internal/jobs implements it.
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module mounts the configuration endpoints.
func New ¶
func New(mailer MailSender, opts ...Option) *Module
New builds the module. A nil mailer leaves the test-email route unmounted (fail closed); the config CRUD needs WithStore.
func (*Module) APIRoutes ¶
APIRoutes mounts the retained public bootstrap endpoint relative to /api. The admin CRUD and test-email surfaces serve ConnectRPC exclusively (see handler_rpc.go).
func (*Module) MergedValues ¶
MergedValues folds the catalog defaults with the stored overrides — the cross-module read path (the registry wires the CIMD allowlist from it).
func (*Module) RPCService ¶ added in v0.0.12
RPCService returns the Connect registration for the application configuration surface. The public bootstrap view is anonymous; the admin read, update, and test email guard per procedure.
type PostgresStore ¶
type PostgresStore struct {
// contains filtered or unexported fields
}
PostgresStore persists overrides in public.app_config.
func NewPostgresStore ¶
func NewPostgresStore(store datastore.Store) *PostgresStore
NewPostgresStore builds the production config store. The store supplies both the read/write executor and transactions.