componentsgen

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binary

type Binary struct {
	// Version is the version of the binary.
	Version string
	// Path is the path to the binary file.
	Path string
	// Content is the content of the binary file as bytes.
	Content []byte
	// BinURL is the URL to the binary file.
	BinURL string
	// HashURL is the URL to the checksum file.
	HashURL string
}

Binary is a component that contains a binary file.

func (*Binary) Get

func (b *Binary) Get(ctx context.Context, tmpDir string) error

Get downloads the binary file and the checksum file and validates the checksum.

type CertManager added in v0.4.0

type CertManager struct {
	// Version is the version of CertManager.
	Version string
	// Registry is the registry to get the controller images from.
	Registry string
	// Components are the components of CertManager.
	Components []string
	// Path is the path to the manifests.
	Path string
	// Content is the content of the install.yaml file.
	Content string
}

CertManager generates CertManager manifests based on the given version.

func (*CertManager) GenerateImages added in v0.4.0

func (c *CertManager) GenerateImages() (map[string][]string, error)

GenerateImages returns a map of images from the components.

func (*CertManager) GenerateLocalizationFromTemplate added in v0.4.0

func (c *CertManager) GenerateLocalizationFromTemplate(tmpl, loc string) (string, error)

GenerateLocalizationFromTemplate generates localization files from a template.

func (*CertManager) GenerateManifests added in v0.4.0

func (c *CertManager) GenerateManifests(ctx context.Context, tmpDir string) error

GenerateManifests generates CertManager manifests for the given version. If the version is invalid, an error is returned.

func (*CertManager) GetPath added in v0.4.0

func (c *CertManager) GetPath() string

type Controller

type Controller struct {
	// Name is the name of the controller.
	Name string
	// Version is the version of the controller.
	Version string
	// Registry is the registry to get the controller image from.
	Registry string
	// Path is the path to the manifests.
	Path string
	// ReleaseURL is the URL to the release page.
	ReleaseURL string
	// ReleaseAPIURL is the URL to the release API.
	ReleaseAPIURL string
	// Content is the content of the install.yaml file.
	Content string
}

Controller is a component that generates manifests for a controller, localization files from a template, and images for a given controller.

func (*Controller) GenerateImages

func (o *Controller) GenerateImages() (map[string][]string, error)

GenerateImages returns a map of images from the install.yaml file.

func (*Controller) GenerateLocalizationFromTemplate

func (o *Controller) GenerateLocalizationFromTemplate(tmpl, loc string) (string, error)

GenerateLocalizationFromTemplate generates localization files from a template.

func (*Controller) GenerateManifests

func (o *Controller) GenerateManifests(ctx context.Context, tmpDir string) error

GenerateManifests downloads the install.yaml file and writes it to a temporary directory. It validates the version and returns an error if the version does not exist.

func (*Controller) GetPath

func (o *Controller) GetPath() string

GetPath returns the path to the manifests.

type ExternalSecrets added in v0.5.0

type ExternalSecrets struct {
	// Version is the version of ExternalSecrets.
	Version string
	// Registry is the registry to get the controller images from.
	Registry string
	// Components are the components of ExternalSecrets.
	Components []string
	// Path is the path to the manifests.
	Path string
	// Content is the content of the external-secrets.yaml file.
	Content string
}

ExternalSecrets generates ExternalSecrets manifests based on the given version.

func (*ExternalSecrets) GenerateImages added in v0.5.0

func (c *ExternalSecrets) GenerateImages() (map[string][]string, error)

GenerateImages returns a map of images from the components.

func (*ExternalSecrets) GenerateLocalizationFromTemplate added in v0.5.0

func (c *ExternalSecrets) GenerateLocalizationFromTemplate(tmpl, loc string) (string, error)

GenerateLocalizationFromTemplate generates localization files from a template.

func (*ExternalSecrets) GenerateManifests added in v0.5.0

func (c *ExternalSecrets) GenerateManifests(ctx context.Context, tmpDir string) error

GenerateManifests generates ExternalSecrets manifests for the given version. If the version is invalid, an error is returned.

func (*ExternalSecrets) GetPath added in v0.5.0

func (c *ExternalSecrets) GetPath() string

type Flux

type Flux struct {
	// Version is the version of Flux.
	Version string
	// Registry is the registry to get the controller images from.
	Registry string
	// Components are the components of Flux.
	Components []string
	// Path is the path to the manifests.
	Path string
	// Content is the content of the install.yaml file.
	Content *string
}

Flux generates Flux manifests based on the given version.

func (*Flux) GenerateImages

func (f *Flux) GenerateImages() (map[string][]string, error)

GenerateImages returns a map of images from the components.

func (*Flux) GenerateLocalizationFromTemplate

func (f *Flux) GenerateLocalizationFromTemplate(tmpl, loc string) (string, error)

GenerateLocalizationFromTemplate generates localization files from a template.

func (*Flux) GenerateManifests

func (f *Flux) GenerateManifests(ctx context.Context, tmpDir string) error

GenerateManifests generates Flux manifests for the given version. If the version is invalid, an error is returned.

func (*Flux) GetPath

func (f *Flux) GetPath() string

type Generator

type Generator interface {
	GenerateManifests(ctx context.Context, tmpDir string) error
	GenerateLocalizationFromTemplate(tmpl, loc string) (string, error)
	GenerateImages() (map[string][]string, error)
	GetPath() string
}

Generator is a component that generates manifests. It can also generate localization files from a template, and images.

Jump to

Keyboard shortcuts

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