extension

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LanguageCodeEn = "en"
	LanguageCodeZh = "zh"
)
View Source
const MetadataFilename = "extension.yaml"

Variables

View Source
var Categories = []string{
	"ai-machine-learning", "database", "integration-delivery", "monitoring-logging", "networking", "security",
	"storage", "streaming-messaging",
}

Functions

func Create

func Create(p string, config Config) error

func CreateAppChart added in v0.2.0

func CreateAppChart(p string, name string, chart []byte) error

func LoadApplicationClass added in v0.2.0

func LoadApplicationClass(name, p, tempDir string) error

Types

type ApplicationClass added in v0.2.0

type ApplicationClass struct {
	ApplicationClassGroup string            `json:"applicationClassGroup,omitempty"`
	Name                  string            `json:"name,omitempty"`
	Provisioner           string            `json:"provisioner,omitempty"`
	Parameters            map[string]string `json:"parameters,omitempty"`
	AppVersion            string            `json:"appVersion,omitempty"`
	PackageVersion        string            `json:"packageVersion,omitempty"`
	Icon                  string            `json:"icon,omitempty"`
	Description           Locales           `json:"description,omitempty"`
	Maintainer            *chart.Maintainer `json:"maintainer,omitempty"`
}

type Config

type Config struct {
	Name     string
	Category string
	Author   string
	Email    string
	URL      string
}

type Extension

type Extension struct {
	Metadata  *Metadata
	ChartData []byte
}

func Load

func Load(path string) (*Extension, error)

func (*Extension) ToKubernetesResources

func (ext *Extension) ToKubernetesResources() []byte

type LanguageCode

type LanguageCode string

type Locales

type Locales map[LanguageCode]string

func (Locales) Default

func (l Locales) Default() string

type Metadata

type Metadata struct {
	APIVersion string `json:"apiVersion" validate:"required"`
	// The name of the chart. Required.
	Name             string                             `json:"name" validate:"required"`
	Version          string                             `json:"version" validate:"required"`
	DisplayName      Locales                            `json:"displayName" validate:"required"`
	Description      Locales                            `json:"description" validate:"required"`
	Category         string                             `json:"category" validate:"required"`
	Keywords         []string                           `json:"keywords,omitempty"`
	Home             string                             `json:"home,omitempty"`
	Sources          []string                           `json:"sources,omitempty"`
	KubeVersion      string                             `json:"kubeVersion,omitempty"`
	KSVersion        string                             `json:"ksVersion,omitempty"`
	Maintainers      []*chart.Maintainer                `json:"maintainers,omitempty"`
	Provider         map[LanguageCode]*chart.Maintainer `json:"provider" validate:"required"`
	Icon             string                             `json:"icon" validate:"required"`
	Screenshots      []string                           `json:"screenshots,omitempty"`
	Dependencies     []*chart.Dependency                `json:"dependencies,omitempty"`
	InstallationMode string                             `json:"installationMode,omitempty"`
}

func LoadMetadata

func LoadMetadata(path string) (*Metadata, error)

func (*Metadata) Init added in v0.2.0

func (md *Metadata) Init(p string) error

func (*Metadata) LoadIcon

func (md *Metadata) LoadIcon(p string) error

func (*Metadata) ToChartYaml

func (md *Metadata) ToChartYaml() (*chart.Metadata, error)

func (*Metadata) Validate

func (md *Metadata) Validate() error

Jump to

Keyboard shortcuts

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