Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(factory CmdFactory, flags CommandFlags, args ...string)
Types ¶
type CmdFactory ¶
type CmdFactory func() Subcommand
type CommandFlags ¶
type CommandFlags uint32
const ( NeedRepositoryKey CommandFlags = 1 << iota BeforeRepositoryWithStorage BeforeRepositoryOpen )
type Subcommand ¶
type Subcommand interface {
Parse(ctx *appcontext.AppContext, args []string) error
Execute(ctx *appcontext.AppContext, repo *repository.Repository) (int, error)
GetRepositorySecret() []byte
GetFlags() CommandFlags
// contains filtered or unexported methods
}
type SubcommandBase ¶
type SubcommandBase struct {
RepositorySecret []byte
Flags CommandFlags
}
func (*SubcommandBase) GetFlags ¶
func (cmd *SubcommandBase) GetFlags() CommandFlags
func (*SubcommandBase) GetRepositorySecret ¶
func (cmd *SubcommandBase) GetRepositorySecret() []byte
Click to show internal directories.
Click to hide internal directories.