Documentation
¶
Index ¶
- Variables
- func CheckUsing(pkg string) (*string, error)
- func ParseVersion(versionStr string, versionFmt string) (*string, error)
- func RemoveUsing(pkg string) error
- func WriteUsing(pkg string, using string) error
- type ArchLinuxPkgInfo
- type AssetInfo
- type OsArchPair
- type OsInfo
- type PkgConfig
- func (pkgConf *PkgConfig) GetAssetStemExtUrl(version string) (*string, *string, *string, error)
- func (pkgConf *PkgConfig) GetLatestVersion() (*string, error)
- func (pkgConf *PkgConfig) GetMyBinPaths() ([]string, error)
- func (pkgConf *PkgConfig) GetRenames() ([]RenameItem, error)
- func (pkgConf *PkgConfig) InstallNotes() string
- func (pkgConf *PkgConfig) RemoveNotes() string
- type PkgGroupConfig
- type ReleaseInfo
- type ReleaseTagInfo
- type RenameItem
- type SingleOrMulti
- type UsingInfo
Constants ¶
This section is empty.
Variables ¶
var GOOStoPkgOs = map[string]string{
"darwin": "macos",
"windows": "win",
"linux": "linux",
}
GOOStoPkgOs is a mapping of GOOS to webman-specific OS names
Functions ¶
func CheckUsing ¶
Check using file. If UsingFile doesn't exist, it is not using anything
func RemoveUsing ¶
func WriteUsing ¶
Types ¶
type ArchLinuxPkgInfo ¶
type ArchLinuxPkgInfo struct {
PkgVer string
}
type OsArchPair ¶
OsArchPair is a mapping of OS to ARCH
type OsInfo ¶
type OsInfo struct {
Name string `yaml:"name"`
Ext string `yaml:"ext"`
BinPaths SingleOrMulti `yaml:"bin_path"`
ExtractHasRoot bool `yaml:"extract_has_root"`
IsRawBinary bool `yaml:"is_raw_binary"`
FilenameFormatOverride string `yaml:"filename_format_override"`
Renames []RenameItem `yaml:"renames"`
InstallNote string `yaml:"install_note"`
RemoveNote string `yaml:"remove_note"`
}
OsInfo is specific information for a package based on OS
type PkgConfig ¶
type PkgConfig struct {
Title string `yaml:"-"`
Tagline string `yaml:"tagline"`
About string `yaml:"about"`
InstallNote string `yaml:"install_note"`
RemoveNote string `yaml:"remove_note"`
InfoUrl string `yaml:"info_url"`
ReleasesUrl string `yaml:"releases_url"`
BaseDownloadUrl string `yaml:"base_download_url"`
GitUser string `yaml:"git_user"`
GitRepo string `yaml:"git_repo"`
GiteaURL string `yaml:"gitea_url"`
SourceUrl string `yaml:"source_url"`
FilenameFormat string `yaml:"filename_format"`
VersionFormat string `yaml:"version_format"`
LatestStrategy string `yaml:"latest_strategy"`
ForceLatest bool `yaml:"force_latest"`
AllowPrerelease bool `yaml:"allow_prerelease"`
ArchLinuxPkgName string `yaml:"arch_linux_pkg_name"`
OsMap map[string]OsInfo `yaml:"os_map"`
ArchMap map[string]string `yaml:"arch_map"`
Ignore []OsArchPair `yaml:"ignore"`
}
PkgConfig is a package configuration
func ParseGroupPackages ¶ added in v0.10.0
func ParsePkgConfig ¶ added in v0.9.2
ParsePkgConfig parses an io.Reader as a package configuration
func ParsePkgConfigLocal ¶
ParsePkgConfigLocal checks all known repos for a given package
func ParsePkgConfigPath ¶ added in v0.10.0
ParsePkgConfigPath parses a package configuration from a repo path (~/.webman/recipes/webman) and package name (age) It combines them to parse (~/.webman/recipes/webman/pkgs/age.webman-pkg.yaml) and assigns the name (age)
func (*PkgConfig) GetAssetStemExtUrl ¶
func (*PkgConfig) GetLatestVersion ¶
GetLatestVersion uses the configuration's latest-strategy to determine the latest version of the package
func (*PkgConfig) GetMyBinPaths ¶
GetMyBinPaths gets all bin paths for this pakcage on this OS
func (*PkgConfig) GetRenames ¶ added in v0.9.0
func (pkgConf *PkgConfig) GetRenames() ([]RenameItem, error)
GetRenames gets all renames for this package on this OS
func (*PkgConfig) InstallNotes ¶ added in v0.9.1
InstallNotes combines package-level and OS-level installation notes
func (*PkgConfig) RemoveNotes ¶ added in v0.9.1
RemoveNotes combines package-level and OS-level removal notes
type PkgGroupConfig ¶
type PkgGroupConfig struct {
Title string `yaml:"title"`
Tagline string `yaml:"tagline"`
Description string `yaml:"description"`
Packages []string `yaml:"packages"`
}
func ParseGroupConfig ¶
func ParseGroupConfig(r io.Reader, name string) (*PkgGroupConfig, error)
func ParseGroupConfigInRepo ¶ added in v0.11.0
func ParseGroupConfigInRepo(pkgRepo *config.PkgRepo, group string) (*PkgGroupConfig, error)
func ParseGroupConfigLocal ¶ added in v0.9.2
type ReleaseInfo ¶
type ReleaseTagInfo ¶
type RenameItem ¶ added in v0.9.0
RenameItem is for package renames when installing
type SingleOrMulti ¶
type SingleOrMulti struct {
Values []string
}
SingleOrMulti is for YAML values that could be a single string or multiple
func (*SingleOrMulti) UnmarshalYAML ¶
func (sm *SingleOrMulti) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements yaml.Unmarshaler