pluginmgr

package
v0.2.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package pluginmgr installs plugins from a deployment's Marketplace.

It is the mechanism both local surfaces share: the CLI and Desktop each own how they ask and what they print, and neither owns staging, digest verification, or the rename that puts a release in place. A second copy of that would be a second set of rules about when a half-installed plugin is visible.

Index

Constants

This section is empty.

Variables

View Source
var ErrIsCheckout = errors.New("the installed plugin is a Git checkout")

ErrIsCheckout means the installed copy is a Git working tree, which may hold work that exists nowhere else. How a surface offers to override that is the surface's own word — a flag here, a confirmation there — so the message says what is true and leaves the wording to the caller.

View Source
var ErrNotSignedIn = errors.New("not signed in: run `buildmax login` first")

ErrNotSignedIn means there is no login to reach a Marketplace with.

Functions

func Inspect

func Inspect(dir string) (inspect.Package, error)

Inspect reads a plugin directory the way a run would.

func Pack

func Pack(dir string) (io.Reader, func(), int64, error)

Pack writes the archive to a temporary file rather than a buffer, so publishing a large plugin does not hold it twice in memory.

func ReadSourceClaim

func ReadSourceClaim(ctx context.Context, dir string) coreplugin.ReleaseSource

ReadSourceClaim describes the checkout a package was packed from.

A directory that is not a repository produces an empty claim, which is not an error: a package assembled by hand is a legitimate thing to publish, and the catalog says so rather than inventing provenance.

func SetDisabled

func SetDisabled(name string, disabled bool) (string, error)

SetDisabled stops a plugin loading, or lets it load again.

Only the flag is written. Recording the source classification here would freeze an answer the directory can change afterwards.

func Uninstall

func Uninstall(name string, force bool) (string, error)

Uninstall removes an installed plugin and returns the path it removed.

Types

type Options

type Options struct {
	Name string
	// Version asks for one exact release. Empty takes the default selection.
	Version string
	// AllowYanked permits a withdrawn release, which a recovery has to say.
	AllowYanked bool
	// RequireInstalled refuses when the plugin is not there yet, which is what
	// separates an update from an install.
	RequireInstalled bool
}

Options describes which release a caller wants installed.

type Plan

type Plan struct {
	Release coreplugin.Release
	// AlreadyInstalled means this exact release is the one already in place.
	AlreadyInstalled bool
}

Plan is what an install would do, resolved before anything is downloaded.

It exists so a surface can show what is about to change while the decision is still open, which is the moment the capability report is worth reading.

type Session

type Session struct {
	// contains filtered or unexported fields
}

Session is an authenticated connection to one deployment's Marketplace.

func Open

func Open() (*Session, error)

Open reads the stored login and prepares a session.

func (*Session) Install

func (s *Session) Install(ctx context.Context, opts Options, release coreplugin.Release) error

Install downloads a resolved release and puts it in place.

func (*Session) ListActivations

func (s *Session) ListActivations(ctx context.Context, teamID string) (*pluginwire.ActivationsResponse, error)

ListActivations reads what a team has activated for its background runs.

It sits here rather than in the CLI so Desktop can show the same thing: a team's activations are a property of the deployment, not of this machine.

func (*Session) Publish

func (s *Session) Publish(ctx context.Context, dir string) (*coreplugin.Release, error)

Publish packs a directory and uploads it.

func (*Session) Resolve

func (s *Session) Resolve(ctx context.Context, opts Options) (Plan, error)

Resolve picks the release to install without installing it.

func (*Session) ServerURL

func (s *Session) ServerURL() string

ServerURL is the deployment this session talks to.

Jump to

Keyboard shortcuts

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