Documentation ¶
Index ¶
Constants ¶
const ( // ErrorStatusCode is the status code returned for error. ErrorStatusCode = 1 // FailStatusCode is the status code returned for fail. FailStatusCode = 100 // PassStatusCode is the status code returned for pass. PassStatusCode = 0 )
Variables ¶
This section is empty.
Functions ¶
func MatchTOML ¶
func MatchTOML(expected interface{}) types.GomegaMatcher
Types ¶
type ConfigMap ¶
ConfigMap represents a file-based projection of a collection of key-value pairs.
func NewConfigMapFromPath ¶
NewConfigMapFromPath creates a new ConfigMap from the files located within a given path.
type DirectoryContentsWriter ¶
type DirectoryContentsWriter struct {
// contains filtered or unexported fields
}
DirectoryContentsWriter is used write the contents of a directory to the given io.Writer
func NewDirectoryContentsWriter ¶
func NewDirectoryContentsWriter(format log.DirectoryContentFormatter, writer io.Writer) DirectoryContentsWriter
NewDirectoryContentsWriter returns a new DirectoryContentsWriter initialized and ready to be used
func (DirectoryContentsWriter) Write ¶
func (d DirectoryContentsWriter) Write(title, path string) error
Write all the file contents to the writer
type EnvironmentWriter ¶
type EnvironmentWriter struct{}
EnvironmentWriter is a type used to write an environment to file filesystem.
type ExecDOption ¶
type ExecDOption func(handler ExecDWriter) ExecDWriter
Option is a function for configuring an ExitHandler instance.
func WithExecDOutputWriter ¶
func WithExecDOutputWriter(writer io.Writer) ExecDOption
WithExecDOutputWriter creates an Option that configures the writer.
type ExecDWriter ¶
type ExecDWriter struct {
// contains filtered or unexported fields
}
ExecDWriter is a type used to write TOML files to fd3.
func NewExecDWriter ¶
func NewExecDWriter(options ...ExecDOption) ExecDWriter
NewExitHandler creates a new instance that calls os.Exit and writes to os.stderr.
type ExitHandler ¶
type ExitHandler struct {
// contains filtered or unexported fields
}
ExitHandler is the default implementation of the libcnb.ExitHandler interface.
func NewExitHandler ¶
func NewExitHandler(options ...Option) ExitHandler
NewExitHandler creates a new instance that calls os.Exit and writes to os.stderr.
func (ExitHandler) Error ¶
func (e ExitHandler) Error(err error)
func (ExitHandler) Fail ¶
func (e ExitHandler) Fail()
func (ExitHandler) Pass ¶
func (e ExitHandler) Pass()
type Option ¶
type Option func(handler ExitHandler) ExitHandler
Option is a function for configuring an ExitHandler instance.
func WithExitHandlerExitFunc ¶
WithExitHandler creates an Option that configures the exit function.
func WithExitHandlerWriter ¶
WithExitHandlerWriter creates an Option that configures the writer.
type PlainDirectoryContentFormatter ¶
type PlainDirectoryContentFormatter struct {
// contains filtered or unexported fields
}
func NewPlainDirectoryContentFormatter ¶
func NewPlainDirectoryContentFormatter() *PlainDirectoryContentFormatter
NewPlainDirectoryContentFormatter returns a formatter applies no formatting
The returned formatter operates as such:
Title -> returns string followed by `:\n` File -> returns file name relative to the root followed by `\n`
func (*PlainDirectoryContentFormatter) RootPath ¶
func (p *PlainDirectoryContentFormatter) RootPath(path string)
func (*PlainDirectoryContentFormatter) Title ¶
func (p *PlainDirectoryContentFormatter) Title(title string) string
type TOMLWriter ¶
type TOMLWriter struct{}
TOMLWriter is a type used to write TOML files to the filesystem.
func (TOMLWriter) Write ¶
func (TOMLWriter) Write(path string, value interface{}) error
Write creates the path's parent directories, and creates a new file or truncates an existing file and then marshals the value to the file.