release

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssetName

func AssetName(component Component, goos, goarch string) (string, error)

func CacheDir

func CacheDir(version string) (string, error)

func CurrentAssetName

func CurrentAssetName(component Component) (string, error)

func DefaultBinDir

func DefaultBinDir() (string, error)

func InstalledName

func InstalledName(component Component) string

func ParseChecksums

func ParseChecksums(r io.Reader) (map[string]string, error)

Types

type Asset

type Asset struct {
	Name               string `json:"name"`
	BrowserDownloadURL string `json:"browser_download_url"`
	Size               int64  `json:"size"`
}

type Client

type Client struct {
	APIBase    string
	Owner      string
	Repository string
	Token      string
	HTTPClient *http.Client
}

func NewClientFromEnv

func NewClientFromEnv() (*Client, error)

func (*Client) Install

func (c *Client) Install(ctx context.Context, component Component, version, destinationDir string) (InstallResult, error)

func (*Client) Resolve

func (c *Client) Resolve(ctx context.Context, version string) (Release, error)

type Component

type Component string
const (
	ComponentPT     Component = "pt"
	ComponentServer Component = "plumtree-server"
)

type InstallResult

type InstallResult struct {
	Component Component
	Version   string
	Path      string
	Checksum  string
}

type Release

type Release struct {
	TagName string  `json:"tag_name"`
	Assets  []Asset `json:"assets"`
}

func (Release) Asset

func (r Release) Asset(name string) (Asset, bool)

Jump to

Keyboard shortcuts

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