Documentation
¶
Index ¶
- func EncryptionPlugins(appName string) (kong.Plugins, error)
- type CreateKeys
- type Decrypt
- type Edit
- type Encrypt
- type GlobalOption
- func GlobalAppName(appName string) GlobalOption
- func GlobalBaseDir(provider func() string) GlobalOption
- func GlobalEncryptionPlugins(plugins kong.Plugins) GlobalOption
- func GlobalLogger(logger io.Writer) GlobalOption
- func GlobalReader(reader io.Reader) GlobalOption
- func GlobalWriter(writer io.Writer) GlobalOption
- type GlobalOptions
- func (o *GlobalOptions) AfterApply() error
- func (o *GlobalOptions) AppName() string
- func (o *GlobalOptions) CliGroups() []kong.Group
- func (o *GlobalOptions) DefaultProvider() string
- func (o *GlobalOptions) Logger() log.Logger
- func (o *GlobalOptions) NewEncrypters() (crypto.Encrypters, error)
- func (o *GlobalOptions) Reader() io.Reader
- func (o *GlobalOptions) Writer() io.Writer
- type Password
- type Recrypt
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateKeys ¶
type CreateKeys struct { Force bool `kong:"help='Overwrite existing data',negatable,short='f'"` Timeout time.Duration `kong:"help='Time limit for secreat generation',short='t',default='5s'"` }
func NewCreateKeys ¶
func NewCreateKeys() *CreateKeys
func (*CreateKeys) Run ¶
func (c *CreateKeys) Run(ctx *GlobalOptions) error
type Decrypt ¶
type Decrypt struct { Parse bool `kong:"help='Parse the input for tokens instead of decrypting everything',negatable,short='p'"` File *os.File `kong:"arg,placeholder='FILE',default='-'"` }
func NewDecrypt ¶
func NewDecrypt() *Decrypt
func (*Decrypt) Run ¶
func (c *Decrypt) Run(ctx *GlobalOptions) error
type Edit ¶
type Edit struct { Preamble bool `kong:"help='Prefix edit sessions with the informative preamble',negatable,default='true'"` Decrypt bool `kong:"help='Decrypt existing encrypted content. New content marked properly will be encrypted',negatable,default='true'"` Editor string `kong:"help='Command to invoke for editing if $EDITOR is not set'"` File string `kong:"arg,type='path',placeholder='FILE'"` }
func (*Edit) Run ¶
func (c *Edit) Run(ctx *GlobalOptions) error
type Encrypt ¶
type Encrypt struct { Parse bool `kong:"help='Parse the input for tokens instead of encrypting everything',negatable,short='p'"` File *os.File `kong:"arg,placeholder='FILE',default='-'"` }
func NewEncrypt ¶
func NewEncrypt() *Encrypt
func (*Encrypt) Run ¶
func (c *Encrypt) Run(ctx *GlobalOptions) error
type GlobalOption ¶
type GlobalOption func(*GlobalOptions)
func GlobalAppName ¶
func GlobalAppName(appName string) GlobalOption
func GlobalBaseDir ¶
func GlobalBaseDir(provider func() string) GlobalOption
func GlobalEncryptionPlugins ¶
func GlobalEncryptionPlugins(plugins kong.Plugins) GlobalOption
func GlobalLogger ¶
func GlobalLogger(logger io.Writer) GlobalOption
func GlobalReader ¶
func GlobalReader(reader io.Reader) GlobalOption
func GlobalWriter ¶
func GlobalWriter(writer io.Writer) GlobalOption
type GlobalOptions ¶
type GlobalOptions struct { kong.Plugins EncryptMethod string `kong:"help='Override default encryption and decryption method',default='pkcs7',short='n',name='encrypt-method'"` Verbose int `kong:"help='Increase output verbosity. Repeat for increased verbosity',type='counter',short='v'"` Quiet bool `kong:"help='Disable any log output.',negatable,short='q'"` Config kong.ConfigFlag `kong:"help='Path to the configuration file',placeholder='FILE'"` // contains filtered or unexported fields }
func NewGlobalOptions ¶
func NewGlobalOptions(options ...GlobalOption) *GlobalOptions
func (*GlobalOptions) AfterApply ¶
func (o *GlobalOptions) AfterApply() error
func (*GlobalOptions) AppName ¶
func (o *GlobalOptions) AppName() string
func (*GlobalOptions) CliGroups ¶
func (o *GlobalOptions) CliGroups() []kong.Group
func (*GlobalOptions) DefaultProvider ¶
func (o *GlobalOptions) DefaultProvider() string
func (*GlobalOptions) Logger ¶
func (o *GlobalOptions) Logger() log.Logger
func (*GlobalOptions) NewEncrypters ¶
func (o *GlobalOptions) NewEncrypters() (crypto.Encrypters, error)
func (*GlobalOptions) Reader ¶
func (o *GlobalOptions) Reader() io.Reader
func (*GlobalOptions) Writer ¶
func (o *GlobalOptions) Writer() io.Writer
type Password ¶
type Password struct { }
func NewPassword ¶
func NewPassword() *Password
func (*Password) Run ¶
func (c *Password) Run(ctx *GlobalOptions) error
type Recrypt ¶
func NewRecrypt ¶
func NewRecrypt() *Recrypt
func (*Recrypt) Run ¶
func (c *Recrypt) Run(ctx *GlobalOptions) error
type Version ¶
type Version struct { }
func NewVersion ¶
func NewVersion() *Version
func (*Version) Run ¶
func (c *Version) Run(ctx *GlobalOptions) error
Click to show internal directories.
Click to hide internal directories.