plugininstall

package module
v0.0.0-...-58c1890 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExitCodeFromErr

func ExitCodeFromErr(err error) int

ExitCodeFromErr maps domain errors to shell exit codes; unknown returns 1.

Types

type Params

type Params struct {
	Owner, Repo, Tag string
	UseLatest        bool   // if true, Tag is ignored; use GitHub releases/latest
	InstallDir       string // default "bin" (relative to cwd resolved to abs)
	Force            bool
	Token            string // optional; also read from GITHUB_TOKEN in CLI
	AllowPrerelease  bool   // default false
	OutputName       string // empty = name from archive
	GitHubBaseURL    string // empty = default
	GOOS             string // optional explicit target override
	GOARCH           string // optional explicit target override
}

Params configures Install (plugin binary from GitHub Releases).

type Result

type Result struct {
	ResolvedInstallPath string
	InstalledFileName   string
	ReleaseRef          string
	ReleaseSource       string
	AssetName           string
	TargetGOOS          string
	TargetGOARCH        string
	Overwrote           bool
	PayloadKind         string
}

func Install

func Install(ctx context.Context, p Params) (Result, error)

Install downloads and verifies a release tarball and writes the binary to InstallDir. This file is the module composition root: the only place that wires concrete adapters into usecase.Installer.

Directories

Path Synopsis
adapters
fs
internal

Jump to

Keyboard shortcuts

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