Documentation
¶
Overview ¶
Package secrets resolves the GitHub token. A missing token is never fatal: GitHub-dependent features degrade to "unknown" rather than failing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KeychainHint ¶
KeychainHint returns the command that stores a token, for error messages and `flow doctor`.
Types ¶
type Resolver ¶
type Resolver struct {
Runner flowexec.Runner
// Getenv is os.Getenv in production; tests substitute their own.
Getenv func(string) string
// KeychainService is the macOS keychain service name to query.
KeychainService string
// ConfigToken is github.token from the config file.
ConfigToken string
}
Resolver finds a GitHub token.
type Source ¶
type Source string
Source names where a token came from, for `flow doctor`. The token value itself is never logged or displayed.
const ( SourceNone Source = "none" SourceGitHubToken Source = "$GITHUB_TOKEN" SourceGHToken Source = "$GH_TOKEN" SourceConfig Source = "config github.token" SourceKeychain Source = "macOS keychain" )
The token resolution order, first hit wins. These are the names of the sources, never the values found in them.
Click to show internal directories.
Click to hide internal directories.