source

package
v0.2.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllTranslatorTypes added in v0.2.0

func GetAllTranslatorTypes() []string

GetAllTranslatorTypes returns all translator types

func ReadApplicationManifest

func ReadApplicationManifest(path string, serviceName string) ([]manifest.Application, []string, error)

ReadApplicationManifest reads an application manifest

func Translate

func Translate(p plantypes.Plan) (irtypes.IR, error)

Translate loads all sources

Types

type Any2KubeTranslator

type Any2KubeTranslator struct {
}

Any2KubeTranslator implements Translator interface for loading any source folder that can be containerized

func (*Any2KubeTranslator) GetServiceOptions

func (any2KubeTranslator *Any2KubeTranslator) GetServiceOptions(inputPath string, plan plantypes.Plan) ([]plantypes.Service, error)

GetServiceOptions - output a plan based on the input directory contents

func (*Any2KubeTranslator) GetTranslatorType

func (*Any2KubeTranslator) GetTranslatorType() plantypes.TranslationTypeValue

GetTranslatorType returns translator type

func (*Any2KubeTranslator) Translate

func (any2KubeTranslator *Any2KubeTranslator) Translate(services []plantypes.Service, plan plantypes.Plan) (irtypes.IR, error)

Translate translates artifacts to IR

type CfManifestTranslator

type CfManifestTranslator struct {
}

CfManifestTranslator implements Translator interface for CfManifest files

func (*CfManifestTranslator) GetServiceOptions

func (cfManifestTranslator *CfManifestTranslator) GetServiceOptions(inputPath string, plan plantypes.Plan) ([]plantypes.Service, error)

GetServiceOptions - output a plan based on the input directory contents

func (*CfManifestTranslator) GetTranslatorType

GetTranslatorType returns the translator type

func (*CfManifestTranslator) Translate

func (cfManifestTranslator *CfManifestTranslator) Translate(services []plantypes.Service, plan plantypes.Plan) (irtypes.IR, error)

Translate translates servies to IR

type ComposeTranslator

type ComposeTranslator struct {
}

ComposeTranslator implements Translator interface

func (*ComposeTranslator) GetServiceOptions

func (c *ComposeTranslator) GetServiceOptions(inputPath string, plan plantypes.Plan) ([]plantypes.Service, error)

GetServiceOptions returns the service options for inputPath

func (*ComposeTranslator) GetTranslatorType

func (c *ComposeTranslator) GetTranslatorType() plantypes.TranslationTypeValue

GetTranslatorType returns the translator type

func (*ComposeTranslator) Translate

func (c *ComposeTranslator) Translate(services []plantypes.Service, plan plantypes.Plan) (irtypes.IR, error)

Translate translates the service to IR

type DockerfileTranslator

type DockerfileTranslator struct {
}

DockerfileTranslator implements Translator interface for using preexisting dockerfiles

func (*DockerfileTranslator) GetServiceOptions

func (dockerfileTranslator *DockerfileTranslator) GetServiceOptions(inputPath string, plan plantypes.Plan) ([]plantypes.Service, error)

GetServiceOptions - output a plan based on the input directory contents

func (*DockerfileTranslator) GetTranslatorType

func (dockerfileTranslator *DockerfileTranslator) GetTranslatorType() plantypes.TranslationTypeValue

GetTranslatorType returns translator type

func (*DockerfileTranslator) Translate

func (dockerfileTranslator *DockerfileTranslator) Translate(services []plantypes.Service, plan plantypes.Plan) (irtypes.IR, error)

Translate translates artifacts to IR

type Translator

type Translator interface {
	GetTranslatorType() plantypes.TranslationTypeValue
	GetServiceOptions(inputPath string, p plantypes.Plan) ([]plantypes.Service, error)
	Translate(services []plantypes.Service, p plantypes.Plan) (irtypes.IR, error)
	// contains filtered or unexported methods
}

Translator interface defines translator that translates files and converts it to ir representation

func GetTranslators added in v0.2.0

func GetTranslators() []Translator

GetTranslators returns translator for given format

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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