From 39cb5554602f39fb40a50b66fee36acb369e5b46 Mon Sep 17 00:00:00 2001 From: Anirudh Oppiliappan Date: Tue, 25 Aug 2026 15:44:02 +0300 Subject: [PATCH] deliberi/config: add optional cloudflare kv envs --- deliberi/config/config.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/deliberi/config/config.go b/deliberi/config/config.go index 09753b84..6f3f66a4 100644 --- a/deliberi/config/config.go +++ b/deliberi/config/config.go @@ -7,11 +7,9 @@ import ( ) type Config struct { - // ListenAddr is where deliberi's xrpc + health server binds. ListenAddr string `env:"DELIBERI_LISTEN_ADDR, default=0.0.0.0:6565"` - // Hostname is deliberi's public hostname; it derives deliberi's did:web, - // used as the audience for verifying inbound service-auth tokens. + // public hostname; derives deliberi's did:web, the audience for service auth Hostname string `env:"DELIBERI_HOSTNAME, required"` DbPath string `env:"DELIBERI_DB_PATH, default=deliberi.db"` @@ -19,16 +17,19 @@ type Config struct { PlcUrl string `env:"DELIBERI_PLC_URL, default=https://plc.directory"` JetstreamEndpoint string `env:"DELIBERI_JETSTREAM_ENDPOINT, default=wss://jetstream1.us-east.bsky.network/subscribe"` - // BobbinApiUrl hosts listRecipients (subscriber fan-out); called as a - // plain internal xrpc, no auth. + // listRecipients subscriber fan-out; plain internal xrpc, no auth BobbinApiUrl string `env:"DELIBERI_BOBBIN_API_URL, default=https://api.tangled.org"` - // BaseURL is the public frontend URL used to build links in digest emails. BaseURL string `env:"DELIBERI_BASE_URL, default=https://tangled.org"` Pds PdsConfig `env:",prefix=DELIBERI_PDS_"` Resend ResendConfig `env:",prefix=DELIBERI_RESEND_"` + // optional; any unset leaves the KV cache client nil + CloudflareAccountID string `env:"CLOUDFLARE_ACCOUNT_ID"` + KvApiToken string `env:"DELIBERI_KV_API_TOKEN"` + KvNamespaceID string `env:"DELIBERI_KV_NAMESPACE_ID"` + Dev bool `env:"DELIBERI_DEV, default=false"` } -- 2.51.2