appdefinition

package
v0.10.0-rc2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	IconFile         = "icon"
	ReadmeFile       = "README"
	Acornfile        = "Acornfile"
	ImageDataFile    = "images.json"
	VersionFile      = "version.json"
	VCSDataFile      = "vcs.json"
	BuildDataFile    = "build.json"
	BuildContextFile = "build-context.json"

	AcornfileSchemaVersion = "v1"
)

Variables

View Source
var (
	ErrInvalidInput = errors.New("invalid input")
)

Functions

func GetImageReferenceForServiceName

func GetImageReferenceForServiceName(svcName string, appSpec *v1.AppSpec, imageData v1.ImagesData) (result string, found bool)

func IconFromTar

func IconFromTar(reader io.Reader) ([]byte, error)

Types

type AppDefinition

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

func FromAppImage

func FromAppImage(appImage *v1.AppImage) (appDef *AppDefinition, err error)

func NewAppDefinition

func NewAppDefinition(data []byte) (*AppDefinition, error)

func (*AppDefinition) AppSpec

func (a *AppDefinition) AppSpec() (*v1.AppSpec, error)

func (*AppDefinition) BuilderSpec

func (a *AppDefinition) BuilderSpec() (*v1.BuilderSpec, error)

func (*AppDefinition) ClearImageData added in v0.9.0

func (a *AppDefinition) ClearImageData() (_ *AppDefinition, images *v1.ImagesData)

func (*AppDefinition) JSON

func (a *AppDefinition) JSON() (string, error)

func (*AppDefinition) ToFlags added in v0.9.0

func (a *AppDefinition) ToFlags(programName, argsFile string, usage func()) (Flags, error)

func (*AppDefinition) ToParamSpec added in v0.9.0

func (a *AppDefinition) ToParamSpec() (*v1.ParamSpec, error)

func (*AppDefinition) WatchFiles

func (a *AppDefinition) WatchFiles(cwd string) (result []string, _ error)

func (*AppDefinition) WithArgs

func (a *AppDefinition) WithArgs(args map[string]any, profiles []string) *AppDefinition

func (*AppDefinition) WithImageData

func (a *AppDefinition) WithImageData(imageData v1.ImagesData) *AppDefinition

func (*AppDefinition) YAML

func (a *AppDefinition) YAML() (string, error)

type DataFiles

type DataFiles struct {
	IconSuffix string
	Icon       []byte
	Readme     []byte
}

func AppImageFromTar

func AppImageFromTar(reader io.Reader) (*v1.AppImage, *DataFiles, error)

type Flags added in v0.9.0

type Flags interface {
	Parse(args []string) (map[string]any, []string, error)
}

Jump to

Keyboard shortcuts

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