dockerfilegenerator

package
v0.3.3-rc.1 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CSPROJ_FILE_EXT is the file extension for C# (C Sharp) projects.
	CSPROJ_FILE_EXT = ".csproj"

	// DotNetCoreCsprojFilesPathType points to the csproj files path of dotnetcore projects
	DotNetCoreCsprojFilesPathType transformertypes.PathType = "DotNetCoreCsprojPathType"
	// DotNetCoreSolutionFilePathType points to the solution file path of dotnetcore project
	DotNetCoreSolutionFilePathType transformertypes.PathType = "DotNetCoreSolutionPathType"
)
View Source
const (

	//RequirementsTxtPathType points to the requirements.txt file if it's present
	RequirementsTxtPathType transformertypes.PathType = "RequirementsTxtPathType"
	// PythonServiceConfigType points to python config
	PythonServiceConfigType transformertypes.ConfigType = "PythonConfig"
	// MainPythonFilesPathType points to the .py files path which contain main function
	MainPythonFilesPathType transformertypes.PathType = "MainPythonFilesPathType"
	// PythonFilesPathType points to the .py files path
	PythonFilesPathType transformertypes.PathType = "PythonFilesPathType"
)
View Source
const (

	// GolangModFilePathType points to the go.mod file path
	GolangModFilePathType transformertypes.PathType = "GoModFilePath"
)

Variables

This section is empty.

Functions

func GetConfFileForService

func GetConfFileForService(confFiles []string, serviceName string) string

GetConfFileForService returns ports used by a service

Types

type CargoTomlConfig

type CargoTomlConfig struct {
	Package PackageInfo
}

CargoTomlConfig implements Cargo.toml config interface

type DotNetCoreDockerfileGenerator

type DotNetCoreDockerfileGenerator struct {
	Config           transformertypes.Transformer
	Env              *environment.Environment
	DotNetCoreConfig *DotNetCoreDockerfileYamlConfig
}

DotNetCoreDockerfileGenerator implements the Transformer interface

func (*DotNetCoreDockerfileGenerator) DirectoryDetect

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

DirectoryDetect runs detect in each sub directory

func (*DotNetCoreDockerfileGenerator) GetConfig

GetConfig returns the transformer config

func (*DotNetCoreDockerfileGenerator) Init

Init Initializes the transformer

func (*DotNetCoreDockerfileGenerator) Transform

Transform transforms the artifacts

type DotNetCoreDockerfileYamlConfig

type DotNetCoreDockerfileYamlConfig struct {
	DefaultDotNetCoreVersion string `yaml:"defaultDotNetCoreVersion"`
}

DotNetCoreDockerfileYamlConfig represents the configuration of the DotNetCore dockerfile

type DotNetCoreTemplateConfig

type DotNetCoreTemplateConfig struct {
	Ports                  []int32
	HTTPPort               int32
	HTTPSPort              int32
	CsprojFileName         string
	CsprojFilePath         string
	IsNodeJSProject        bool
	DotNetVersion          string
	PublishProfileFilePath string
	PublishUrl             string
}

DotNetCoreTemplateConfig implements DotNetCore config interface

type GlobalParameters

type GlobalParameters struct {
	Address string
	Port    int32
}

GlobalParameters implements global properties in Rocket.toml

type GolangDockerfileGenerator

type GolangDockerfileGenerator struct {
	Config       transformertypes.Transformer
	Env          *environment.Environment
	GolangConfig *GolangDockerfileYamlConfig
}

GolangDockerfileGenerator implements the Transformer interface

func (*GolangDockerfileGenerator) DirectoryDetect

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

DirectoryDetect runs detect in each sub directory

func (*GolangDockerfileGenerator) GetConfig

GetConfig returns the transformer config

func (*GolangDockerfileGenerator) Init

Init Initializes the transformer

func (*GolangDockerfileGenerator) Transform

Transform transforms the artifacts

type GolangDockerfileYamlConfig

type GolangDockerfileYamlConfig struct {
	DefaultGoVersion string `yaml:"defaultGoVersion"`
}

GolangDockerfileYamlConfig represents the configuration of the Golang dockerfile

type GolangTemplateConfig

type GolangTemplateConfig struct {
	Ports     []int32
	AppName   string
	GoVersion string
}

GolangTemplateConfig implements Golang config interface

type LaunchProfile

type LaunchProfile struct {
	CommandName          string            `json:"CommandName"`
	LaunchBrowser        bool              `json:"launchBrowser"`
	ApplicationURL       string            `json:"applicationUrl"`
	EnvironmentVariables map[string]string `json:"environmentVariables"`
}

LaunchProfile implements launch profile properties

type LaunchSettings

type LaunchSettings struct {
	Profiles map[string]LaunchProfile `json:"profiles"`
}

LaunchSettings defines launchSettings.json properties

type NodejsDockerfileGenerator

type NodejsDockerfileGenerator struct {
	Config       transformertypes.Transformer
	Env          *environment.Environment
	NodejsConfig *NodejsDockerfileYamlConfig
}

NodejsDockerfileGenerator implements the Transformer interface

func (*NodejsDockerfileGenerator) DirectoryDetect

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

DirectoryDetect runs detect in each sub directory

func (*NodejsDockerfileGenerator) GetConfig

GetConfig returns the transformer config

func (*NodejsDockerfileGenerator) Init

Init Initializes the transformer

func (*NodejsDockerfileGenerator) Transform

Transform transforms the artifacts

type NodejsDockerfileYamlConfig

type NodejsDockerfileYamlConfig struct {
	DefaultNodejsVersion string `yaml:"defaultNodejsVersion"`
}

NodejsDockerfileYamlConfig represents the configuration of the Nodejs dockerfile

type NodejsTemplateConfig

type NodejsTemplateConfig struct {
	Port        int32
	Build       bool
	NodeVersion string
}

NodejsTemplateConfig implements Nodejs config interface

type PHPDockerfileGenerator

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

PHPDockerfileGenerator implements the Transformer interface

func (*PHPDockerfileGenerator) DirectoryDetect

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

DirectoryDetect runs detect in each sub directory

func (*PHPDockerfileGenerator) GetConfig

GetConfig returns the transformer config

func (*PHPDockerfileGenerator) Init

Init Initializes the transformer

func (*PHPDockerfileGenerator) Transform

Transform transforms the artifacts

type PackageInfo

type PackageInfo struct {
	Name    string
	Version string
}

PackageInfo implements package properties

type PackageJSON

type PackageJSON struct {
	Name         string            `json:"name"`
	Version      string            `json:"version"`
	Description  string            `json:"description"`
	Keywords     []string          `json:"keywords"`
	Homepage     string            `json:"homepage"`
	License      string            `json:"license"`
	Files        []string          `json:"files"`
	Main         string            `json:"main"`
	Scripts      map[string]string `json:"scripts"`
	Os           []string          `json:"os"`
	CPU          []string          `json:"cpu"`
	Private      bool              `json:"private"`
	Engines      map[string]string `json:"engines"`
	Dependencies map[string]string `json:"dependencies"`
}

PackageJSON represents NodeJS package.json

type PhpTemplateConfig

type PhpTemplateConfig struct {
	ConfFile     string
	ConfFilePort int32
}

PhpTemplateConfig implements Php config interface

type PropertyGroup

type PropertyGroup struct {
	XMLName     xml.Name `xml:"PropertyGroup"`
	PublishUrl  string   `xml:"PublishUrl"`
	PublishUrlS string   `xml:"publishUrl"`
}

PropertyGroup has publish properties of the project

type PublishProfile

type PublishProfile struct {
	XMLName       xml.Name       `xml:"Project"`
	PropertyGroup *PropertyGroup `xml:"PropertyGroup"`
}

PublishProfile defines the publish profile

type PythonConfig

type PythonConfig struct {
	IsDjango bool `json:"IsDjango" yaml:"IsDjango"`
}

PythonConfig implements python config interface

type PythonDockerfileGenerator

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

PythonDockerfileGenerator implements the Transformer interface

func (*PythonDockerfileGenerator) DirectoryDetect

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

DirectoryDetect runs detect in each sub directory

func (*PythonDockerfileGenerator) GetConfig

GetConfig returns the transformer config

func (*PythonDockerfileGenerator) Init

Init Initializes the transformer

func (*PythonDockerfileGenerator) Transform

Transform transforms the artifacts

type PythonTemplateConfig

type PythonTemplateConfig struct {
	AppName               string
	Port                  int32
	StartingScriptRelPath string
	RequirementsTxt       string
	IsDjango              bool
}

PythonTemplateConfig implements python config interface

type RocketTomlConfig

type RocketTomlConfig struct {
	Global GlobalParameters
}

RocketTomlConfig implements Rocket.toml config interface

type RubyDockerfileGenerator

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

RubyDockerfileGenerator implements the Transformer interface

func (*RubyDockerfileGenerator) DirectoryDetect

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

DirectoryDetect runs detect in each sub directory

func (*RubyDockerfileGenerator) GetConfig

GetConfig returns the transformer config

func (*RubyDockerfileGenerator) Init

Init Initializes the transformer

func (*RubyDockerfileGenerator) Transform

Transform transforms the artifacts

type RubyTemplateConfig

type RubyTemplateConfig struct {
	Port    int32
	AppName string
}

RubyTemplateConfig implements Ruby config interface

type RustDockerfileGenerator

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

RustDockerfileGenerator implements the Transformer interface

func (*RustDockerfileGenerator) DirectoryDetect

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

DirectoryDetect runs detect in each sub directory

func (*RustDockerfileGenerator) GetConfig

GetConfig returns the transformer config

func (*RustDockerfileGenerator) Init

Init Initializes the transformer

func (*RustDockerfileGenerator) Transform

Transform transforms the artifacts

type RustTemplateConfig

type RustTemplateConfig struct {
	Port          int32
	AppName       string
	RocketToml    string
	RocketAddress string
}

RustTemplateConfig implements Nodejs config interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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