pkgparse

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GOOStoPkgOs = map[string]string{
	"darwin":  "macos",
	"windows": "win",
	"linux":   "linux",
}

Functions

func CheckUsing

func CheckUsing(pkg string) (*string, error)

Check using file. If UsingFile doesn't exist, it is not using anything

func ParseVersion

func ParseVersion(versionStr string, versionFmt string) (*string, error)

func RefreshRecipes

func RefreshRecipes() error

func RemoveUsing

func RemoveUsing(pkg string) error

func ShouldRefreshRecipes

func ShouldRefreshRecipes() (bool, error)

func WriteUsing

func WriteUsing(pkg string, using string) error

Types

type ArchLinuxPkgInfo

type ArchLinuxPkgInfo struct {
	PkgVer string
}

type AssetInfo

type AssetInfo struct {
	Name               string
	Size               uint32
	BrowserDownloadUrl string `json:"browser_download_url"`
}

type GithubDir

type GithubDir struct {
	Name        string
	DownloadUrl string `yaml:"download_url"`
}

type OsArchPair

type OsArchPair struct {
	Os   string `yaml:"os"`
	Arch string `yaml:"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"`
}

type PkgConfig

type PkgConfig struct {
	Title   string
	Tagline string
	About   string

	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"`
}

func ParsePkgConfigLocal

func ParsePkgConfigLocal(pkg string, strict bool) (*PkgConfig, error)

func ParsePkgConfigOnline

func ParsePkgConfigOnline(pkg string) (*PkgConfig, error)

func (*PkgConfig) GetAssetStemExtUrl

func (pkgConf *PkgConfig) GetAssetStemExtUrl(version string) (*string, *string, *string, error)

/

func (*PkgConfig) GetLatestVersion

func (pkgConf *PkgConfig) GetLatestVersion() (*string, error)

func (*PkgConfig) GetMyBinPaths

func (pkgConf *PkgConfig) GetMyBinPaths() ([]string, error)

type PkgGroupConfig

type PkgGroupConfig struct {
	Title   string
	Tagline string
	About   string

	InfoUrl  string   `yaml:"info_url"`
	Packages []string `yaml:"packages"`
}

func ParseGroupConfig

func ParseGroupConfig(group string) *PkgGroupConfig

type PkgInfo

type PkgInfo struct {
	Title   string
	Tagline string
	About   string
}

func ParseMultiPkgInfo

func ParseMultiPkgInfo(pkgs []string) ([]PkgInfo, error)

func ParsePkgInfo

func ParsePkgInfo(pkg string) (*PkgInfo, error)

type RefreshFile

type RefreshFile struct {
	LastUpdated *time.Time
}

type ReleaseInfo

type ReleaseInfo struct {
	Url     string
	Assets  []AssetInfo
	TagName string `json:"tag_name"`
	Date    string `json:"published_at"`
}

type ReleaseTagInfo

type ReleaseTagInfo struct {
	TagName    string `json:"tag_name"`
	Date       string `json:"published_at"`
	Prerelease bool
	Draft      bool
}

type SingleOrMulti

type SingleOrMulti struct {
	Values []string
}

func (*SingleOrMulti) UnmarshalYAML

func (sm *SingleOrMulti) UnmarshalYAML(unmarshal func(interface{}) error) error

type UsingInfo

type UsingInfo struct {
	Using string
}

Jump to

Keyboard shortcuts

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