Versions in this module Expand all Collapse all v0 v0.6.0 Dec 4, 2026 v0.5.0 Dec 2, 2026 Changes in this version + const DefaultMaxArchiveBytes + const DefaultMaxArtifactBytes + const DefaultMaxTreeBytes + const DefaultMaxTreeFiles + const ManifestName + const MaxDownloadRedirects + var ErrExists = errors.New("plugin package already installed") + var ErrNotFound = errors.New("plugin package not installed") + func Download(ctx context.Context, client HTTPClient, source, destination string, ...) error + func ExtractArchive(archive, sha256Hex, destination string, limits Limits) (string, error) + func ExtractArchiveWithLayout(archive, sha256Hex, destination string, limits Limits, ...) (string, error) + func NewDownloadClient() *http.Client + func SafeArchivePath(name string) bool + func SealExecutable(options ExecutablePackage) (packagekit.Manifest, error) + func WriteManifest(dir string, m packagekit.Manifest) error + func WriteManifestAt(dir, manifestPath string, m packagekit.Manifest) error + type Archive struct + ID string + SHA256 string + Source string + type ArchiveOptions struct + Client HTTPClient + Copy CopyOptions + type Check struct + Directory string + Err error + ID string + func (c Check) OK() bool + type CopyOptions struct + PreserveExecutableArtifacts bool + type Entrypoint struct + Artifact string + Digest string + Name string + Package Installed + Path string + type ExecutablePackage struct + Arch string + Binary string + Descriptor plugin.Descriptor + ManifestPath string + OS string + OutputDir string + Protocol string + type HTTPClient interface + Do func(*http.Request) (*http.Response, error) + type Installed struct + Directory string + Manifest packagekit.Manifest + func (p Installed) ArtifactPath(name string) (string, error) + func (p Installed) Digest() (string, error) + func (p Installed) Executable() (string, error) + func (p Installed) IsExecutable() bool + func (p Installed) Name() string + func (p Installed) Supports(name, version string) bool + func (p Installed) Verify() error + func (p Installed) Version() string + type Layered struct + func NewLayered(stores ...*Store) (*Layered, error) + func (l *Layered) List() ([]Installed, error) + func (l *Layered) ListUnverified() ([]Installed, []Check, error) + func (l *Layered) Load(id string) (Installed, error) + func (l *Layered) Roots() []string + func (l *Layered) Verify() ([]Check, error) + type Limits struct + MaxArchiveBytes int64 + MaxArtifactBytes int64 + MaxTreeBytes int64 + MaxTreeFiles int + type Receipt struct + ID string + Revision string + SHA256 string + type Store struct + func New(root string, limits Limits) (*Store, error) + func NewWithLayout(root string, limits Limits, layout storelayout.Layout) (*Store, error) + func (s *Store) Install(source string) (Installed, error) + func (s *Store) InstallArchive(ctx context.Context, archive Archive, options ArchiveOptions) (Installed, error) + func (s *Store) InstallWithOptions(source string, options CopyOptions) (Installed, error) + func (s *Store) Layout() storelayout.Layout + func (s *Store) List() ([]Installed, error) + func (s *Store) ListUnverified() ([]Installed, []Check, error) + func (s *Store) Load(id string) (Installed, error) + func (s *Store) Receipt(id string) (Receipt, error) + func (s *Store) Remove(id string) error + func (s *Store) Replace(source string) (Installed, error) + func (s *Store) ReplaceWithOptions(source string, options CopyOptions) (Installed, error) + func (s *Store) ResolveEntrypoint(id, contract, version, protocol, reviewedDigest string) (Entrypoint, error) + func (s *Store) Root() string + func (s *Store) Upgrade(source string) (Installed, error) + func (s *Store) UpgradeWithOptions(source string, options CopyOptions) (Installed, error) + func (s *Store) Verify() ([]Check, error)