cli

package
v0.0.0-...-95ab6b0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const Headline = "Low Orbit Ransomware Denial Toolkit (https://github.com/jessehorne/lordt)"
View Source
View Source
const Version = "0.0.1"

Variables

View Source
var (
	ErrNoArgs         = errors.New("no args provided")
	ErrInvalidCommand = errors.New("invalid command")
)

Functions

func HelpCommandHandler

func HelpCommandHandler(ch *CommandHandler, args []string) error

func InitCommands

func InitCommands(ch *CommandHandler)

func NLockCommandHandler

func NLockCommandHandler(ch *CommandHandler, args []string) error

Types

type Command

type Command struct {
	Name    string
	Desc    string
	Handler func(*CommandHandler, []string) error
}

type CommandHandler

type CommandHandler struct {
	Commands map[string]*Command
}

func NewCommandHandler

func NewCommandHandler() *CommandHandler

func (*CommandHandler) AddCommand

func (ch *CommandHandler) AddCommand(c *Command)

func (*CommandHandler) Handle

func (ch *CommandHandler) Handle(args []string) error

func (*CommandHandler) RunCommand

func (ch *CommandHandler) RunCommand(short string, args []string) error

Jump to

Keyboard shortcuts

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