composer

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: MPL-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromLockfile

func FromLockfile()

func FromManifest

func FromManifest()

func Install added in v0.7.27

func Install(dir string, c Composer) error

Install calls Install on the Composer with dir as the CWD.

Types

type Composer

type Composer interface {
	// Show returns the output of running the `show` command in dir with optional additional arguments.
	Show(dir string, args ...string) (stdout string, stderr string, err error)

	// Install returns the output of running the `install` command in dir with optional additional arguments.
	Install(dir string, args ...string) (stdout string, stderr string, err error)
}

A Composer can return the output of the `show` and `install` commands.

func NewComposer added in v0.7.27

func NewComposer(composerBinary string) Composer

NewComposer returns a Runner that invokes the real composer binary.

type LineParser

type LineParser func(line string) (level int, node Package, err error)

level is 1-indexed

type Manifest

type Manifest struct {
	Name string
}

type Package

type Package struct {
	Name        string
	Version     string
	Description string
}

func Dependencies added in v0.7.27

func Dependencies(dir string, c Composer) ([]Package, map[Package][]Package, error)

func ReadPackageTree

func ReadPackageTree(lines []string, parser LineParser) ([]Package, map[Package][]Package, error)

type ShowOutput added in v0.7.27

type ShowOutput struct {
	Installed []Package `json:"installed"`
}

A ShowOutput structure has a list of dependencies reported by Composer.

func Show

func Show(dir string, c Composer) (ShowOutput, error)

Show calls Show on the Composer with dir as the CWD.

Jump to

Keyboard shortcuts

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