template

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTemplateVariableYaml added in v1.9.9

func GetTemplateVariableYaml(variables []*models.Variable, variableYaml string) (string, error)

GetTemplateVariableYaml returns variable yaml of yamlTemplate or templateService

func GetYamlVariables

func GetYamlVariables(s string, logger *zap.SugaredLogger) ([]*models.ChartVariable, error)

func SafeMergeVariableYaml added in v1.9.9

func SafeMergeVariableYaml(variableYamls ...string) (string, map[string]string, error)

SafeMergeVariableYaml merge yamls support go template grammar

Types

type BuildReference

type BuildReference struct {
	BuildName   string `json:"build_name"`
	ProjectName string `json:"project_name"`
}

type Chart

type Chart struct {
	Name       string                  `json:"name"`
	CodehostID int                     `json:"codehostID"`
	Owner      string                  `json:"owner"`
	Namespace  string                  `json:"namespace"`
	Repo       string                  `json:"repo"`
	Branch     string                  `json:"branch"`
	Path       string                  `json:"path"`
	Variables  []*models.ChartVariable `json:"variables,omitempty"`

	Files []*fs.FileInfo `json:"files,omitempty"`
}

type DockerfileDetail

type DockerfileDetail struct {
	ID        string                  `json:"id"`
	Name      string                  `json:"name"`
	Content   string                  `json:"content"`
	Variables []*models.ChartVariable `json:"variable"`
}

func GetDockerfileTemplateDetail

func GetDockerfileTemplateDetail(id string, logger *zap.SugaredLogger) (*DockerfileDetail, error)

type DockerfileListObject

type DockerfileListObject struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type DockerfileTemplate

type DockerfileTemplate struct {
	Name    string `json:"name"`
	Content string `json:"content"`
}

type ServiceReference

type ServiceReference struct {
	ProjectName string `json:"project_name"`
	ServiceName string `json:"service_name"`
}

type YamlDetail

type YamlDetail struct {
	ID           string                  `json:"id"`
	Name         string                  `json:"name"`
	Content      string                  `json:"content"`
	Variables    []*models.ChartVariable `json:"variable"`
	VariableYaml string                  `json:"variable_yaml"`
}

type YamlListObject

type YamlListObject struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type YamlTemplate

type YamlTemplate struct {
	Name         string                  `json:"name"`
	Content      string                  `json:"content"`
	Variable     []*models.ChartVariable `json:"variable"`
	VariableYaml string                  `json:"variable_yaml"`
}

Jump to

Keyboard shortcuts

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