Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DecoderInterface ¶
type DecoderInterface interface {
DecodeManifest(bytes []byte, varsFilePaths []string, vars map[string]string) (*ServiceManifest, error)
}
DecoderInterface describes the method needed to decode a bytestream to a ServiceManifest
type FileIO ¶
type FileIO struct {
FileIOInterface
}
FileIO struct
func (*FileIO) IsNotExist ¶
IsNotExist returns a boolean as to weather a file exists
func (*FileIO) OpenReadOnly ¶
OpenReadOnly performs an os.Open on a given filename
type FileIOInterface ¶
type FileIOInterface interface { Stat(name string) (os.FileInfo, error) IsNotExist(err error) bool OpenReadOnly(filename string) (io.Reader, error) }
FileIOInterface interface
type ParseData ¶
type ParseData struct { Parser ParserInterface Reader io.Reader Decoder DecoderInterface FileIO FileIOInterface }
ParseData holds the Parser reader and the interface that will provide the methods to process the input data
func NewParser ¶
func NewParser() *ParseData
NewParser returns a ParseData structure with the default interfaces described in its struct
func (*ParseData) CreateParser ¶
CreateParser returns a Parser struct with a reader
type ParserInterface ¶
type ParserInterface interface { Parse(varsFilePaths []string, vars map[string]string) (*ServiceManifest, error) CreateParser(filename string) (*ParseData, error) }
ParserInterface is an interface describing the default methods used to decode a manifest file
type Service ¶
type Service struct { ServiceName string `yaml:"name"` Type string `yaml:"type"` //brokered, credentials, drain, route. "blank" == brokered Broker string `yaml:"broker"` PlanName string `yaml:"plan"` URL string `yaml:"url"` UpdateService bool `yaml:"updateService"` // Does not update service plan. This should be done manually. Credentials map[string]string `yaml:"credentials"` Tags string `yaml:"tags"` JSONParameters string `yaml:"parameters"` }
Service describes a CF service that will be instantiated
type ServiceManifest ¶
type ServiceManifest struct {
Services []Service `yaml:"create-services"`
}
ServiceManifest describes a service Manifest as an array of services
type YmlDecoder ¶
type YmlDecoder struct { }
YmlDecoder is
func (*YmlDecoder) DecodeManifest ¶
func (yml *YmlDecoder) DecodeManifest(bytes []byte, varsFilePaths []string, vars map[string]string) (*ServiceManifest, error)
DecodeManifest unmarshals a bytestream into a ServiceManifest struct using yaml.v2 In addition, it will also evaluate any templated variables that are specified in the input service manifest yaml