packs

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalysisBase

type AnalysisBase struct {
	PackName                  string
	LanguageVersion           string
	GitURL                    string
	GitBranch                 string
	Framework                 string
	FrameworkVersion          string
	SupportedLanguageVersions []string
	Messages                  common.Lister
	Databases                 []string
	ListOfStartCommands       []string
}

type Analyzer

type Analyzer interface {
	FillServices(*[]*common.Service) error
	HasPackage(pack string) bool
	GuessFramework() string
}

type AnalyzerBase

type AnalyzerBase struct {
	PackElement

	RootDir      string
	Environment  string
	ShouldPrompt bool

	GitURL    string
	GitBranch string

	Messages common.Lister
}

func (*AnalyzerBase) AnalyzeServices

func (b *AnalyzerBase) AnalyzeServices(a Analyzer, envVars []*common.EnvVar, gitBranch string, gitURL string, buildRoot string) ([]*common.Service, error)

func (*AnalyzerBase) AskForCommand

func (a *AnalyzerBase) AskForCommand(defaultCommand string, step string) string

func (*AnalyzerBase) CheckNotSupportedPackages

func (a *AnalyzerBase) CheckNotSupportedPackages(packages *common.Lister)

func (*AnalyzerBase) ConfirmDatabases

func (a *AnalyzerBase) ConfirmDatabases(foundDbs []common.Database) []common.Database

func (*AnalyzerBase) ConfirmVersion

func (a *AnalyzerBase) ConfirmVersion(found bool, version string, defaultVersion string) string

func (*AnalyzerBase) DetectWebServer

func (b *AnalyzerBase) DetectWebServer(a Analyzer, command string, servers []WebServer) (hasFound bool, webserver WebServer)

func (*AnalyzerBase) FindPort

func (a *AnalyzerBase) FindPort(hasFoundServer bool, server WebServer, command *string) (string, error)

func (*AnalyzerBase) GetOrCreateWebService

func (a *AnalyzerBase) GetOrCreateWebService(services *[]*common.Service) *common.Service

func (*AnalyzerBase) ProjectMetadata

func (a *AnalyzerBase) ProjectMetadata() (string, string, string, error)

type Detector

type Detector interface {
	GetPack() Pack
	Detect(rootDir string) bool
}

type DockerComposeYAMLContextBase

type DockerComposeYAMLContextBase struct {
	Services []*common.Service
	Dbs      []common.Database
}

type DockerComposeYAMLWriterBase

type DockerComposeYAMLWriterBase struct {
	PackElement
	TemplateWriterBase
}

func (*DockerComposeYAMLWriterBase) Write

func (w *DockerComposeYAMLWriterBase) Write(context interface{}) error

type DockerfileContextBase

type DockerfileContextBase struct {
	Version          string
	Framework        string
	Packages         *common.Lister
	FrameworkVersion string
}

type DockerfileWriterBase

type DockerfileWriterBase struct {
	PackElement
	TemplateWriterBase
}

func (*DockerfileWriterBase) Write

func (w *DockerfileWriterBase) Write(context interface{}) error

type Pack

type Pack interface {
	Name() string
	LanguageVersion() string
	Framework() string
	FrameworkVersion() string
	FilesToBeAnalysed() []string
	Detector() Detector
	Analyze(rootDir string, environment string, shouldNotPrompt bool, git_repo string, git_branch string) error
	WriteDockerfile(templateDir string, outputDir string, shouldNotPrompt bool) error
	WriteServiceYAML(templateDir string, outputDir string, shouldNotPrompt bool) error
	WriteDockerComposeYAML(templateDir string, outputDir string, shouldNotPrompt bool) error
	WriteKubesConfig(outputDir string, shouldNotPrompt bool) error
	GetMessages() []string
	GetDatabases() []string
	GetStartCommands() []string
	GetSupportedLanguageVersions() []string
	SetSupportedLanguageVersions(versions []string)
	CreateSkycapFiles(outputDir string, templateDir string, branch string) error
	StencilRepositoryPath() string
}

type PackBase

type PackBase struct {
	Messages *common.Lister
}

type PackElement

type PackElement struct {
	Pack Pack
}

func (*PackElement) GetPack

func (e *PackElement) GetPack() Pack

type ServiceYAMLContextBase

type ServiceYAMLContextBase struct {
	Services []*common.Service
	Dbs      []common.Database
}

type ServiceYAMLWriterBase

type ServiceYAMLWriterBase struct {
	PackElement
	TemplateWriterBase
}

func (*ServiceYAMLWriterBase) Write

func (w *ServiceYAMLWriterBase) Write(context interface{}) error

type TemplateWriterBase

type TemplateWriterBase struct {
	TemplateDir  string
	OutputDir    string
	ShouldPrompt bool
}

func (*TemplateWriterBase) WriteTemplate

func (w *TemplateWriterBase) WriteTemplate(templateName string, filename string, context interface{}) error

type WebServer

type WebServer interface {
	Names() []string
	Port(command *string) string
	ParsePort(command string) (hasFound bool, port string)
	RemovePortIfEnvVar(command string) string
	DefaultPort() string
}

type WebServerBase

type WebServerBase struct {
}

func (*WebServerBase) ParsePort

func (w *WebServerBase) ParsePort(command string) (hasFound bool, port string)

func (*WebServerBase) Port

func (b *WebServerBase) Port(w WebServer, command *string) string

func (*WebServerBase) RemovePortIfEnvVar

func (w *WebServerBase) RemovePortIfEnvVar(command string) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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