Documentation
¶
Index ¶
- func AddProject2CurrentGroup(groupName, projectKey, projectDisplayName, deployType, user string) error
- func CreateProductTemplate(args *template.Product, log *zap.SugaredLogger) (err error)
- func CreateProjectCodeHost(projectName string, codehost *models.CodeHost, _ *zap.SugaredLogger) (*models.CodeHost, error)
- func CreateProjectGroup(args *ProjectGroupArgs, user string, logger *zap.SugaredLogger) error
- func CreateProjectOpenAPI(userID, username string, args *OpenAPICreateProductReq, ...) error
- func CreateVariableSet(args *CreateVariableSetRequest) error
- func DeleteCollabrationMode(productName string, userName string, log *zap.SugaredLogger) error
- func DeleteLabels(productName string, log *zap.SugaredLogger) error
- func DeleteProductTemplate(userName, productName, requestID string, isDelete bool, log *zap.SugaredLogger) (err error)
- func DeleteProductsAsync(userName, productName, requestID string, isDelete bool, log *zap.SugaredLogger) error
- func DeleteProjectCodeHost(projectName string, id int, _ *zap.SugaredLogger) error
- func DeleteProjectGroup(name string, logger *zap.SugaredLogger) error
- func DeleteProjectOpenAPI(userName, requestID, projectName string, isDelete bool, ...) error
- func DeleteScanningModules(productName string, log *zap.SugaredLogger) error
- func DeleteTestModules(productName, requestID string, log *zap.SugaredLogger) error
- func DeleteVariableSet(id, projectName string, log *zap.SugaredLogger) error
- func GetAvailableCodehostList(projectName, encryptedKey string, log *zap.SugaredLogger) ([]*models.CodeHost, error)
- func GetBizDirProjectServices(projectName string) ([]string, error)
- func GetGlobalVariables(productName string, production bool, log *zap.SugaredLogger) ([]*commontypes.ServiceVariableKV, error)
- func GetProductTemplateServices(productName string, envType types.EnvType, isBaseEnv bool, baseEnvName string, ...) (*template.Product, error)
- func GetProjectCodeHost(id int, projectName string, ignoreDelete bool, _ *zap.SugaredLogger) (*models.CodeHost, error)
- func GetProjectCodehostList(projectName, encryptedKey, address, owner, source string, ...) ([]*models.CodeHost, error)
- func GetUnGroupedProjectKeys() ([]string, error)
- func GetVariableSet(idStr string, log *zap.SugaredLogger) (*commonmodels.VariableSet, error)
- func InitializeYAMLProject(userID, username, requestID string, args *OpenAPIInitializeProjectReq, ...) error
- func ListProjectGroupNames() ([]string, error)
- func ListProjects(opts *ProjectListOptions, logger *zap.SugaredLogger) (interface{}, error)
- func OpenAPIGetGlobalVariables(projectName string, logger *zap.SugaredLogger) (*commontypes.GlobalVariables, error)
- func OpenAPIInitializeHelmProject(userID, username, requestID string, args *OpenAPIInitializeProjectReq, ...) error
- func TransferHostProject(user, projectName string, log *zap.SugaredLogger) (err error)
- func UpdateCodeHostByToken(host *models.CodeHost, _ *zap.SugaredLogger) (*models.CodeHost, error)
- func UpdateCustomMatchRules(productName, userName, requestID string, matchRules []*ImageParseData) error
- func UpdateGlobalVariables(productName, userName string, globalVariables []*commontypes.ServiceVariableKV, ...) error
- func UpdateProductTemplate(name string, args *template.Product, log *zap.SugaredLogger) (err error)
- func UpdateProductTmplStatus(productName, onboardingStatus string, log *zap.SugaredLogger) (err error)
- func UpdateProductionServiceOrchestration(name string, services [][]string, updateBy string, log *zap.SugaredLogger) (err error)
- func UpdateProject(name string, args *template.Product, log *zap.SugaredLogger) (err error)
- func UpdateProjectGroup(args *ProjectGroupArgs, user string, logger *zap.SugaredLogger) error
- func UpdateProjectSystemCodeHost(projectName string, host *models.CodeHost, _ *zap.SugaredLogger) (*models.CodeHost, error)
- func UpdateServiceOrchestration(name string, services [][]string, updateBy string, log *zap.SugaredLogger) (err error)
- func UpdateVariableSet(args *CreateVariableSetRequest, requestID string, log *zap.SugaredLogger) error
- type ContainerInfo
- type CreateVariableSetRequest
- type CustomParseDataArgs
- type EnvDefinition
- type EnvInfo
- type GetBizDirServiceDetailResponse
- type GetGlobalVariableCandidatesRespone
- type GroupDetail
- type ImageParseData
- type OpenAPICreateProductReq
- type OpenAPIInitializeProjectReq
- type OpenAPIListProjectReq
- type OpenAPIProjectDetailResp
- type OpenAPIProjectListResp
- type ProductInfo
- type ProjectBrief
- type ProjectBriefRepresentation
- type ProjectBriefResponse
- type ProjectDetailedRepresentation
- type ProjectDetailedResponse
- type ProjectGroupArgs
- type ProjectGroupPreset
- type ProjectGroupRelation
- type ProjectListOptions
- type ProjectMinimalRepresentation
- type QueryVerbosity
- type SearchBizDirByServiceGroup
- type SearchBizDirByServiceProject
- type Service
- type ServiceDefinition
- type ServiceInfo
- type VariableSetFindOption
- type VariableSetListResp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddProject2CurrentGroup ¶
func CreateProductTemplate ¶
func CreateProductTemplate(args *template.Product, log *zap.SugaredLogger) (err error)
CreateProductTemplate 创建产品模板
func CreateProjectCodeHost ¶
func CreateProjectGroup ¶
func CreateProjectGroup(args *ProjectGroupArgs, user string, logger *zap.SugaredLogger) error
func CreateProjectOpenAPI ¶
func CreateProjectOpenAPI(userID, username string, args *OpenAPICreateProductReq, logger *zap.SugaredLogger) error
func CreateVariableSet ¶
func CreateVariableSet(args *CreateVariableSetRequest) error
func DeleteCollabrationMode ¶
func DeleteCollabrationMode(productName string, userName string, log *zap.SugaredLogger) error
func DeleteLabels ¶
func DeleteLabels(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 DeleteProjectCodeHost ¶
func DeleteProjectCodeHost(projectName string, id int, _ *zap.SugaredLogger) error
func DeleteProjectGroup ¶
func DeleteProjectGroup(name string, logger *zap.SugaredLogger) error
func DeleteProjectOpenAPI ¶
func DeleteProjectOpenAPI(userName, requestID, projectName string, isDelete bool, logger *zap.SugaredLogger) error
func DeleteScanningModules ¶
func DeleteScanningModules(productName string, log *zap.SugaredLogger) error
func DeleteTestModules ¶
func DeleteTestModules(productName, requestID string, log *zap.SugaredLogger) error
func DeleteVariableSet ¶
func DeleteVariableSet(id, projectName string, log *zap.SugaredLogger) error
func GetGlobalVariables ¶
func GetGlobalVariables(productName string, production bool, log *zap.SugaredLogger) ([]*commontypes.ServiceVariableKV, error)
func GetProjectCodeHost ¶
func GetProjectCodehostList ¶
func GetUnGroupedProjectKeys ¶
func GetVariableSet ¶
func GetVariableSet(idStr string, log *zap.SugaredLogger) (*commonmodels.VariableSet, error)
func InitializeYAMLProject ¶
func InitializeYAMLProject(userID, username, requestID string, args *OpenAPIInitializeProjectReq, logger *zap.SugaredLogger) error
func ListProjectGroupNames ¶
func ListProjects ¶
func ListProjects(opts *ProjectListOptions, logger *zap.SugaredLogger) (interface{}, error)
func OpenAPIGetGlobalVariables ¶
func OpenAPIGetGlobalVariables(projectName string, logger *zap.SugaredLogger) (*commontypes.GlobalVariables, error)
func OpenAPIInitializeHelmProject ¶
func OpenAPIInitializeHelmProject(userID, username, requestID string, args *OpenAPIInitializeProjectReq, logger *zap.SugaredLogger) error
func TransferHostProject ¶
func TransferHostProject(user, projectName string, log *zap.SugaredLogger) (err error)
func UpdateCodeHostByToken ¶
func UpdateCustomMatchRules ¶
func UpdateCustomMatchRules(productName, userName, requestID string, matchRules []*ImageParseData) error
func UpdateGlobalVariables ¶
func UpdateGlobalVariables(productName, userName string, globalVariables []*commontypes.ServiceVariableKV, production bool) error
func UpdateProductTemplate ¶
UpdateProductTemplate 更新产品模板
func UpdateProductTmplStatus ¶
func UpdateProductTmplStatus(productName, onboardingStatus string, log *zap.SugaredLogger) (err error)
UpdateProductTmplStatus 更新项目onboarding状态
func UpdateProject ¶
UpdateProject 更新项目
func UpdateProjectGroup ¶
func UpdateProjectGroup(args *ProjectGroupArgs, user string, logger *zap.SugaredLogger) error
func UpdateVariableSet ¶
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 CustomParseDataArgs ¶
type CustomParseDataArgs struct {
Rules []*ImageParseData `json:"rules"`
}
type EnvDefinition ¶
type GetBizDirServiceDetailResponse ¶
type GetBizDirServiceDetailResponse struct {
ProjectName string `json:"project_name"`
EnvName string `json:"env_name"`
Production bool `json:"production"`
Name string `json:"name"`
Type string `json:"type"`
Status string `json:"status"`
Images []string `json:"images"`
ChartVersion string `json:"chart_version"`
UpdateTime int64 `json:"update_time"`
Error string `json:"error"`
}
func GetBizDirServiceDetail ¶
func GetBizDirServiceDetail(projectName, serviceName string) ([]GetBizDirServiceDetailResponse, error)
type GetGlobalVariableCandidatesRespone ¶
type GetGlobalVariableCandidatesRespone struct {
KeyName string `json:"key_name"`
RelatedService []string `json:"related_service"`
}
func GetGlobalVariableCandidates ¶
func GetGlobalVariableCandidates(productName string, production bool, log *zap.SugaredLogger) ([]*GetGlobalVariableCandidatesRespone, error)
type GroupDetail ¶
type GroupDetail struct {
GroupName string `json:"group_name"`
Projects []*commonmodels.ProjectDetail `json:"projects"`
}
func GetBizDirProject ¶
func GetBizDirProject() ([]GroupDetail, error)
func SearchBizDirByProject ¶
func SearchBizDirByProject(projectKeyword string) ([]GroupDetail, error)
type ImageParseData ¶
type ImageParseData struct {
Repo string `json:"repo,omitempty"`
Namespace string `json:"namespace,omitempty"`
Image string `json:"image,omitempty"`
Tag string `json:"tag,omitempty"`
InUse bool `json:"inUse,omitempty"`
PresetId int `json:"presetId,omitempty"`
}
func GetCustomMatchRules ¶
func GetCustomMatchRules(productName string, log *zap.SugaredLogger) ([]*ImageParseData, error)
type OpenAPICreateProductReq ¶
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 ¶
func (req OpenAPICreateProductReq) Validate() error
type OpenAPIInitializeProjectReq ¶
type OpenAPIInitializeProjectReq struct {
ProjectName string `json:"project_name"`
ProjectKey string `json:"project_key"`
IsPublic bool `json:"is_public"`
Description string `json:"description"`
ServiceList []*ServiceDefinition `json:"service_list"`
EnvList []*EnvDefinition `json:"env_list"`
}
func (OpenAPIInitializeProjectReq) Validate ¶
func (req OpenAPIInitializeProjectReq) Validate() error
type OpenAPIListProjectReq ¶
type OpenAPIProjectDetailResp ¶
type OpenAPIProjectDetailResp struct {
ProjectName string `json:"project_name"`
ProjectKey string `json:"project_key"`
IsPublic bool `json:"is_public"`
Desc string `json:"desc"`
DeployType string `json:"deploy_type"`
CreateTime int64 `json:"create_time"`
CreatedBy string `json:"created_by"`
}
func GetProjectDetailOpenAPI ¶
func GetProjectDetailOpenAPI(projectName string, logger *zap.SugaredLogger) (*OpenAPIProjectDetailResp, error)
type OpenAPIProjectListResp ¶
type OpenAPIProjectListResp struct {
Total int `json:"total"`
Projects []*ProjectBrief `json:"projects"`
}
func ListProjectOpenAPI ¶
func ListProjectOpenAPI(authorizedProjectList []string, pageSize, pageNum int64, logger *zap.SugaredLogger) (*OpenAPIProjectListResp, 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 ProjectBrief ¶
type ProjectBriefRepresentation ¶
type ProjectBriefRepresentation struct {
*ProjectMinimalRepresentation
Envs []string `json:"envs"`
}
type ProjectBriefResponse ¶
type ProjectBriefResponse struct {
ProjectBriefRepresentation []*ProjectBriefRepresentation `json:"projects"`
Total int `json:"total"`
}
type ProjectDetailedResponse ¶
type ProjectDetailedResponse struct {
ProjectDetailedRepresentation []*ProjectDetailedRepresentation `json:"projects"`
Total int `json:"total"`
}
type ProjectGroupArgs ¶
type ProjectGroupArgs struct {
GroupID string `json:"group_id"`
GroupName string `json:"group_name"`
ProjectKeys []string `json:"project_keys"`
}
func (*ProjectGroupArgs) Validate ¶
func (args *ProjectGroupArgs) Validate() error
type ProjectGroupPreset ¶
type ProjectGroupPreset struct {
GroupID string `json:"group_id"`
GroupName string `json:"group_name"`
Projects []*ProjectGroupRelation `json:"projects"`
}
func GetProjectGroupRelation ¶
func GetProjectGroupRelation(name string, logger *zap.SugaredLogger) (resp *ProjectGroupPreset, err error)
type ProjectGroupRelation ¶
type ProjectListOptions ¶
type ProjectMinimalRepresentation ¶
type ProjectMinimalRepresentation struct {
Name string `json:"name"`
}
type QueryVerbosity ¶
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 SearchBizDirByServiceGroup ¶
type SearchBizDirByServiceGroup struct {
GroupName string `json:"group_name"`
Projects []*SearchBizDirByServiceProject `json:"projects"`
}
func SearchBizDirByService ¶
func SearchBizDirByService(serviceName string) ([]*SearchBizDirByServiceGroup, error)
type SearchBizDirByServiceProject ¶
type SearchBizDirByServiceProject struct {
Project *commonmodels.ProjectDetail `json:"project"`
Services []string `json:"services"`
}
type ServiceDefinition ¶
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 ¶
type VariableSetListResp ¶
type VariableSetListResp struct {
VariableSetList []*commonmodels.VariableSet `json:"variable_set_list"`
Total int64 `json:"total"`
}
func ListVariableSets ¶
func ListVariableSets(option *VariableSetFindOption, log *zap.SugaredLogger) (*VariableSetListResp, error)
Click to show internal directories.
Click to hide internal directories.