api

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatErrors

func FormatErrors(errs validator.ValidationErrors) error

func NewValidator

func NewValidator(opts ...ValidatorOpts) *validator.Validate

Types

type DependencyType

type DependencyType string
const (
	DependencyTypeExtension DependencyType = "sysext"
	DependencyTypeHelm      DependencyType = "helm"
)

type Helm

type Helm struct {
	Charts       []*HelmChart      `yaml:"charts" validate:"dive"`
	Repositories []*HelmRepository `yaml:"repositories" validate:"dive"`
}

type HelmChart

type HelmChart struct {
	Name       string                `yaml:"name,omitempty"`
	Chart      string                `yaml:"chart" validate:"required"`
	Version    string                `yaml:"version" validate:"required"`
	Namespace  string                `yaml:"namespace,omitempty"`
	Repository string                `yaml:"repository,omitempty"`
	Values     map[string]any        `yaml:"values,omitempty"`
	DependsOn  []HelmChartDependency `yaml:"dependsOn,omitempty" validate:"dive"`
	Images     []HelmChartImage      `yaml:"images,omitempty"`
}

func (*HelmChart) ExtensionDependencies

func (c *HelmChart) ExtensionDependencies() []string

func (*HelmChart) GetInlineValues

func (c *HelmChart) GetInlineValues() map[string]any

func (*HelmChart) GetName

func (c *HelmChart) GetName() string

func (*HelmChart) GetRepositoryName

func (c *HelmChart) GetRepositoryName() string

func (*HelmChart) ToCRD

func (c *HelmChart) ToCRD(values []byte, repository string, hasAuth bool, skipTLSVerify bool) *helm.CRD

type HelmChartDependency

type HelmChartDependency struct {
	Name string         `yaml:"name" validate:"required"`
	Type DependencyType `yaml:"type" validate:"required,oneof=sysext helm"`
}

type HelmChartImage

type HelmChartImage struct {
	Name  string `yaml:"name"`
	Image string `yaml:"image"`
}

type HelmRepository

type HelmRepository struct {
	Name string `yaml:"name" validate:"required"`
	URL  string `yaml:"url" validate:"required,url"`
}

type Metadata

type Metadata struct {
	Name         string `yaml:"name" validate:"required"`
	Version      string `yaml:"version" validate:"required"`
	CreationDate string `yaml:"creationDate,omitempty"`
}

type SchemaVersion

type SchemaVersion string
const SchemaV0 SchemaVersion = "v0"

func LoadSchemaVersion

func LoadSchemaVersion(data []byte) (SchemaVersion, error)

type Systemd

type Systemd struct {
	Extensions []SystemdExtension `yaml:"extensions,omitempty" validate:"dive"`
}

type SystemdExtension

type SystemdExtension struct {
	Name          string   `yaml:"name" validate:"required"`
	Image         string   `yaml:"image" validate:"required"`
	Required      bool     `yaml:"required,omitempty"`
	KernelModules []string `yaml:"kernelModules,omitempty"`
}

type ValidatorOpts

type ValidatorOpts func(*validator.Validate)

func WithCustomValidations

func WithCustomValidations(customValidations map[string]validator.Func) ValidatorOpts

func WithYAMLFieldNames

func WithYAMLFieldNames() ValidatorOpts

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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