Documentation ¶
Index ¶
- Variables
- func AddBuildTemplate(userName string, build *commonmodels.BuildTemplate, logger *zap.SugaredLogger) error
- func AddChartTemplate(name string, args *fs.DownloadFromSourceArgs, logger *zap.SugaredLogger) error
- func CreateDockerfileTemplate(template *template.DockerfileTemplate, logger *zap.SugaredLogger) error
- func CreateScanningTemplate(userName string, template *commonmodels.ScanningTemplate, ...) error
- func CreateWorkflowTemplate(userName string, template *commonmodels.WorkflowV4Template, ...) error
- func CreateYamlTemplate(template *template.YamlTemplate, logger *zap.SugaredLogger) error
- func DeleteDockerfileTemplate(id string, logger *zap.SugaredLogger) error
- func DeleteScanningTemplate(id string, logger *zap.SugaredLogger) error
- func DeleteWorkflowTemplateByID(idStr string, logger *zap.SugaredLogger) error
- func DeleteYamlTemplate(id string, logger *zap.SugaredLogger) error
- func DeprecatedWorkflowTemplateName() []string
- func ExtractVariable(yamlContent string) (string, error)
- func FlattenKvs(yamlContent string) ([]*models.VariableKV, error)
- func GetBuildTemplateByID(idStr string) (*commonmodels.BuildTemplate, error)
- func GetBuildTemplateByName(name string) (*commonmodels.BuildTemplate, error)
- func GetBuildTemplateReference(id string, logger *zap.SugaredLogger) ([]*template.BuildTemplateReference, error)
- func GetChartTemplate(name string, logger *zap.SugaredLogger) (*template.Chart, error)
- func GetChartTemplateReference(name string, logger *zap.SugaredLogger) ([]*template.ServiceReference, error)
- func GetChartTemplateVariables(name string, logger *zap.SugaredLogger) ([]*commonmodels.ChartVariable, error)
- func GetDockerfileTemplateReference(id string, logger *zap.SugaredLogger) ([]*template.BuildReference, error)
- func GetFileContentForTemplate(name, filePath, fileName string, logger *zap.SugaredLogger) ([]byte, error)
- func GetScanningTemplateByID(idStr string) (*commonmodels.ScanningTemplate, error)
- func GetScanningTemplateReference(id string, logger *zap.SugaredLogger) ([]*template.ScanningTemplateReference, error)
- func GetSystemDefaultVariables() []*models.ChartVariable
- func GetWorkflowTemplateByID(idStr string, logger *zap.SugaredLogger) (*commonmodels.WorkflowV4Template, error)
- func GetYamlTemplateDetail(id string, logger *zap.SugaredLogger) (*template.YamlDetail, error)
- func GetYamlTemplateReference(id string, logger *zap.SugaredLogger) ([]*template.ServiceReference, error)
- func InitWorkflowTemplate()
- func InitWorkflowTemplateInfos() []*commonmodels.WorkflowV4Template
- func ListDockerfileTemplate(pageNum, pageSize int, logger *zap.SugaredLogger) ([]*template.DockerfileListObject, int, error)
- func ListYamlTemplate(pageNum, pageSize int, logger *zap.SugaredLogger) ([]*template.YamlListObject, int, error)
- func RemoveBuildTemplate(id string, logger *zap.SugaredLogger) error
- func RemoveChartTemplate(name string, logger *zap.SugaredLogger) error
- func SyncHelmTemplateReference(userName, name string, logger *zap.SugaredLogger) error
- func SyncYamlTemplateReference(userName, id string, logger *zap.SugaredLogger) error
- func UpdateBuildTemplate(id string, buildTemplate *commonmodels.BuildTemplate, ...) 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 *template.DockerfileTemplate, logger *zap.SugaredLogger) error
- func UpdateScanningTemplate(id string, template *commonmodels.ScanningTemplate, logger *zap.SugaredLogger) error
- func UpdateWorkflowTemplate(userName string, template *commonmodels.WorkflowV4Template, ...) error
- func UpdateYamlTemplate(id string, template *template.YamlTemplate, logger *zap.SugaredLogger) error
- func UpdateYamlTemplateVariable(id string, template *template.YamlTemplate, logger *zap.SugaredLogger) error
- func ValidateDockerfileTemplate(template string, _ *zap.SugaredLogger) error
- func ValidateVariable(content, variable string) error
- type BuildTemplateBrief
- type BuildTemplateListResp
- type ChartTemplateListResp
- type ScanningTemplateBrief
- type ScanningTemplateListResp
- type WorkflowTemplateJob
- type WorkflowTemplateStage
- type WorkflowtemplatePreView
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 AddBuildTemplate ¶
func AddBuildTemplate(userName string, build *commonmodels.BuildTemplate, logger *zap.SugaredLogger) error
func AddChartTemplate ¶
func AddChartTemplate(name string, args *fs.DownloadFromSourceArgs, logger *zap.SugaredLogger) error
func CreateDockerfileTemplate ¶
func CreateDockerfileTemplate(template *template.DockerfileTemplate, logger *zap.SugaredLogger) error
func CreateScanningTemplate ¶
func CreateScanningTemplate(userName string, template *commonmodels.ScanningTemplate, logger *zap.SugaredLogger) error
func CreateWorkflowTemplate ¶
func CreateWorkflowTemplate(userName string, template *commonmodels.WorkflowV4Template, logger *zap.SugaredLogger) error
func CreateYamlTemplate ¶
func CreateYamlTemplate(template *template.YamlTemplate, logger *zap.SugaredLogger) error
func DeleteDockerfileTemplate ¶
func DeleteDockerfileTemplate(id string, logger *zap.SugaredLogger) error
func DeleteScanningTemplate ¶
func DeleteScanningTemplate(id string, logger *zap.SugaredLogger) error
func DeleteWorkflowTemplateByID ¶
func DeleteWorkflowTemplateByID(idStr string, logger *zap.SugaredLogger) error
func DeleteYamlTemplate ¶
func DeleteYamlTemplate(id string, logger *zap.SugaredLogger) error
func DeprecatedWorkflowTemplateName ¶
func DeprecatedWorkflowTemplateName() []string
func ExtractVariable ¶
func FlattenKvs ¶
func FlattenKvs(yamlContent string) ([]*models.VariableKV, error)
func GetBuildTemplateByID ¶
func GetBuildTemplateByID(idStr string) (*commonmodels.BuildTemplate, error)
func GetBuildTemplateByName ¶
func GetBuildTemplateByName(name string) (*commonmodels.BuildTemplate, error)
func GetBuildTemplateReference ¶
func GetBuildTemplateReference(id string, logger *zap.SugaredLogger) ([]*template.BuildTemplateReference, error)
func GetChartTemplate ¶
func GetChartTemplateReference ¶
func GetChartTemplateReference(name string, logger *zap.SugaredLogger) ([]*template.ServiceReference, error)
func GetChartTemplateVariables ¶
func GetChartTemplateVariables(name string, logger *zap.SugaredLogger) ([]*commonmodels.ChartVariable, error)
func GetDockerfileTemplateReference ¶
func GetDockerfileTemplateReference(id string, logger *zap.SugaredLogger) ([]*template.BuildReference, error)
func GetFileContentForTemplate ¶
func GetFileContentForTemplate(name, filePath, fileName string, logger *zap.SugaredLogger) ([]byte, error)
func GetScanningTemplateByID ¶
func GetScanningTemplateByID(idStr string) (*commonmodels.ScanningTemplate, error)
func GetScanningTemplateReference ¶
func GetScanningTemplateReference(id string, logger *zap.SugaredLogger) ([]*template.ScanningTemplateReference, error)
func GetSystemDefaultVariables ¶
func GetSystemDefaultVariables() []*models.ChartVariable
func GetWorkflowTemplateByID ¶
func GetWorkflowTemplateByID(idStr string, logger *zap.SugaredLogger) (*commonmodels.WorkflowV4Template, error)
func GetYamlTemplateDetail ¶
func GetYamlTemplateDetail(id string, logger *zap.SugaredLogger) (*template.YamlDetail, error)
func GetYamlTemplateReference ¶
func GetYamlTemplateReference(id string, logger *zap.SugaredLogger) ([]*template.ServiceReference, error)
func InitWorkflowTemplate ¶
func InitWorkflowTemplate()
func InitWorkflowTemplateInfos ¶
func InitWorkflowTemplateInfos() []*commonmodels.WorkflowV4Template
func ListDockerfileTemplate ¶
func ListDockerfileTemplate(pageNum, pageSize int, logger *zap.SugaredLogger) ([]*template.DockerfileListObject, int, error)
func ListYamlTemplate ¶
func ListYamlTemplate(pageNum, pageSize int, logger *zap.SugaredLogger) ([]*template.YamlListObject, int, error)
func RemoveBuildTemplate ¶
func RemoveBuildTemplate(id string, logger *zap.SugaredLogger) error
func RemoveChartTemplate ¶
func RemoveChartTemplate(name string, logger *zap.SugaredLogger) error
func SyncHelmTemplateReference ¶
func SyncHelmTemplateReference(userName, name string, logger *zap.SugaredLogger) error
func SyncYamlTemplateReference ¶
func SyncYamlTemplateReference(userName, id string, logger *zap.SugaredLogger) error
func UpdateBuildTemplate ¶
func UpdateBuildTemplate(id string, buildTemplate *commonmodels.BuildTemplate, 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 *template.DockerfileTemplate, logger *zap.SugaredLogger) error
func UpdateScanningTemplate ¶
func UpdateScanningTemplate(id string, template *commonmodels.ScanningTemplate, logger *zap.SugaredLogger) error
func UpdateWorkflowTemplate ¶
func UpdateWorkflowTemplate(userName string, template *commonmodels.WorkflowV4Template, logger *zap.SugaredLogger) error
func UpdateYamlTemplate ¶
func UpdateYamlTemplate(id string, template *template.YamlTemplate, logger *zap.SugaredLogger) error
func UpdateYamlTemplateVariable ¶
func UpdateYamlTemplateVariable(id string, template *template.YamlTemplate, logger *zap.SugaredLogger) error
func ValidateDockerfileTemplate ¶
func ValidateDockerfileTemplate(template string, _ *zap.SugaredLogger) error
func ValidateVariable ¶
Types ¶
type BuildTemplateBrief ¶
type BuildTemplateListResp ¶
type BuildTemplateListResp struct { BuildTemplates []*BuildTemplateBrief `json:"build_templates"` Total int `json:"total,omitempty"` }
func ListBuildTemplates ¶
func ListBuildTemplates(pageNum, pageSize int) (*BuildTemplateListResp, error)
type ChartTemplateListResp ¶
type ChartTemplateListResp struct { SystemVariables []*commonmodels.ChartVariable `json:"systemVariables"` ChartTemplates []*template.Chart `json:"chartTemplates"` }
func ListChartTemplates ¶
func ListChartTemplates(logger *zap.SugaredLogger) (*ChartTemplateListResp, error)
type ScanningTemplateBrief ¶
type ScanningTemplateListResp ¶
type ScanningTemplateListResp struct { ScanningTemplates []*ScanningTemplateBrief `json:"scanning_templates"` Total int `json:"total,omitempty"` }
func ListScanningTemplates ¶
func ListScanningTemplates(pageNum, pageSize int) (*ScanningTemplateListResp, error)
type WorkflowTemplateJob ¶
type WorkflowTemplateStage ¶
type WorkflowTemplateStage struct { Name string `json:"name"` Jobs []*WorkflowTemplateJob `json:"jobs"` }
type WorkflowtemplatePreView ¶
type WorkflowtemplatePreView struct { ID primitive.ObjectID `json:"id"` TemplateName string `json:"template_name"` CreateBy string `json:"create_by"` CreateTime int64 `json:"create_time"` UpdateBy string `json:"update_by"` UpdateTime int64 `json:"update_time"` Stages []string `json:"stages"` StageDetails []*WorkflowTemplateStage `json:"stage_details"` Description string `json:"description"` Category setting.WorkflowCategory `json:"category"` BuildIn bool `json:"build_in"` }
func ListWorkflowTemplate ¶
func ListWorkflowTemplate(category string, excludeBuildIn bool, logger *zap.SugaredLogger) ([]*WorkflowtemplatePreView, error)
Click to show internal directories.
Click to hide internal directories.