Documentation
¶
Overview ¶
Package config loads and validates runtime configuration from the environment.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// BaseURL is the New API origin, e.g. http://127.0.0.1:3001.
// It must not carry a trailing slash or an /api suffix.
BaseURL string
// AccessToken is a New API personal access token (not a relay/API key).
AccessToken string
// UserID is the numeric New API user id sent as the New-Api-User header.
UserID string
// Timeout bounds a single upstream request.
Timeout time.Duration
// ReadOnly rejects every mutating tool call.
ReadOnly bool
// QuotaPerUnit converts New API's internal quota integers to currency units.
// New API ships 500000 quota per $1 (common/constants.go: QuotaPerUnit).
QuotaPerUnit float64
Transport Transport
HTTPAddr string
HTTPToken string
LogLevel string
LogFormat string
}
Config is the fully validated runtime configuration.
Click to show internal directories.
Click to hide internal directories.