Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(opts ...BackendOpt) backend
New creates a new pecl backend with d default (and fully working) peclapi client, a default vfs.FS instance, a default command runner (used to compile the extensions) and a non interactive UI. All these default values can be changed through With*() functions.
Types ¶
type BackendOpt ¶
type BackendOpt func(b *backend)
func WithClient ¶
func WithClient(client peclapi.Client) BackendOpt
WithClient returns a new BackendOpt that could be used with New() to change the default peclapi.Client used.
func WithCmdExec ¶
func WithCmdExec(cmdexec cmdexec.CmdExecutor) BackendOpt
WithCmdExec returns a BackendOpt that could be used with New() to change the default instance of CmdExec used by the backend.
func WithFS ¶
func WithFS(fs vfs.FS) BackendOpt
WithFS returns a BackendOpt that could be used with New() to change the default instance of vfs.FS to a custom instance.
func WithPhpConfigPath ¶
func WithPhpConfigPath(phpConfigPath string) BackendOpt
func WithUI ¶
func WithUI(ui ui.UI) BackendOpt
WithUI returns a new BackendOpt that could be used with New() to change the default ui.UI used.
type BuildOpts ¶
type BuildOpts struct { // SourceDir is the folder containing the source code of the extension to // build. SourceDir string // InstallDir is the folder where the compiled extension should be installed. InstallDir string // PackageXmlPath is the full path to the package.xml for the extension to // build. PackageXmlPath string // ConfigureArgs is a list of flags to pass to ./configure when building. ConfigureArgs []string // Parallel is the maximum number of parallel jobs executed by make at once. Parallel int // Cleanup indicates whether make clean should be run. Cleanup bool }
type DownloadOpts ¶
type InstallOpts ¶
type InstallOpts struct { DownloadOpts // InstallDir is the directory where the compiled extension is copied to. InstallDir string // ConfigureArgs is a list of flags to pass to ./configure when building // the extension. ConfigureArgs []string // Parallel is the maximum number of parallel jobs executed by make at once. Parallel int // Clenaup indicates whether source code and build files should be removed // after sucessful builds. Cleanup bool }