cosmos

package
v0.0.0-...-11f2a26 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CLIPluginInfo

func CLIPluginInfo(pkg dcos.CosmosPackage, baseURL *url.URL) (cliArtifact dcos.CosmosPackageResourceCliArtifact, err error)

CLIPluginInfo extracts plugin resource data from the Cosmos package and for the current platform.

Types

type Client

type Client interface {
	PackageDescribe(name string, version string) (*Description, error)
	PackageList() ([]Package, error)
	PackageListVersions(name string) ([]string, error)
	PackageRender(appID string, name string, version string, optionsPath string) (map[string]interface{}, error)
	PackageSearch(query string) (*SearchResult, error)
	PackageAddRepo(name string, uri string, index *int) ([]dcos.CosmosPackageRepo, error)
	PackageDeleteRepo(name string) error
	PackageListRepo() (*dcos.CosmosPackageListRepoV1Response, error)
	PackageInstall(appID string, name string, version string, optionsPath string) error
	PackageUninstall(packageName string, all bool, appID string) (*dcos.CosmosPackageUninstallV1Response, error)
}

Client is a Cosmos client abstraction

func NewClient

func NewClient(ctx api.Context, baseClient *httpclient.Client) (Client, error)

NewClient creates a new Cosmos client.

type Description

type Description struct {
	Package dcos.CosmosPackage `json:"package"`
}

Description returns the backward-compatible description of a Cosmos package.

type Package

type Package struct {
	Apps        []string                    `json:"apps,omitempty"`
	Command     *dcos.CosmosPackageCommand  `json:"command,omitempty"`
	Config      map[string]interface{}      `json:"config,omitempty"`
	Description string                      `json:"description,omitempty"`
	Framework   bool                        `json:"framework"`
	Licenses    []dcos.CosmosPackageLicense `json:"licenses,omitempty"`
	Maintainer  string                      `json:"maintainer,omitempty"`
	Marathon    *struct {
		V2AppMustacheTemplate string `json:"v2AppMustacheTemplate,omitempty"`
	} `json:"marathon,omitempty"`
	Name               string   `json:"name,omitempty"`
	PackagingVersion   string   `json:"packagingVersion,omitempty"`
	PostInstallNotes   string   `json:"postInstallNotes,omitempty"`
	PostUninstallNotes string   `json:"postUninstallNotes,omitempty"`
	PreInstallNotes    string   `json:"preInstallNotes,omitempty"`
	Scm                string   `json:"scm,omitempty"`
	ReleaseVersion     *int64   `json:"releaseVersion,omitempty"`
	Selected           bool     `json:"selected"`
	Tags               []string `json:"tags,omitempty"`
	Version            string   `json:"version,omitempty"`
	Website            string   `json:"website,omitempty"`
}

Package is a struct representing a package.

type SearchResult

type SearchResult struct {
	Packages []dcos.CosmosPackageSearchDetails `json:"packages"`
}

SearchResult returns the backward-compatible description of a search on Cosmos.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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