Documentation ¶
Index ¶
- Constants
- func GetMaxParallelism(envMaxParallelism string, logE *logrus.Entry) int
- func GetRootDir(osEnv osenv.OSEnv) string
- type Alias
- type Config
- type File
- type FormatOverride
- type Override
- type Package
- type PackageInfo
- func (pkgInfo *PackageInfo) GetAsset() *string
- func (pkgInfo *PackageInfo) GetDescription() string
- func (pkgInfo *PackageInfo) GetFileSrc(pkg *Package, file *File, rt *runtime.Runtime) (string, error)
- func (pkgInfo *PackageInfo) GetFiles() []*File
- func (pkgInfo *PackageInfo) GetFormat() string
- func (pkgInfo *PackageInfo) GetLink() string
- func (pkgInfo *PackageInfo) GetName() string
- func (pkgInfo *PackageInfo) GetPkgPath(rootDir string, pkg *Package, rt *runtime.Runtime) (string, error)
- func (pkgInfo *PackageInfo) GetReplacements() map[string]string
- func (pkgInfo *PackageInfo) GetRosetta2() bool
- func (pkgInfo *PackageInfo) GetType() string
- func (pkgInfo *PackageInfo) HasRepo() bool
- func (pkgInfo *PackageInfo) Override(v string, rt *runtime.Runtime) (*PackageInfo, error)
- func (pkgInfo *PackageInfo) RenderAsset(pkg *Package, rt *runtime.Runtime) (string, error)
- func (pkgInfo *PackageInfo) RenderURL(pkg *Package, rt *runtime.Runtime) (string, error)
- func (pkgInfo *PackageInfo) Validate() error
- type PackageInfos
- type Param
- type Registries
- type Registry
- type RegistryContent
- type VersionOverride
Constants ¶
View Source
const ( PkgInfoTypeGitHubRelease = "github_release" PkgInfoTypeGitHubContent = "github_content" PkgInfoTypeGitHubArchive = "github_archive" PkgInfoTypeHTTP = "http" )
View Source
const ( RegistryTypeGitHubContent = "github_content" RegistryTypeLocal = "local" RegistryTypeStandard = "standard" )
Variables ¶
This section is empty.
Functions ¶
func GetMaxParallelism ¶ added in v1.6.1
func GetRootDir ¶ added in v1.6.1
Types ¶
type Config ¶
type Config struct { Packages []*Package `validate:"dive" json:"packages"` Registries Registries `validate:"dive" json:"registries"` }
type File ¶
type FormatOverride ¶
type Override ¶
type Override struct { GOOS string `` /* 199-byte string literal not displayed */ GOArch string `` /* 182-byte string literal not displayed */ Replacements map[string]string `json:"replacements,omitempty"` Format string `json:"format,omitempty" jsonschema:"example=tar.gz,example=raw"` Asset *string `json:"asset,omitempty"` Files []*File `json:"files,omitempty"` URL *string `json:"url,omitempty"` }
type Package ¶
type Package struct { Name string `validate:"required" json:"name,omitempty"` Registry string `` /* 131-byte string literal not displayed */ Version string `validate:"required" yaml:",omitempty" json:"version,omitempty"` Import string `yaml:",omitempty" json:"import,omitempty"` }
func (*Package) UnmarshalYAML ¶
type PackageInfo ¶
type PackageInfo struct { Name string `json:"name,omitempty"` Type string `validate:"required" json:"type" jsonschema:"enum=github_release,enum=github_content,enum=github_archive,enum=http"` RepoOwner string `yaml:"repo_owner" json:"repo_owner,omitempty"` RepoName string `yaml:"repo_name" json:"repo_name,omitempty"` Asset *string `json:"asset,omitempty"` Path *string `json:"path,omitempty"` Format string `json:"format,omitempty" jsonschema:"example=tar.gz,example=raw"` Files []*File `json:"files,omitempty"` URL *string `json:"url,omitempty"` Description string `json:"description,omitempty"` Link string `json:"link,omitempty"` Replacements map[string]string `json:"replacements,omitempty"` Overrides []*Override `json:"overrides,omitempty"` FormatOverrides []*FormatOverride `yaml:"format_overrides" json:"format_overrides,omitempty"` VersionConstraints string `yaml:"version_constraint" json:"version_constraint,omitempty"` VersionOverrides []*VersionOverride `yaml:"version_overrides" json:"version_overrides,omitempty"` SupportedIf *string `yaml:"supported_if" json:"supported_if,omitempty"` VersionFilter *string `yaml:"version_filter" json:"version_filter,omitempty"` Rosetta2 *bool `json:"rosetta2,omitempty"` Aliases []*Alias `json:"aliases,omitempty"` }
func (*PackageInfo) GetAsset ¶
func (pkgInfo *PackageInfo) GetAsset() *string
func (*PackageInfo) GetDescription ¶
func (pkgInfo *PackageInfo) GetDescription() string
func (*PackageInfo) GetFileSrc ¶
func (*PackageInfo) GetFiles ¶
func (pkgInfo *PackageInfo) GetFiles() []*File
func (*PackageInfo) GetFormat ¶
func (pkgInfo *PackageInfo) GetFormat() string
func (*PackageInfo) GetLink ¶
func (pkgInfo *PackageInfo) GetLink() string
func (*PackageInfo) GetName ¶
func (pkgInfo *PackageInfo) GetName() string
func (*PackageInfo) GetPkgPath ¶
func (*PackageInfo) GetReplacements ¶
func (pkgInfo *PackageInfo) GetReplacements() map[string]string
func (*PackageInfo) GetRosetta2 ¶
func (pkgInfo *PackageInfo) GetRosetta2() bool
func (*PackageInfo) GetType ¶
func (pkgInfo *PackageInfo) GetType() string
func (*PackageInfo) HasRepo ¶
func (pkgInfo *PackageInfo) HasRepo() bool
func (*PackageInfo) Override ¶
func (pkgInfo *PackageInfo) Override(v string, rt *runtime.Runtime) (*PackageInfo, error)
func (*PackageInfo) RenderAsset ¶
func (*PackageInfo) Validate ¶
func (pkgInfo *PackageInfo) Validate() error
type PackageInfos ¶
type PackageInfos []*PackageInfo
func (*PackageInfos) ToMap ¶
func (pkgInfos *PackageInfos) ToMap() (map[string]*PackageInfo, error)
type Registries ¶
func (Registries) JSONSchema ¶ added in v1.4.0
func (Registries) JSONSchema() *jsonschema.Schema
func (*Registries) UnmarshalYAML ¶
func (registries *Registries) UnmarshalYAML(unmarshal func(interface{}) error) error
type Registry ¶
type Registry struct { Name string `validate:"required" json:"name,omitempty"` Type string `validate:"required" json:"type,omitempty" jsonschema:"enum=standard,enum=local,enum=github_content"` RepoOwner string `yaml:"repo_owner" json:"repo_owner,omitempty"` RepoName string `yaml:"repo_name" json:"repo_name,omitempty"` Ref string `json:"ref,omitempty"` Path string `validate:"required" json:"path,omitempty"` }
func (*Registry) GetFilePath ¶
func (*Registry) UnmarshalYAML ¶
type RegistryContent ¶
type RegistryContent struct {
PackageInfos PackageInfos `yaml:"packages" validate:"dive" json:"packages"`
}
type VersionOverride ¶ added in v1.4.0
type VersionOverride struct { Type string `json:"type,omitempty" jsonschema:"enum=github_release,enum=github_content,enum=github_archive,enum=http"` RepoOwner string `yaml:"repo_owner" json:"repo_owner,omitempty"` RepoName string `yaml:"repo_name" json:"repo_name,omitempty"` Asset *string `json:"asset,omitempty"` Path *string `json:"path,omitempty"` Format string `json:"format,omitempty" jsonschema:"example=tar.gz,example=raw"` Files []*File `json:"files,omitempty"` URL *string `json:"url,omitempty"` Replacements map[string]string `json:"replacements,omitempty"` Overrides []*Override `json:"overrides,omitempty"` FormatOverrides []*FormatOverride `yaml:"format_overrides" json:"format_overrides,omitempty"` SupportedIf *string `yaml:"supported_if" json:"supported_if,omitempty"` VersionConstraints string `yaml:"version_constraint" json:"version_constraint,omitempty"` VersionFilter *string `yaml:"version_filter" json:"version_filter,omitempty"` Rosetta2 *bool `json:"rosetta2,omitempty"` }
Click to show internal directories.
Click to hide internal directories.