Documentation
¶
Overview ¶
Package config turns the environment and Keychain token into a Config. It never reads process state; callers pass everything in.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
HubURL *url.URL // no trailing slash; may include a base path
Token Secret
TokenSource TokenSource
TokenUserID string // the token's "id" claim
TokenExpiresAt time.Time // checked later; an expired token still parses
LogLevel slog.Level
}
Config is the validated startup configuration.
type Secret ¶
type Secret string
Secret is a string that prints as "***" in fmt, slog and JSON.
func (Secret) MarshalJSON ¶
MarshalJSON implements encoding/json.Marshaler.
type TokenSource ¶ added in v0.2.0
type TokenSource string
TokenSource is where the hub token came from.
const ( SourceKeychain TokenSource = "keychain" SourceEnv TokenSource = "env" )
The token sources.