Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CLIProvider ¶
type CLIProvider struct {
// contains filtered or unexported fields
}
CLIProvider resolves arguments from command-line key=value pairs. It validates that all provided keys match known argument names.
func NewCLIProvider ¶
func NewCLIProvider(cliArgs []string) (*CLIProvider, error)
func (*CLIProvider) Provide ¶
func (p *CLIProvider) Provide(args []Arg) ([]ResolvedArg, error)
type ErrorProvider ¶
type ErrorProvider struct {
// contains filtered or unexported fields
}
ErrorProvider always returns an error. Useful for testing error handling.
func NewErrorProvider ¶
func NewErrorProvider(err error) *ErrorProvider
func (*ErrorProvider) Provide ¶
func (p *ErrorProvider) Provide(args []Arg) ([]ResolvedArg, error)
type InteractiveProvider ¶
type InteractiveProvider struct {
// contains filtered or unexported fields
}
InteractiveProvider prompts the user for each argument via stdin/stdout.
func NewInteractiveProvider ¶
func NewInteractiveProvider(in io.Reader, out io.Writer) *InteractiveProvider
func (*InteractiveProvider) Provide ¶
func (p *InteractiveProvider) Provide(args []Arg) ([]ResolvedArg, error)
type MissingArgsError ¶
type MissingArgsError []Arg
func (MissingArgsError) Error ¶
func (e MissingArgsError) Error() string
type Provider ¶
type Provider interface {
Provide(args []Arg) ([]ResolvedArg, error)
}
type ResolvedArg ¶
type StaticProvider ¶
type StaticProvider struct {
// contains filtered or unexported fields
}
StaticProvider returns a fixed set of resolved arguments. Useful for testing.
func NewStaticProvider ¶
func NewStaticProvider(values ...ResolvedArg) *StaticProvider
func (*StaticProvider) Provide ¶
func (p *StaticProvider) Provide(args []Arg) ([]ResolvedArg, error)
type StrictProviderChain ¶
type StrictProviderChain struct {
// contains filtered or unexported fields
}
StrictProviderChain chains multiple providers and ensures all required arguments are resolved. It stops early once all required arguments are satisfied.
func NewStrictProviderChain ¶
func NewStrictProviderChain(providers ...Provider) *StrictProviderChain
func (*StrictProviderChain) Provide ¶
func (p *StrictProviderChain) Provide(args []Arg) ([]ResolvedArg, error)
Click to show internal directories.
Click to hide internal directories.