Documentation
¶
Overview ¶
Package extensions contains the install/upgrades/uninstall logic for extensions
Index ¶
- Variables
- func DeletePackage(ctx context.Context, pkg string, isExperiment bool) (err error)
- func Install(ctx context.Context, downloader *oci.Downloader, url string, ...) (err error)
- func Promote(ctx context.Context, pkg string) (err error)
- func Remove(ctx context.Context, pkg string, extensions []string, isExperiment bool, ...) (err error)
- func RemoveAll(ctx context.Context, pkg string, isExperiment bool, hooks ExtensionHooks) (err error)
- func Restore(ctx context.Context, downloader *oci.Downloader, pkg string, ...) (err error)
- func Save(ctx context.Context, pkg string, saveDir string) (err error)
- func SetPackage(ctx context.Context, pkg string, version string, isExperiment bool) (err error)
- type ExtensionHooks
Constants ¶
This section is empty.
Variables ¶
View Source
var ExtensionsDBDir = paths.RunPath
ExtensionsDBDir is the path to the extensions database, overridden in tests
Functions ¶
func DeletePackage ¶
DeletePackage removes a package from the database.
func Install ¶
func Install(ctx context.Context, downloader *oci.Downloader, url string, extensions []string, isExperiment bool, hooks ExtensionHooks) (err error)
Install installs extensions for a package.
func Remove ¶
func Remove(ctx context.Context, pkg string, extensions []string, isExperiment bool, hooks ExtensionHooks) (err error)
Remove removes extensions for a package.
func RemoveAll ¶
func RemoveAll(ctx context.Context, pkg string, isExperiment bool, hooks ExtensionHooks) (err error)
RemoveAll removes all extensions for a package.
func Restore ¶
func Restore(ctx context.Context, downloader *oci.Downloader, pkg string, downloadURL string, saveDir string, isExperiment bool, hooks ExtensionHooks) (err error)
Restore restores the extensions after a package upgrade
Types ¶
type ExtensionHooks ¶
type ExtensionHooks interface {
PreInstallExtension(ctx context.Context, pkg string, extension string) error
PreRemoveExtension(ctx context.Context, pkg string, extension string) error
PostInstallExtension(ctx context.Context, pkg string, extension string) error
}
ExtensionHooks is the interface for the extension hooks.
Click to show internal directories.
Click to hide internal directories.