apps

package
v0.0.0-...-d8cb705 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrFailedToGetApps       = "failed to get apps"
	ErrFailedToGetAppStorage = "failed to get app storage"
)
View Source
const (
	APP_STORE_URL               = "https://apps.home-cloud.io/index.yaml"
	ErrFailedToPopulateAppStore = "failed to populate app store"
)

Variables

This section is empty.

Functions

func AppStoreCache

func AppStoreCache(logger chassis.Logger)

AppStoreCache creates a new store cache that runs in the background keeping the app store up to date with the latest available apps

Types

type Controller

type Controller interface {
	// Install will install the requested app.
	Install(ctx context.Context, logger chassis.Logger, request *v1.InstallAppRequest) error
	// Delete will delete the requested app.
	Delete(ctx context.Context, logger chassis.Logger, request *v1.DeleteAppRequest) error
	// Update will update the requested app.
	//
	// NOTE: An empty value on the spec will be applied as empty and will NOT
	// default to the existing value.
	Update(ctx context.Context, logger chassis.Logger, request *v1.UpdateAppRequest) error
	// Store returns all apps currently available in the store.
	Store(ctx context.Context, logger chassis.Logger) ([]*v1.App, error)
	// UpdateAll will update all apps to the latest available version in the store.
	UpdateAll(ctx context.Context, logger chassis.Logger) error
	// Healthcheck will retrieve the health of all installed apps.
	Healthcheck(ctx context.Context, logger chassis.Logger) ([]*v1.AppHealth, error)
	// AutoUpdate will check for and install app updates on a schedule. It is designed to
	// be called at bootup.
	AutoUpdate(logger chassis.Logger)
	// GetAppStorage will retrieve the app storage volumes for all installed apps.
	GetAppStorage(ctx context.Context, logger chassis.Logger) ([]*v1.AppStorage, error)
}

func NewController

func NewController(logger chassis.Logger) Controller

type HelmIndex

type HelmIndex struct {
	ApiVersion string
	Generated  string
	Entries    map[string][]*v1.App
}

HelmIndex represents the exact shape of a Helm repository index file: e.g. https://apps.home-cloud.io/index.yaml

NOTE: This is a local type instead of a protobuf because protobufs cannot represent a map with an array/slice as the value but that is needed to unmarshal the yaml from the Helm index.

Jump to

Keyboard shortcuts

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