Documentation ¶
Overview ¶
Package cli implements the gopass CLI.
Index ¶
- func Run(ctx context.Context, cfg CommandConfig, cmdAndArgs []string) error
- type CommandConfig
- type DefaultConfig
- func (cfg *DefaultConfig) Editor() string
- func (cfg *DefaultConfig) PasswordStore() *store.PasswordStore
- func (cfg *DefaultConfig) PasswordStoreDir() string
- func (cfg *DefaultConfig) ReaderInput() io.Reader
- func (cfg *DefaultConfig) WriterError() io.Writer
- func (cfg *DefaultConfig) WriterOutput() io.Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CommandConfig ¶
type CommandConfig interface { WriterOutput() io.Writer WriterError() io.Writer ReaderInput() io.Reader Editor() string PasswordStoreDir() string PasswordStore() *store.PasswordStore }
CommandConfig contains everything that commands needs to run.
func NewCommandConfig ¶
func NewCommandConfig(writerOutput, writerError io.Writer, readerInput io.Reader) CommandConfig
NewCommandConfig creates a CommandConfig.
type DefaultConfig ¶
type DefaultConfig struct {
// contains filtered or unexported fields
}
DefaultConfig is a default CommandConfig implementation.
func (*DefaultConfig) Editor ¶
func (cfg *DefaultConfig) Editor() string
Editor returns the configured editor.
func (*DefaultConfig) PasswordStore ¶
func (cfg *DefaultConfig) PasswordStore() *store.PasswordStore
PasswordStore returns the PasswordStore.
func (*DefaultConfig) PasswordStoreDir ¶
func (cfg *DefaultConfig) PasswordStoreDir() string
PasswordStoreDir returns the password store directory.
func (*DefaultConfig) ReaderInput ¶
func (cfg *DefaultConfig) ReaderInput() io.Reader
ReaderInput returns the input reader
func (*DefaultConfig) WriterError ¶
func (cfg *DefaultConfig) WriterError() io.Writer
WriterError returns the output writer
func (*DefaultConfig) WriterOutput ¶
func (cfg *DefaultConfig) WriterOutput() io.Writer
WriterOutput returns the output writer
Click to show internal directories.
Click to hide internal directories.