Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Raw repo type means the apps in the repo are raw apps Raw RepoType = "raw" // Helm repo means the apps in the repo are helm apps Helm RepoType = "helm" // RegistriesDirName represents the dir name within ConfigDir holding all the kbrew registries RegistriesDirName = "registries" // AnalyticsUUID represents unique ID used as customer ID AnalyticsUUID = "analyticsUUID" // AnalyticsEnabled to toggle GA event collection AnalyticsEnabled = "analyticsEnabled" )
Variables ¶
View Source
var ConfigDir string
ConfigDir represents dir path of kbrew config
Functions ¶
func InitConfig ¶
func InitConfig()
InitConfig initializes ConfigDir. If ConfigDir does not exists, create it
Types ¶
type App ¶
type App struct {
Args map[string]interface{} `yaml:"args,omitempty"`
Repository Repository `yaml:"repository"`
Name string `yaml:"name,omitempty"`
Namespace string `yaml:"namespace,omitempty"`
URL string `yaml:"url,omitempty"`
SHA256 string `yaml:"sha256,omitempty"`
Version string `yaml:"version,omitempty"`
PreInstall []PreInstall `yaml:"pre_install,omitempty"`
PostInstall []PostInstall `yaml:"post_install,omitempty"`
PreCleanup AppCleanup `yaml:"pre_cleanup,omitempty"`
PostCleanup AppCleanup `yaml:"post_cleanup,omitempty"`
}
App hold app details set in kbrew recipe
type AppCleanup ¶ added in v0.0.6
type AppCleanup struct {
Steps []string `yaml:"steps,omitempty"`
}
AppCleanup contains steps to be executed before uninstalling applications
type AppConfig ¶
type AppConfig struct {
APIVersion string `yaml:"apiVersion"`
Kind string `yaml:"kind"`
App App `yaml:"app"`
}
AppConfig is the kbrew recipe configuration
type KbrewConfig ¶ added in v0.0.5
type KbrewConfig struct {
AnalyticsUUID string `yaml:"analyticsUUID"`
AnalyticsEnabled bool `yaml:"analyticsEnabled"`
}
KbrewConfig is a kbrew config stored at CONFIG_DIR/config.yaml
func NewKbrew ¶ added in v0.0.5
func NewKbrew() (*KbrewConfig, error)
NewKbrew parses Kbrew config and returns KbrewConfig struct object
type PostInstall ¶
type PostInstall struct {
Apps []string `yaml:"apps,omitempty"`
Steps []string `yaml:"steps,omitempty"`
}
PostInstall contains Apps and Steps that need to be installed/executed after installing the main app
type PreInstall ¶
type PreInstall struct {
Apps []string `yaml:"apps,omitempty"`
Steps []string `yaml:"steps,omitempty"`
}
PreInstall contains Apps and Steps that need to be installed/executed before installing the main app
type Repository ¶
type Repository struct {
Name string `yaml:"name"`
URL string `yaml:"url"`
Type RepoType `yaml:"type"`
}
Repository is the repo for kbrew app
Click to show internal directories.
Click to hide internal directories.