Documentation ¶
Index ¶
- Variables
- func AddChartTemplate(name string, args *fs.DownloadFromSourceArgs, logger *zap.SugaredLogger) error
- func CreateDockerfileTemplate(template *DockerfileTemplate, logger *zap.SugaredLogger) error
- func CreateYamlTemplate(template *YamlTemplate, logger *zap.SugaredLogger) error
- func DeleteDockerfileTemplate(id string, logger *zap.SugaredLogger) error
- func DeleteYamlTemplate(id string, logger *zap.SugaredLogger) error
- func GetChartTemplateVariables(name string, logger *zap.SugaredLogger) ([]*commonmodels.ChartVariable, error)
- func GetFileContentForTemplate(name, filePath, fileName string, logger *zap.SugaredLogger) ([]byte, error)
- func GetSystemDefaultVariables() []*models.ChartVariable
- func GetYamlVariables(s string, logger *zap.SugaredLogger) ([]*models.ChartVariable, error)
- func RemoveChartTemplate(name string, logger *zap.SugaredLogger) error
- func UpdateChartTemplate(name string, args *fs.DownloadFromSourceArgs, logger *zap.SugaredLogger) error
- func UpdateChartTemplateVariables(name string, args []*commonmodels.Variable, logger *zap.SugaredLogger) error
- func UpdateDockerfileTemplate(id string, template *DockerfileTemplate, logger *zap.SugaredLogger) error
- func UpdateYamlTemplate(id string, template *YamlTemplate, logger *zap.SugaredLogger) error
- func ValidateDockerfileTemplate(template string, logger *zap.SugaredLogger) error
- type BuildReference
- type Chart
- type ChartTemplateListResp
- type DockerfileDetail
- type DockerfileListObject
- type DockerfileTemplate
- type ServiceReference
- type YamlDetail
- type YamlListObject
- type YamlTemplate
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ChartTemplateDefaultSystemVariable = map[string]string{ setting.TemplateVariableProduct: setting.TemplateVariableProductDescription, setting.TemplateVariableService: setting.TemplateVariableServiceDescription, } )
View Source
var DefaultSystemVariable = map[string]string{ setting.TemplateVariableProduct: setting.TemplateVariableProductDescription, setting.TemplateVariableService: setting.TemplateVariableServiceDescription, }
Functions ¶
func AddChartTemplate ¶
func AddChartTemplate(name string, args *fs.DownloadFromSourceArgs, logger *zap.SugaredLogger) error
func CreateDockerfileTemplate ¶
func CreateDockerfileTemplate(template *DockerfileTemplate, logger *zap.SugaredLogger) error
func CreateYamlTemplate ¶
func CreateYamlTemplate(template *YamlTemplate, logger *zap.SugaredLogger) error
func DeleteDockerfileTemplate ¶
func DeleteDockerfileTemplate(id string, logger *zap.SugaredLogger) error
func DeleteYamlTemplate ¶
func DeleteYamlTemplate(id string, logger *zap.SugaredLogger) error
func GetChartTemplateVariables ¶
func GetChartTemplateVariables(name string, logger *zap.SugaredLogger) ([]*commonmodels.ChartVariable, error)
func GetFileContentForTemplate ¶
func GetFileContentForTemplate(name, filePath, fileName string, logger *zap.SugaredLogger) ([]byte, error)
func GetSystemDefaultVariables ¶
func GetSystemDefaultVariables() []*models.ChartVariable
func GetYamlVariables ¶
func GetYamlVariables(s string, logger *zap.SugaredLogger) ([]*models.ChartVariable, error)
func RemoveChartTemplate ¶
func RemoveChartTemplate(name string, logger *zap.SugaredLogger) error
func UpdateChartTemplate ¶
func UpdateChartTemplate(name string, args *fs.DownloadFromSourceArgs, logger *zap.SugaredLogger) error
func UpdateChartTemplateVariables ¶
func UpdateChartTemplateVariables(name string, args []*commonmodels.Variable, logger *zap.SugaredLogger) error
func UpdateDockerfileTemplate ¶
func UpdateDockerfileTemplate(id string, template *DockerfileTemplate, logger *zap.SugaredLogger) error
func UpdateYamlTemplate ¶
func UpdateYamlTemplate(id string, template *YamlTemplate, logger *zap.SugaredLogger) error
func ValidateDockerfileTemplate ¶
func ValidateDockerfileTemplate(template string, logger *zap.SugaredLogger) error
Types ¶
type BuildReference ¶
type BuildReference struct { BuildName string `json:"build_name"` ProjectName string `json:"project_name"` }
func GetDockerfileTemplateReference ¶
func GetDockerfileTemplateReference(id string, logger *zap.SugaredLogger) ([]*BuildReference, error)
type Chart ¶
type Chart struct { Name string `json:"name"` CodehostID int `json:"codehostID"` Owner string `json:"owner"` Repo string `json:"repo"` Branch string `json:"branch"` Path string `json:"path"` Variables []*models.ChartVariable `json:"variables,omitempty"` Files []*fs.FileInfo `json:"files,omitempty"` }
func GetChartTemplate ¶
func GetChartTemplate(name string, logger *zap.SugaredLogger) (*Chart, error)
type ChartTemplateListResp ¶
type ChartTemplateListResp struct { SystemVariables []*commonmodels.ChartVariable `json:"systemVariables"` ChartTemplates []*Chart `json:"chartTemplates"` }
func ListChartTemplates ¶
func ListChartTemplates(logger *zap.SugaredLogger) (*ChartTemplateListResp, error)
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 ¶
func ListDockerfileTemplate ¶
func ListDockerfileTemplate(pageNum, pageSize int, logger *zap.SugaredLogger) ([]*DockerfileListObject, int, error)
type DockerfileTemplate ¶
type ServiceReference ¶
type ServiceReference struct { ProjectName string `json:"project_name"` ServiceName string `json:"service_name"` }
func GetYamlTemplateReference ¶
func GetYamlTemplateReference(id string, logger *zap.SugaredLogger) ([]*ServiceReference, error)
type YamlDetail ¶
type YamlDetail struct { ID string `json:"id"` Name string `json:"name"` Content string `json:"content"` Variables []*models.ChartVariable `json:"variable"` }
func GetYamlTemplateDetail ¶
func GetYamlTemplateDetail(id string, logger *zap.SugaredLogger) (*YamlDetail, error)
type YamlListObject ¶
func ListYamlTemplate ¶
func ListYamlTemplate(pageNum, pageSize int, logger *zap.SugaredLogger) ([]*YamlListObject, int, error)
type YamlTemplate ¶
type YamlTemplate struct { Name string `json:"name"` Content string `json:"content"` Variable []*models.ChartVariable `json:"variable"` }
Click to show internal directories.
Click to hide internal directories.