extension

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func Create

func Create(p string, config Config) (err error)

Types

type Config

type Config struct {
	Name     string
	Author   string
	Email    string
	Category 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 LocaleString

type LocaleString string

type Locales

type Locales map[LanguageCode]LocaleString

func (Locales) Default

func (l Locales) Default() string

type Metadata

type Metadata struct {
	// The name of the chart. Required.
	Name         string              `json:"name,omitempty"`
	DisplayName  Locales             `json:"displayName,omitempty"`
	Description  Locales             `json:"description,omitempty"`
	ApiVersion   string              `json:"apiVersion,omitempty"`
	Icon         string              `json:"icon,omitempty"`
	Version      string              `json:"version,omitempty"`
	Keywords     []string            `json:"keywords,omitempty"`
	Sources      []string            `json:"sources,omitempty"`
	KubeVersion  string              `json:"kubeVersion,omitempty"`
	KsVersion    string              `json:"ksVersion,omitempty"`
	Home         string              `json:"home,omitempty"`
	Dependencies []*chart.Dependency `json:"dependencies,omitempty"`
}

func LoadMetadata

func LoadMetadata(path string) (*Metadata, 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(p string) error

Jump to

Keyboard shortcuts

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