Documentation
¶
Index ¶
- Constants
- Variables
- func ContainerizeApplication(dockerfilePath, localPath string, templateRepoURL string, log log.Logger) error
- func CustomResolveVars(yamlFileContent []byte, matchFn func(string, string, string) bool, ...) ([]byte, error)
- type ComponentSchema
- type ComponentsGenerator
- type DockerfileGenerator
Constants ¶
const ComponentsRepoPath = ".devspace/components"
ComponentsRepoPath is the path relative to the user folder where the components are stored
const ComponentsRepoURL = "https://github.com/devspace-cloud/components.git"
ComponentsRepoURL is the repository url
const DockerfileRepoPath = ".devspace/dockerfileRepo"
DockerfileRepoPath is the path relative to the user folder where the docker file repo is stored
const DockerfileRepoURL = "https://github.com/devspace-cloud/devspace-templates.git"
DockerfileRepoURL is the default repository url
Variables ¶
var VarMatchRegex = regexp.MustCompile("^(.*)(\\$\\{[^\\}]+\\})(.*)$")
VarMatchRegex is the regex to check if a value matches the devspace var format
Functions ¶
Types ¶
type ComponentSchema ¶
type ComponentSchema struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
Variables []latest.Variable `yaml:"variables"`
VariableValues map[string]string
}
ComponentSchema is the component schema
type ComponentsGenerator ¶
type ComponentsGenerator struct {
LocalPath string
// contains filtered or unexported fields
}
ComponentsGenerator holds the information to create a component
func NewComponentGenerator ¶
func NewComponentGenerator() (*ComponentsGenerator, error)
NewComponentGenerator creates a new component generator for the given path
func (*ComponentsGenerator) GetComponent ¶
func (cg *ComponentsGenerator) GetComponent(name string) (*ComponentSchema, error)
GetComponent retrieves a component
func (*ComponentsGenerator) GetComponentTemplate ¶
func (cg *ComponentsGenerator) GetComponentTemplate(name string, log log.Logger) (*latest.ComponentConfig, error)
GetComponentTemplate retrieves a component templates
func (*ComponentsGenerator) ListComponents ¶
func (cg *ComponentsGenerator) ListComponents() ([]*ComponentSchema, error)
ListComponents returns an array with all available components
type DockerfileGenerator ¶
type DockerfileGenerator struct {
Language string
LocalPath string
// contains filtered or unexported fields
}
DockerfileGenerator is a type of object that generates a Helm Chart
func NewDockerfileGenerator ¶
func NewDockerfileGenerator(localPath string, templateRepoURL *string) (*DockerfileGenerator, error)
NewDockerfileGenerator creates a new dockerfile generator
func (*DockerfileGenerator) CreateDockerfile ¶
func (cg *DockerfileGenerator) CreateDockerfile(language string) error
CreateDockerfile creates a dockerfile for a given language
func (*DockerfileGenerator) GetLanguage ¶
func (cg *DockerfileGenerator) GetLanguage() (string, error)
GetLanguage gets the language from DockerfileGenerator either from its field "Language" or by detecting it
func (*DockerfileGenerator) GetSupportedLanguages ¶
func (cg *DockerfileGenerator) GetSupportedLanguages() ([]string, error)
GetSupportedLanguages returns all languages that are available in the local Template Rempository
func (*DockerfileGenerator) IsSupportedLanguage ¶
func (cg *DockerfileGenerator) IsSupportedLanguage(language string) bool
IsSupportedLanguage returns true if the given language is supported by the DockerfileGenerator