shared

package module
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: Unlicense Imports: 13 Imported by: 0

README

Shared

A library for creating laraboot buildpacks

Contributing

Simply create an issue or a pull request.

Documentation

Overview

Package shared contains all shared public dependencies and definitions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunCommand added in v0.1.0

func RunCommand(context packit.BuildContext, execName string, args ...string) ([]byte, error)

RunCommand runs a composer command .

Types

type Contributor added in v0.3.1

type Contributor struct {
	// contains filtered or unexported fields
}

Contributor represents a PHP contribution by the buildpack.

func NewContributor added in v0.3.1

func NewContributor(name string, context packit.BuildContext, layer packit.Layer) (Contributor, error)

NewContributor creates a new Contributor instance.

func NewGlobalContributor added in v0.3.1

func NewGlobalContributor(name string, context packit.BuildContext, layer packit.Layer) (Contributor, error)

NewGlobalContributor creates a Contributor instance and set global = true.

func (Contributor) Install added in v0.3.1

func (l Contributor) Install() ([]byte, error)

Install the package It requieres `composer buildpack` to run the installation.

func (Contributor) WriteCustomInitFile added in v0.3.1

func (l Contributor) WriteCustomInitFile(templateBody string, outputPath string, data interface{}) error

WriteCustomInitFile writes an ini file.

type LarabootStruct

type LarabootStruct struct {
	Version   string `json:"version"`
	ProjectID string `json:"project_id"`
	Php       struct {
		Version string `json:"version"`
	} `json:"php"`
	Framework struct {
		Config struct {
			Overrides []struct {
				Key     string `json:"key"`
				Envs    string `json:"envs"`
				Default string `json:"default"`
			} `json:"overrides"`
		} `json:"config"`
		Auth struct {
			Stack string `json:"stack"`
		} `json:"auth"`
		Models []struct {
			Name    string `json:"name"`
			Columns []struct {
				Name string `json:"name"`
				Type string `json:"type"`
			} `json:"columns"`
		} `json:"models"`
	} `json:"Framework"`
	Build struct {
		Tasks []struct {
			Name   string `json:"name"`
			Path   string `json:"path"`
			Local  bool   `json:"local"`
			Format string `json:"format"`
			Env    struct {
			} `json:"env"`
		} `json:"tasks"`
	} `json:"Build"`
}

LarabootStruct : Laraboot file schema.

func NewFromFile

func NewFromFile(filename string) (LarabootStruct, error)

NewFromFile :Reads JSON data from file and returns the parsed map.

func NewFromString

func NewFromString(jsonData string) (
	LarabootStruct,
	error,
)

NewFromString : Reads JSON data from string and returns the parsed map.

type LogEmitter added in v0.1.0

type LogEmitter struct {
	// Emitter is embedded and therefore delegates all of its functions to the
	scribe.Emitter
}

LogEmitter .

func NewLogEmitter added in v0.1.0

func NewLogEmitter(output io.Writer) LogEmitter

NewLogEmitter .

func (LogEmitter) Candidates added in v0.1.0

func (e LogEmitter) Candidates(entries []packit.BuildpackPlanEntry)

Candidates logs Candidates.

func (LogEmitter) Environment added in v0.1.0

func (e LogEmitter) Environment(environment packit.Environment)

Environment logs an Environment subprocess.

Directories

Path Synopsis
cmd
spec
Package laraboot ...
Package laraboot ...

Jump to

Keyboard shortcuts

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