Covers the MOPAC briefing/report surface (Redmine 495 Part A): category
list/create (create needs the admin-scoped key; current key 403s, typed
as ErrForbidden), topic create/list/latest/get, post create/update/get,
current-user identity probe, and a Do() JSON passthrough so unmodeled
endpoints need no client release. Key is env/constructor-only, never a
flag, never logged; errors classify via errors.Is. Fake-server unit
tests + containerized end-to-end smoke (redaction sweep included); live
reads verified against community.turnsys.com.
💘 Generated with Crush
Assisted-by: Crush:glm-5.2
15 lines
596 B
Plaintext
15 lines
596 B
Plaintext
# mopac-discourse-go credentials (copy to a 0600 file, e.g.
|
|
# ~/.config/discourse-go/env, source it, and fill in). Values are NEVER
|
|
# passed as flags or arguments. Any *.env file in this repo is gitignored.
|
|
#
|
|
# Instance root, no trailing slash.
|
|
DISCOURSE_URL=https://community.turnsys.com
|
|
|
|
# Discourse API key (Admin API > Keys, or a user API key). Creating
|
|
# categories requires an admin-scoped key; a standard key 403s there.
|
|
DISCOURSE_API_KEY=replace-me
|
|
|
|
# The user the key acts as (must match the key's allowed username, or be
|
|
# "system" for global keys).
|
|
DISCOURSE_API_USERNAME=reachableceo
|