provider

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VersionLatest = "latest"
	ChecksumType  = "checksum"

	SignatureTypeNone     = "none"
	SignatureTypeFile     = "file"
	SignatureTypeChecksum = "checksum"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GPGAsset

type GPGAsset struct {
	*asset.Asset

	KeyID uint64

	Source ISource
}

func (*GPGAsset) Download

func (a *GPGAsset) Download(ctx context.Context) error

func (*GPGAsset) ID

func (a *GPGAsset) ID() string

func (*GPGAsset) Path

func (a *GPGAsset) Path() string

type ISource

type ISource interface {
	GetSource() string
	GetOwner() string
	GetRepo() string
	GetApp() string
	GetID() string
	GetDownloadsDir() string
	GetVersion() string
	PreRun(context.Context) error
	Run(context.Context) error
}

type Options

type Options struct {
	OS       string
	Arch     string
	Config   *config.Config
	Settings map[string]interface{}
}

type Provider

type Provider struct {
	Options   *Options
	OSConfig  *osconfig.OS
	Assets    []asset.IAsset
	Binary    asset.IAsset
	Signature asset.IAsset
	Checksum  asset.IAsset
	Key       asset.IAsset

	ChecksumType  string
	SignatureType string
}

func (*Provider) Cleanup

func (p *Provider) Cleanup() error

func (*Provider) CommonRun

func (p *Provider) CommonRun(ctx context.Context) error

CommonRun - common run logic for all sources that includes download, extract, install and cleanup

func (*Provider) Discover

func (p *Provider) Discover(names []string, version string) error

Discover will attempt to discover and categorize the assets provided

func (*Provider) Download

func (p *Provider) Download(ctx context.Context) error

func (*Provider) Extract

func (p *Provider) Extract() error

func (*Provider) GetArch

func (p *Provider) GetArch() string

func (*Provider) GetOS

func (p *Provider) GetOS() string

func (*Provider) GetVersion

func (p *Provider) GetVersion() string

func (*Provider) Install

func (p *Provider) Install() error

func (*Provider) Verify

func (p *Provider) Verify() error

Jump to

Keyboard shortcuts

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