Documentation
¶
Overview ¶
Package credential handles env template parsing and credential resolution.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoopProvider = errors.New("credential provider is not configured")
Functions ¶
func NormalizeEnvValue ¶ added in v0.3.0
NormalizeEnvValue trims surrounding quotes from dotenv-style values so the launched process receives the literal token, not the quote characters.
Types ¶
type Entry ¶
type Entry struct {
EnvVar string // e.g., "GITHUB_TOKEN"
Provider string // e.g., "github"
Resource string // e.g., "readonly" (optional, after /)
Raw string // e.g., "{{kontext:github}}"
}
Entry represents a single credential placeholder from the env template.
func ParseTemplate ¶
ParseTemplate reads an env template file and extracts credential placeholders.
type InvalidPlaceholder ¶ added in v0.3.0
type ManagedProvider ¶ added in v0.3.0
type NoopProvider ¶ added in v0.7.0
type NoopProvider struct{}
func (NoopProvider) ResolveCredential ¶ added in v0.7.0
type ProviderFunc ¶ added in v0.7.0
func (ProviderFunc) ResolveCredential ¶ added in v0.7.0
type SyncResult ¶ added in v0.3.0
type SyncResult struct {
Created bool
Updated bool
Added []ManagedProvider
CollisionSkipped []ManagedProvider
Template *TemplateFile
}
func EnsureManagedTemplate ¶ added in v0.3.0
func EnsureManagedTemplate(path string, managed []ManagedProvider) (*SyncResult, error)
type TemplateFile ¶ added in v0.3.0
type TemplateFile struct {
Entries []Entry
ExistingValues map[string]string
InvalidPlaceholders []InvalidPlaceholder
SafeToMutate bool
MutationWarning string
HasManagedPlaceholds bool
}
func LoadTemplateFile ¶ added in v0.3.0
func LoadTemplateFile(path string) (*TemplateFile, error)
Click to show internal directories.
Click to hide internal directories.