provider

package
v1.0.0-alpha.29 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VersionLatest = "latest"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ISource

type ISource interface {
	GetSource() string
	GetOwner() string
	GetRepo() string
	GetApp() string
	GetID() string
	GetDownloadsDir() string
	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
}

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) error

Discover will attempt to discover and categorize the assets provided TODO(ek): split up and refactor this function as it's way too complex

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) 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