extensions

package
v0.77.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package extensions contains the install/upgrades/uninstall logic for extensions

Index

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

func DeletePackage(ctx context.Context, pkg string, isExperiment bool) (err error)

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 Promote

func Promote(ctx context.Context, pkg string) (err error)

Promote promotes a package's extensions from experiment to stable.

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

func Save

func Save(ctx context.Context, pkg string, saveDir string) (err error)

Save saves the extensions for a package upgrade

func SetPackage

func SetPackage(ctx context.Context, pkg string, version string, isExperiment bool) (err error)

SetPackage sets the version of a package in the database.

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.

Jump to

Keyboard shortcuts

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