Documentation
¶
Index ¶
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 ¶
type KeyOptions struct {
PublicKeyPaths []string
// contains filtered or unexported fields
}
func (*KeyOptions) AddFlags ¶
func (ko *KeyOptions) AddFlags(cmd *cobra.Command)
AddFlags adds the options flags to a command
func (*KeyOptions) Config ¶ added in v0.2.0
func (ko *KeyOptions) Config() *OptionsSetConfig
func (*KeyOptions) ParseKeys ¶
func (ko *KeyOptions) ParseKeys() ([]key.PublicKeyProvider, error)
ParseKeys parses the key files and returns a slice of public key providers.
func (*KeyOptions) Validate ¶ added in v0.1.1
func (ko *KeyOptions) Validate() error
Verify checks the options. Key files are verified to check if they exist
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 ¶ added in v0.2.0
type OutputFile struct {
OutputPath string
// contains filtered or unexported fields
}
func (*OutputFile) AddFlags ¶ added in v0.2.0
func (oo *OutputFile) AddFlags(cmd *cobra.Command)
AddFlags adds the options flags to a command
func (*OutputFile) Config ¶ added in v0.2.0
func (oo *OutputFile) Config() *OptionsSetConfig
func (*OutputFile) Validate ¶ added in v0.2.0
func (oo *OutputFile) Validate() error
Click to show internal directories.
Click to hide internal directories.