helpers

package
v0.0.0-...-c85c183 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(source, destination string) error

func DetectInFile

func DetectInFile(file string, pattern string, logger bard.Logger) bool

func GetCommand

func GetCommand(writer io.Writer, name string, arguments ...string) *exec.Cmd

func GetLayerEnvironment

func GetLayerEnvironment(layer libcnb.Layer, logger bard.Logger) []string

func InstallAptPackages

func InstallAptPackages(layer libcnb.Layer, packageList []string, logger bard.Logger) error

func RunCommand

func RunCommand(writer io.Writer, name string, arguments ...string) error

func SummariseContributions

func SummariseContributions(layer libcnb.Layer)

Types

type AptLayer

type AptLayer struct {
	Packages         []string
	LayerName        string
	LayerContributor libpak.LayerContributor
	Logger           bard.Logger
}

func NewAptLayer

func NewAptLayer(packages []string, name string, logger bard.Logger, cache bool) *AptLayer

func (AptLayer) Contribute

func (apt AptLayer) Contribute(layer libcnb.Layer) (libcnb.Layer, error)

func (AptLayer) Name

func (apt AptLayer) Name() string

type IndentedWriter

type IndentedWriter struct {
	Indent int
	Logger bard.Logger
}

func IndentedWriterFactory

func IndentedWriterFactory(indent int, logger bard.Logger) IndentedWriter

func (IndentedWriter) Write

func (iw IndentedWriter) Write(p []byte) (int, error)

type LayerEnv

type LayerEnv struct {
	Type      string
	Value     string
	Delimiter string
	Current   string
}

Jump to

Keyboard shortcuts

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