source

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadApplicationManifest

func ReadApplicationManifest(path string, serviceName string, artifactType plantypes.TargetArtifactTypeValue) ([]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 (c Any2KubeTranslator) GetServiceOptions(inputPath string, plan plantypes.Plan) ([]plantypes.Service, error)

GetServiceOptions - output a plan based on the input directory contents

func (Any2KubeTranslator) GetTranslatorType

func (c Any2KubeTranslator) GetTranslatorType() plantypes.TranslationTypeValue

GetTranslatorType returns translator type

func (Any2KubeTranslator) Translate

func (c Any2KubeTranslator) Translate(services []plantypes.Service, p 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 (c CfManifestTranslator) GetServiceOptions(inputPath string, plan plantypes.Plan) ([]plantypes.Service, error)

GetServiceOptions - output a plan based on the input directory contents

func (CfManifestTranslator) GetTranslatorType

func (c CfManifestTranslator) GetTranslatorType() plantypes.TranslationTypeValue

GetTranslatorType returns the translator type

func (CfManifestTranslator) Translate

func (c CfManifestTranslator) Translate(services []plantypes.Service, p 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, p 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 (c DockerfileTranslator) GetServiceOptions(inputPath string, plan plantypes.Plan) ([]plantypes.Service, error)

GetServiceOptions - output a plan based on the input directory contents

func (DockerfileTranslator) GetTranslatorType

func (c DockerfileTranslator) GetTranslatorType() plantypes.TranslationTypeValue

GetTranslatorType returns translator type

func (DockerfileTranslator) Translate

func (c DockerfileTranslator) Translate(services []plantypes.Service, p plantypes.Plan) (irtypes.IR, error)

Translate translates artifacts to IR

type KnativeTranslator

type KnativeTranslator struct {
}

KnativeTranslator implements Translator interface

func (KnativeTranslator) GetServiceOptions

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

GetServiceOptions returns the service options for the inputPath

func (KnativeTranslator) GetTranslatorType

func (c KnativeTranslator) GetTranslatorType() plantypes.TranslationTypeValue

GetTranslatorType returns the translator type

func (KnativeTranslator) Translate

func (c KnativeTranslator) Translate(services []plantypes.Service, p plantypes.Plan) (irtypes.IR, error)

Translate returns the IR for the plan service

type KubeTranslator

type KubeTranslator struct {
}

KubeTranslator implements Translator interface

func (KubeTranslator) GetServiceOptions

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

GetServiceOptions returns the possible service options for the inputPath

func (KubeTranslator) GetTranslatorType

func (c KubeTranslator) GetTranslatorType() plantypes.TranslationTypeValue

GetTranslatorType returns the translator type

func (KubeTranslator) Translate

func (c KubeTranslator) Translate(services []plantypes.Service, p plantypes.Plan) (irtypes.IR, error)

Translate returns the IR representation for the plan service

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 loader that translates files and converts it to ir representation

func GetSourceLoaders

func GetSourceLoaders() []Translator

GetSourceLoaders returns loader for given format

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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