armory

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2022 License: GPL-3.0 Imports: 25 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPackageNotFound = errors.New("package not found")
)

Functions

func AliasExtensionOrBundleCompleter

func AliasExtensionOrBundleCompleter(prefix string, args []string, con *console.SliverConsoleClient) []string

AliasExtensionOrBundleCompleter - Completer for alias, extension, and bundle names

func ArmoryCmd

func ArmoryCmd(ctx *grumble.Context, con *console.SliverConsoleClient)

ArmoryCmd - The main armory command

func ArmoryInstallCmd

func ArmoryInstallCmd(ctx *grumble.Context, con *console.SliverConsoleClient)

ArmoryInstallCmd - The armory install command

func ArmorySearchCmd

func ArmorySearchCmd(ctx *grumble.Context, con *console.SliverConsoleClient)

ArmorySearchCmd - Search for packages by name

func ArmoryUpdateCmd

func ArmoryUpdateCmd(ctx *grumble.Context, con *console.SliverConsoleClient)

ArmoryUpdateCmd - Update all installed extensions/aliases

func DefaultArmoryPkgParser

func DefaultArmoryPkgParser(armoryPkg *ArmoryPackage, sigOnly bool, clientConfig ArmoryHTTPConfig) (*minisign.Signature, []byte, error)

DefaultArmoryPkgParser - Parse the armory package manifest directly from the url

func GithubAPIArmoryPackageParser

func GithubAPIArmoryPackageParser(armoryPkg *ArmoryPackage, sigOnly bool, clientConfig ArmoryHTTPConfig) (*minisign.Signature, []byte, error)

GithubAPIArmoryPackageParser - Retrieve the minisig and tar.gz for an armory package from a GitHub release

func GithubArmoryPackageParser

func GithubArmoryPackageParser(armoryPkg *ArmoryPackage, sigOnly bool, clientConfig ArmoryHTTPConfig) (*minisign.Signature, []byte, error)

GithubArmoryPackageParser - Uses github.com instead of api.github.com to download packages

func PrintArmoryBundles

func PrintArmoryBundles(bundles []*ArmoryBundle, con *console.SliverConsoleClient)

PrintArmoryBundles - Prints the armory bundles

func PrintArmoryPackages

func PrintArmoryPackages(aliases []*alias.AliasManifest, exts []*extensions.ExtensionManifest, con *console.SliverConsoleClient)

PrintArmoryPackages - Prints the armory packages

Types

type ArmoryBundle

type ArmoryBundle struct {
	Name     string   `json:"name"`
	Packages []string `json:"packages"`
}

type ArmoryHTTPConfig

type ArmoryHTTPConfig struct {
	IgnoreCache          bool
	ProxyURL             *url.URL
	Timeout              time.Duration
	DisableTLSValidation bool
}

type ArmoryIndex

type ArmoryIndex struct {
	Aliases    []*ArmoryPackage `json:"aliases"`
	Extensions []*ArmoryPackage `json:"extensions"`
	Bundles    []*ArmoryBundle  `json:"bundles"`
}

func DefaultArmoryIndexParser

func DefaultArmoryIndexParser(armoryConfig *assets.ArmoryConfig, clientConfig ArmoryHTTPConfig) (*ArmoryIndex, error)

DefaultArmoryParser - Parse the armory index directly from the url

func GithubAPIArmoryIndexParser

func GithubAPIArmoryIndexParser(armoryConfig *assets.ArmoryConfig, clientConfig ArmoryHTTPConfig) (*ArmoryIndex, error)

GithubAPIArmoryIndexParser - Parse the armory index from a GitHub release

type ArmoryIndexParser

type ArmoryIndexParser func(*assets.ArmoryConfig, ArmoryHTTPConfig) (*ArmoryIndex, error)

ArmoryIndexParser - Generic interface to fetch armory indexes

type ArmoryPackage

type ArmoryPackage struct {
	Name        string `json:"name"`
	CommandName string `json:"command_name"`
	RepoURL     string `json:"repo_url"`
	PublicKey   string `json:"public_key"`

	IsAlias bool `json:"-"`
}

type ArmoryPackageParser

type ArmoryPackageParser func(*ArmoryPackage, bool, ArmoryHTTPConfig) (*minisign.Signature, []byte, error)

ArmoryPackageParser - Generic interface to fetch armory package manifests

type GithubAsset

type GithubAsset struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
	URL  string `json:"url"`
	Size int    `json:"size"`

	BrowserDownloadURL string `json:"browser_download_url"`
}

type GithubRelease

type GithubRelease struct {
	ID          int           `json:"id"`
	Name        string        `json:"name"`
	URL         string        `json:"url"`
	HTMLURL     string        `json:"html_url"`
	TagName     string        `json:"tag_name"`
	Body        string        `json:"body"`
	Prerelease  bool          `json:"prerelease"`
	TarballURL  string        `json:"tarball_url"`
	ZipballURL  string        `json:"zipball_url"`
	CreatedAt   string        `json:"created_at"`
	PublishedAt string        `json:"published_at"`
	Assets      []GithubAsset `json:"assets"`
}

Jump to

Keyboard shortcuts

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