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 DirectoryContents ¶
type DirectoryContents struct {
Path string
}
DirectoryContents is used to generate a collection of the names of all files within a directory.
func (DirectoryContents) Get ¶
func (d DirectoryContents) Get() ([]string, error)
Get returns the names of all files within a directory
type EnvironmentWriter ¶
type EnvironmentWriter struct{}
EnvironmentWriter is a type used to write an environment to file filesystem.
type ExecDOption ¶ added in v1.24.0
type ExecDOption func(handler ExecDWriter) ExecDWriter
Option is a function for configuring an ExitHandler instance.
func WithExecDOutputWriter ¶ added in v1.24.0
func WithExecDOutputWriter(writer io.Writer) ExecDOption
WithExecDOutputWriter creates an Option that configures the writer.
type ExecDWriter ¶ added in v1.24.0
type ExecDWriter struct {
// contains filtered or unexported fields
}
ExecDWriter is a type used to write TOML files to fd3.
func NewExecDWriter ¶ added in v1.24.0
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 LayerAPI5 ¶ added in v1.21.0
type LayerAPI5 struct { // Build indicates that a layer should be used for builds. Build bool `toml:"build"` // Cache indicates that a layer should be cached. Cache bool `toml:"cache"` // Launch indicates that a layer should be used for launch. Launch bool `toml:"launch"` // Metadata is the metadata associated with the layer. Metadata map[string]interface{} `toml:"metadata"` }
LayerAPI5 is used for backwards compatibility with serialization/deserialization of the layer toml
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 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.