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.
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 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 ¶
GenerateImages returns a map of images from the components.
func (*Flux) GenerateLocalizationFromTemplate ¶
GenerateLocalizationFromTemplate generates localization files from a template.
func (*Flux) GenerateManifests ¶
GenerateManifests generates Flux manifests for the given version. If the version is invalid, an error is returned.
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.