Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Downloaders map[string][]Downloader `json:"downloaders,omitempty"`
}
Config is downloaders configuration
func LoadConfig ¶
LoadConfig returns a Config from a config reader
func (*Config) Downloader ¶
func (c *Config) Downloader(binary, opSys, arch string) Downloader
Downloader returns a Downloader for the given binary, os and arch.
func (*Config) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
func (*Config) UpdateChecksums ¶
UpdateChecksums updates the checksums for binary's downloaders
type Downloader ¶
type Downloader interface {
ErrString(binary string) string
MatchesOS(opSys string) bool
MatchesArch(arch string) bool
HasChecksum(checksum string) bool
UpdateChecksum(cellarDir string) error
Install(downloaderName, cellarDir, targetDir string, force bool) error
Validate(cellarDir string) error
}
Downloader interface for *bindown.Downloader
type File ¶
type File struct {
*Config
// contains filtered or unexported fields
}
File represents a config file
func NewConfigFile ¶
NewConfigFile creates a *File for the file at filename
Click to show internal directories.
Click to hide internal directories.