Help us shape the future of Go! Take the 2026 Go Developer Survey

alias

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

README

Alias

Wraps external DLLs/tool in Sliver console commands.

Format
  • alias-dir/
    • manifest.json -

Documentation

Index

Constants

View Source
const (
	ManifestFileName = "alias.json"
)

Variables

This section is empty.

Functions

func AliasCommandNameCompleter

func AliasCommandNameCompleter(prefix string, args []string, con *console.Console) []string

AliasCommandNameCompleter - Completer for installed extensions command names

func AliasesCmd

func AliasesCmd(ctx *grumble.Context, con *console.Console) error

AliasesCmd - The alias command

func AliasesInstallCmd

func AliasesInstallCmd(ctx *grumble.Context, con *console.Console)

AliasesInstallCmd - Install an alias

func AliasesLoadCmd

func AliasesLoadCmd(ctx *grumble.Context, con *console.Console)

AliasesLoadCmd - Locally load a alias into the Sliver shell.

func AliasesRemoveCmd

func AliasesRemoveCmd(ctx *grumble.Context, con *console.Console)

AliasesRemoveCmd - Locally load a alias into the Sliver shell.

func Commands

func Commands(con *console.Console) []*grumble.Command

func InstallFromFile

func InstallFromFile(aliasGzFilePath string, aliasName string, promptToOverwrite bool, con *console.Console) *string

Install an extension from a .tar.gz file

func PrintAliases

func PrintAliases(con *console.Console)

PrintAliases - Print a list of loaded aliases

func PrintAssemblyOutput

func PrintAssemblyOutput(cmdName string, resp *clientpb.Task, outFilePath *os.File, con *console.Console)

PrintAssemblyOutput - Prints the output of an execute-assembly command

func RemoveAliasByCommandName

func RemoveAliasByCommandName(commandName string, con *console.Console) error

RemoveAliasByCommandName - Remove an alias by command name

Types

type AliasFile

type AliasFile struct {
	OS   string `json:"os"`
	Arch string `json:"arch"`
	Path string `json:"path"`
}

AliasFile - An OS/Arch specific file

type AliasManifest

type AliasManifest struct {
	Name           string `json:"name"`
	Version        string `json:"version"`
	CommandName    string `json:"command_name"`
	OriginalAuthor string `json:"original_author"`
	RepoURL        string `json:"repo_url"`
	Help           string `json:"help"`
	LongHelp       string `json:"long_help"`

	Entrypoint   string       `json:"entrypoint"`
	AllowArgs    bool         `json:"allow_args"`
	DefaultArgs  string       `json:"default_args"`
	Files        []*AliasFile `json:"files"`
	IsReflective bool         `json:"is_reflective"`
	IsAssembly   bool         `json:"is_assembly"`

	RootPath   string `json:"-"`
	ArmoryName string `json:"-"`
	ArmoryPK   string `json:"-"`
}

AliasManifest - The manifest for an alias, contains metadata

func LoadAlias

func LoadAlias(manifestPath string, con *console.Console) (*AliasManifest, error)

LoadAlias - Load an alias into the Sliver shell from a given directory

func ParseAliasManifest

func ParseAliasManifest(data []byte) (*AliasManifest, error)

ParseAliasManifest - Parse an alias manifest

Jump to

Keyboard shortcuts

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