Documentation
¶
Overview ¶
Package runtimeconfig defines explicit, validated process configuration.
Index ¶
Constants ¶
const NtfyTopic = "https://ntfy.sh/0x63616c-ai-agant"
NtfyTopic is the only supported milestone notification topic.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizationSink ¶
type AuthorizationSink interface {
// SetBearerToken applies the secret directly to a transport boundary.
SetBearerToken(string)
}
AuthorizationSink accepts a notifier bearer token without exposing it for diagnostics.
type Config ¶
type Config struct {
// Version is the validated configuration schema version.
Version int
// Notifier is the validated fixed-topic notifier configuration.
Notifier NotifierConfig
}
Config is validated runtime configuration.
func (Config) Diagnostics ¶
Diagnostics returns configuration that is safe to expose to authorized diagnostics.
type Input ¶
type Input struct {
// Version selects the supported configuration schema.
Version int
// Notifier supplies explicit milestone notification configuration.
Notifier NotifierInput
}
Input is explicit unvalidated runtime configuration from a composition root.
type NotifierConfig ¶
type NotifierConfig struct {
// Topic is the validated fixed notifier topic.
Topic string
// contains filtered or unexported fields
}
NotifierConfig is validated fixed-topic notifier configuration.
func (NotifierConfig) ApplyAuthorization ¶
func (c NotifierConfig) ApplyAuthorization(sink AuthorizationSink)
ApplyAuthorization supplies the token only to an explicit notifier transport sink.
func (NotifierConfig) LogValue ¶
func (c NotifierConfig) LogValue() slog.Value
LogValue implements slog.LogValuer with only safe notifier configuration values.
func (NotifierConfig) String ¶
func (c NotifierConfig) String() string
String returns a redacted diagnostic representation of NotifierConfig.
type NotifierInput ¶
type NotifierInput struct {
// Topic optionally repeats the one allowlisted notifier topic.
Topic string
// AccessToken is passed only to an explicit authorization sink.
AccessToken string
}
NotifierInput is the explicit notifier configuration supplied at startup.