global

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CurrentAPIVersion = "srew.sensors.com/v1alpha2"
	PluginKind        = "Plugin"
	ManifestExtension = ".yaml"
	SrewPluginName    = "srew" // plugin name of srew itself
)
View Source
const (
	UpgradeNotification = "A newer version of srew is available (%s -> %s).\nRun \"srew upgrade\" to get the newest version!\n"

	// upgradeCheckRate is the percentage of srew runs for which the upgrade check is performed.
	UpgradeCheckRate = 0.1
)

Variables

View Source
var (
	SREW_SERVER_BASEURL  string
	SREW_SERVER_USERNAME string
	SREW_SERVER_PASSWORD string
	Token                string
	//latestTag            = ""
	TokenFile  = "token.json"
	SrewClient *client.SrewClient
)

全局配置

View Source
var (
	EnableDebug           bool
	Format                bool
	AllVersion            bool
	PluginName            string
	PluginVersion         string
	ArchiveFileOverride   string
	Manifest, ManifestURL string
)

命令参数

Functions

This section is empty.

Types

type FileOperation

type FileOperation struct {
	From string `json:"from,omitempty"`
	To   string `json:"to,omitempty"`
}

FileOperation specifies a file copying operation from plugin archive to the installation directory.

type Platform

type Platform struct {
	URI    string `json:"uri,omitempty"`
	Sha256 string `json:"sha256,omitempty"`

	Selector *metav1.LabelSelector `json:"selector,omitempty"`
	Files    []FileOperation       `json:"files"`

	// Bin specifies the path to the plugin executable.
	// The path is relative to the root of the installation folder.
	// The binary will be linked after all FileOperations are executed.
	Bin string `json:"bin"`
}

Platform describes how to perform an installation on a specific platform and how to match the target platform (os, arch).

type Plugin

type Plugin struct {
	metav1.TypeMeta   `json:",inline" yaml:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata"`

	Spec PluginSpec `json:"spec"`
}

Plugin describes a plugin manifest file.

type PluginSpec

type PluginSpec struct {
	Version          string `json:"version,omitempty"`
	ShortDescription string `json:"shortDescription,omitempty"`
	Description      string `json:"description,omitempty"`
	Caveats          string `json:"caveats,omitempty"`
	Homepage         string `json:"homepage,omitempty"`

	Platforms []Platform `json:"platforms,omitempty"`
}

PluginSpec is the plugin specification.

type Receipt

type Receipt struct {
	Plugin `json:",inline" yaml:",inline"`
}

Receipt describes a plugin receipt file.

Jump to

Keyboard shortcuts

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