Documentation ¶
Index ¶
- Constants
- Variables
- func DownloadFile(path string, url string, followRedirects bool, compress bool) (string, error)
- func ExecuteCommand(workdir string, args ...string) error
- func FindArchitecture() (string, error)
- func InstallPackage(packageDefinition *XdebPackageDefinition, context *cli.Context) error
- func LogMessage(format string, args ...any)
- func SyncRepositories(path string, arch string, providerNames ...string) error
- func TrimPathExtension(path string) string
- type PackageListsDefinition
- type PackageListsProvider
- type XdebPackageDefinition
- type XdebProviderDefinition
Constants ¶
View Source
const APPLICATION_NAME = "xdeb-install"
View Source
const LOG_MESSAGE_PREFIX = "[" + APPLICATION_NAME + "]"
View Source
const XDEB_INSTALL_REPOSITORIES_TAG = "v1.0.0"
View Source
const XDEB_INSTALL_REPOSITORIES_URL = "https://raw.githubusercontent.com/thetredev/xdeb-install-repositories/%s/repositories/%s/lists.yaml"
View Source
const XDEB_MASTER_URL = "https://raw.githubusercontent.com/toluschr/xdeb/master/xdeb"
View Source
const XDEB_RELEASE_URL = "https://github.com/toluschr/xdeb/releases/download/%s/xdeb"
View Source
const XDEB_URL = "https://github.com/toluschr/xdeb/releases"
Variables ¶
View Source
var ARCHITECTURE_MAP = map[string]string{
"amd64": "x86_64",
"arm64": "aarch64",
"386": "i686",
}
Functions ¶
func DownloadFile ¶
func ExecuteCommand ¶
func FindArchitecture ¶
func InstallPackage ¶
func InstallPackage(packageDefinition *XdebPackageDefinition, context *cli.Context) error
func LogMessage ¶
func SyncRepositories ¶ added in v1.1.0
func TrimPathExtension ¶
Types ¶
type PackageListsDefinition ¶
type PackageListsDefinition struct {
Providers []PackageListsProvider `yaml:"providers"`
}
type PackageListsProvider ¶
type XdebPackageDefinition ¶
type XdebPackageDefinition struct { Name string `yaml:"name"` Version string `yaml:"version"` Url string `yaml:"url"` Sha256 string `yaml:"sha256"` Path string `yaml:"path,omitempty"` FilePath string `yaml:"filepath,omitempty"` Provider string `yaml:"provider,omitempty"` Distribution string `yaml:"distribution,omitempty"` Component string `yaml:"component,omitempty"` IsConfigured bool `yaml:"is_configured,omitempty"` }
func FindPackage ¶
func PackageDefinitionWithMetadata ¶
func PackageDefinitionWithMetadata(packageDefinition *XdebPackageDefinition, path string) *XdebPackageDefinition
func (*XdebPackageDefinition) Configure ¶ added in v1.2.1
func (this *XdebPackageDefinition) Configure(rootPath string)
type XdebProviderDefinition ¶
type XdebProviderDefinition struct {
Xdeb []XdebPackageDefinition `yaml:"xdeb"`
}
func ParseYamlDefinition ¶
func ParseYamlDefinition(path string) (*XdebProviderDefinition, error)
Click to show internal directories.
Click to hide internal directories.