Documentation
¶
Overview ¶
Package credentials manages CLI authentication tokens stored in the user's config directory (~/.config/pbflags/credentials.yaml).
Lookup order:
- PBFLAGS_TOKEN environment variable (wins if set)
- ~/.config/pbflags/credentials.yaml
- No token (unauthenticated)
The credentials file is created with 0600 permissions and the package refuses to read files that are group- or world-readable.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Save ¶
func Save(creds Credentials) error
Save writes credentials to ~/.config/pbflags/credentials.yaml with 0600 permissions, creating the directory if needed.
Types ¶
type Credentials ¶
Credentials holds stored authentication details.
func Load ¶
func Load() (Credentials, error)
Load returns the active credentials using the lookup order: PBFLAGS_TOKEN env var, then credentials.yaml file. Returns a zero Credentials (no error) if neither source is available.
Click to show internal directories.
Click to hide internal directories.