Documentation ¶
Index ¶
Constants ¶
const ( TransDataStatusPreFormal = "pre_formal" TransDataStatusPreDelete = "pre_delete" )
const ( // HTTPCreate create method HTTPCreate = "POST" // HTTPSelectPost select method HTTPSelectPost = "POST" // HTTPSelectGet select method HTTPSelectGet = "GET" // HTTPUpdate update method HTTPUpdate = "PUT" // HTTPDelete delete method HTTPDelete = "DELETE" // BKTrue the true definition BKTrue = 1 // BKFalse the false definition BKFalse = 2 // BKNoLimit no limit definition BKNoLimit = 999999999 // BKDefaultLimit the default limit definition BKDefaultLimit = 20 // BKParent the parent code BKParent = 1 // BKChild the child code BKChild = 2 // BKParentStr the parent name BKParentStr = "bk_parentid" // BKChildStr the child name BKChildStr = "bk_childid" // BKInstParentStr the inst parent name BKInstParentStr = "bk_parent_id" // BKDefaultOwnerID the default owner value BKDefaultOwnerID = "0" // BKDefaultSupplierID the default owner id BKDefaultSupplierID = 0 // BKDefaultDirSubArea the default dir subarea BKDefaultDirSubArea = 0 // BKTimeTypeParseFlag the time flag BKTimeTypeParseFlag = "cc_time_type" // BKTopoBusinessLevelLimit the mainline topo level limit BKTopoBusinessLevelLimit = "level.businessTopoMax" // BKTopoBusinessLevelDefault the mainline topo level default level BKTopoBusinessLevelDefault = 6 )
const ( // BKInnerObjIDApp the inner object BKInnerObjIDApp = "biz" // BKInnerObjIDSet the inner object BKInnerObjIDSet = "set" // BKInnerObjIDModule the inner object BKInnerObjIDModule = "module" // BKInnerObjIDHost the inner object BKInnerObjIDHost = "host" // BKINnerObjIDObject the inner object BKINnerObjIDObject = "object" // BKInnerObjIDProc the inner object BKInnerObjIDProc = "process" // BKInnerObjIDPlat the inner object BKInnerObjIDPlat = "plat" // BKInnerObjIDSwitch the inner object BKInnerObjIDSwitch = "bk_switch" // BKInnerObjIDRouter the inner object BKInnerObjIDRouter = "bk_router" // BKInnerObjIDBlance the inner object BKInnerObjIDBlance = "bk_load_balance" // BKInnerObjIDFirewall the inner object BKInnerObjIDFirewall = "bk_firewall" // BKInnerObjIDWeblogic the inner object BKInnerObjIDWeblogic = "bk_weblogic" // BKInnerObjIDTomcat the inner object BKInnerObjIDTomcat = "bk_tomcat" // BKInnerObjIDApache the inner object BKInnerObjIDApache = "bk_apache" )
const ( RevisionEnterprise = "enterprise" RevisionCommunity = "community" RevisionOpensource = "opensource" )
Revision
const ( // BKDBIN the db operator BKDBIN = "$in" // BKDBOR the db operator BKDBOR = "$or" // BKDBLIKE the db operator BKDBLIKE = "$regex" // BKDBEQ the db operator BKDBEQ = "$eq" // BKDBNE the db operator BKDBNE = "$ne" // BKDBNIN the db oeprator BKDBNIN = "$nin" // BKDBLT the db operator BKDBLT = "$lt" // BKDBLTE the db operator BKDBLTE = "$lte" // BKDBGT the db operator BKDBGT = "$gt" // BKDBGTE the db opeartor BKDBGTE = "$gte" // BKDBSortFieldSep the db sort field split char BKDBSortFieldSep = "," )
const ( // DefaultResModuleName the default idle module name DefaultResModuleName string = "空闲机" // DefaultFaultModuleName the default fault module name DefaultFaultModuleName string = "故障机" )
const ( // BKFIeldID the id definition BKFieldID = "id" // BKDefaultField the default field BKDefaultField = "default" // BKOwnerIDField the owner field BKOwnerIDField = "bk_supplier_account" // BKSupplierIDField the supplier id field BKSupplierIDField = "bk_supplier_id" // BKAppIDField the appid field BKAppIDField = "bk_biz_id" // BKHostInnerIPField the host innerip field BKHostInnerIPField = "bk_host_innerip" // BKHostOuterIPField the host outerip field BKHostOuterIPField = "bk_host_outerip" // BKHostIDField the host id field BKHostIDField = "bk_host_id" // BKHostNameField the host name field BKHostNameField = "bk_host_name" // BKAppNameField the app name field BKAppNameField = "bk_biz_name" // BKSetIDField the setid field BKSetIDField = "bk_set_id" // BKSetNameField the set name field BKSetNameField = "bk_set_name" // BKModuleIDField the module id field BKModuleIDField = "bk_module_id" // BKModuleNameField the module name field BKModuleNameField = "bk_module_name" // BKSubscriptionIDField the subscription id field BKSubscriptionIDField = "subscription_id" // BKOSTypeField the os type field BKOSTypeField = "bk_os_type" // BKOSNameField the os name field BKOSNameField = "bk_os_name" // BKCloudIDField the cloud id field BKCloudIDField = "bk_cloud_id" // BKCloudNameField the cloud name field BKCloudNameField = "bk_cloud_name" // BKObjIDField the obj id field BKObjIDField = "bk_obj_id" // BKObjNameField the obj name field BKObjNameField = "bk_obj_name" // BKObjIconField the obj icon field BKObjIconField = "bk_obj_icon" // BKInstIDField the inst id field BKInstIDField = "bk_inst_id" // BKInstNameField the inst name field BKInstNameField = "bk_inst_name" // BKProcIDField the proc id field BKProcIDField = "bk_process_id" // BKProcNameField the proc name field BKProcNameField = "bk_process_name" // BKPropertyIDField the propety id field BKPropertyIDField = "bk_property_id" // BKPropertyNameField the property name field BKPropertyNameField = "bk_property_name" // BKPropertyTypeField the property type field BKPropertyTypeField = "bk_property_type" BKPropertyGroupField = "bk_property_group" // BKPropertyValueField the property value field BKPropertyValueField = "bk_property_value" // BKObjAttIDField the obj att id field BKObjAttIDField = "bk_object_att_id" // BKClassificationIDField the classification id field BKClassificationIDField = "bk_classification_id" // BKClassificationNameField the classification name field BKClassificationNameField = "bk_classification_name" // BKClassificationIconField the classification icon field BKClassificationIconField = "bk_classification_icon" // BKPropertyGroupIDField the property group id field BKPropertyGroupIDField = "bk_group_id" // BKPropertyGroupNameField the property group name field BKPropertyGroupNameField = "bk_group_name" // BKPropertyGroupIndexField the property group index field BKPropertyGroupIndexField = "bk_group_index" // BKAsstObjIDField the property obj id field BKAsstObjIDField = "bk_asst_obj_id" // BKAsstInstIDField the property inst id field BKAsstInstIDField = "bk_asst_inst_id" // BKOptionField the option field BKOptionField = "option" // BKPrivilegeField the privilege field BKPrivilegeField = "privilege" // BKUserGroupIDField the group id field BKUserGroupIDField = "group_id" // BKUserListField the user list field BKUserListField = "user_list" // BKContentField the content field BKContentField = "content" // BKExtKeyField the ext key field BKExtKeyField = "ext_key" // BKOpDescField the op desc field BKOpDescField = "op_desc" // BKOpTypeField the op type field BKOpTypeField = "op_type" // BKOpTargetField the op target field BKOpTargetField = "op_target" // BKOpTimeField the op time field BKOpTimeField = "op_time" // BKSetEnvField the set env field BKSetEnvField = "bk_set_env" // BKSetStatusField the set status field BKSetStatusField = "bk_service_status" // BKSetDescField the set desc field BKSetDescField = "bk_set_desc" // BKSetCapacityField the set capacity field BKSetCapacityField = "bk_capacity" // BKPort the port BKPort = "port" // BKUser the user BKUser = "user" // BKProtocol the protocol BKProtocol = "protocol" // BKProcessIDField the process id field BKProcessIDField = "bk_process_id" // BKProcessNameField the process name field BKProcessNameField = "bk_process_name" // BKFuncIDField the func id field BKFuncIDField = "bk_func_id" // BKFuncName the function name BKFuncName = "bk_func_name" // BKBindIP the bind ip BKBindIP = "bind_ip" // BKWorkPath the work path BKWorkPath = "work_path" // BKIsPre the ispre field BKIsPre = "ispre" // bkIsOnly the isonly field, is primary key BKIsOnly = "isonly" // BKIsIncrementField the isincrement field BKIsIncrementField = "is_increment" // BKProxyListField the proxy list field BKProxyListField = "bk_proxy_list" // BKIPListField the ip list field BKIPListField = "ip_list" // BKInvalidIPSField the invalid ips field BKInvalidIPSField = "invalid_ips" // BKGseProxyField the gse proxy BKGseProxyField = "bk_gse_proxy" // BKSubAreaField the sub area field BKSubAreaField = "bk_cloud_id" // BKProcField the proc field BKProcField = "bk_process" // BKMaintainersField the maintainers field BKMaintainersField = "bk_biz_maintainer" // BKProductPMField the product pm field BKProductPMField = "bk_biz_productor" // BKTesterField the tester field BKTesterField = "bk_biz_tester" // BKOperatorField the operator field BKOperatorField = "operator" // the operator of app of module, is means a job position // BKLifeCycleField the life cycle field BKLifeCycleField = "life_cycle" // BKDeveloperField the developer field BKDeveloperField = "bk_biz_developer" // BKLanguageField the language field BKLanguageField = "language" // BKBakOperatorField the bak operator field BKBakOperatorField = "bk_bak_operator" // BKTimeZoneField the time zone field BKTimeZoneField = "time_zone" // BKIsRequiredField the required field BKIsRequiredField = "isrequired" // BKModuleTypeField the module type field BKModuleTypeField = "bk_module_type" // BKOrgIPField the org ip field BKOrgIPField = "bk_org_ip" // BKDstIPField the dst ip field BKDstIPField = "bk_dst_ip" // BKDescriptionField the description field BKDescriptionField = "description" // BKIsOnlyField the isonly name field BKIsOnlyField = "isonly" // BKInstKeyField the inst key field for metric discover BKInstKeyField = "bk_inst_key" )
const ( // CreatorField the creator CreatorField = "creator" // CreateTimeField the create time field CreateTimeField = "create_time" // ModifierField the modifier field ModifierField = "modifier" // LastTimeField the last time field LastTimeField = "last_time" )
the inst record's logging information
const ( // ValidCreate valid create ValidCreate = "create" // ValidUpdate valid update ValidUpdate = "update" )
const ( // DefaultResModuleFlag the default resource module flag DefaultResModuleFlag int = 1 // DefaultFaultModuleFlag the default fault module flag DefaultFaultModuleFlag int = 2 )
const ( // FieldTypeSingleChar the single char filed type FieldTypeSingleChar string = "singlechar" // FieldTypeLongChar the long char field type FieldTypeLongChar string = "longchar" // FieldTypeInt the int field type FieldTypeInt string = "int" // FieldTypeEnum the enum field type FieldTypeEnum string = "enum" // FieldTypeDate the date field type FieldTypeDate string = "date" // FieldTypeTime the time field type FieldTypeTime string = "time" // FieldTypeUser the user field type FieldTypeUser string = "objuser" // FieldTypeSingleAsst the single association FieldTypeSingleAsst string = "singleasst" // FieldTypeMultiAsst the multi association FieldTypeMultiAsst string = "multiasst" // FieldTypeTimeZone the timezone field type FieldTypeTimeZone string = "timezone" // FieldTypeBool the bool type FieldTypeBool string = "bool" // FieldTypeSingleLenChar the single char length limit FieldTypeSingleLenChar int = 48 // FieldTypeLongLenChar the long char length limit FieldTypeLongLenChar int = 512 )
const ( // HostAddMethodExcel add a host method HostAddMethodExcel = "1" // HostAddMethodAgent add a agent method HostAddMethodAgent = "2" // HostAddMethodAPI add api method HostAddMethodAPI = "3" // HostAddMethodExcelIndexOffset the height of the table header HostAddMethodExcelIndexOffset = 3 // ExcelHeaderFirstRowColor cell bg color ExcelHeaderFirstRowColor = "FF92D050" // ExcelHeaderFirstRowFontColor font color ExcelHeaderFirstRowFontColor = "00000000" // ExcelHeaderFirstRowRequireFontColor require font color ExcelHeaderFirstRowRequireFontColor = "FFFF0000" // ExcelHeaderOtherRowColor cell bg color ExcelHeaderOtherRowColor = "FFC6EFCE" // ExcelHeaderOtherRowFontColor font color ExcelHeaderOtherRowFontColor = "FF000000" // ExcelCellDefaultBorderColor black color ExcelCellDefaultBorderColor = "FFD4D4D4" // ExcelAsstPrimaryKeySplitChar split char ExcelAsstPrimaryKeySplitChar = "##" // ExcelAsstPrimaryKeyRowChar split char ExcelAsstPrimaryKeyRowChar = "\n" // ExcelDelAsstObjectRelation delete asst object relation ExcelDelAsstObjectRelation = "/" // ExcelDataValidationListLen excel dropdown list item count ExcelDataValidationListLen = 50 // ExcelCommentSheetCotentLangPrefixKey excel comment sheet centent language prefixe key ExcelCommentSheetCotentLangPrefixKey = "import_comment" )
const ( // InputTypeExcel data from excel InputTypeExcel = "excel" // InputTypeApiHostSync data from api for synchronize new host InputTypeApiNewHostSync = "api_sync_host" // BatchHostAddMaxRow batch sync add host max row BatchHostAddMaxRow = 128 )
const ( // BKTableNameProcModule the table name of the process module BKTableNameProcModule = "cc_Proc2Module" // BKTableNamePrivilege the table name of the privilege module BKTableNamePrivilege = "cc_Privilege" // BKTableNameUserGroup the table name of the user group module BKTableNameUserGroup = "cc_UserGroup" // BKTableNameUserGroupPrivilege the table name of the user group privilege BKTableNameUserGroupPrivilege = "cc_UserGroupPrivilege" // BKTableNamePropertyGroup the table name of the property group BKTableNamePropertyGroup = "cc_PropertyGroup" // BKTableNameObjDes the table name of the object BKTableNameObjDes = "cc_ObjDes" // BKTableNameObjAttDes the table name of the object attribute BKTableNameObjAttDes = "cc_ObjAttDes" // BKTableNameObjClassifiction the table name of the object classification BKTableNameObjClassifiction = "cc_ObjClassification" // BKTableNameInstAsst the table name of the inst association BKTableNameInstAsst = "cc_InstAsst" BKTableNameBaseApp = "cc_ApplicationBase" BKTableNameBaseHost = "cc_HostBase" BKTableNameBaseModule = "cc_ModuleBase" BKTableNameBaseInst = "cc_ObjectBase" BKTableNameBasePlat = "cc_PlatBase" BKTableNameBaseSet = "cc_SetBase" BKTableNameBaseProcess = "cc_Process" BKTableNameModuleHostConfig = "cc_ModuleHostConfig" )
table names
const ( // HTTPBKAPIErrorMessage apiserver error message HTTPBKAPIErrorMessage = "bk_error_msg" // HTTPBKAPIErrorCode apiserver error code HTTPBKAPIErrorCode = "bk_error_code" )
const ( // CCSystemOperatorUserName the system user CCSystemOperatorUserName = "cc_system" CCSystemCollectorUserName = "cc_collector" )
const ( // LocalHostName the local host name definition LocalHostName = "localhost" // LocalHostIP the local host ip definition LocalHostIP = "127.0.0.1" )
const ( // BKHTTPHeaderUser current request http request header fields name for login user BKHTTPHeaderUser = "BK_User" // BKHTTPLanguage the language key word BKHTTPLanguage = "HTTP_BLUEKING_LANGUAGE" // BKHTTPOwnerID the owner id BKHTTPOwnerID = "HTTP_BLUEKING_SUPPLIER_ID" //BKHTTPOwnerID = "HTTP_BLUEKING_OWNERID" BKHTTPCookieLanugageKey = "blueking_language" BKSessionLanugageKey = "language" )
const ( HostOSTypeEnumLinux = "1" HostOSTypeEnumWindows = "2" )
Host OS type enumeration value
const ( MaxUint64 = ^uint64(0) MinUint64 = 0 MaxInt64 = int64(MaxUint64 >> 1) MinInt64 = -MaxInt64 - 1 MaxUint = ^uint(0) MinUint = 0 MaxInt = int(MaxUint >> 1) MinInt = -MaxInt - 1 )
integer const
const ( // CCSystemBusy the system is busy CCSystemBusy = -1 CCSuccess = 0 CCSuccessStr = "success" // CCErrCommJSONUnmarshalFailed JSON deserialization failed CCErrCommJSONUnmarshalFailed = 1199000 // CCErrCommJSONMarshalFailed JSON serialization failed CCErrCommJSONMarshalFailed = 1199001 // CCErrCommHTTPDoRequestFailed the HTTP Request failed CCErrCommHTTPDoRequestFailed = 1199002 // CCErrCommHTTPInputInvalid the input parameter is invalid, and the parameter here refers to the URL or Query parameter CCErrCommHTTPInputInvalid = 1199003 // CCErrCommHTTPReadBodyFailed unable to read HTTP request body data CCErrCommHTTPReadBodyFailed = 1199004 // CCErrCommHTTPBodyEmpty HTTP request body data is not set CCErrCommHTTPBodyEmpty = 1199005 // CCErrCommParamsInvalid parameter validation in the body is not paased CCErrCommParamsInvalid = 1199006 // CCErrCommParamsNeedString the parameter must be of type string CCErrCommParamsNeedString = 1199007 // CCErrCommParamsLostField the prameter not specified CCErrCommParamsLostField = 1199008 // CCErrCommParamsNeedInt the parameter must be of tyep int CCErrCommParamsNeedInt = 1199009 // CCErrCommParamsNeedSet the parameter unassigned CCErrCommParamsNeedSet = 1199010 // CCErrCommParamsIsInvalid the parameter is invalid or nonexistent CCErrCommParamsIsInvalid = 1199011 // CCErrCommUniqueCheckFailed the uniqueness validation fails CCErrCommUniqueCheckFailed = 1199012 // CCErrCommParseDataFailed failed to read data from data field CCErrCommParseDataFailed = 1199013 // CCErrCommDuplicateItem duplicate data CCErrCommDuplicateItem = 1199014 // CCErrCommOverLimit data length exceeds limit CCErrCommOverLimit = 1199015 // CCErrFieldRegValidFailed regular verification failed CCErrFieldRegValidFailed = 1199016 // CCErrCommDBSelectFailed database query failed CCErrCommDBSelectFailed = 1199017 // CCErrCommDBInsertFailed database cannot add data CCErrCommDBInsertFailed = 1199018 //CCErrCommNotFound the goal does not exist CCErrCommNotFound = 1199019 //CCErrCommDBUpdateFailed database cannot update data CCErrCommDBUpdateFailed = 1199020 //CCErrCommDBDeleteFailed database cannot delete data CCErrCommDBDeleteFailed = 1199021 //CCErrCommRelyOnServerAddressFailed dependent service did not start CCErrCommRelyOnServerAddressFailed = 1199022 //CCErrCommExcelTemplateFailed unable to generate and download CCErrCommExcelTemplateFailed = 1199023 // CCErrCommParamsNeedTimeZone the parameter must be time zone type CCErrCommParamsNeedTimeZone = 1199024 // CCErrCommParamsNeedBool the parameter must be bool type CCErrCommParamsNeedBool = 1199025 // CCErrCommConfMissItem missing configuration item CCErrCommConfMissItem = 1199026 // CCErrCommNotAuthItem failed to get authorization information CCErrCommNotAuthItem = 1199027 // CCErrCommNotAuthItem field valide failed CCErrCommFieldNotValid = 1199028 //CCErrCommReplyDataFormatError Return data format error CCErrCommReplyDataFormatError = 1199029 //CCErrCommReplyDataFormatError Return data format error CCErrCommPostInputParseError = 1199030 // CCErrCommResourceInitFailed %s init failed CCErrCommResourceInitFailed = 1199031 // CCErrCommParams should be string CCErrCommParamsShouldBeString = 1199032 // CCErrCommSearchPropertyFailed get object property fields error CCErrCommSearchPropertyFailed = 1199033 // CCErrCommParamsShouldBeEnum set enum CCErrCommParamsShouldBeEnum = 1199034 // CCErrCommXXExceedLimit xx exceed limit number CCErrCommXXExceedLimit = 1199035 // toposerver 1101XXX // CCErrTopoInstCreateFailed unable to create the instance CCErrTopoInstCreateFailed = 1101000 // CCErrTopoInstDeleteFailed unable to delete the instance CCErrTopoInstDeleteFailed = 1101001 // CCErrTopoInstUpdateFailed unable to update the instance CCErrTopoInstUpdateFailed = 1101002 // CCErrTopoInstSelectFailed unable to search the instance CCErrTopoInstSelectFailed = 1101003 // CCErrTopoModuleCreateFailed unable to create a module CCErrTopoModuleCreateFailed = 1101004 // CCErrTopoModuleDeleteFailed unable to delete a module CCErrTopoModuleDeleteFailed = 1101005 // CCErrTopoModuleUpdateFailed unable to update a module CCErrTopoModuleUpdateFailed = 1101006 // CCErrTopoModuleSelectFailed unable to select a module CCErrTopoModuleSelectFailed = 1101007 // CCErrTopoSetCreateFailed unable to create a set CCErrTopoSetCreateFailed = 1101008 // CCErrTopoSetDeleteFailed unable to delete a set CCErrTopoSetDeleteFailed = 1101009 // CCErrTopoSetUpdateFailed unable to update a set CCErrTopoSetUpdateFailed = 1101010 // CCErrTopoSetSelectFailed unable to select a set CCErrTopoSetSelectFailed = 1101011 // CCErrTopoInstHasHostChild include hosts CCErrTopoInstHasHostChild = 1101012 // CCErrTopoObjectCreateFailed unable to create a object CCErrTopoObjectCreateFailed = 1101013 // CCErrTopoObjectDeleteFailed unable to delete a object CCErrTopoObjectDeleteFailed = 1101014 // CCErrTopoObjectUpdateFailed unable to update a object CCErrTopoObjectUpdateFailed = 1101015 // CCErrTopoObjectSelectFailed unable to select a object CCErrTopoObjectSelectFailed = 1101016 // CCErrTopoObjectAttributeCreateFailed unable to create a object attribute CCErrTopoObjectAttributeCreateFailed = 1101017 // CCErrTopoObjectAttributeDeleteFailed unable to delete a object attribute CCErrTopoObjectAttributeDeleteFailed = 1101018 // CCErrTopoObjectAttributeUpdateFailed unable to update a object attribute CCErrTopoObjectAttributeUpdateFailed = 1101019 // CCErrTopoObjectAttributeSelectFailed unable to select a object attribute CCErrTopoObjectAttributeSelectFailed = 1101020 // CCErrTopoObjectClassificationCreateFailed unable to create a object classification CCErrTopoObjectClassificationCreateFailed = 1101021 // CCErrTopoObjectClassificationDeleteFailed unbale to delete a object classification CCErrTopoObjectClassificationDeleteFailed = 1101022 // CCErrTopoObjectClassificationUpdateFailed unable to update a object classification CCErrTopoObjectClassificationUpdateFailed = 1101023 // CCErrTopoObjectClassificationSelectFailed unable to select a object classification CCErrTopoObjectClassificationSelectFailed = 1101024 // CCErrTopoObjectGroupCreateFailed unable to create object group CCErrTopoObjectGroupCreateFailed = 1101025 // CCErrTopoObjectGroupDeleteFailed unable to delete a object group CCErrTopoObjectGroupDeleteFailed = 1101026 // CCErrTopoObjectGroupUpdateFailed unable to update a object group CCErrTopoObjectGroupUpdateFailed = 1101027 // CCErrTopoObjectGroupSelectFailed unable to select a object group CCErrTopoObjectGroupSelectFailed = 1101028 // CCErrTopoObjectClassificationHasObject the object classification can't be deleted under clssification CCErrTopoObjectClassificationHasObject = 1101029 // CCErrTopoHasHostCheckFailed cannot detect if host information is included CCErrTopoHasHostCheckFailed = 1101030 // CCErrTopoHasHost include host CCErrTopoHasHost = 1101030 // CCErrTopoGetCloudErrStrFaild get cloud error CCErrTopoGetCloudErrStrFaild = 1101031 // CCErrTopoCloudNotFound cloud area not found CCErrTopoCloudNotFound = 1101032 // CCErrTopoGetAppFaild search app err %s CCErrTopoGetAppFaild = 1101033 // CCErrTopoGetModuleFailed search module err %s CCErrTopoGetModuleFailed = 1101034 // CCErrTopoBizTopoOverLevel the mainline topo level over limit CCErrTopoBizTopoLevelOverLimit = 1101035 CCErrTopoAppDeleteFailed = 1001031 CCErrTopoAppUpdateFailed = 1001032 CCErrTopoAppSearchFailed = 1001033 CCErrTopoAppCreateFailed = 1001034 CCErrTopoForbiddenToDeleteModelFailed = 1001035 CCErrTopoMainlineCreatFailed = 1001037 CCErrTopoMainlineDeleteFailed = 1001038 CCErrTopoMainlineSelectFailed = 1001039 CCErrTopoTopoSelectFailed = 1001040 CCErrTopoUserGroupCreateFailed = 1001041 CCErrTopoUserGroupDeleteFailed = 1001042 CCErrTopoUserGroupUpdateFailed = 1001043 CCErrTopoUserGroupSelectFailed = 1001044 CCErrTopoUserGroupPrivilegeUpdateFailed = 1001045 CCErrTopoUserGroupPrivilegeSelectFailed = 1001046 CCErrTopoUserPrivilegeSelectFailed = 1001047 CCErrTopoRolePrivilegeCreateFailed = 1001048 CCErrTopoDeleteMainLineObjectAndInstNameRepeat = 1001049 CCErrHostNotAllowedToMutiBiz = 1001050 CCErrTopoGraphicsSearchFailed = 1001051 CCErrTopoGraphicsUpdateFailed = 1001052 CCErrTopoMulueIDNotfoundFailed = 1101080 CCErrTopoBkAppNotAllowedDelete = 1101081 // CCErrObjectPropertyGroupInsertFailed failed to save the property group CCErrObjectPropertyGroupInsertFailed = 1102000 // CCErrObjectPropertyGroupDeleteFailed failed to delete the property group CCErrObjectPropertyGroupDeleteFailed = 1102001 // CCErrObjectPropertyGroupSelectFailed failed to select the property group CCErrObjectPropertyGroupSelectFailed = 1102002 // CCErrObjectPropertyGroupUpdateFailed failed to update the filed CCErrObjectPropertyGroupUpdateFailed = 1102003 CCErrObjectCreateInstFailed = 1102004 CCErrObjectUpdateInstFailed = 1102005 CCErrObjectDeleteInstFailed = 1102006 CCErrObjectSelectInstFailed = 1102007 // CCErrObjectDBOpErrno failed to operation database CCErrObjectDBOpErrno = 1102004 // event_server 1103XXX // CCErrEventSubscribeInsertFailed failed to save the Subscribe CCErrEventSubscribeInsertFailed = 1103000 // CCErrEventSubscribeDeleteFailed failed to delete the Subscribe CCErrEventSubscribeDeleteFailed = 1103001 // CCErrEventSubscribeSelectFailed failed to select the Subscribe CCErrEventSubscribeSelectFailed = 1103002 // CCErrEventSubscribeUpdateFailed failed to update the filed CCErrEventSubscribeUpdateFailed = 1103003 // CCErrEventSubscribePingFailed failed to ping the filed CCErrEventSubscribePingFailed = 1103004 // CCErrEventSubscribePingFailed failed to telnet the filed CCErrEventSubscribeTelnetFailed = 1103005 // host 1104XXX CCErrHostModuleRelationAddFailed = 1104000 // migrate 1105XXX // CCErrCommMigrateFailed failed to migrate CCErrCommMigrateFailed = 1105000 // hostcontroller 1106XXX CCErrHostSelectInst = 1106000 CCErrHostCreateInst = 1106002 CCErrHostGetSnapshot = 1106003 CCErrHostTransferModule = 1106004 CCErrDelDefaultModuleHostConfig = 1106005 CCErrGetModule = 1106006 CCErrDelOriginHostModuelRelationship = 1106007 CCErrGetOriginHostModuelRelationship = 1106008 CCErrTransferHostFromPool = 1106009 CCErrAlreadyAssign = 1106010 CCErrNotBelongToIdleModule = 1106011 CCErrTransfer2ResourcePool = 1106012 CCErrCreateUserCustom = 1106013 CCErrHostFavouriteQueryFail = 1106014 CCErrHostFavouriteCreateFail = 1106015 CCErrHostFavouriteUpdateFail = 1106016 CCErrHostFavouriteDeleteFail = 1106017 CCErrHostFavouriteDupFail = 1106018 CCErrHostGetSnapshotChannelEmpty = 1106019 CCErrHostGetSnapshotChannelClose = 1106020 // proccontroller 1107XXX CCErrProcDeleteProc2Module = 1107001 CCErrProcCreateProc2Module = 1107002 CCErrProcSelectProc2Module = 1107003 // procserver 1108XXX CCErrProcSearchDetailFaile = 1108001 CCErrProcBindToMoudleFaile = 1108002 CCErrProcUnBindToMoudleFaile = 1108003 CCErrProcSelectBindToMoudleFaile = 1108004 CCErrProcUpdateProcessFaile = 1108005 CCErrProcSearchProcessFaile = 1108006 CCErrProcDeleteProcessFaile = 1108007 CCErrProcCreateProcessFaile = 1108008 // auditlog 1109XXX CCErrAuditSaveLogFaile = 1109001 CCErrAuditTakeSnapshotFaile = 1109001 //hostserver CCErrHostGetFail = 1110001 CCErrHostUpdateFail = 1110002 CCErrHostUpdateFieldFail = 1110003 CCErrHostCreateFail = 1110004 CCErrHostModifyFail = 1110005 CCErrHostDeleteFail = 1110006 CCErrHostFiledValdFail = 1110007 CCErrHostNotFound = 1110008 CCErrHostLength = 1110009 CCErrHostDetailFail = 1110010 CCErrHostSnap = 1110011 CCErrHostFeildValidFail = 1110012 CCErrHostFavCreateFail = 1110013 CCErrHostEmptyFavName = 1110014 CCErrHostFavUpdateFail = 1110015 CCErrHostFavDeleteFail = 1110016 CCErrHostFavGetFail = 1110017 CCErrHostHisCreateFail = 1110018 CCErrHostHisGetFail = 1110019 CCErrHostCustomCreateFail = 1110020 CCErrHostCustomGetFail = 1110021 CCErrHostCustomGetDefaultFail = 1110022 CCErrHostNotINAPP = 1110023 CCErrHostNotINAPPFail = 1110024 CCErrHostDELResourcePool = 1110025 CCErrHostAddRelationFail = 1110026 CCErrHostMoveResourcePoolFail = 1110027 CCErrHostEditRelationPoolFail = 1110028 CCErrAddHostToModule = 1110029 CCErrAddHostToModuleFailStr = 1110030 //web 1111XXX CCErrWebFileNoFound = 1111001 CCErrWebFileSaveFail = 1111002 CCErrWebOpenFileFail = 1111003 CCErrWebFileContentEmpty = 1111004 CCErrWebFileContentFail = 1111005 CCErrWebGetHostFail = 1111006 CCErrWebCreateEXCELFail = 1111007 CCErrWebGetObjectFail = 1111008 CC_Err_Comm_HOST_CREATE_FAIL = 4300 CC_Err_Comm_HOST_CREATE_FAIL_STR = "create host fail" CC_Err_Comm_HOST_MODIFY_FAIL = 4301 CC_Err_Comm_HOST_MODIFY_FAIL_STR = "modify host fail" CC_Err_Comm_HOST_Field_VALID_FAIL = 4302 CC_Err_Comm_HOST_Field_VALID_FAIL_STR = "host field valid fail" CC_Err_Comm_Host_Get_FAIL = 4303 CC_Err_Comm_Host_Get_FAIL_STR = "get host fail" CC_Err_Comm_Host_Update_Field_ERR = 4304 CC_Err_Comm_Host_Update_Field_ERR_STR = "update host field err" CC_Err_Comm_Host_Update_FAIL_ERR = 4305 CC_Err_Comm_Host_Update_FAIL_ERR_STR = "update host fail err" CC_Err_Comm_Host_Not_Founded_ERR = 4306 CC_Err_Comm_Host_Not_Founded_ERR_STR = "find no host by condition" CC_Err_Comm_Host_Length_ERR = 4307 CC_Err_Comm_Host_Length_ERR_STR = "not expected host length" // CCErrApiServerV2AppNameLenErr app name must be 1-32 len CCErrAPIServerV2APPNameLenErr = 1170001 // CCErrAPIServerV2DirectErr disply error CCErrAPIServerV2DirectErr = 1170002 // CCErrAPIServerV2SetNameLenErr set name must be < 24 len CCErrAPIServerV2SetNameLenErr = 1170003 // CCErrAPIServerV2MultiModuleIDErr single module id is int CCErrAPIServerV2MultiModuleIDErr = 1170004 // CCErrAPIServerV2MultiSetIDErr single set id is int CCErrAPIServerV2MultiSetIDErr = 1170005 // CCErrAPIServerV2OSTypeErr osType must be linux or windows CCErrAPIServerV2OSTypeErr = 1170006 // CCErrAPIServerV2HostModuleContainDefaultModuleErr translate host to multiple module not contain default module CCErrAPIServerV2HostModuleContainDefaultModuleErr = 1170007 // db CC_ERR_Comm_DB_OP_ERRNO = 1000 CC_ERR_Comm_DB_OP_ERRNO_STR = "database return some exception" CC_Err_Comm_DB_Insert_Failed = "insert data failed" CC_Err_Comm_DB_Delete_Failed = "delete data failed" CC_Err_Comm_DB_Update_Failed = "update data failed" CC_Err_Comm_DB_Select_Failed = "select data failed" //http CC_Err_Comm_http_DO = 2000 CC_Err_Comm_http_DO_STR = "do http request failed!" CC_Err_Comm_http_Input_Params = 2001 CC_Err_Comm_http_Input_Params_STR = "input params error!" CC_Err_Comm_http_ReadReqBody = 2002 CC_Err_Comm_http_ReadReqBody_STR = "read http request body failed!" //json CC_ERR_Comm_JSON_DECODE = 3001 CC_ERR_Comm_JSON_DECODE_STR = "json decode failed!" CC_ERR_Comm_JSON_ENCODE = 3002 CC_ERR_Comm_JSON_ENCODE_STR = "json encode failed!" CC_ERR_Comm_JSON_GET = 3003 //app CC_Err_Comm_APP_ID_ERR = 4001 CC_Err_Comm_APP_ID_ERR_STR = "app id error" CC_Err_Comm_APP_DEL_FAIL = 4002 CC_Err_Comm_APP_DEL_FAIL_STR = "delete app fail" CC_Err_Comm_APP_Create_FAIL = 4003 CC_Err_Comm_APP_Create_FAIL_STR = "create app fail" CC_Err_Comm_APP_Create_Field_ERR = 4004 CC_Err_Comm_APP_Create_Field_ERR_STR = "create app lack field" CC_Err_Comm_APP_Create_Name_DUP = 4005 CC_Err_Comm_APP_Create_Name_DUP_STR = "duplicate application name" CC_Err_Comm_APP_Update_FAIL = 4006 CC_Err_Comm_APP_Update_FAIL_STR = "update application fail" CC_Err_Comm_APP_Field_VALID_FAIL = 4007 CC_Err_Comm_APP_Field_VALID_FAIL_STR = "app field valid fail" CC_Err_Comm_APP_QUERY_FAIL = 4008 CC_Err_Comm_APP_QUERY_FAIL_STR = "query app fail" CC_Err_Comm_APP_CHECK_HOST_FAIL = 4009 CC_Err_Comm_APP_CHECK_HOST_FAIL_STR = "failed to check host for app" CC_Err_Comm_APP_HAS_HOST_FAIL = 4010 CC_Err_Comm_APP_HAS_HOST_FAIL_STR = "failed to delete app, because of it has some hosts" //set CC_Err_Comm_Set_QUERY_FAIL = 4100 CC_Err_Comm_Set_QUERY_FAIL_STR = "get set fail" CC_Err_Comm_Set_CREATE_FAIL = 4101 CC_Err_Comm_Set_CREATE_FAIL_STR = "create set fail" CC_Err_Comm_Set_Update_FAIL = 4102 CC_Err_Comm_Set_Update_FAIL_STR = "update set fail" CC_Err_Comm_Set_Delete_FAIL = 4103 CC_Err_Comm_Set_Delete_FAIL_STR = "delete set fail" //module CC_Err_Comm_Module_QUERY_FAIL = 4200 CC_Err_Comm_Module_QUERY_FAIL_STR = "get module fail" CC_Err_Comm_Module_Update_FAIL = 4201 CC_Err_Comm_Module_Update_FAIL_STR = "update module error" CC_Err_Comm_Host_SNAPSHOT_GET_FAIL_ERR = 4306 CC_Err_Comm_Host_SNAPSHOT_GET_FAIL_ERR_STR = "get host snapshot fail err" //process CC_Err_Comm_PROC_Create_FAIL = 4400 CC_Err_Comm_PROC_Create_FAIL_STR = "create process fail" CC_Err_Comm_PROC_Create_Field_ERR = 4401 CC_Err_Comm_PROC_Create_Field_ERR_STR = "create process lack field" CC_Err_Comm_PROC_Field_VALID_FAIL = 4402 CC_Err_Comm_PROC_Field_VALID_FAIL_STR = "process field valid fail" CC_Err_Comm_PROC_DELETE_FAIL = 4403 CC_Err_Comm_PROC_DELETE_FAIL_STR = "delete process fail" CC_Err_Comm_PROC_SEARCH_FAIL = 4404 CC_Err_Comm_PROC_SEARCH_FAIL_STR = "search process fail" CC_Err_Comm_CREATE_PROC_MODULE_FAIL = 4405 CC_Err_Comm_CREATE_PROC_MODULE_FAIL_STR = "create process module config fail" CC_Err_Comm_GET_PROC_FAIL = 4406 CC_Err_Comm_GET_PROC_FAIL_STR = "get process fail" CC_Err_Comm_GET_PROC_MODULE_FAIL = 4407 CC_Err_Comm_GET_PROC_MODULE_FAIL_STR = "get process module config fail" CC_Err_Comm_BIND_PROC_MODULE_FAIL = 4408 CC_Err_Comm_BIND_PROC_MODULE_FAIL_STR = "bind process module config fail" CC_Err_Comm_PROC_UPDATE_FAIL = 4409 CC_Err_Comm_PROC_UPDATE_FAIL_STR = "update process fail" CC_Err_Comm_DELETE_PROC_MODULE_FAIL = 4410 CC_Err_Comm_DELETE_PROC_MODULE_FAIL_STR = "delete process fail" //主机历史 CC_Err_Comm_HOST_HISTORY_Create_FAIL = 4400 CC_Err_Comm_HOST_HISTORY_Create_FAIL_STR = "create app fail" //collect CC_Err_Comm_HOST_FAVOURITE_CREATE_FAIL = 4401 CC_Err_Comm_HOST_FAVOURITE_CREATE_FAIL_STR = "create host favourite fail" CC_Err_Comm_HOST_FAVOURITE_QUERY_FAIL = 4402 CC_Err_Comm_HOST_FAVOURITE_QUERY_FAIL_STR = "query host favourite fail" CC_Err_Comm_HOST_FAVOURITE_EDIT_FAIL = 4403 CC_Err_Comm_HOST_FAVOURITE_EDIT_FAIL_STR = "modify host favourite fail" //user custom CC_Err_Comm_USER_CUSTOM_SAVE_FAIL = 5000 CC_Err_Comm_USER_CUSTOM_SAVE_FAIL_STR = "save user custom fail" CC_Err_Comm_USER_CUSTOM_QUERY_FAIL = 5001 CC_Err_Comm_USER_CUSTOM_QUERY_FAIL_STR = "query user custom fail" CC_Err_Comm_USER_CUSTOM_EDIT_FAIL = 5002 CC_Err_Comm_USER_CUSTOM_EDIT_FAIL_STR = "modify user custom fail" //privilege CC_Err_Comm_CREATE_ROLE_PRI_FAIL = 7000 CC_Err_Comm_CREATE_ROLE_PRI_FAIL_STR = "create role privilege error" CC_Err_Comm_GET_ROLE_PRI_FAIL = 7001 CC_Err_Comm_GET_ROLE_PRI_FAIL_STR = "get role privilege error" CC_Err_Comm_ROLE_PRI_EXIST = 7002 CC_Err_Comm_ROLE_PRI_EXIST_STR = "role privilege exist" CC_Err_Comm_UPDATE_ROLE_PRI_FAIL = 7003 CC_Err_Comm_UPDATE_ROLE_PRI_FAIL_STR = "create role privilege error" CC_Err_Comm_CREATE_USER_GROUP_FAIL = 7004 CC_Err_Comm_CREATE_USER_GROUP_FAIL_STR = "create user group error" CC_Err_Comm_UPDATE_USER_GROUP_FAIL = 7005 CC_Err_Comm_UPDATE_USER_GROUP_FAIL_STR = "update user group error" CC_Err_Comm_SEARCH_USER_GROUP_FAIL = 7006 CC_Err_Comm_SEARCH_USER_GROUP_FAIL_STR = "search user group error" CC_Err_Comm_DELETE_USER_GROUP_FAIL = 7007 CC_Err_Comm_DELETE_USER_GROUP_FAIL_STR = "delete user group error" CC_Err_Comm_INSERT_USER_GROUP_PRIVI_FAIL = 7008 CC_Err_Comm_INSERT_USER_GROUP_PRIVI_FAIL_STR = "insert user group privilege error" CC_Err_Comm_UPDATE_USER_GROUP_PRIVI_FAIL = 7009 CC_Err_Comm_UPDATE_USER_GROUP_PRIVI_FAIL_STR = "update user group privilege error" CC_Err_Comm_GET_USER_GROUP_PRIVI_FAIL = 7010 CC_Err_Comm_GET_USER_GROUP_PRIVI_FAIL_STR = "get user group privilege error" CC_Err_Comm_DUP_GROUP_NAME_ERR = 7011 CC_Err_Comm_DUP_GROUP_NAME_ERR_STR = "duplicate group name" CC_Err_Comm_DUP_GROUP_PRIVI_ERR = 7012 CC_Err_Comm_DUP_GROUP_PRIVI_ERR_STR = "duplicate group privilege" CC_Err_Comm_GET_USER_PRIVI_ERR = 7013 CC_Err_Comm_GET_USER_PRIVI_ERR_STR = "get user privilege error" // object CC_Err_Comm_Object_Valid_Failed = 8000 Json_Marshal_ERR = 9000 Json_Marshal_ERR_STR = "json marshal error" // property CC_Err_Comm_GET_PROPERTY_PRI_FAIL = 10001 CC_Err_Comm_GET_PROPERTY_PRI_FAIL_STR = "get property error" // plat CC_Err_Comm_GET_PLAT_FAIL = 11001 CC_Err_Comm_GET_PLAT_FAIL_STR = "get plat error" CC_Err_Comm_DELETE_PLAT_FAIL = 11002 CC_Err_Comm_DELETE_PLAT_FAIL_STR = "delete plat error" CC_Err_Comm_CREATE_PLAT_FAIL = 11003 CC_Err_Comm_CREATE_PLAT_FAIL_STR = "create plat error" CC_Err_Comm_HOST_IN_PLAT_FAIL = 11004 CC_Err_Comm_HOST_IN_PLAT_FAIL_STR = "plat has host data, can not delete plat" )
CC error number defined in this file Errno name is composed of the following format CCErr[XXX]
const BKAppName string = "蓝鲸"
BKAppName the default app name
const BKBizRecovery = "recovery"
const (
// BKCacheKeyV3Prefix the prefix definition
BKCacheKeyV3Prefix = "cc:v3:"
)
const (
BKCharSpecilChar1 = ","
)
const BKDataStatusField = "bk_data_status"
const BKMainLine = "mainline"
const DefaultAppFlag int = 1
DefaultAppFlag the default app flag
const (
// DefaultAppLifeCycleNormal biz life cycle normal
DefaultAppLifeCycleNormal = "2"
)
const DefaultAppName string = "资源池"
DefaultAppName the default app name
const DefaultResSetFlag int = 1
DefaultResSetFlag the default resource set flat
const DefaultResSetName string = "空闲机池"
DefaultResSetName the inner module set
const HostCrossBizField = "hostcrossbiz"
flag
const HostCrossBizValue = "e76fd4d1683d163e4e7e79cef45a74c1"
const (
// InstAsstIDSplit instance associated fields, separators between mulitple ids of associated objects
InstAsstIDSplit = ","
)
const PatternIP = `^(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|[1-9])\.((1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\.){2}(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)$`
PatternIP regular pattern for ip
const PatternMultipleIP = `` /* 246-byte string literal not displayed */
const SystemTableName = "cc_System"
const WhiteListAppName = "蓝鲸"
WhiteListAppName the white list app name
const WhiteListModuleName = "gitserver"
WhiteListModuleName the white list module name
const WhiteListSetName = "公共组件"
WhiteListSetName the white list set name
Variables ¶
This section is empty.
Functions ¶
func GetIdentification ¶
func GetIdentification() string
func GetInstNameField ¶
GetInstNameField returns the inst name field
func ReadPid ¶
ReadPid the pid from the configured file. It is an error if the pidfile hasn't been configured.
func SetIdentification ¶
func SetIdentification(id string)
Types ¶
type APIRsp ¶
type APIRsp struct { HTTPCode int `json:"-"` Result bool `json:"result"` Code int `json:"code"` Message interface{} `json:"message"` Data interface{} `json:"data"` }
APIRsp the result the http requst
type AtomicFile ¶
AtomicFile behaves like os.File, but does an atomic rename operation at Close.
func AtomicFileNew ¶
func AtomicFileNew(path string, mode os.FileMode) (*AtomicFile, error)
AtomicFileNew creates a new temporary file that will replace the file at the given path when Closed.
func (*AtomicFile) Abort ¶
func (f *AtomicFile) Abort() error
Abort closes the file and removes it instead of replacing the configured file. This is useful if after starting to write to the file you decide you don't want it anymore.
func (*AtomicFile) Close ¶
func (f *AtomicFile) Close() error
Close the file replacing the configured file.
type DataStatusFlag ¶
type DataStatusFlag string
const ( DataStatusDisabled DataStatusFlag = "disabled" DataStatusEnable DataStatusFlag = "enable" )
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cli_server
|
|
core
|
|
tester
|
|
* Tencent is pleased to support the open source community by making 蓝鲸 available.
|
* Tencent is pleased to support the open source community by making 蓝鲸 available. |