config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

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

func NewApp added in v0.0.5

func NewApp(name, path string) (*AppConfig, error)

NewApp parses kbrew recipe configuration and returns AppConfig instance

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 RepoType

type RepoType string

RepoType describes the type of kbrew app repository

type Repository

type Repository struct {
	Name string   `yaml:"name"`
	URL  string   `yaml:"url"`
	Type RepoType `yaml:"type"`
}

Repository is the repo for kbrew app

Jump to

Keyboard shortcuts

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