Documentation ¶
Index ¶
- Variables
- func AliasExtensionOrBundleCompleter(prefix string, args []string, con *repl.Console) []string
- func ArmoryCmd(cmd *cobra.Command, con *repl.Console)
- func ArmoryInstallCmd(cmd *cobra.Command, con *repl.Console)
- func ArmorySearchCmd(cmd *cobra.Command, con *repl.Console)
- func ArmoryUpdateCmd(cmd *cobra.Command, con *repl.Console)
- func Commands(con *repl.Console) []*cobra.Command
- func DefaultArmoryPkgParser(armoryConfig *assets.ArmoryConfig, armoryPkg *ArmoryPackage, sigOnly bool, ...) (*minisign.Signature, []byte, error)
- func DownloadArmoryCallback(tableModel *tui.TableModel, writer io.Writer, con *repl.Console, ...) func()
- func GithubAPIArmoryPackageParser(armoryConfig *assets.ArmoryConfig, armoryPkg *ArmoryPackage, sigOnly bool, ...) (*minisign.Signature, []byte, error)
- func GithubArmoryPackageParser(_ *assets.ArmoryConfig, armoryPkg *ArmoryPackage, sigOnly bool, ...) (*minisign.Signature, []byte, error)
- func PrintArmoryBundles(bundles []*ArmoryBundle, con *repl.Console)
- func PrintArmoryPackages(aliases []*alias.AliasManifest, exts []*extension.ExtensionManifest, ...)
- type ArmoryBundle
- type ArmoryHTTPConfig
- type ArmoryIndex
- type ArmoryIndexParser
- type ArmoryPackage
- type ArmoryPackageParser
- type GithubAsset
- type GithubRelease
- type PackageType
- type UpdateIdentifier
- type VersionInformation
Constants ¶
This section is empty.
Variables ¶
var ( // ErrPackageNotFound - The package was not found ErrPackageNotFound = errors.New("package not found") ErrPackageAlreadyInstalled = errors.New("package is already installed") )
Functions ¶
func AliasExtensionOrBundleCompleter ¶
AliasExtensionOrBundleCompleter - Completer for alias, extension, and bundle names
func ArmoryInstallCmd ¶
ArmoryInstallCmd - The armory install command
func ArmorySearchCmd ¶
ArmorySearchCmd - Search for packages by name
func ArmoryUpdateCmd ¶
ArmoryUpdateCmd - Update all installed extensions/aliases
func DefaultArmoryPkgParser ¶
func DefaultArmoryPkgParser(armoryConfig *assets.ArmoryConfig, armoryPkg *ArmoryPackage, sigOnly bool, clientConfig ArmoryHTTPConfig) (*minisign.Signature, []byte, error)
DefaultArmoryPkgParser - Parse the armory package manifest directly from the url
func DownloadArmoryCallback ¶ added in v0.0.3
func DownloadArmoryCallback(tableModel *tui.TableModel, writer io.Writer, con *repl.Console, clientConfig ArmoryHTTPConfig) func()
func GithubAPIArmoryPackageParser ¶
func GithubAPIArmoryPackageParser(armoryConfig *assets.ArmoryConfig, 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(_ *assets.ArmoryConfig, 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 *repl.Console)
PrintArmoryBundles - Prints the armory bundles
func PrintArmoryPackages ¶
func PrintArmoryPackages(aliases []*alias.AliasManifest, exts []*extension.ExtensionManifest, con *repl.Console, clientConfig ArmoryHTTPConfig)
PrintArmoryPackages - Prints the armory packages
Types ¶
type ArmoryBundle ¶
type ArmoryBundle struct { Name string `json:"name"` Packages []string `json:"packages"` ArmoryName string `json:"-"` }
ArmoryBundle - A list of packages
type ArmoryHTTPConfig ¶
type ArmoryHTTPConfig struct { ArmoryConfig *assets.ArmoryConfig IgnoreCache bool ProxyURL *url.URL Timeout time.Duration DisableTLSValidation bool }
ArmoryHTTPConfig - Configuration for armory HTTP client
type ArmoryIndex ¶
type ArmoryIndex struct { ArmoryConfig *assets.ArmoryConfig `json:"-"` Aliases []*ArmoryPackage `json:"aliases"` Extensions []*ArmoryPackage `json:"extensions"` Bundles []*ArmoryBundle `json:"bundles"` }
ArmoryIndex - Index JSON containing alias/extension/bundle information
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:"-"` ArmoryName string `json:"-"` /* With support for multiple armories, the command name of a package is not unique anymore, so we need something that is unique to be able to keep track of packages. This ID will be a hash calculated from properties of the package. */ ID string `json:"-"` ArmoryPK string `json:"-"` }
ArmoryPackage - JSON metadata for alias or extension
type ArmoryPackageParser ¶
type ArmoryPackageParser func(*assets.ArmoryConfig, *ArmoryPackage, bool, ArmoryHTTPConfig) (*minisign.Signature, []byte, error)
ArmoryPackageParser - Generic interface to fetch armory package manifests
type GithubAsset ¶
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"` }
type UpdateIdentifier ¶
type UpdateIdentifier struct { Type PackageType Name string }