Documentation ¶
Index ¶
- func Destroy()
- func GetServices(prjName string, dir string) (services map[string][]transformertypes.Artifact, err error)
- func GetTransformers() map[string]Transformer
- func Init(assetsPath, sourcePath string, targetCluster collectiontypes.ClusterMetadata, ...) (err error)
- func InitTransformers(transformerToInit map[string]string, ...) error
- func Transform(plan plantypes.Plan, outputPath string) (err error)
- type CloudFoundry
- func (t *CloudFoundry) DirectoryDetect(dir string) (services map[string][]transformertypes.Artifact, err error)
- func (t *CloudFoundry) GetConfig() (transformertypes.Transformer, *environment.Environment)
- func (t *CloudFoundry) Init(tc transformertypes.Transformer, env *environment.Environment) (err error)
- func (t *CloudFoundry) Transform(newArtifacts []transformertypes.Artifact, ...) ([]transformertypes.PathMapping, []transformertypes.Artifact, error)
- type ReadMeGenerator
- func (t *ReadMeGenerator) DirectoryDetect(dir string) (services map[string][]transformertypes.Artifact, err error)
- func (t *ReadMeGenerator) GetConfig() (transformertypes.Transformer, *environment.Environment)
- func (t *ReadMeGenerator) Init(tc transformertypes.Transformer, env *environment.Environment) (err error)
- func (t *ReadMeGenerator) Transform(newArtifacts []transformertypes.Artifact, ...) ([]transformertypes.PathMapping, []transformertypes.Artifact, error)
- type Transformer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetServices ¶
func GetServices(prjName string, dir string) (services map[string][]transformertypes.Artifact, err error)
GetServices returns the list of services detected in a directory
func GetTransformers ¶
func GetTransformers() map[string]Transformer
GetTransformers returns the list of initialized transformers
func Init ¶
func Init(assetsPath, sourcePath string, targetCluster collectiontypes.ClusterMetadata, outputPath, projName string) (err error)
Init initializes the transformers
func InitTransformers ¶
func InitTransformers(transformerToInit map[string]string, targetCluster collectiontypes.ClusterMetadata, sourcePath string, outputPath, projName string, warn bool) error
InitTransformers initializes a subset of transformers
Types ¶
type CloudFoundry ¶
type CloudFoundry struct { Config transformertypes.Transformer Env *environment.Environment }
CloudFoundry implements Transformer interface
func (*CloudFoundry) DirectoryDetect ¶
func (t *CloudFoundry) DirectoryDetect(dir string) (services map[string][]transformertypes.Artifact, err error)
DirectoryDetect detects cloud foundry projects in various directories
func (*CloudFoundry) GetConfig ¶
func (t *CloudFoundry) GetConfig() (transformertypes.Transformer, *environment.Environment)
GetConfig returns the transformer config
func (*CloudFoundry) Init ¶
func (t *CloudFoundry) Init(tc transformertypes.Transformer, env *environment.Environment) (err error)
Init Initializes the transformer
func (*CloudFoundry) Transform ¶
func (t *CloudFoundry) Transform(newArtifacts []transformertypes.Artifact, oldArtifacts []transformertypes.Artifact) ([]transformertypes.PathMapping, []transformertypes.Artifact, error)
Transform transforms the artifacts
type ReadMeGenerator ¶
type ReadMeGenerator struct { Config transformertypes.Transformer Env *environment.Environment }
ReadMeGenerator implements Transformer interface
func (*ReadMeGenerator) DirectoryDetect ¶
func (t *ReadMeGenerator) DirectoryDetect(dir string) (services map[string][]transformertypes.Artifact, err error)
DirectoryDetect executes detect in directories respecting the m2kignore
func (*ReadMeGenerator) GetConfig ¶
func (t *ReadMeGenerator) GetConfig() (transformertypes.Transformer, *environment.Environment)
GetConfig returns the config of the transformer
func (*ReadMeGenerator) Init ¶
func (t *ReadMeGenerator) Init(tc transformertypes.Transformer, env *environment.Environment) (err error)
Init initializes the translator
func (*ReadMeGenerator) Transform ¶
func (t *ReadMeGenerator) Transform(newArtifacts []transformertypes.Artifact, oldArtifacts []transformertypes.Artifact) ([]transformertypes.PathMapping, []transformertypes.Artifact, error)
Transform transforms the artifacts
type Transformer ¶
type Transformer interface { Init(tc transformertypes.Transformer, env *environment.Environment) (err error) // GetConfig returns the transformer config GetConfig() (transformertypes.Transformer, *environment.Environment) DirectoryDetect(dir string) (services map[string][]transformertypes.Artifact, err error) Transform(newArtifacts []transformertypes.Artifact, oldArtifacts []transformertypes.Artifact) ([]transformertypes.PathMapping, []transformertypes.Artifact, error) }
Transformer interface defines transformer that transforms files and converts it to ir representation