Documentation
¶
Index ¶
- Constants
- Variables
- func DownloadFile(path string, baseRequestUrl string, followRedirects bool, compress bool) (string, error)
- func ExecuteCommand(workdir string, args ...string) error
- func FindArchitecture() (string, error)
- func FindXdeb() (string, error)
- func InstallPackage(packageDefinition *XdebPackageDefinition, context *cli.Context) error
- func LogMessage(format string, args ...any)
- func NewHttpClient() *http.Client
- func RepositoryPath() (string, error)
- func SyncRepositories(lists *PackageListsDefinition, providerNames ...string) error
- func TrimPathExtension(path string, count int) string
- type PackageListsDefinition
- type PackageListsProvider
- type XdebPackageDefinition
- type XdebPackagePostInstallCommandDefinition
- type XdebPackagePostInstallDefinition
- type XdebProviderDefinition
Constants ¶
View Source
const APPLICATION_NAME = "xdeb-install"
View Source
const HTTP_REQUEST_HEADERS_TIMEOUT = 10 * time.Second
View Source
const LOG_MESSAGE_PREFIX = "[" + APPLICATION_NAME + "]"
View Source
const XDEB_INSTALL_REPOSITORIES_TAG = "v1.1.2"
View Source
const XDEB_INSTALL_REPOSITORIES_URL = "https://raw.githubusercontent.com/xdeb-org/xdeb-install-repositories"
View Source
const XDEB_MASTER_URL = "https://raw.githubusercontent.com/xdeb-org/xdeb/master"
View Source
const XDEB_URL = "https://github.com/xdeb-org/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 NewHttpClient ¶ added in v2.3.7
func RepositoryPath ¶
func SyncRepositories ¶
func SyncRepositories(lists *PackageListsDefinition, providerNames ...string) error
func TrimPathExtension ¶
Types ¶
type PackageListsDefinition ¶
type PackageListsDefinition struct { Path string `yaml:"path,omitempty"` Providers []PackageListsProvider `yaml:"providers"` }
func ParsePackageLists ¶
func ParsePackageLists() (*PackageListsDefinition, error)
type PackageListsProvider ¶
type XdebPackageDefinition ¶
type XdebPackageDefinition struct { Name string `yaml:"name"` Version string `yaml:"version"` Url string `yaml:"url"` Sha256 string `yaml:"sha256"` PostInstall []XdebPackagePostInstallDefinition `yaml:"post-install,omitempty"` 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 (*XdebPackageDefinition) Configure ¶
func (packageDefinition *XdebPackageDefinition) Configure(rootPath string)
type XdebPackagePostInstallDefinition ¶
type XdebPackagePostInstallDefinition struct { Name string `yaml:"name"` Commands []XdebPackagePostInstallCommandDefinition `yaml:"commands"` }
type XdebProviderDefinition ¶
type XdebProviderDefinition struct {
Xdeb []*XdebPackageDefinition `yaml:"xdeb"`
}
Click to show internal directories.
Click to hide internal directories.