bundle

package
v2.36.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateBundleSha256Sum

func CalculateBundleSha256Sum(bundlePath string) (string, error)

func Download

func Download(preset crcPreset.Preset, bundleURI string, enableBundleQuayFallback bool) (string, error)

func GetBundleNameFromURI

func GetBundleNameFromURI(bundleURI string) string

func GetBundleNameWithExtension

func GetBundleNameWithExtension(bundleName string) string

func GetBundleNameWithoutExtension

func GetBundleNameWithoutExtension(bundleName string) string

func GetCustomBundleName

func GetCustomBundleName(bundleFilename string) string

Types

type BuildInfo

type BuildInfo struct {
	BuildTime                 string `json:"buildTime"`
	OpenshiftInstallerVersion string `json:"openshiftInstallerVersion"`
	SncVersion                string `json:"sncVersion"`
}

type ClusterInfo

type ClusterInfo struct {
	OpenShiftVersion    *semver.Version `json:"openshiftVersion"`
	ClusterName         string          `json:"clusterName"`
	BaseDomain          string          `json:"baseDomain"`
	AppsDomain          string          `json:"appsDomain"`
	SSHPrivateKeyFile   string          `json:"sshPrivateKeyFile"`
	KubeConfig          string          `json:"kubeConfig"`
	OpenshiftPullSecret string          `json:"openshiftPullSecret,omitempty"`
}

type Copier

type Copier struct {
	// contains filtered or unexported fields
}

func NewCopier

func NewCopier(srcBundle *CrcBundleInfo, basePath string, customBundleName string) (*Copier, error)

func (*Copier) CachedPath

func (copier *Copier) CachedPath() string

func (*Copier) Cleanup

func (copier *Copier) Cleanup() error

func (*Copier) CopyFilesFromFileList

func (copier *Copier) CopyFilesFromFileList() error

func (*Copier) CopyKubeConfig

func (copier *Copier) CopyKubeConfig() error

func (*Copier) CopyPrivateSSHKey

func (copier *Copier) CopyPrivateSSHKey(srcPath string) error

func (*Copier) GenerateBundle

func (copier *Copier) GenerateBundle(bundleName string) error

func (*Copier) SetDiskImage

func (copier *Copier) SetDiskImage(path string, format string) error

type CrcBundleInfo

type CrcBundleInfo struct {
	Version     string      `json:"version"`
	Type        string      `json:"type"`
	Name        string      `json:"name"`
	BuildInfo   BuildInfo   `json:"buildInfo"`
	ClusterInfo ClusterInfo `json:"clusterInfo"`
	Nodes       []Node      `json:"nodes"`
	Storage     Storage     `json:"storage"`
	DriverInfo  DriverInfo  `json:"driverInfo"`
	// contains filtered or unexported fields
}

func Extract

func Extract(path string) (*CrcBundleInfo, error)

func Get

func Get(bundleName string) (*CrcBundleInfo, error)

func List

func List() ([]CrcBundleInfo, error)

func Use

func Use(bundleName string) (*CrcBundleInfo, error)

func (*CrcBundleInfo) GetAPIHostname

func (bundle *CrcBundleInfo) GetAPIHostname() string

func (*CrcBundleInfo) GetAppHostname

func (bundle *CrcBundleInfo) GetAppHostname(appName string) string

func (*CrcBundleInfo) GetBundleBuildTime

func (bundle *CrcBundleInfo) GetBundleBuildTime() (time.Time, error)

func (*CrcBundleInfo) GetBundleName

func (bundle *CrcBundleInfo) GetBundleName() string

func (*CrcBundleInfo) GetBundleNameWithoutExtension

func (bundle *CrcBundleInfo) GetBundleNameWithoutExtension() string

func (*CrcBundleInfo) GetBundleType

func (bundle *CrcBundleInfo) GetBundleType() crcPreset.Preset

func (*CrcBundleInfo) GetDiskImageFormat

func (bundle *CrcBundleInfo) GetDiskImageFormat() string

func (*CrcBundleInfo) GetDiskImagePath

func (bundle *CrcBundleInfo) GetDiskImagePath() string

func (*CrcBundleInfo) GetInitramfsPath

func (bundle *CrcBundleInfo) GetInitramfsPath() string

func (*CrcBundleInfo) GetKernelCommandLine

func (bundle *CrcBundleInfo) GetKernelCommandLine() string

func (*CrcBundleInfo) GetKernelPath

func (bundle *CrcBundleInfo) GetKernelPath() string

func (*CrcBundleInfo) GetKubeConfigPath

func (bundle *CrcBundleInfo) GetKubeConfigPath() string

func (*CrcBundleInfo) GetOcPath

func (bundle *CrcBundleInfo) GetOcPath() string

func (*CrcBundleInfo) GetPodmanPath

func (bundle *CrcBundleInfo) GetPodmanPath() string

func (*CrcBundleInfo) GetPodmanVersion

func (bundle *CrcBundleInfo) GetPodmanVersion() string

func (*CrcBundleInfo) GetSSHKeyPath

func (bundle *CrcBundleInfo) GetSSHKeyPath() string

func (*CrcBundleInfo) GetVersion

func (bundle *CrcBundleInfo) GetVersion() string

func (*CrcBundleInfo) IsMicroshift

func (bundle *CrcBundleInfo) IsMicroshift() bool

func (*CrcBundleInfo) IsOpenShift

func (bundle *CrcBundleInfo) IsOpenShift() bool

func (*CrcBundleInfo) IsPodman

func (bundle *CrcBundleInfo) IsPodman() bool

type DiskImage

type DiskImage struct {
	File
	Format string `json:"format"`
}

type DriverInfo

type DriverInfo struct {
	Name string `json:"name"`
}

type File

type File struct {
	Name     string `json:"name"`
	Size     string `json:"size"`
	Checksum string `json:"sha256sum"`
}

type FileListItem

type FileListItem struct {
	File
	Type FileType `json:"type"`
}

type FileType

type FileType string
const (
	OcExecutable     FileType = "oc-executable"
	PodmanExecutable FileType = "podman-executable"
)

type Node

type Node struct {
	Kind          []string `json:"kind"`
	Hostname      string   `json:"hostname"`
	DiskImage     string   `json:"diskImage"`
	KernelCmdLine string   `json:"kernelCmdLine,omitempty"`
	Initramfs     string   `json:"initramfs,omitempty"`
	Kernel        string   `json:"kernel,omitempty"`
	InternalIP    string   `json:"internalIP"`
	PodmanVersion string   `json:"podmanVersion,omitempty"`
}

type ReleaseInfo

type ReleaseInfo struct {
	Version Version           `json:"version"`
	Links   map[string]string `json:"links"`
}

func FetchLatestReleaseInfo

func FetchLatestReleaseInfo() (*ReleaseInfo, error)

type Repository

type Repository struct {
	CacheDir     string
	OcBinDir     string
	PodmanBinDir string
}

func (*Repository) CalculateBundleSha256Sum

func (repo *Repository) CalculateBundleSha256Sum(bundlePath string) (string, error)

func (*Repository) Extract

func (repo *Repository) Extract(path string) error

func (*Repository) Get

func (repo *Repository) Get(bundleName string) (*CrcBundleInfo, error)

func (*Repository) List

func (repo *Repository) List() ([]CrcBundleInfo, error)

func (*Repository) Use

func (repo *Repository) Use(bundleName string) (*CrcBundleInfo, error)

type Storage

type Storage struct {
	DiskImages []DiskImage    `json:"diskImages"`
	Files      []FileListItem `json:"fileList"`
}

type Version

type Version struct {
	CrcVersion       *semver.Version `json:"crcVersion"`
	GitSha           string          `json:"gitSha"`
	OpenshiftVersion string          `json:"openshiftVersion"`
}

Jump to

Keyboard shortcuts

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