service

package
v1.16.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateProductTemplate

func CreateProductTemplate(args *template.Product, log *zap.SugaredLogger) (err error)

CreateProductTemplate 创建产品模板

func CreateProjectOpenAPI added in v1.9.9

func CreateProjectOpenAPI(userID, username string, args *OpenAPICreateProductReq, logger *zap.SugaredLogger) error

func CreateVariableSet added in v1.9.9

func CreateVariableSet(args *CreateVariableSetRequest) error

func DeleteCollabrationMode added in v1.9.9

func DeleteCollabrationMode(productName string, userName string, log *zap.SugaredLogger) error

func DeleteLabels added in v1.9.9

func DeleteLabels(productName string, log *zap.SugaredLogger) error

func DeletePolicy added in v1.10.0

func DeletePolicy(productName string, log *zap.SugaredLogger) error

func DeleteProductTemplate

func DeleteProductTemplate(userName, productName, requestID string, isDelete bool, log *zap.SugaredLogger) (err error)

DeleteProductTemplate 删除产品模板

func DeleteProductsAsync

func DeleteProductsAsync(userName, productName, requestID string, isDelete bool, log *zap.SugaredLogger) error

func DeleteTestModules

func DeleteTestModules(productName, requestID string, log *zap.SugaredLogger) error

func DeleteVariableSet added in v1.9.9

func DeleteVariableSet(id, projectName string, log *zap.SugaredLogger) error

func FillProductTemplateVars

func FillProductTemplateVars(productTemplates []*template.Product, log *zap.SugaredLogger) error

func ForkProduct

func ForkProduct(username, uid, requestID string, args *template.ForkProject, log *zap.SugaredLogger) error

ForkProduct Deprecated

func GetProductTemplateServices

func GetProductTemplateServices(productName string, envType types.EnvType, isBaseEnv bool, baseEnvName string, log *zap.SugaredLogger) (*template.Product, error)

func GetVariableSet added in v1.9.9

func GetVariableSet(idStr string, log *zap.SugaredLogger) (*commonmodels.VariableSet, error)

func ListOpenSourceProduct

func ListOpenSourceProduct(log *zap.SugaredLogger) ([]*template.Product, error)

func ListProjects added in v1.5.0

func ListProjects(opts *ProjectListOptions, logger *zap.SugaredLogger) (interface{}, error)

func TransferHostProject added in v1.9.9

func TransferHostProject(user, projectName string, log *zap.SugaredLogger) (err error)

func UnForkProduct

func UnForkProduct(userID string, username, productName, workflowName, envName, requestID string, log *zap.SugaredLogger) error

func UpdateCustomMatchRules added in v1.5.0

func UpdateCustomMatchRules(productName, userName, requestID string, matchRules []*ImageParseData) error

func UpdateProductTemplate

func UpdateProductTemplate(name string, args *template.Product, log *zap.SugaredLogger) (err error)

UpdateProductTemplate 更新产品模板

func UpdateProductTmplStatus

func UpdateProductTmplStatus(productName, onboardingStatus string, log *zap.SugaredLogger) (err error)

UpdateProductTmplStatus 更新项目onboarding状态

func UpdateProject

func UpdateProject(name string, args *template.Product, log *zap.SugaredLogger) (err error)

UpdateProject 更新项目

func UpdateServiceOrchestration added in v1.6.0

func UpdateServiceOrchestration(name string, services [][]string, updateBy string, log *zap.SugaredLogger) (err error)

func UpdateVariableSet added in v1.9.9

func UpdateVariableSet(args *CreateVariableSetRequest, requestID string, log *zap.SugaredLogger) error

Types

type ContainerInfo

type ContainerInfo struct {
	Value string `bson:"value"              json:"value"`
	Label string `bson:"label"              json:"label"`
}

ContainerInfo ...

type CreateVariableSetRequest added in v1.9.9

type CreateVariableSetRequest struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	Description  string `json:"description"`
	ProjectName  string `json:"project_name"`
	VariableYaml string `json:"variable_yaml"`
	UserName     string
}

type CustomParseDataArgs added in v1.5.0

type CustomParseDataArgs struct {
	Rules []*ImageParseData `json:"rules"`
}

type ImageParseData added in v1.5.0

type ImageParseData struct {
	Repo     string `json:"repo,omitempty"`
	Image    string `json:"image,omitempty"`
	Tag      string `json:"tag,omitempty"`
	InUse    bool   `json:"inUse,omitempty"`
	PresetId int    `json:"presetId,omitempty"`
}

func GetCustomMatchRules added in v1.5.0

func GetCustomMatchRules(productName string, log *zap.SugaredLogger) ([]*ImageParseData, error)

type OpenAPICreateProductReq added in v1.9.9

type OpenAPICreateProductReq struct {
	ProjectName string             `json:"project_name"`
	ProjectKey  string             `json:"project_key"`
	IsPublic    bool               `json:"is_public"`
	Description string             `json:"description"`
	ProjectType config.ProjectType `json:"project_type"`
}

func (OpenAPICreateProductReq) Validate added in v1.9.9

func (req OpenAPICreateProductReq) Validate() error

type ProductInfo

type ProductInfo struct {
	Value       string         `bson:"value"              json:"value"`
	Label       string         `bson:"label"              json:"label"`
	ServiceInfo []*ServiceInfo `bson:"services"           json:"services"`
}

func ListTemplatesHierachy

func ListTemplatesHierachy(userName string, log *zap.SugaredLogger) ([]*ProductInfo, error)

type ProjectBriefRepresentation added in v1.5.0

type ProjectBriefRepresentation struct {
	*ProjectMinimalRepresentation
	Envs []string `json:"envs"`
}

type ProjectDetailedRepresentation added in v1.5.0

type ProjectDetailedRepresentation struct {
	*ProjectBriefRepresentation
	Alias      string `json:"alias"`
	Desc       string `json:"desc"`
	UpdatedAt  int64  `json:"updatedAt"`
	UpdatedBy  string `json:"updatedBy"`
	Onboard    bool   `json:"onboard"`
	Public     bool   `json:"public"`
	DeployType string `json:"deployType"`
}

type ProjectListOptions added in v1.5.0

type ProjectListOptions struct {
	IgnoreNoEnvs     bool
	IgnoreNoVersions bool
	Verbosity        QueryVerbosity
	Names            []string
}

type ProjectMinimalRepresentation added in v1.5.0

type ProjectMinimalRepresentation struct {
	Name string `json:"name"`
}

type QueryVerbosity added in v1.5.0

type QueryVerbosity string
const (
	VerbosityDetailed QueryVerbosity = "detailed" // all information
	VerbosityBrief    QueryVerbosity = "brief"    // short information or a summary
	VerbosityMinimal  QueryVerbosity = "minimal"  // very little information, usually only a resource identifier
)

type ServiceInfo

type ServiceInfo struct {
	Value         string           `bson:"value"              json:"value"`
	Label         string           `bson:"label"              json:"label"`
	ContainerInfo []*ContainerInfo `bson:"containers"         json:"containers"`
}

type VariableSetFindOption added in v1.9.9

type VariableSetFindOption struct {
	ID      string `json:"id"`
	PerPage int    `json:"perPage"`
	Page    int    `json:"page"`
}

type VariableSetListResp added in v1.9.9

type VariableSetListResp struct {
	VariableSetList []*commonmodels.VariableSet `json:"variable_set_list"`
	Total           int64                       `json:"total"`
}

func ListVariableSets added in v1.9.9

func ListVariableSets(option *VariableSetFindOption, log *zap.SugaredLogger) (*VariableSetListResp, error)

Jump to

Keyboard shortcuts

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