Documentation ¶
Index ¶
- Constants
- Variables
- func Commands(con *repl.Console) []*cobra.Command
- func ExecuteExtension(rpc clientrpc.MaliceRPCClient, sess *core.Session, extName string, ...) (*clientpb.Task, error)
- func ExtensionLoadCmd(cmd *cobra.Command, con *repl.Console)
- func ExtensionRegisterCommand(extCmd *ExtCommand, cmd *cobra.Command, con *repl.Console)
- func ExtensionsCmd(cmd *cobra.Command, con *repl.Console)
- func ExtensionsCommandNameCompleter(con *repl.Console) carapace.Action
- func ExtensionsInstallCmd(cmd *cobra.Command, con *repl.Console)
- func ExtensionsRemoveCmd(cmd *cobra.Command, con *repl.Console)
- func InstallFromDir(extLocalPath string, promptToOverwrite bool, con *repl.Console, isGz bool)
- func PrintExtensions(con *repl.Console)
- func Register(con *repl.Console)
- func RemoveExtensionByCommandName(commandName string, con *repl.Console) error
- type ExtCommand
- type ExtensionManifest
- type ExtensionManifest_
Constants ¶
View Source
const (
// ManifestFileName - Extension manifest file name
ManifestFileName = "extension.json"
)
Variables ¶
View Source
var ( ErrExtensionDependModuleNotFound = errors.New("extension depends on module not found") DependOnMap = map[string]string{ "coff-loader": consts.ModuleExecuteBof, } )
Functions ¶
func ExecuteExtension ¶ added in v0.0.2
func ExtensionLoadCmd ¶
ExtensionLoadCmd - Load extension command
func ExtensionRegisterCommand ¶
func ExtensionRegisterCommand(extCmd *ExtCommand, cmd *cobra.Command, con *repl.Console)
ExtensionRegisterCommand
func ExtensionsCmd ¶
ExtensionsCmd - List information about installed extensions
func ExtensionsCommandNameCompleter ¶
ExtensionsCommandNameCompleter - Completer for installed extensions command names.
func ExtensionsInstallCmd ¶
ExtensionsInstallCmd - Install an extension
func ExtensionsRemoveCmd ¶
ExtensionsRemoveCmd - Remove an extension
func InstallFromDir ¶
Install an extension from a directory
func PrintExtensions ¶
PrintExtensions - Print a list of loaded extensions
Types ¶
type ExtCommand ¶
type ExtCommand struct { CommandName string `json:"command_name"` Help string `json:"help"` LongHelp string `json:"long_help"` Files []*extensionFile `json:"files"` Arguments []*extensionArgument `json:"arguments"` Entrypoint string `json:"entrypoint"` DependsOn string `json:"depends_on"` Init string `json:"init"` Manifest *ExtensionManifest }
type ExtensionManifest ¶
type ExtensionManifest struct { Name string `json:"name"` Version string `json:"version"` ExtensionAuthor string `json:"extension_author"` OriginalAuthor string `json:"original_author"` RepoURL string `json:"repo_url"` ExtCommand []*ExtCommand `json:"commands"` RootPath string `json:"-"` ArmoryName string `json:"-"` ArmoryPK string `json:"-"` }
func LoadExtensionManifest ¶
func LoadExtensionManifest(manifestPath string) (*ExtensionManifest, error)
LoadExtensionManifest - Parse extension files
func ParseExtensionManifest ¶
func ParseExtensionManifest(data []byte) (*ExtensionManifest, error)
ParseExtensionManifest - Parse extension manifest from buffer
type ExtensionManifest_ ¶
type ExtensionManifest_ struct { Name string `json:"name"` CommandName string `json:"command_name"` Version string `json:"version"` ExtensionAuthor string `json:"extension_author"` OriginalAuthor string `json:"original_author"` RepoURL string `json:"repo_url"` Help string `json:"help"` LongHelp string `json:"long_help"` Files []*extensionFile `json:"files"` Arguments []*extensionArgument `json:"arguments"` Entrypoint string `json:"entrypoint"` DependsOn string `json:"depends_on"` Init string `json:"init"` RootPath string `json:"-"` }
Click to show internal directories.
Click to hide internal directories.