service

package
v1.9.9 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func AddBuildTemplate added in v1.9.9

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 added in v1.6.0

func CreateDockerfileTemplate(template *template.DockerfileTemplate, logger *zap.SugaredLogger) error

func CreateWorkflowTemplate added in v1.9.9

func CreateWorkflowTemplate(userName string, template *commonmodels.WorkflowV4Template, logger *zap.SugaredLogger) error

func CreateYamlTemplate added in v1.6.0

func CreateYamlTemplate(template *template.YamlTemplate, logger *zap.SugaredLogger) error

func DeleteDockerfileTemplate added in v1.6.0

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

func DeleteWorkflowTemplateByID added in v1.9.9

func DeleteWorkflowTemplateByID(idStr string, logger *zap.SugaredLogger) error

func DeleteYamlTemplate added in v1.6.0

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

func DeprecatedWorkflowTemplateName added in v1.9.9

func DeprecatedWorkflowTemplateName() []string

func ExtractVariable added in v1.9.9

func ExtractVariable(yamlContent string) (string, error)

func FlattenKvs added in v1.9.9

func FlattenKvs(yamlContent string) ([]*models.VariableKV, error)

func GetBuildTemplateByID added in v1.9.9

func GetBuildTemplateByID(idStr string) (*commonmodels.BuildTemplate, error)

func GetBuildTemplateByName added in v1.9.9

func GetBuildTemplateByName(name string) (*commonmodels.BuildTemplate, error)

func GetBuildTemplateReference added in v1.9.9

func GetBuildTemplateReference(id string, logger *zap.SugaredLogger) ([]*template.BuildTemplateReference, error)

func GetChartTemplate

func GetChartTemplate(name string, logger *zap.SugaredLogger) (*template.Chart, error)

func GetChartTemplateReference added in v1.9.9

func GetChartTemplateReference(name string, logger *zap.SugaredLogger) ([]*template.ServiceReference, error)

func GetChartTemplateVariables added in v1.6.0

func GetChartTemplateVariables(name string, logger *zap.SugaredLogger) ([]*commonmodels.ChartVariable, error)

func GetDockerfileTemplateReference added in v1.6.0

func GetDockerfileTemplateReference(id string, logger *zap.SugaredLogger) ([]*template.BuildReference, error)

func GetFileContentForTemplate added in v1.6.0

func GetFileContentForTemplate(name, filePath, fileName string, logger *zap.SugaredLogger) ([]byte, error)

func GetSystemDefaultVariables added in v1.6.0

func GetSystemDefaultVariables() []*models.ChartVariable

func GetWorkflowTemplateByID added in v1.9.9

func GetWorkflowTemplateByID(idStr string, logger *zap.SugaredLogger) (*commonmodels.WorkflowV4Template, error)

func GetYamlTemplateDetail added in v1.6.0

func GetYamlTemplateDetail(id string, logger *zap.SugaredLogger) (*template.YamlDetail, error)

func GetYamlTemplateReference added in v1.6.0

func GetYamlTemplateReference(id string, logger *zap.SugaredLogger) ([]*template.ServiceReference, error)

func InitWorkflowTemplate added in v1.9.9

func InitWorkflowTemplate()

func InitWorkflowTemplateInfos added in v1.9.9

func InitWorkflowTemplateInfos() []*commonmodels.WorkflowV4Template

func ListDockerfileTemplate added in v1.6.0

func ListDockerfileTemplate(pageNum, pageSize int, logger *zap.SugaredLogger) ([]*template.DockerfileListObject, int, error)

func ListYamlTemplate added in v1.6.0

func ListYamlTemplate(pageNum, pageSize int, logger *zap.SugaredLogger) ([]*template.YamlListObject, int, error)

func RemoveBuildTemplate added in v1.9.9

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

func RemoveChartTemplate

func RemoveChartTemplate(name string, logger *zap.SugaredLogger) error

func SyncHelmTemplateReference added in v1.9.9

func SyncHelmTemplateReference(userName, name string, logger *zap.SugaredLogger) error

func SyncYamlTemplateReference added in v1.9.9

func SyncYamlTemplateReference(userName, id string, logger *zap.SugaredLogger) error

func UpdateBuildTemplate added in v1.9.9

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 added in v1.6.0

func UpdateChartTemplateVariables(name string, args []*commonmodels.Variable, logger *zap.SugaredLogger) error

func UpdateDockerfileTemplate added in v1.6.0

func UpdateDockerfileTemplate(id string, template *template.DockerfileTemplate, logger *zap.SugaredLogger) error

func UpdateWorkflowTemplate added in v1.9.9

func UpdateWorkflowTemplate(userName string, template *commonmodels.WorkflowV4Template, logger *zap.SugaredLogger) error

func UpdateYamlTemplate added in v1.6.0

func UpdateYamlTemplate(id string, template *template.YamlTemplate, logger *zap.SugaredLogger) error

func UpdateYamlTemplateVariable added in v1.9.9

func UpdateYamlTemplateVariable(id string, template *template.YamlTemplate, logger *zap.SugaredLogger) error

func ValidateDockerfileTemplate added in v1.6.0

func ValidateDockerfileTemplate(template string, _ *zap.SugaredLogger) error

func ValidateVariable added in v1.9.9

func ValidateVariable(content, variable string) error

Types

type BuildTemplateBrief added in v1.9.9

type BuildTemplateBrief struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

type BuildTemplateListResp added in v1.9.9

type BuildTemplateListResp struct {
	BuildTemplates []*BuildTemplateBrief `json:"build_templates"`
	Total          int                   `json:"total,omitempty"`
}

func ListBuildTemplates added in v1.9.9

func ListBuildTemplates(pageNum, pageSize int) (*BuildTemplateListResp, error)

type ChartTemplateListResp added in v1.6.0

type ChartTemplateListResp struct {
	SystemVariables []*commonmodels.ChartVariable `json:"systemVariables"`
	ChartTemplates  []*template.Chart             `json:"chartTemplates"`
}

func ListChartTemplates

func ListChartTemplates(logger *zap.SugaredLogger) (*ChartTemplateListResp, error)

type WorkflowTemplateJob added in v1.9.9

type WorkflowTemplateJob struct {
	Name    string `json:"name"`
	JobType string `json:"job_type"`
}

type WorkflowTemplateStage added in v1.9.9

type WorkflowTemplateStage struct {
	Name string                 `json:"name"`
	Jobs []*WorkflowTemplateJob `json:"jobs"`
}

type WorkflowtemplatePreView added in v1.9.9

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 added in v1.9.9

func ListWorkflowTemplate(category string, excludeBuildIn bool, logger *zap.SugaredLogger) ([]*WorkflowtemplatePreView, error)

Jump to

Keyboard shortcuts

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