command

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands = map[string]Command{
	"help":    NewHelpCommand(),
	"init":    NewInitCommand(),
	"dump":    NewDumpCommand(),
	"update":  NewUpdateCommand(),
	"ls":      NewLsCommand(),
	"get":     NewGetCommand(),
	"set":     NewSetCommand(),
	"rm":      NewRmCommand(),
	"version": NewVersionCommand(),
}

Functions

func ParseArgs

func ParseArgs(m *manager.Manager, args []string) error

Types

type Command

type Command interface {
	Parse([]string) error
	Apply(*manager.Manager) error
}

type DumpCommand

type DumpCommand struct {
	// contains filtered or unexported fields
}

func NewDumpCommand

func NewDumpCommand() *DumpCommand

func (*DumpCommand) Apply

func (cmd *DumpCommand) Apply(m *manager.Manager) error

func (*DumpCommand) Parse

func (cmd *DumpCommand) Parse(args []string) error

type GetCommand

type GetCommand struct {
	// contains filtered or unexported fields
}

func NewGetCommand

func NewGetCommand() *GetCommand

func (*GetCommand) Apply

func (cmd *GetCommand) Apply(m *manager.Manager) error

func (*GetCommand) Parse

func (cmd *GetCommand) Parse(args []string) error

type HelpCommand

type HelpCommand struct {
	// contains filtered or unexported fields
}

func NewHelpCommand

func NewHelpCommand() *HelpCommand

func (*HelpCommand) Apply

func (cmd *HelpCommand) Apply(m *manager.Manager) error

func (*HelpCommand) Parse

func (cmd *HelpCommand) Parse(args []string) error

type InitCommand

type InitCommand struct {
	// contains filtered or unexported fields
}

func NewInitCommand

func NewInitCommand() *InitCommand

func (*InitCommand) Apply

func (cmd *InitCommand) Apply(m *manager.Manager) error

func (*InitCommand) Parse

func (cmd *InitCommand) Parse(args []string) error

type LsCommand

type LsCommand struct {
	// contains filtered or unexported fields
}

func NewLsCommand

func NewLsCommand() *LsCommand

func (*LsCommand) Apply

func (cmd *LsCommand) Apply(m *manager.Manager) error

func (*LsCommand) Parse

func (cmd *LsCommand) Parse(args []string) error

type RmCommand

type RmCommand struct {
	// contains filtered or unexported fields
}

func NewRmCommand

func NewRmCommand() *RmCommand

func (*RmCommand) Apply

func (cmd *RmCommand) Apply(m *manager.Manager) error

func (*RmCommand) Parse

func (cmd *RmCommand) Parse(args []string) error

type SetCommand

type SetCommand struct {
	// contains filtered or unexported fields
}

func NewSetCommand

func NewSetCommand() *SetCommand

func (*SetCommand) Apply

func (cmd *SetCommand) Apply(m *manager.Manager) error

func (*SetCommand) Parse

func (cmd *SetCommand) Parse(args []string) error

type UpdateCommand

type UpdateCommand struct {
	// contains filtered or unexported fields
}

func NewUpdateCommand

func NewUpdateCommand() *UpdateCommand

func (*UpdateCommand) Apply

func (cmd *UpdateCommand) Apply(m *manager.Manager) error

func (*UpdateCommand) Parse

func (cmd *UpdateCommand) Parse(args []string) error

type VersionCommand

type VersionCommand struct {
	// contains filtered or unexported fields
}

func NewVersionCommand

func NewVersionCommand() *VersionCommand

func (*VersionCommand) Apply

func (cmd *VersionCommand) Apply(m *manager.Manager) error

func (*VersionCommand) Parse

func (cmd *VersionCommand) Parse(args []string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL