config

package
v0.103.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const Path = "config.yaml"

Variables

This section is empty.

Functions

func PlatformAsValue

func PlatformAsValue(platform string) string

Types

type Application

type Application struct {
	DownloadPath string            `yaml:"download-path"`
	SnippetPath  string            `yaml:"snippet-path"`
	FromImages   []BinaryFromImage `yaml:"from-images"`
}

func DefaultApplication

func DefaultApplication() Application

func Read

func Read() (*Application, error)

func (Application) GetBinaryFromImage

func (c Application) GetBinaryFromImage(name, version string) *BinaryFromImage

func (Application) GetBinaryFromImageByPath

func (c Application) GetBinaryFromImageByPath(storePath string) *BinaryFromImage

func (Application) Validate

func (c Application) Validate() error

type BinaryFromImage

type BinaryFromImage struct {
	GenericName string `yaml:"name"`
	Version     string `yaml:"version"`

	Images       []Image  `yaml:"images"`
	PathsInImage []string `yaml:"paths"`
}

func (BinaryFromImage) AllStorePaths

func (c BinaryFromImage) AllStorePaths(dest string) []string

func (BinaryFromImage) AllStorePathsForImage

func (c BinaryFromImage) AllStorePathsForImage(image Image, dest string) []string

func (BinaryFromImage) Fingerprint

func (c BinaryFromImage) Fingerprint() string

func (BinaryFromImage) Key

func (c BinaryFromImage) Key() string

func (BinaryFromImage) Name

func (c BinaryFromImage) Name() string

type Image

type Image struct {
	Reference string `yaml:"ref"`
	Platform  string `yaml:"platform"`
}

func (Image) Key

func (c Image) Key() string

Jump to

Keyboard shortcuts

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