app

package
v0.0.0-...-ed7d7af Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateFileChecksum

func CalculateFileChecksum(filePath string) (string, error)

func InstallationPath

func InstallationPath(installationPath, repositoryName, appName, appVersion string) string

InstallationPath returns the path where the app should be installed. The path is constructed as "<installationPath>/<repository-name>/<app-name>/<app-version>".

Types

type App

type App interface {
	// Reference returns the reference of the app.
	Reference() *Reference
	// Checksum returns the checksum of the app.
	Checksum() string
	// ExecutablePath returns the path to the executable.
	ExecutablePath() string
	// PossibleReferences returns a list of possible references for the app.
	PossibleReferences() []string
}

App is an interface that represents an application within the repository. It provides methods to access the app's reference, checksum, executable path, and possible references.

func NewBinaryApp

func NewBinaryApp(repository, name, version, checksum, executionPath string) App

type BinaryApp

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

func (*BinaryApp) Checksum

func (a *BinaryApp) Checksum() string

func (*BinaryApp) ExecutablePath

func (a *BinaryApp) ExecutablePath() string

func (*BinaryApp) PossibleReferences

func (a *BinaryApp) PossibleReferences() []string

func (*BinaryApp) Reference

func (a *BinaryApp) Reference() *Reference

type Reference

type Reference struct {
	Repository string
	Name       string
	Version    string
}

func (*Reference) PossibleReferences

func (a *Reference) PossibleReferences() []string

String returns a string representation of the AppReference. The format is "repository::name@version" if all fields are present, or just "name@version" if the repository is not specified.

func (*Reference) String

func (a *Reference) String() string

String returns a string representation of the AppReference. The format is "repository::name@version" if all fields are present, or just "name@version" if the repository is not specified.

Jump to

Keyboard shortcuts

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