apps

package
v1.1.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidApp is the error when an app is invalid
	ErrInvalidApp = errors.New("invalid app")

	// ErrMissingManifest is the error when the manifest is missing
	ErrMissingManifest = errors.New("missing manifest")

	// ErrInvalidManifest is the error when the manifest is invalid
	ErrInvalidManifest = errors.New("invalid manifest")

	// ErrEntrypointDoesNotExist is the error when the entrypoint does not exist or is not a file
	ErrEntrypointDoesNotExist = errors.New("entrypoint does not exist")
)

Functions

This section is empty.

Types

type Application

type Application struct {
	// ID is the unique identifier of the application
	ID string `json:"-"`

	// Disabled is a flag to disable the application
	Disabled bool `json:"disabled,omitempty"`

	// Entrypoint is the entrypoint of the application within the bundle
	Entrypoint string `json:"entrypoint" validate:"required"`

	// Config contains the application-specific configuration
	Config map[string]interface{} `json:"config,omitempty"`
}

Application contains the metadata of an application

func List

func List(logger log.Logger, data map[string]config.App, fSystems ...fs.FS) []Application

List returns a list of applications from the given filesystems, individual filesystems are searched for applications, and the list is merged. Last finding gets priority in case of conflicts, so the order of the filesystems is important.

func (Application) ToExternal

func (a Application) ToExternal(entrypoint string) config.ExternalApp

ToExternal converts an Application to an ExternalApp configuration

Jump to

Keyboard shortcuts

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