datamodel

package
v0.20240313.0-lilypan Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Components

type Components struct {
	ContainerImages []*ContainerImage `json:"ContainerImages"`
	DownloadFiles   []DownloadFile    `json:"DownloadFiles"`
}

Components is the data model for the component config. The component config is a JSON file, for example, vhdbuilder/packer/components.json. for example, vhdbuilder/packer/components.json.

func NewComponentsFromFile

func NewComponentsFromFile(path string) (*Components, error)

NewComponentsFromFile loads component config from the given file and returns a Components object.

func (*Components) ToImageList

func (c *Components) ToImageList() []string

ToImageList returns a list of image names from the given Components object. The image names are generated from the given Components object and the given downloadURL. The image names are generated by replacing the * in the downloadURL with the image tag.

type ContainerImage

type ContainerImage struct {
	DownloadURL       string   `json:"downloadURL"`
	Amd64OnlyVersions []string `json:"amd64OnlyVersions"`
	MultiArchVersions []string `json:"multiArchVersions"`
}

type DockerKubeProxyImages

type DockerKubeProxyImages struct {
	ContainerImages []*ContainerImage `json:"ContainerImages"`
}

type DownloadFile

type DownloadFile struct {
	FileName               string   `json:"fileName"`
	DownloadLocation       string   `json:"downloadLocation"`
	DownloadURL            string   `json:"downloadURL"`
	Versions               []string `json:"versions"`
	TargetContainerRuntime string   `json:"targetContainerRuntime,omitempty"`
}

type KubeProxyImages

type KubeProxyImages struct {
	DockerKubeProxyImages     *DockerKubeProxyImages `json:"dockerKubeProxyImages"`
	ContainerdKubeProxyImages *DockerKubeProxyImages `json:"containerdKubeProxyImages"`
}

KubeProxyImages is the data model for the kube-proxy image config. The kube-proxy image config is a JSON file, for example, vhdbuilder/packer/kube-proxy-images.json.

func NewKubeProxyImagesFromFile

func NewKubeProxyImagesFromFile(path string) (*KubeProxyImages, error)

NewKubeProxyImagesFromFile loads kube-proxy image config from the given file and returns a KubeProxyImages object. The given file should be a KubeProxyImages object, and should be in JSON format. The given file should be in JSON format.

func (*KubeProxyImages) ToImageList

func (k *KubeProxyImages) ToImageList() ([]string, error)

ToImageList returns a list of image names from the given KubeProxyImages object. The image names are generated from the given KubeProxyImages object and the given downloadURL. The image names are generated by replacing the * in the downloadURL with the image tag.

Jump to

Keyboard shortcuts

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