compose

package
v0.3.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ComposeServiceConfigType represents the Compose service config type
	ComposeServiceConfigType transformertypes.ConfigType = "ComposeService"
	// ComposeFileConfigType represents the docker-compose file config type
	ComposeFileConfigType transformertypes.ConfigType = "DockerCompose"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ComposeAnalyser

type ComposeAnalyser struct {
	Config                transformertypes.Transformer
	Env                   *environment.Environment
	ComposeAnalyzerConfig *ComposeAnalyzerConfig
}

ComposeAnalyser implements Transformer interface

func (*ComposeAnalyser) DirectoryDetect

func (t *ComposeAnalyser) DirectoryDetect(dir string) (services map[string][]transformertypes.Artifact, err error)

DirectoryDetect detects docker compose files

func (*ComposeAnalyser) GetConfig

GetConfig returns the config

func (*ComposeAnalyser) Init

Init Initializes the transformer

func (*ComposeAnalyser) Transform

Transform transforms the artifacts

type ComposeAnalyzerConfig added in v0.3.6

type ComposeAnalyzerConfig struct {
	EnableNetworkParsing bool `yaml:"enableNetworkParsing"`
}

ComposeAnalyzerConfig represents the configuration of the compose analyzer

type ComposeConfig

type ComposeConfig struct {
	ServiceName string `yaml:"serviceName,omitempty"`
}

ComposeConfig stores the config for compose service

type ComposeGenerator

type ComposeGenerator struct {
	Config                 transformertypes.Transformer
	Env                    *environment.Environment
	ComposeGeneratorConfig *ComposeGeneratorYamlConfig
}

ComposeGenerator implements Transformer interface

func (*ComposeGenerator) DirectoryDetect

func (t *ComposeGenerator) DirectoryDetect(dir string) (services map[string][]transformertypes.Artifact, err error)

DirectoryDetect executes detect in each sub directory

func (*ComposeGenerator) GetConfig

GetConfig returns the transformer config

func (*ComposeGenerator) Init

Init Initializes the transformer

func (*ComposeGenerator) Transform

func (t *ComposeGenerator) Transform(newArtifacts []transformertypes.Artifact, alreadySeenArtifacts []transformertypes.Artifact) (pathMappings []transformertypes.PathMapping, createdArtifacts []transformertypes.Artifact, err error)

Transform transforms the artifacts

type ComposeGeneratorYamlConfig

type ComposeGeneratorYamlConfig struct {
	OutputPath string `yaml:"outputPath"`
}

ComposeGeneratorYamlConfig contains all the configuration from the transformer YAML

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL