Documentation ¶
Index ¶
- Constants
- Variables
- type Executable
- func (t *Executable) DirectoryDetect(dir string) (services map[string][]transformertypes.Artifact, err error)
- func (t *Executable) GetConfig() (transformertypes.Transformer, *environment.Environment)
- func (t *Executable) Init(tc transformertypes.Transformer, env *environment.Environment) error
- func (t *Executable) Transform(newArtifacts []transformertypes.Artifact, ...) ([]transformertypes.PathMapping, []transformertypes.Artifact, error)
- type ExecutableYamlConfig
- type StarYamlConfig
- type Starlark
- func (t *Starlark) DirectoryDetect(dir string) (services map[string][]transformertypes.Artifact, err error)
- func (t *Starlark) GetConfig() (transformertypes.Transformer, *environment.Environment)
- func (t *Starlark) Init(tc transformertypes.Transformer, env *environment.Environment) (err error)
- func (t *Starlark) Transform(newArtifacts []transformertypes.Artifact, ...) ([]transformertypes.PathMapping, []transformertypes.Artifact, error)
Constants ¶
View Source
const ( // TemplateConfigType represents the template config type TemplateConfigType transformertypes.ConfigType = "TemplateConfig" )
Variables ¶
View Source
var ( // DetectContainerOutputDir is the directory where external transformer detect output is stored DetectContainerOutputDir = "/var/tmp/m2k_detect_output" // TransformContainerOutputDir is the directory where external transformer transform output is stored TransformContainerOutputDir = "/var/tmp/m2k_transform_output" )
Functions ¶
This section is empty.
Types ¶
type Executable ¶
type Executable struct { Config transformertypes.Transformer Env *environment.Environment ExecConfig *ExecutableYamlConfig }
Executable implements transformer interface and is used to write simple external transformers
func (*Executable) DirectoryDetect ¶
func (t *Executable) DirectoryDetect(dir string) (services map[string][]transformertypes.Artifact, err error)
DirectoryDetect runs detect in each sub directory
func (*Executable) GetConfig ¶
func (t *Executable) GetConfig() (transformertypes.Transformer, *environment.Environment)
GetConfig returns the transformer config
func (*Executable) Init ¶
func (t *Executable) Init(tc transformertypes.Transformer, env *environment.Environment) error
Init Initializes the transformer
func (*Executable) Transform ¶
func (t *Executable) Transform(newArtifacts []transformertypes.Artifact, alreadySeenArtifacts []transformertypes.Artifact) ([]transformertypes.PathMapping, []transformertypes.Artifact, error)
Transform transforms the artifacts
type ExecutableYamlConfig ¶
type ExecutableYamlConfig struct { EnableQA bool `yaml:"enableQA"` Platforms []string `yaml:"platforms"` EnvList []core.EnvVar `yaml:"env,omitempty"` DirectoryDetectCMD environmenttypes.Command `yaml:"directoryDetectCMD"` TransformCMD environmenttypes.Command `yaml:"transformCMD"` Container environmenttypes.Container `yaml:"container,omitempty"` }
ExecutableYamlConfig is the format of executable yaml config
type StarYamlConfig ¶
type StarYamlConfig struct {
StarFile string `yaml:"starFile"`
}
StarYamlConfig defines yaml config for Starlark transformers
type Starlark ¶
type Starlark struct { Config transformertypes.Transformer StarConfig *StarYamlConfig StarThread *starlark.Thread StarGlobals starlark.StringDict Env *environment.Environment // contains filtered or unexported fields }
Starlark implements transformer interface and is used to write simple external transformers
func (*Starlark) DirectoryDetect ¶
func (t *Starlark) DirectoryDetect(dir string) (services map[string][]transformertypes.Artifact, err error)
DirectoryDetect runs detect in each sub directory
func (*Starlark) GetConfig ¶
func (t *Starlark) GetConfig() (transformertypes.Transformer, *environment.Environment)
GetConfig returns the transformer config
func (*Starlark) Init ¶
func (t *Starlark) Init(tc transformertypes.Transformer, env *environment.Environment) (err error)
Init Initializes the transformer
func (*Starlark) Transform ¶
func (t *Starlark) Transform( newArtifacts []transformertypes.Artifact, alreadySeenArtifacts []transformertypes.Artifact, ) ([]transformertypes.PathMapping, []transformertypes.Artifact, error)
Transform transforms the artifacts
Click to show internal directories.
Click to hide internal directories.