Documentation
¶
Index ¶
- type Asset
- func (a *Asset) Classify()
- func (a *Asset) Cleanup() error
- func (a *Asset) Download(_ context.Context) error
- func (a *Asset) Extract() error
- func (a *Asset) GetAsset() *Asset
- func (a *Asset) GetDisplayName() string
- func (a *Asset) GetFilePath() string
- func (a *Asset) GetFiles() []*File
- func (a *Asset) GetName() string
- func (a *Asset) GetScore() int
- func (a *Asset) GetTempPath() string
- func (a *Asset) GetType() Type
- func (a *Asset) ID() string
- func (a *Asset) Install(id, binDir string) error
- func (a *Asset) IsSupportedExtension() bool
- func (a *Asset) Score(opts *ScoreOptions) int
- type File
- type IAsset
- type ScoreOptions
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Asset ¶
type Asset struct {
Name string
DisplayName string
Type Type
OS string
Arch string
Version string
Extension string
DownloadPath string
Hash string
TempDir string
Files []*File
// contains filtered or unexported fields
}
func (*Asset) Classify ¶
func (a *Asset) Classify()
Classify determines the type of asset based on the file extension
func (*Asset) GetDisplayName ¶
func (*Asset) GetFilePath ¶
func (*Asset) GetTempPath ¶
func (*Asset) IsSupportedExtension ¶
func (*Asset) Score ¶
func (a *Asset) Score(opts *ScoreOptions) int
Score returns the score of the asset based on the options provided
type IAsset ¶
type IAsset interface {
GetName() string
GetDisplayName() string
GetScore() int
GetType() Type
GetAsset() *Asset
GetFiles() []*File
GetTempPath() string
GetFilePath() string
Score(options *ScoreOptions) int
Download(context.Context) error
Extract() error
Install(string, string) error
Cleanup() error
ID() string
}
type ScoreOptions ¶
Click to show internal directories.
Click to hide internal directories.