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 )
const ModeExecutable = 0100
Variables ¶
This section is empty.
Functions ¶
func MatchTOML ¶
func MatchTOML(expected interface{}) types.GomegaMatcher
Types ¶
type EntryWriter ¶
type EntryWriter struct{}
type EnvironmentWriter ¶
type EnvironmentWriter struct {
// contains filtered or unexported fields
}
EnvironmentWriter is an implementation of the libcnb.EnvironmentWriter interface.
func NewEnvironmentWriter ¶
func NewEnvironmentWriter(options ...EnvironmentWriterOption) EnvironmentWriter
NewEnvironmentWriter creates a new instance that writes to the filesystem and writes to the default log.Logger.
type EnvironmentWriterOption ¶
type EnvironmentWriterOption func(writer EnvironmentWriter) EnvironmentWriter
EnvironmentWriterOption is a function for configuring a EnvironmentWriter instance.
func WithEnvironmentWriterLogger ¶
func WithEnvironmentWriterLogger(logger log.Logger) EnvironmentWriterOption
WithEnvironmentWriterLogger creates an EnvironmentWriterOption that configures the logger.
type ExitHandler ¶
type ExitHandler struct {
// contains filtered or unexported fields
}
ExitHandler is an implementation of the libcnb.ExitHandler interface.
func NewExitHandler ¶
func NewExitHandler(options ...ExitHandlerOption) ExitHandler
NewExitHandler creates a new instance that calls os.Exit and writes to the default log.Logger and 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 ExitHandlerOption ¶
type ExitHandlerOption func(handler ExitHandler) ExitHandler
ExitHandlerOption is a function for configuring an ExitHandler instance.
func WithExitHandlerExitFunc ¶
func WithExitHandlerExitFunc(exitFunc func(int)) ExitHandlerOption
WithExitHandler creates an ExitHandlerOption that configures the exit function.
func WithExitHandlerLogger ¶
func WithExitHandlerLogger(logger log.Logger) ExitHandlerOption
WithExitHandlerLogger creates an ExitHandlerOption that configures the logger.
func WithExitHandlerWriter ¶
func WithExitHandlerWriter(writer io.Writer) ExitHandlerOption
WithExitHandlerWriter creates an ExitHandlerOption that configures the writer.
type TOMLWriter ¶
type TOMLWriter struct {
// contains filtered or unexported fields
}
TOMLWriter is an implementation of the libcnb.TOMLWriter interface.
func NewTOMLWriter ¶
func NewTOMLWriter(options ...TOMLWriterOption) TOMLWriter
NewTOMLWriter creates a new instance that writes to the filesystem and writes to the default log.Logger.
func (TOMLWriter) Write ¶
func (t 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.
type TOMLWriterOption ¶
type TOMLWriterOption func(writer TOMLWriter) TOMLWriter
TOMLWriterOption is a function for configuring a TOMLWriter instance.
func WithTOMLWriterLogger ¶
func WithTOMLWriterLogger(logger log.Logger) TOMLWriterOption
WithTOMLWriterLogger creates an TOMLWriterOption that configures the logger.