Documentation
¶
Index ¶
- type FlagConfig
- type KeyOptionsdeprecated
- type OptionsSet
- type OptionsSetConfig
- type OutputFiledeprecated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FlagConfig ¶ added in v0.2.0
FlagConfig holds the configuration of a flag
type KeyOptions
deprecated
type KeyOptions struct {
PublicKeyPaths []string
// contains filtered or unexported fields
}
KeyOptions provides key file configuration for Carabiner applications.
Deprecated: Use github.com/carabiner-dev/command/keys.Options instead.
func (*KeyOptions) AddFlags
deprecated
func (ko *KeyOptions) AddFlags(cmd *cobra.Command)
AddFlags adds the options flags to a command.
Deprecated: Use github.com/carabiner-dev/command/keys.Options instead.
func (*KeyOptions) Config
deprecated
added in
v0.2.0
func (ko *KeyOptions) Config() *OptionsSetConfig
Config returns the flag configuration for key options.
Deprecated: Use github.com/carabiner-dev/command/keys.Options instead.
func (*KeyOptions) ParseKeys
deprecated
func (ko *KeyOptions) ParseKeys() ([]key.PublicKeyProvider, error)
ParseKeys parses the key files and returns a slice of public key providers.
Deprecated: Use github.com/carabiner-dev/command/keys.Options instead.
func (*KeyOptions) Validate
deprecated
added in
v0.1.1
func (ko *KeyOptions) Validate() error
Validate checks the options. Key files are verified to check if they exist.
Deprecated: Use github.com/carabiner-dev/command/keys.Options instead.
type OptionsSet ¶
type OptionsSet interface {
AddFlags(*cobra.Command)
Validate() error
Config() *OptionsSetConfig
}
OptionsSet is an interface that defines the functions options set need to implement to make them reusable.
type OptionsSetConfig ¶ added in v0.2.0
type OptionsSetConfig struct {
FlagPrefix string
Flags map[string]FlagConfig
}
OptionsSetConfig configures a flag
func (*OptionsSetConfig) HelpText ¶ added in v0.2.0
func (c *OptionsSetConfig) HelpText(id string) string
func (*OptionsSetConfig) LongFlag ¶ added in v0.2.0
func (c *OptionsSetConfig) LongFlag(id string) string
func (*OptionsSetConfig) ShortFlag ¶ added in v0.2.0
func (c *OptionsSetConfig) ShortFlag(id string) string
type OutputFile
deprecated
added in
v0.2.0
type OutputFile struct {
OutputPath string
// contains filtered or unexported fields
}
OutputFile provides output file configuration for Carabiner applications.
Deprecated: Use github.com/carabiner-dev/command/output.Options instead.
func (*OutputFile) AddFlags
deprecated
added in
v0.2.0
func (oo *OutputFile) AddFlags(cmd *cobra.Command)
AddFlags adds the options flags to a command.
Deprecated: Use github.com/carabiner-dev/command/output.Options instead.
func (*OutputFile) Config
deprecated
added in
v0.2.0
func (oo *OutputFile) Config() *OptionsSetConfig
Config returns the flag configuration for output options.
Deprecated: Use github.com/carabiner-dev/command/output.Options instead.
func (*OutputFile) GetWriter
deprecated
added in
v0.2.0
func (oo *OutputFile) GetWriter() (io.Writer, error)
GetWriter returns a writer for the output.
Deprecated: Use github.com/carabiner-dev/command/output.Options instead.
func (*OutputFile) Validate
deprecated
added in
v0.2.0
func (oo *OutputFile) Validate() error
Validate checks the output options.
Deprecated: Use github.com/carabiner-dev/command/output.Options instead.