xdeb

package
v2.3.9 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: MIT Imports: 24 Imported by: 0

Documentation

Index

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 DownloadFile(path string, baseRequestUrl string, followRedirects bool, compress bool) (string, error)

func ExecuteCommand

func ExecuteCommand(workdir string, args ...string) error

func FindArchitecture

func FindArchitecture() (string, error)

func FindXdeb

func FindXdeb() (string, error)

func InstallPackage

func InstallPackage(packageDefinition *XdebPackageDefinition, context *cli.Context) error

func LogMessage

func LogMessage(format string, args ...any)

func NewHttpClient added in v2.3.7

func NewHttpClient() *http.Client

func RepositoryPath

func RepositoryPath() (string, error)

func SyncRepositories

func SyncRepositories(lists *PackageListsDefinition, providerNames ...string) error

func TrimPathExtension

func TrimPathExtension(path string, count int) string

Types

type PackageListsDefinition

type PackageListsDefinition struct {
	Path      string                 `yaml:"path,omitempty"`
	Providers []PackageListsProvider `yaml:"providers"`
}

func ParsePackageLists

func ParsePackageLists() (*PackageListsDefinition, error)

type PackageListsProvider

type PackageListsProvider struct {
	Name          string   `yaml:"name"`
	Custom        bool     `yaml:"custom"`
	Url           string   `yaml:"url"`
	Architecture  string   `yaml:"architecture"`
	Components    []string `yaml:"components"`
	Distributions []string `yaml:"dists"`
}

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 FindPackage(name string, path string, provider string, distribution string, exact bool) ([]*XdebPackageDefinition, error)

func (*XdebPackageDefinition) Configure

func (packageDefinition *XdebPackageDefinition) Configure(rootPath string)

type XdebPackagePostInstallCommandDefinition

type XdebPackagePostInstallCommandDefinition struct {
	Root    bool   `yaml:"root"`
	Command string `yaml:"command"`
}

type XdebPackagePostInstallDefinition

type XdebPackagePostInstallDefinition struct {
	Name     string                                    `yaml:"name"`
	Commands []XdebPackagePostInstallCommandDefinition `yaml:"commands"`
}

type XdebProviderDefinition

type XdebProviderDefinition struct {
	Xdeb []*XdebPackageDefinition `yaml:"xdeb"`
}

Jump to

Keyboard shortcuts

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