Documentation ¶
Index ¶
- Constants
- Variables
- func SortTopoInst(instData []*metadata.TopoInstRst)
- type Aggregation
- type MapStrWithModelBizID
- type ModelType
- type Page
- type Query
- type SearchResult
- type SearchResults
- type Service
- func (s *Service) BatchCheckSetInstUpdateToDateStatus(ctx *rest.Contexts)
- func (s *Service) BatchCreateSet(ctx *rest.Contexts)
- func (s *Service) CheckIsBuiltInModule(kit *rest.Kit, moduleIDs ...int64) errors.CCErrorCoder
- func (s *Service) CheckIsBuiltInSet(kit *rest.Kit, setIDs ...int64) errors.CCErrorCoder
- func (s *Service) CheckSetInstUpdateToDateStatus(ctx *rest.Contexts)
- func (s *Service) CreateAssociationInst(ctx *rest.Contexts)
- func (s *Service) CreateAssociationType(ctx *rest.Contexts)
- func (s *Service) CreateBusiness(ctx *rest.Contexts)
- func (s *Service) CreateClassification(ctx *rest.Contexts)
- func (s *Service) CreateDefaultBusiness(ctx *rest.Contexts)
- func (s *Service) CreateInst(ctx *rest.Contexts)
- func (s *Service) CreateMainLineObject(ctx *rest.Contexts)
- func (s *Service) CreateModule(ctx *rest.Contexts)
- func (s *Service) CreateObject(ctx *rest.Contexts)
- func (s *Service) CreateObjectAssociation(ctx *rest.Contexts)
- func (s *Service) CreateObjectAttribute(ctx *rest.Contexts)
- func (s *Service) CreateObjectBatch(ctx *rest.Contexts)
- func (s *Service) CreateObjectGroup(ctx *rest.Contexts)
- func (s *Service) CreateObjectUnique(ctx *rest.Contexts)
- func (s *Service) CreateResourceDirectory(ctx *rest.Contexts)
- func (s *Service) CreateSet(ctx *rest.Contexts)
- func (s *Service) CreateSetTemplate(ctx *rest.Contexts)
- func (s *Service) DeleteAssociationInst(ctx *rest.Contexts)
- func (s *Service) DeleteAssociationType(ctx *rest.Contexts)
- func (s *Service) DeleteBusiness(ctx *rest.Contexts)
- func (s *Service) DeleteClassification(ctx *rest.Contexts)
- func (s *Service) DeleteInst(ctx *rest.Contexts)
- func (s *Service) DeleteInsts(ctx *rest.Contexts)
- func (s *Service) DeleteMainLineObject(ctx *rest.Contexts)
- func (s *Service) DeleteModule(ctx *rest.Contexts)
- func (s *Service) DeleteObject(ctx *rest.Contexts)
- func (s *Service) DeleteObjectAssociation(ctx *rest.Contexts)
- func (s *Service) DeleteObjectAttribute(ctx *rest.Contexts)
- func (s *Service) DeleteObjectAttributeGroup(ctx *rest.Contexts)
- func (s *Service) DeleteObjectGroup(ctx *rest.Contexts)
- func (s *Service) DeleteObjectUnique(ctx *rest.Contexts)
- func (s *Service) DeleteResourceDirectory(ctx *rest.Contexts)
- func (s *Service) DeleteSet(ctx *rest.Contexts)
- func (s *Service) DeleteSetTemplate(ctx *rest.Contexts)
- func (s *Service) DeleteSets(ctx *rest.Contexts)
- func (s *Service) DiffSetTplWithInst(ctx *rest.Contexts)
- func (s *Service) FullTextFind(ctx *rest.Contexts)
- func (s *Service) GetBusinessBasicInfo(ctx *rest.Contexts)
- func (s *Service) GetInternalModule(ctx *rest.Contexts)
- func (s *Service) GetInternalModuleWithStatistics(ctx *rest.Contexts)
- func (s *Service) GetModelStatistics(ctx *rest.Contexts)
- func (s *Service) GetResourceDirsInCloudSync(ctx *rest.Contexts) (map[int64]bool, error)
- func (s *Service) GetSetSyncDetails(ctx *rest.Contexts)
- func (s *Service) GetSetTemplate(ctx *rest.Contexts)
- func (s *Service) Healthz(req *restful.Request, resp *restful.Response)
- func (s *Service) ImportInstanceAssociation(ctx *rest.Contexts)
- func (s *Service) IsSetInitializedByTemplate(kit *rest.Kit, setID int64) (bool, errors.CCErrorCoder)
- func (s *Service) ListAllBusinessSimplify(ctx *rest.Contexts)
- func (s *Service) ListHostModelAttribute(ctx *rest.Contexts)
- func (s *Service) ListModulesByServiceTemplateID(ctx *rest.Contexts)
- func (s *Service) ListSetTemplate(ctx *rest.Contexts)
- func (s *Service) ListSetTemplateSyncHistory(ctx *rest.Contexts)
- func (s *Service) ListSetTemplateSyncStatus(ctx *rest.Contexts)
- func (s *Service) ListSetTemplateWeb(ctx *rest.Contexts)
- func (s *Service) ListSetTplRelatedSets(kit *rest.Kit, bizID int64, setTemplateID int64, ...) (*metadata.QueryConditionResult, error)
- func (s *Service) ListSetTplRelatedSetsWeb(ctx *rest.Contexts)
- func (s *Service) ListSetTplRelatedSvcTpl(ctx *rest.Contexts)
- func (s *Service) ListSetTplRelatedSvcTplWithStatistics(ctx *rest.Contexts)
- func (s *Service) SearchAssociationInst(ctx *rest.Contexts)
- func (s *Service) SearchAssociationType(ctx *rest.Contexts)
- func (s *Service) SearchAuditDetail(ctx *rest.Contexts)
- func (s *Service) SearchAuditDict(ctx *rest.Contexts)
- func (s *Service) SearchAuditList(ctx *rest.Contexts)
- func (s *Service) SearchBusiness(ctx *rest.Contexts)
- func (s *Service) SearchBusinessTopo(ctx *rest.Contexts)
- func (s *Service) SearchBusinessTopoWithStatistics(ctx *rest.Contexts)
- func (s *Service) SearchClassification(ctx *rest.Contexts)
- func (s *Service) SearchClassificationWithObjects(ctx *rest.Contexts)
- func (s *Service) SearchGroupByObject(ctx *rest.Contexts)
- func (s *Service) SearchIdentifier(ctx *rest.Contexts)
- func (s *Service) SearchInstAndAssociationDetail(ctx *rest.Contexts)
- func (s *Service) SearchInstAssociation(ctx *rest.Contexts)
- func (s *Service) SearchInstAssociationUI(ctx *rest.Contexts)
- func (s *Service) SearchInstAssociationWithOtherObject(ctx *rest.Contexts)
- func (s *Service) SearchInstByAssociation(ctx *rest.Contexts)
- func (s *Service) SearchInstByInstID(ctx *rest.Contexts)
- func (s *Service) SearchInstByObject(ctx *rest.Contexts)
- func (s *Service) SearchInstChildTopo(ctx *rest.Contexts)
- func (s *Service) SearchInstTopo(ctx *rest.Contexts)
- func (s *Service) SearchInsts(ctx *rest.Contexts)
- func (s *Service) SearchMainLineChildInstTopo(ctx *rest.Contexts)
- func (s *Service) SearchMainLineObjectTopo(ctx *rest.Contexts)
- func (s *Service) SearchModule(ctx *rest.Contexts)
- func (s *Service) SearchModuleBatch(ctx *rest.Contexts)
- func (s *Service) SearchObject(ctx *rest.Contexts)
- func (s *Service) SearchObjectAssocWithAssocKindList(ctx *rest.Contexts)
- func (s *Service) SearchObjectAssociation(ctx *rest.Contexts)
- func (s *Service) SearchObjectAttribute(ctx *rest.Contexts)
- func (s *Service) SearchObjectBatch(ctx *rest.Contexts)
- func (s *Service) SearchObjectByClassificationID(ctx *rest.Contexts)
- func (s *Service) SearchObjectTopo(ctx *rest.Contexts)
- func (s *Service) SearchObjectUnique(ctx *rest.Contexts)
- func (s *Service) SearchOwnerResourcePoolBusiness(ctx *rest.Contexts)
- func (s *Service) SearchReducedBusinessList(ctx *rest.Contexts)
- func (s *Service) SearchResourceDirectory(ctx *rest.Contexts)
- func (s *Service) SearchRuleRelatedTopoNodes(ctx *rest.Contexts)
- func (s *Service) SearchSet(ctx *rest.Contexts)
- func (s *Service) SearchSetBatch(ctx *rest.Contexts)
- func (s *Service) SearchTopoPath(ctx *rest.Contexts)
- func (s *Service) SearchTopologyNodePath(ctx *rest.Contexts)
- func (s *Service) SearchTopologyTree(ctx *rest.Contexts)
- func (s *Service) SelectObjectTopoGraphics(ctx *rest.Contexts)
- func (s *Service) SyncModuleTaskHandler(ctx *rest.Contexts)
- func (s *Service) SyncSetTplToInst(ctx *rest.Contexts)
- func (s *Service) UpdateAssociationType(ctx *rest.Contexts)
- func (s *Service) UpdateBusiness(ctx *rest.Contexts)
- func (s *Service) UpdateBusinessStatus(ctx *rest.Contexts)
- func (s *Service) UpdateClassification(ctx *rest.Contexts)
- func (s *Service) UpdateInst(ctx *rest.Contexts)
- func (s *Service) UpdateInsts(ctx *rest.Contexts)
- func (s *Service) UpdateModule(ctx *rest.Contexts)
- func (s *Service) UpdateModuleHostApplyEnableStatus(ctx *rest.Contexts)
- func (s *Service) UpdateObject(ctx *rest.Contexts)
- func (s *Service) UpdateObjectAssociation(ctx *rest.Contexts)
- func (s *Service) UpdateObjectAttribute(ctx *rest.Contexts)
- func (s *Service) UpdateObjectAttributeGroupProperty(ctx *rest.Contexts)
- func (s *Service) UpdateObjectAttributeIndex(ctx *rest.Contexts)
- func (s *Service) UpdateObjectGroup(ctx *rest.Contexts)
- func (s *Service) UpdateObjectTopoGraphics(ctx *rest.Contexts)
- func (s *Service) UpdateObjectTopoGraphicsNew(ctx *rest.Contexts)
- func (s *Service) UpdateObjectUnique(ctx *rest.Contexts)
- func (s *Service) UpdateResourceDirectory(ctx *rest.Contexts)
- func (s *Service) UpdateSet(ctx *rest.Contexts)
- func (s *Service) UpdateSetTemplate(ctx *rest.Contexts)
- func (s *Service) UpdateSetVersion(kit *rest.Kit, bizID, setID, setTemplateVersion int64) errors.CCErrorCoder
- func (s *Service) WebService() *restful.Container
Constants ¶
const ( ESIndexPrefix = "cmdb" TypeHost = "host" TypeObject = "object" TypeApplication = "biz" BkBizMetaKey = "metadata.label.bk_biz_id" )
Variables ¶
var ForbiddenModifyMainlineObjectUniqueWhiteList = []string{ common.BKInnerObjIDHost, }
var (
SpecialChar = []string{"`", "~", "!", "@", "#", "$", "%", "^", "&", "*",
"(", ")", "-", "_", "=", "+", "[", "{", "]", "}",
"\\", "|", ";", ":", "'", "\"", ",", "<", ".", ">", "/", "?"}
)
Functions ¶
func SortTopoInst ¶
func SortTopoInst(instData []*metadata.TopoInstRst)
Types ¶
type Aggregation ¶
type Aggregation struct { Key interface{} `json:"key"` Count int64 `json:"count"` }
type MapStrWithModelBizID ¶
func (*MapStrWithModelBizID) UnmarshalJSON ¶
func (m *MapStrWithModelBizID) UnmarshalJSON(data []byte) error
type ModelType ¶
type ModelType struct {
BizID int64 `json:"bk_biz_id"`
}
ModelType is model type bk_biz_id == 0 : public model bk_biz_id > 0 : private model
type Query ¶
type SearchResult ¶
type SearchResults ¶
type SearchResults struct { Total int64 `json:"total"` Aggregations []Aggregation `json:"aggregations"` Hits []SearchResult `json:"hits"` }
type Service ¶
type Service struct { Engine *backbone.Engine Core core.Core Config options.Config AuthManager *extensions.AuthManager Es *elasticsearch.EsSrv Error errors.CCErrorIf Language language.CCLanguageIf EnableTxn bool }
func (*Service) BatchCheckSetInstUpdateToDateStatus ¶
func (*Service) BatchCreateSet ¶
func (*Service) CheckIsBuiltInModule ¶
func (*Service) CheckIsBuiltInSet ¶
func (*Service) CheckSetInstUpdateToDateStatus ¶
func (*Service) CreateAssociationInst ¶
func (*Service) CreateAssociationType ¶
func (*Service) CreateBusiness ¶
CreateBusiness create a new business
func (*Service) CreateClassification ¶
CreateClassification create a new object classification
func (*Service) CreateDefaultBusiness ¶
CreateDefaultBusiness create the default business
func (*Service) CreateInst ¶
CreateInst create a new inst
func (*Service) CreateMainLineObject ¶
CreateMainLineObject create a new model in the main line topo
func (*Service) CreateModule ¶
CreateModule create a new module
func (*Service) CreateObject ¶
CreateObject create a new object
func (*Service) CreateObjectAssociation ¶
CreateObjectAssociation create a new object association
func (*Service) CreateObjectAttribute ¶
CreateObjectAttribute create a new object attribute
func (*Service) CreateObjectBatch ¶
CreateObjectBatch batch to create some objects
func (*Service) CreateObjectGroup ¶
func (*Service) CreateObjectUnique ¶
CreateObjectUnique create a new object unique
func (*Service) CreateResourceDirectory ¶
func (*Service) CreateSetTemplate ¶
func (*Service) DeleteAssociationInst ¶
func (*Service) DeleteAssociationType ¶
func (*Service) DeleteBusiness ¶
DeleteBusiness delete the business
func (*Service) DeleteClassification ¶
DeleteClassification delete the object classification
func (*Service) DeleteInst ¶
DeleteInst delete the inst
func (*Service) DeleteInsts ¶
func (*Service) DeleteMainLineObject ¶
DeleteMainLineObject delete a object int the main line topo
func (*Service) DeleteModule ¶
DeleteModule delete the module
func (*Service) DeleteObject ¶
DeleteObject delete the object
func (*Service) DeleteObjectAssociation ¶
DeleteObjectAssociation delete object association
func (*Service) DeleteObjectAttribute ¶
DeleteObjectAttribute delete the object attribute
func (*Service) DeleteObjectAttributeGroup ¶
func (*Service) DeleteObjectGroup ¶
DeleteObjectGroup delete the object group
func (*Service) DeleteObjectUnique ¶
DeleteObjectUnique delete a object unique
func (*Service) DeleteResourceDirectory ¶
func (*Service) DeleteSetTemplate ¶
func (*Service) DeleteSets ¶
func (*Service) DiffSetTplWithInst ¶
func (*Service) FullTextFind ¶
func (*Service) GetBusinessBasicInfo ¶
func (*Service) GetInternalModule ¶
func (*Service) GetInternalModuleWithStatistics ¶
func (*Service) GetModelStatistics ¶
GetModelStatistics 用于统计各个模型的实例数(Web页面展示需要)
func (*Service) GetResourceDirsInCloudSync ¶
获取云同步任务有关联的所有资源池目录
func (*Service) GetSetSyncDetails ¶
func (*Service) GetSetTemplate ¶
func (*Service) ImportInstanceAssociation ¶
ImportInstanceAssociation import instance association
func (*Service) IsSetInitializedByTemplate ¶
func (*Service) ListAllBusinessSimplify ¶
ListAllBusinessSimplify list all businesses with return only several fields
func (*Service) ListHostModelAttribute ¶
ListHostModelAttribute list host model's attributes
func (*Service) ListModulesByServiceTemplateID ¶
func (*Service) ListSetTemplate ¶
func (*Service) ListSetTemplateSyncHistory ¶
func (*Service) ListSetTemplateSyncStatus ¶
func (*Service) ListSetTemplateWeb ¶
func (*Service) ListSetTplRelatedSets ¶
func (s *Service) ListSetTplRelatedSets(kit *rest.Kit, bizID int64, setTemplateID int64, option metadata.ListSetByTemplateOption) (*metadata.QueryConditionResult, error)
ListSetTplRelatedSets get SetTemplate related sets
func (*Service) ListSetTplRelatedSetsWeb ¶
ListSetTplRelatedSetsWeb get SetTemplate related sets, just for web
func (*Service) ListSetTplRelatedSvcTpl ¶
func (*Service) ListSetTplRelatedSvcTplWithStatistics ¶
func (*Service) SearchAssociationInst ¶
func (*Service) SearchAssociationType ¶
func (*Service) SearchAuditDetail ¶
SearchAuditDetail search audit log detail by id
func (*Service) SearchAuditDict ¶
SearchAuditDict returns all audit types with their name and actions for front-end display
func (*Service) SearchAuditList ¶
SearchAuditList search audit log list, only contains information for front-end table display
func (*Service) SearchBusiness ¶
SearchBusiness search the business by condition func (s *Service) SearchBusiness(ctx *rest.Contexts) {
func (*Service) SearchBusinessTopo ¶
func (*Service) SearchBusinessTopoWithStatistics ¶
SearchBusinessTopoWithStatistics calculate how many service instances on each topo instance node
func (*Service) SearchClassification ¶
SearchClassification search the classifications
func (*Service) SearchClassificationWithObjects ¶
SearchClassificationWithObjects search the classification with objects
func (*Service) SearchGroupByObject ¶
SearchGroupByObject search the groups by the object
func (*Service) SearchIdentifier ¶
func (*Service) SearchInstAndAssociationDetail ¶
SearchInstAndAssociationDetail search the inst with association details
func (*Service) SearchInstAssociation ¶
Deprecated 2019-09-30 废弃接口
func (*Service) SearchInstAssociationUI ¶
func (*Service) SearchInstAssociationWithOtherObject ¶
SearchInstAssociationWithOtherObject 要求根据实例信息(实例的模型ID,实例ID)和模型ID(关联关系中的源,目的模型ID) 返回实例关联或者被关联模型实例得数据。
func (*Service) SearchInstByAssociation ¶
SearchInstByAssociation search inst by the association inst
func (*Service) SearchInstByInstID ¶
SearchInstByInstID search the inst by inst ID
func (*Service) SearchInstByObject ¶
SearchInstByObject search the inst of the object
func (*Service) SearchInstChildTopo ¶
SearchInstChildTopo search the child inst topo for a inst
func (*Service) SearchInstTopo ¶
SearchInstTopo search the inst topo
func (*Service) SearchInsts ¶
SearchInst search the inst
func (*Service) SearchMainLineChildInstTopo ¶
SearchMainLineChildInstTopo search the child inst topo by a inst
func (*Service) SearchMainLineObjectTopo ¶
SearchMainLineObjectTopo search the main line topo
func (*Service) SearchModule ¶
SearchModule search the modules
func (*Service) SearchModuleBatch ¶
SearchModuleBatch search the modules in one biz
func (*Service) SearchObject ¶
SearchObject search some objects by condition
func (*Service) SearchObjectAssocWithAssocKindList ¶
func (*Service) SearchObjectAssociation ¶
SearchObjectAssociation search object association by object id
func (*Service) SearchObjectAttribute ¶
SearchObjectAttribute search the object attributes
func (*Service) SearchObjectBatch ¶
SearchObjectBatch batch to search some objects
func (*Service) SearchObjectByClassificationID ¶
SearchObjectByClassificationID search the object by classification ID
func (*Service) SearchObjectTopo ¶
SearchObjectTopo search the object topo
func (*Service) SearchObjectUnique ¶
SearchObjectUnique search object uniques
func (*Service) SearchOwnerResourcePoolBusiness ¶
SearchOwnerResourcePoolBusiness search archived business by condition
func (*Service) SearchReducedBusinessList ¶
find business list with these info: 1. have any authorized resources in a business. 2. only returned with a few field for this business info.
func (*Service) SearchResourceDirectory ¶
func (*Service) SearchRuleRelatedTopoNodes ¶
func (*Service) SearchSetBatch ¶
SearchSetBatch search the sets in one biz
func (*Service) SearchTopoPath ¶
func (*Service) SearchTopologyNodePath ¶
func (*Service) SearchTopologyTree ¶
func (*Service) SelectObjectTopoGraphics ¶
func (*Service) SyncModuleTaskHandler ¶
func (*Service) SyncSetTplToInst ¶
func (*Service) UpdateAssociationType ¶
func (*Service) UpdateBusiness ¶
UpdateBusiness update the business
func (*Service) UpdateBusinessStatus ¶
UpdateBusinessStatus update the business status
func (*Service) UpdateClassification ¶
UpdateClassification update the object classification
func (*Service) UpdateInst ¶
UpdateInst update the inst
func (*Service) UpdateInsts ¶
func (*Service) UpdateModule ¶
UpdateModule update the module
func (*Service) UpdateModuleHostApplyEnableStatus ¶
func (*Service) UpdateObject ¶
UpdateObject update the object
func (*Service) UpdateObjectAssociation ¶
UpdateObjectAssociation update object association
func (*Service) UpdateObjectAttribute ¶
UpdateObjectAttribute update the object attribute
func (*Service) UpdateObjectAttributeGroupProperty ¶
UpdateObjectAttributeGroupProperty update the object attribute belongs to group information
func (*Service) UpdateObjectAttributeIndex ¶
func (*Service) UpdateObjectGroup ¶
UpdateObjectGroup update the object group information
func (*Service) UpdateObjectTopoGraphics ¶
func (*Service) UpdateObjectTopoGraphicsNew ¶
func (*Service) UpdateObjectUnique ¶
UpdateObjectUnique update a object unique
func (*Service) UpdateResourceDirectory ¶
func (*Service) UpdateSetTemplate ¶
func (*Service) UpdateSetVersion ¶
func (*Service) WebService ¶
func (s *Service) WebService() *restful.Container
WebService the web service
Source Files ¶
- association.go
- auditlog.go
- cache.go
- fulltextsearch.go
- graphics.go
- health.go
- identifier.go
- inst.go
- inst_business.go
- inst_module.go
- inst_set.go
- internal_task.go
- object.go
- object_association.go
- object_attribute.go
- object_classification.go
- object_group.go
- resource_directory.go
- service.go
- service_business_initfunc.go
- service_init_internal.go
- service_initfunc.go
- service_settemplate_initfunc.go
- set_template.go
- unique.go