types

package
v0.0.0-...-2469478 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPackageNotFound      = errors.New("package not found")
	ErrReleaseNotFound      = errors.New("release not found")
	ErrPlatformNotSupported = errors.New("package doesn't support platform")
)

Functions

This section is empty.

Types

type ArtifactMetadata

type ArtifactMetadata struct {
	URL                string `json:"url"`
	BrowserDownloadURL string `json:"browser_download_url"`

	Name          string    `json:"name"`
	DownloadCount int       `json:"download_count"`
	CreatedAt     time.Time `json:"created_at"`
	UpdatedAt     time.Time `json:"updated_at"`
	ContentType   string    `json:"content_type"`
	Size          int       `json:"size"`
}

type PkgRef

type PkgRef struct {
	Owner   string
	Repo    string
	Version string
}

func NewPkgRef

func NewPkgRef(pkg string) (PkgRef, error)

func (PkgRef) String

func (p PkgRef) String() string

type Platform

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

func CurrentPlatform

func CurrentPlatform() Platform

func NewPlatform

func NewPlatform(os, arch string) Platform

func ParsePlatform

func ParsePlatform(s string) (Platform, error)

func (Platform) Arch

func (p Platform) Arch() string

func (Platform) OS

func (p Platform) OS() string

func (Platform) String

func (p Platform) String() string

type ReleaseMetadata

type ReleaseMetadata struct {
	// Name here is the release name, which often is the same as the tag name (usually the version).
	// Two things:
	// 1. There's also TagName, consider using that instead
	// 2. Should this be called Tag or Version, so we can reserve Name for tha package name if
	//    we want to include that?
	TagName     string             `json:"tag_name"`
	CreatedAt   time.Time          `json:"created_at"`
	PublishedAt time.Time          `json:"published_at"`
	Draft       bool               `json:"draft"`
	Prerelease  bool               `json:"prerelease"`
	Artifacts   []ArtifactMetadata `json:"artifacts"`
}

type RunCmd

type RunCmd struct {
	Packages []PkgRef
	App      string
	Args     []string
}

Jump to

Keyboard shortcuts

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