Documentation
¶
Overview ¶
* Tencent is pleased to support the open source community by making 蓝鲸 available., * Copyright (C) 2017,-2018 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the ",License",); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * http://opensource.org/licenses/MIT * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an ",AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language governing permissions and * limitations under the License.
* Tencent is pleased to support the open source community by making 蓝鲸 available., * Copyright (C) 2017,-2018 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the ",License",); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * http://opensource.org/licenses/MIT * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an ",AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language governing permissions and * limitations under the License.
* Tencent is pleased to support the open source community by making 蓝鲸 available., * Copyright (C) 2017,-2018 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the ",License",); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * http://opensource.org/licenses/MIT * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an ",AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language governing permissions and * limitations under the License.
* Tencent is pleased to support the open source community by making 蓝鲸 available., * Copyright (C) 2017,-2018 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the ",License",); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * http://opensource.org/licenses/MIT * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an ",AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language governing permissions and * limitations under the License.
* Tencent is pleased to support the open source community by making 蓝鲸 available., * Copyright (C) 2017,-2018 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the ",License",); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * http://opensource.org/licenses/MIT * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an ",AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language governing permissions and * limitations under the License.
* Tencent is pleased to support the open source community by making 蓝鲸 available. * Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * http://opensource.org/licenses/MIT * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language governing permissions and * limitations under the License.
* Tencent is pleased to support the open source community by making 蓝鲸 available., * Copyright (C) 2017,-2018 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the ",License",); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * http://opensource.org/licenses/MIT * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an ",AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language governing permissions and * limitations under the License.
* Tencent is pleased to support the open source community by making 蓝鲸 available., * Copyright (C) 2017,-2018 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the ",License",); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * http://opensource.org/licenses/MIT * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an ",AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language governing permissions and * limitations under the License.
* Tencent is pleased to support the open source community by making 蓝鲸 available., * Copyright (C) 2017,-2018 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the ",License",); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * http://opensource.org/licenses/MIT * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an ",AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language governing permissions and * limitations under the License.
* Tencent is pleased to support the open source community by making 蓝鲸 available., * Copyright (C) 2017,-2018 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the ",License",); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * http://opensource.org/licenses/MIT * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an ",AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language governing permissions and * limitations under the License.
* Tencent is pleased to support the open source community by making 蓝鲸 available., * Copyright (C) 2017,-2018 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the ",License",); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * http://opensource.org/licenses/MIT * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an ",AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language governing permissions and * limitations under the License.
Index ¶
- Constants
- Variables
- func BizIDFromMetadata(meta Metadata) (int64, error)
- func CheckAllowHostApplyOnField(field string) bool
- func ConvertHostSpecialStringToArray(host map[string]interface{}) map[string]interface{}
- func FilterValidFields(fields []string) []string
- func GetAllProcessPropertyFields() []string
- func GetAuditDict() []resourceTypeInfo
- func GetBusinessIDFromMeta(data interface{}) string
- func GetInstIDFieldByObjID(objID string) string
- func GetInstNameFieldName(objID string) string
- func GetSetTemplateSyncIndex(setID int64) string
- func IsAsDefaultValue(asDefaultValue *bool) bool
- func NewPublicOrBizConditionByBizID(businessID int64) mapstr.MapStr
- func ParseBizIDFromData(rawData mapstr.MapStr) (int64, error)
- func ParseCursorTypeFromEventType(eventType string) watch.CursorType
- func ParseTime(data interface{}) (time.Time, error)
- func PublicAndBizCondition(meta Metadata) mapstr.MapStr
- func Register(propertyBindInfo ProcPropertyExtraBindInfoInterface, ...)
- func StringToTimeDurationHookFunc() mapstructure.DecodeHookFunc
- type APISubTaskDetail
- type APITaskDetail
- type APITaskStatus
- type AccountValidityInfo
- type ActionType
- type AddConfigQuery
- type AddDeviceResult
- type AddHistoryResult
- type AddHostFromAgentHostList
- type AddHostToResourcePoolHostList
- type AddHostToResourcePoolResult
- type AddNetPropertyResult
- type AddOneHostToResourcePoolResult
- type AddToModuleInfo
- type AggregateIntResponse
- type AggregateStringResponse
- type Ancestor
- type AppBasicInfoResult
- type AppQueryResult
- type AssignHostToAppParams
- type Association
- type AssociationDetail
- type AssociationDirection
- type AssociationIdItem
- type AssociationKind
- type AssociationKindIDs
- type AssociationList
- type AssociationMapping
- type AssociationOnDeleteAction
- type AssociationOpDetail
- type AssociationParams
- type Attribute
- func (attribute *Attribute) Parse(data mapstr.MapStr) (*Attribute, error)
- func (attribute Attribute) PrettyValue(ctx context.Context, val interface{}) (string, error)
- func (attribute *Attribute) ToMapStr() mapstr.MapStr
- func (attribute *Attribute) Validate(ctx context.Context, data interface{}, key string) (rawError errors.RawErrorInfo)
- type AttributeGroup
- type AttributeWrapper
- type AttributesOption
- type AttributesOptions
- type AuditLog
- type AuditQueryCondition
- type AuditQueryInput
- type AuditQueryResult
- type AuditType
- type AuthBathVerifyRequest
- type AuthBathVerifyResult
- type AuthResource
- type BKResponse
- type BackendCfg
- type BaseCfgItem
- type BasePage
- type BaseResp
- type BasicContent
- type BasicOpDetail
- type BatchAddDevice
- type BatchAddDeviceResult
- type BatchAddNetProperty
- type BatchAddNetPropertyResult
- type BatchCheckSetInstUpdateToDateStatusOption
- type BatchCreateOrUpdateApplyRuleOption
- type BatchCreateOrUpdateHostApplyRuleResult
- type BizBasicInfo
- type BizInst
- type BkBaseResp
- type BkHostInfo
- type BkSystemInstallRequest
- type BoolResponse
- type BusinessDefaultSetModuleInfo
- type BusinessDefaultSetModuleInfoResult
- type BusinessTopoInstNamesItem
- type ChartClassification
- type ChartConfig
- type ChartData
- type ChartPosition
- type Classification
- type ClassificationWithObject
- type ClassifyIdItem
- type CloneHostPropertyParams
- type CloudAccount
- type CloudAccountConf
- type CloudAccountResult
- type CloudAccountVerify
- type CloudAccountWithExtraInfo
- type CloudArea
- type CloudAreaSearchParam
- type CloudHost
- type CloudHostModuleParams
- type CloudHostResource
- type CloudInst
- type CloudMapping
- type CloudSyncTask
- type CntInfoString
- type CommonInstTopo
- type CommonInstTopoV2
- type CommonSearchChart
- type ConditionItem
- type ConfigAdmin
- type ConfigAdminParmams
- type ConfigAdminResult
- type ConfirmMode
- type CoreDeleteServiceInstanceOption
- type CoreUint64Response
- type CountSetTplInstItem
- type CountSetTplInstOption
- type CountTopoNodeHostsOption
- type CreateAssociationInstRequest
- type CreateAssociationInstResult
- type CreateAssociationKind
- type CreateAssociationObjectResult
- type CreateAssociationTypeResult
- type CreateAuditLogParam
- type CreateHostApplyRuleOption
- type CreateInstResult
- type CreateManyAssociationKind
- type CreateManyCloudAreaElem
- type CreateManyCloudAreaResult
- type CreateManyDataResult
- type CreateManyInfoResult
- type CreateManyInstanceAssociation
- type CreateManyModelClassifiaction
- type CreateManyModelInstance
- type CreateModel
- type CreateModelAssociation
- type CreateModelAttrUnique
- type CreateModelAttributeGroup
- type CreateModelAttributes
- type CreateModelInstance
- type CreateModelResult
- type CreateObjectAttributeResult
- type CreateObjectClassificationResult
- type CreateObjectGroupResult
- type CreateObjectResult
- type CreateOneDataResult
- type CreateOneInstanceAssociation
- type CreateOneModelClassification
- type CreateOrUpdateApplyRuleOption
- type CreateOrUpdateHostApplyRuleResult
- type CreateProcessTemplateBatchInput
- type CreateRawProcessInstanceInput
- type CreateResult
- type CreateServiceCategoryOption
- type CreateServiceInstanceDetail
- type CreateServiceInstanceForServiceTemplateInput
- type CreateServiceInstanceOption
- type CreateServiceInstancePreviewInput
- type CreateServiceTemplateOption
- type CreateSetTemplateOption
- type CreateSyncHistoryesult
- type CreateSyncTaskResult
- type CreateTaskRequest
- type CreateTaskResponse
- type CreateUniqueRequest
- type CreateUniqueResult
- type CreatedCount
- type CreatedDataResult
- type CreatedManyOptionResult
- type CreatedOneOptionResult
- type DefaultModuleHostConfigParams
- type DeleteArchive
- type DeleteAssociationInstRequest
- type DeleteAssociationInstResult
- type DeleteAssociationObjectResult
- type DeleteAssociationTypeResult
- type DeleteCategoryInput
- type DeleteDestroyedHostRelatedOption
- type DeleteHostApplyRuleOption
- type DeleteHostBatchOpt
- type DeleteHostFromBizParameter
- type DeleteHostRequest
- type DeleteModelAttrUnique
- type DeleteModelClassificationResult
- type DeleteNetDeviceBatchOpt
- type DeleteNetPropertyBatchOpt
- type DeleteOption
- type DeleteProcessInstanceInServiceInstanceInput
- type DeleteProcessInstanceRelationOption
- type DeleteProcessTemplateBatchInput
- type DeleteResult
- type DeleteServiceInstanceOption
- type DeleteServiceTemplatesInput
- type DeleteSetTemplateOption
- type DeleteSetTemplateSyncStatusOption
- type DeleteUniqueRequest
- type DeleteUniqueResult
- type DeletedCount
- type DeletedOptionResult
- type DepartmentData
- type DepartmentItem
- type DepartmentProfileData
- type DepartmentProfileItem
- type DepartmentProfileResult
- type DepartmentResult
- type DetailFactory
- type DiffModuleWithTemplateOption
- type DiffOneModuleWithTemplateOption
- type DiffSetTplWithInstOption
- type DifferenceDetail
- type Dimension
- type DistInst
- type DistInstCtx
- type DistinctHostIDByTopoRelationRequest
- type DistinctID
- type DistinctIDResponse
- type EnumIdItem
- type EnumNameItem
- type EnumOption
- type EnumVal
- type ErrorContainer
- type EsbBaseResponse
- type EsbDepartmentProfileResponse
- type EsbDepartmentResponse
- type EsbListUserResponse
- type EsbResponse
- type EsbUserListResponse
- type EventData
- type EventInst
- type EventInstCtx
- type EventType
- type ExcelAssocation
- type ExcelAssocationOperate
- type ExceptionResult
- type FavoriteResult
- type FavouriteMeta
- type FavouriteParms
- type FieldIdItem
- type FilePriviewMap
- type FindHostsBySetTplOpt
- type FindHostsBySrvTplOpt
- type FindHostsByTopoOpt
- type FindModuleHostRelationParameter
- type FindModuleHostRelationResp
- type FindModuleHostRelationResult
- type FindServiceAndProcessInstanceOption
- type FindTopoPathRequest
- type FloatItem
- type FloatOption
- type FooterItem
- type GetHistoryResult
- type GetHostFavoriteResult
- type GetHostFavoriteWithIDResult
- type GetHostModuleIDsResult
- type GetHostSnapBatchResult
- type GetHostSnapResult
- type GetHostsResult
- type GetProc2ModuleOption
- type GetProc2ModuleResult
- type GetServiceInstanceInModuleInput
- type GetUserConfigDetailResult
- type GetUserConfigResult
- type GetUserCustomResult
- type GraphAsst
- type Group
- type GseHost
- type GseProcConfigmap
- type GseProcControl
- type GseProcIdentity
- type GseProcMeta
- type GseProcMonitorPlolicy
- type GseProcRequest
- type GseProcResource
- type GseProcSpec
- type GseProcWarnReportPolicy
- type GseProcessOperateTaskResult
- type HistoryContent
- type HistoryMeta
- type HistoryResult
- type Host2Modules
- type HostApplyConflictField
- type HostApplyConflictResolver
- type HostApplyPlanOption
- type HostApplyPlanRequest
- type HostApplyPlanResult
- type HostApplyResult
- type HostApplyRule
- type HostApplyUpdateField
- type HostBizTopo
- type HostChangeChartData
- type HostCloneInputParams
- type HostCommonSearch
- type HostConfig
- type HostConfigData
- type HostIdentModule
- type HostIdentProcess
- type HostIdentProcessSorter
- type HostIdentifier
- type HostInfo
- type HostInputType
- type HostInstanceProperties
- type HostInstancePropertiesResult
- type HostInstanceResult
- type HostList
- type HostLockData
- type HostLockQueryResponse
- type HostLockRequest
- type HostLockResponse
- type HostLockResultResponse
- type HostMapStr
- type HostModuleConfig
- type HostModuleFind
- type HostModuleRelationParameter
- type HostModuleRelationRequest
- type HostObjAttDes
- type HostProcessInstance
- type HostProcessRelation
- type HostSnap
- type HostSnapBatchInput
- type HostSnapBatchOption
- type HostSnapBatchResult
- type HostSnapResult
- type HostSyncInfo
- type HostSyncList
- type HostToAppModule
- type HostTopo
- type HostTopoResult
- type HostTransferOpDetail
- type HostTransferPlan
- type HostTransferPreview
- type HostsModuleRelation
- type I18N
- type ID
- type IDResult
- type IPInfo
- type IPParam
- type IamAction
- type IamCreatorActionPolicy
- type IamInstance
- type IamInstanceAncestor
- type IamInstanceWithCreator
- type IamInstancesWithCreator
- type IamPermission
- type IamResourceAttribute
- type IamResourceAttributeValue
- type IamResourceInstance
- type IamResourceType
- type InlineProcInfo
- type InnerModule
- type InnterAppTopo
- type InstAsst
- type InstBaseInfo
- type InstChangeCount
- type InstDataInfo
- type InstNameAsst
- type InstResult
- type Instance
- type InstanceAssociationOpDetail
- type InstanceOpDetail
- type InstanceTagKeyItem
- type InstanceTagValueItem
- type InstancesInfo
- type IntIDArrayCount
- type IntIDCount
- type IntOption
- type JsonCntInfoResp
- type JsonStringResp
- type Label
- func (label Label) Get(key string) (exist bool, value string)
- func (label Label) GetBusinessID() (int64, error)
- func (label Label) GetModelKind() (ModelKind, error)
- func (label Label) Int64(key string) (int64, error)
- func (label Label) IsTrue(key string) (bool, error)
- func (label Label) Set(key, value string)
- func (label Label) SetBusinessID(id int64)
- func (label Label) SetModelKind(kind ModelKind)
- func (label Label) ToMapStr() mapstr.MapStr
- type LabelAggregationOption
- type Layer
- type LimiterRule
- type LinksItem
- type ListAPITaskData
- type ListAPITaskRequest
- type ListAPITaskResponse
- type ListAssociationsWithAssociationKindResult
- type ListHostApplyRuleOption
- type ListHostRelatedApplyRuleOption
- type ListHostResult
- type ListHostWithPage
- type ListHostWithoutAppResponse
- type ListHosts
- type ListHostsParameter
- type ListHostsWithNoBizParameter
- type ListProcessInstanceRelationOption
- type ListProcessInstancesDetailsByIDsOption
- type ListProcessInstancesNameIDsOption
- type ListProcessInstancesOption
- type ListProcessInstancesWithHostOption
- type ListProcessTemplateWithServiceTemplateInput
- type ListProcessTemplatesOption
- type ListServiceCategoriesOption
- type ListServiceInstanceDetailOption
- type ListServiceInstanceDetailRequest
- type ListServiceInstanceOption
- type ListServiceInstancesWithHostInput
- type ListServiceTemplateInput
- type ListServiceTemplateOption
- type ListServiceTemplateWithDetailResult
- type ListSetByTemplateOption
- type ListSetTemplateOption
- type ListSetTemplateResult
- type ListSetTemplateSyncStatusOption
- type ListUserItem
- type ListWithIDOption
- type LoginChangeSupplierResult
- type LoginPluginInfo
- type LoginSystemUserInfo
- type LoginUserInfo
- type LoginUserInfoDetail
- type LoginUserInfoOwnerUinList
- type LoginUserInfoResult
- type LoginUserPluginInerface
- type LoginUserPluginParams
- type LogoutRequestParams
- type LogoutResult
- type LongcharItem
- type LonginSystemUserListResult
- type MainLineObject
- type MainLineResult
- type MainlineInstInfo
- type MainlineObjectTopo
- type MainlineObjectTopoResult
- type MapArrayResponse
- type MatchProcInstParam
- type Metadata
- type MetadataWrapper
- type ModelAssociationOpDetail
- type ModelAttrOpDetail
- type ModelIdItem
- type ModelInstChange
- type ModelInstChartData
- type ModelKind
- type ModifyProcInstanceDetail
- type Module
- type ModuleChangedAttribute
- type ModuleDiffWithTemplateDetail
- type ModuleHost
- type ModuleHostConfigParams
- type ModuleHostRelation
- type ModuleInst
- type MultipleCloudAccount
- type MultipleCloudAccountConf
- type MultipleCloudAccountConfResult
- type MultipleCloudAccountResult
- type MultipleCloudSyncTask
- type MultipleCloudSyncTaskResult
- type MultipleHostApplyResult
- type MultipleHostApplyRuleResult
- type MultipleHostProcessRelation
- type MultipleHostProcessRelationResult
- type MultipleMap
- type MultipleProcessInstanceRelation
- type MultipleProcessInstanceRelationResult
- type MultipleProcessTemplate
- type MultipleProcessTemplateResult
- type MultipleServiceCategory
- type MultipleServiceCategoryResult
- type MultipleServiceCategoryWithStatistics
- type MultipleServiceCategoryWithStatisticsResult
- type MultipleServiceInstance
- type MultipleServiceInstanceDetail
- type MultipleServiceInstanceDetailResult
- type MultipleServiceInstanceResult
- type MultipleServiceTemplate
- type MultipleServiceTemplateDetail
- type MultipleServiceTemplateDetailResult
- type MultipleServiceTemplateResult
- type MultipleSetTemplateResult
- type MultipleSetTemplateSyncStatus
- type MultipleSetTemplateWithStatisticsResult
- type MultipleSyncHistory
- type MultipleSyncHistoryResult
- type MultipleSyncRegionResult
- type NamedCharacterItem
- type NetCollSearchParams
- type NetcollectConfig
- type NetcollectDevice
- type NetcollectHistory
- type NetcollectProperty
- type NetcollectReport
- type NetcollectReportAssociation
- type NetcollectReportAsstCond
- type NetcollectReportAttribute
- type NetcollectReportSummary
- type Netcollector
- type NetcollectorStatus
- type NodeTopoPath
- type NumberItem
- type ObjAttDes
- type ObjClassificationObject
- type ObjQueryInput
- type Object
- func (o *Object) GetDefaultInstPropertyName() string
- func (o *Object) GetInstIDFieldName() string
- func (o *Object) GetInstNameFieldName() string
- func (o *Object) GetObjectID() string
- func (o *Object) GetObjectType() string
- func (o *Object) IsCommon() bool
- func (o *Object) Parse(data mapstr.MapStr) (*Object, error)
- func (o *Object) ToMapStr() mapstr.MapStr
- type ObjectAttr
- type ObjectAttrBatchResult
- type ObjectAttrGroupResult
- type ObjectAttrResult
- type ObjectClsDes
- type ObjectIDName
- type ObjectTopo
- type ObjectUnique
- type OneHostApplyPlan
- type OneProcessInstanceRelationResult
- type OneProcessTemplateResult
- type OneServiceCategoryResult
- type OneServiceCategoryWithStatisticsResult
- type OneServiceInstanceResult
- type OneServiceTemplateResult
- type OneServiceTemplateWithStatisticsResult
- type OperateFromType
- type OperaterException
- type OperationTimeCondition
- type ParamData
- type ParamNetcollectComfirm
- type ParamNetcollectDiscover
- type ParamNetcollectorSearch
- type ParamSearchNetcollectReport
- type ParamSubscriptionSearch
- type ParamSubscriptionTelnet
- type ParamSubscriptionTestCallback
- type Permission
- type Position
- type PositionInfo
- type Proc2Module
- type ProcBindInfo
- func (pbi ProcBindInfo) MarshalBSON() ([]byte, error)
- func (pbi ProcBindInfo) MarshalJSON() ([]byte, error)
- func (pbi ProcBindInfo) SetExtraItem(key string, value interface{}) error
- func (pbi *ProcBindInfo) UnmarshalBSON(data []byte) error
- func (pbi *ProcBindInfo) UnmarshalJSON(data []byte) error
- func (pbi ProcBindInfo) Value() map[string]interface{}
- type ProcExtraBindInfoInterface
- type ProcInfoArrResult
- type ProcInstModelResult
- type ProcInstanceDetail
- type ProcInstanceDetailResult
- type ProcInstanceDetailStatus
- type ProcInstanceModel
- type ProcModuleConfig
- type ProcModuleResult
- type ProcOpTaskStatus
- type ProcPropertyBindInfo
- func (pbi *ProcPropertyBindInfo) DiffWithProcessTemplate(procBindInfoArr []ProcBindInfo, host map[string]interface{}) (newBindInfoArr []ProcBindInfo, change bool)
- func (pbi *ProcPropertyBindInfo) ExtractChangeInfoBindInfo(i *Process, host map[string]interface{}) ([]ProcBindInfo, bool, bool)
- func (pbi *ProcPropertyBindInfo) ExtractInstanceUpdateData(input *Process, host map[string]interface{}) []ProcBindInfo
- func (pbi ProcPropertyBindInfo) NewProcBindInfo(host map[string]interface{}) []ProcBindInfo
- func (pbi *ProcPropertyBindInfo) Update(input ProcessProperty, rawProperty map[string]interface{})
- func (pbi *ProcPropertyBindInfo) Validate() (string, error)
- type ProcPropertyBindInfoValue
- func (pbi ProcPropertyBindInfoValue) MarshalBSON() ([]byte, error)
- func (pbi ProcPropertyBindInfoValue) MarshalJSON() ([]byte, error)
- func (pbi ProcPropertyBindInfoValue) SetExtraItem(key string, value interface{}) error
- func (pbi *ProcPropertyBindInfoValue) UnmarshalBSON(data []byte) error
- func (pbi *ProcPropertyBindInfoValue) UnmarshalJSON(data []byte) error
- func (pbi *ProcPropertyBindInfoValue) Validate() (string, error)
- type ProcPropertyExtraBindInfoInterface
- type Process
- type ProcessChangedAttribute
- type ProcessCreateOrUpdateInfo
- type ProcessDetail
- type ProcessDifferenceDetail
- type ProcessInst
- type ProcessInstance
- type ProcessInstanceDetail
- type ProcessInstanceDetailByID
- type ProcessInstanceNG
- type ProcessInstanceNameIDs
- type ProcessInstanceRelation
- type ProcessModule
- type ProcessOperate
- type ProcessOperateTask
- type ProcessOperateTaskDetail
- type ProcessOperateTaskResult
- type ProcessProperty
- type ProcessPropertyInterface
- type ProcessTemplate
- func (pt *ProcessTemplate) ExtractChangeInfo(i *Process, host map[string]interface{}) (mapstr.MapStr, bool, bool)
- func (pt *ProcessTemplate) ExtractEditableFields() []string
- func (pt *ProcessTemplate) ExtractInstanceUpdateData(input *Process, host map[string]interface{}) map[string]interface{}
- func (pt *ProcessTemplate) GetEditableFields(fields []string) []string
- func (pt *ProcessTemplate) NewProcess(bizID int64, supplierAccount string, host map[string]interface{}) *Process
- func (pt *ProcessTemplate) Validate() (field string, err error)
- type PropertyBindIP
- type PropertyBool
- type PropertyGroupCondition
- type PropertyGroupObjectAtt
- type PropertyInt64
- type PropertyInt64String
- type PropertyPort
- type PropertyProtocol
- type PropertyString
- type ProtocolType
- type PullResourceParam
- type PullResourceResponse
- type PullResourceResult
- type QueryBusinessRequest
- type QueryCondition
- type QueryConditionResult
- type QueryHostLockRequest
- type QueryInput
- type QueryInstResult
- type QueryModelAttributeDataResult
- type QueryModelAttributeGroupDataResult
- type QueryModelClassificationDataResult
- type QueryModelDataResult
- type QueryModelWithAttributeDataResult
- type QueryObjectAssociationResult
- type QueryObjectAttributeResult
- type QueryObjectAttributeWrapperResult
- type QueryObjectClassificationResult
- type QueryObjectClassificationWithObjectsResult
- type QueryObjectGroupResult
- type QueryObjectResult
- type QueryResult
- type QueryUniqueResult
- type ReadInstAssociationResult
- type ReadModelAssociationResult
- type ReadModelAttrResult
- type ReadModelAttributeGroupResult
- type ReadModelClassifitionResult
- type ReadModelResult
- type ReadModelUniqueResult
- type Region
- type RegionVpc
- type RemoveFromModuleHost
- type RemoveFromModuleInfo
- type RemoveHostsFromModuleOption
- type RemoveTemplateBindingOnModuleOption
- type RemoveTemplateBoundOnModuleResult
- type RepeatedDataResult
- type ReponseSysUserConfig
- type RequestImportAssociation
- type RequestInstAssociationObjectID
- type RequestInstAssociationObjectIDCondition
- type Resource
- type ResourceType
- type RespError
- type ResponeImportAssociation
- type ResponeImportAssociationData
- type Response
- type ResponseDataMapStr
- type ResponseInstData
- type ResponseSysUserConfigData
- type RoleAppResult
- type RolePriResult
- type RowMsgData
- type RspID
- type RspNetcollectConfirm
- type RspNetcollectHistory
- type RspNetcollectReport
- type RspNetcollectorSearch
- type RspSubscriptionCreate
- type RspSubscriptionSearch
- type RspSubscriptionTestCallback
- type SearchAccountValidityOption
- type SearchAssociationInstRequest
- type SearchAssociationInstRequestCond
- type SearchAssociationInstResult
- type SearchAssociationKindResult
- type SearchAssociationObjectRequest
- type SearchAssociationObjectResult
- type SearchAssociationTopoResult
- type SearchAssociationTypeRequest
- type SearchAssociationTypeResult
- type SearchChartCommon
- type SearchChartConfig
- type SearchChartResponse
- type SearchCloudOption
- type SearchCondition
- type SearchDataResult
- type SearchHost
- type SearchHostIdentifierData
- type SearchHostIdentifierParam
- type SearchHostIdentifierResult
- type SearchHostResult
- type SearchHostWithIDOption
- type SearchHostWithInnerIPOption
- type SearchIdentifierParam
- type SearchInnterAppTopoResult
- type SearchInstBatchOption
- type SearchInstResult
- type SearchLimitdeprecated
- type SearchModelInfo
- type SearchModelResult
- type SearchNetDevice
- type SearchNetDeviceResult
- type SearchNetProperty
- type SearchNetPropertyResult
- type SearchParams
- type SearchResourceDirParams
- type SearchResourceDirResult
- type SearchResp
- type SearchRuleRelatedModulesOption
- type SearchSort
- type SearchSortParse
- type SearchSyncHistoryOption
- type SearchSyncRegionOption
- type SearchSyncTaskOption
- type SearchTopoGraphicsResult
- type SearchTopoInstanceNodeResult
- type SearchTopoModelNodeResult
- type SearchTopoResult
- type SearchUniqueRequest
- type SearchUniqueResult
- type SearchVpcHostCntOption
- type SearchVpcOption
- type SearchVpcResult
- type SecretContent
- type SecretKeyInfo
- type SecretKeyResult
- type ServiceCategory
- type ServiceCategoryWithStatistics
- type ServiceDifferenceDetails
- type ServiceInstance
- type ServiceInstanceDeletePreview
- type ServiceInstanceDetail
- type ServiceInstanceDifference
- type ServiceInstanceWithTopoPath
- type ServiceProcessInstanceDifference
- type ServiceTemplate
- type ServiceTemplateDetail
- type ServiceTemplateWithStatistics
- type SetAssociationKind
- type SetDataResult
- type SetDiff
- type SetHostConfigParams
- type SetIdenifierFlag
- type SetInst
- type SetManyAssociationKind
- type SetManyInstanceAssociation
- type SetManyModelClassification
- type SetManyModelInstance
- type SetModel
- type SetModelAssociation
- type SetModelAttributeGroup
- type SetModelAttributes
- type SetModelInstance
- type SetModuleDiff
- type SetOneInstanceAssociation
- type SetOneModelClassification
- type SetOptionResult
- type SetServiceTemplateRelation
- type SetSyncStatusOption
- type SetTemplate
- type SetTemplateResult
- type SetTemplateSyncStatus
- type SetTemplateUpdateToDateStatus
- type SetTemplateWithStatistics
- type SetTplDiffResult
- type SetUpdateToDateStatus
- type SinglecharItem
- type SiteCfg
- type SocketBindType
- type StatisticInstOperation
- type Statistics
- type StringArrayToString
- type StringIDCount
- type SubAttribute
- type Subscription
- type SuccessResponse
- type SyncDetail
- type SyncFailInfo
- type SyncHistory
- type SyncModuleServiceInstanceByTemplateOption
- type SyncModuleTask
- type SyncRegion
- type SyncResult
- type SyncServiceInstanceByTemplateOption
- type SyncSetTplToInstOption
- type SyncStatus
- type SyncStatusDesc
- type SyncSuccessInfo
- type SynchronizeClearDataParameter
- type SynchronizeDataInfo
- type SynchronizeDataResult
- type SynchronizeFindInfoParameter
- type SynchronizeItem
- type SynchronizeOperateDataType
- type SynchronizeOperateType
- type SynchronizeParameter
- type SynchronizeResult
- type SysUserConfigItem
- type TaskDetailResponse
- type TemplateVersion
- type Time
- func (t Time) MarshalBSONValue() (bsontype.Type, []byte, error)
- func (t Time) MarshalJSON() ([]byte, error)
- func (t *Time) Scan(value interface{}) error
- func (t *Time) UnmarshalBSONValue(typo bsontype.Type, raw []byte) error
- func (t *Time) UnmarshalJSON(data []byte) error
- func (t Time) Value() (driver.Value, error)
- type TimeRange
- type TitleItem
- type Topo
- type TopoGraphics
- func (t *TopoGraphics) FillBlank() *TopoGraphics
- func (t *TopoGraphics) SetExt(val map[string]interface{})
- func (t *TopoGraphics) SetIcon(val string)
- func (t *TopoGraphics) SetInstID(val int)
- func (t *TopoGraphics) SetIsPre(val bool)
- func (t *TopoGraphics) SetNodeName(val string)
- func (t *TopoGraphics) SetNodeType(val string)
- func (t *TopoGraphics) SetObjID(val string)
- func (t *TopoGraphics) SetPosition(val Position)
- func (t *TopoGraphics) SetScopeID(val string)
- func (t *TopoGraphics) SetScopeType(val string)
- func (t *TopoGraphics) SetSupplierAccount(val string)
- type TopoInst
- type TopoInstRst
- type TopoInstRstVisitor
- type TopoInstance
- type TopoInstanceNode
- func (node *TopoInstanceNode) DeepFirstTraversal(f func(node *TopoInstanceNode))
- func (node *TopoInstanceNode) Name() string
- func (node *TopoInstanceNode) ToSimplify() *TopoInstanceNodeSimplify
- func (node *TopoInstanceNode) TraversalFindModule(targetID int64) []*TopoInstanceNode
- func (node *TopoInstanceNode) TraversalFindNode(objectType string, targetID int64) []*TopoInstanceNode
- type TopoInstanceNodeSimplify
- type TopoItem
- type TopoModelNode
- type TopoNode
- type TopoNodeHostCount
- type TopoPathResult
- type TransferException
- type TransferExceptionResult
- type TransferHostAcrossBusinessParameter
- type TransferHostResourceDirectory
- type TransferHostToInnerModule
- type TransferHostWithAutoClearServiceInstanceOption
- type TransferHostsCrossBusinessRequest
- type TransferOptions
- type TxnCapable
- type TxnOption
- type Uint64DataResponse
- type Uint64Response
- type UniqueKey
- type UpdateAssociationObjectRequest
- type UpdateAssociationObjectResult
- type UpdateAssociationTypeRequest
- type UpdateAssociationTypeResult
- type UpdateAttrIndexData
- type UpdateAttributeIndex
- type UpdateBusinessStatusOption
- type UpdateGroupCondition
- type UpdateHostApplyRuleOption
- type UpdateHostByHostApplyRuleOption
- type UpdateHostCloudAreaFieldOption
- type UpdateHostPropertyBatchParameter
- type UpdateID
- type UpdateInstCount
- type UpdateModelAttrUnique
- type UpdateModuleHostApplyEnableStatusOption
- type UpdateOption
- type UpdateParams
- type UpdateProcessByIDsInput
- type UpdateProcessTemplateInput
- type UpdateRawProcessInstanceInput
- type UpdateResult
- type UpdateServiceTemplateOption
- type UpdateSetTemplateOption
- type UpdateTopoGraphicsInput
- type UpdateUniqueRequest
- type UpdateUniqueResult
- type UpdatedAttrIndexResult
- type UpdatedCount
- type UpdatedDataResult
- type UpdatedOptionResult
- type UserConfig
- type UserConfigMeta
- type UserConfigResult
- type UserCustomQueryDetailResult
- type UserInfo
- type ValidationRulesCfg
- type Vpc
- type VpcHostCntResult
- type VpcInfo
- type VpcInstances
- type VpcInstancesCnt
- type VpcSyncInfo
- type VpcsInfo
Constants ¶
const ( // AssociationFieldObjectID the association data field definition AssociationFieldObjectID = "bk_obj_id" // AssociationFieldAsstID the association data field bk_obj_asst_id AssociationFieldAsstID = "bk_obj_asst_id" // AssociationFieldObjectAttributeID the association data field definition //AssociationFieldObjectAttributeID = "bk_object_att_id" // AssociationFieldSupplierAccount the association data field definition AssociationFieldSupplierAccount = "bk_supplier_account" // AssociationFieldAssociationForward the association data field definition // AssociationFieldAssociationForward = "bk_asst_forward" // AssociationFieldAssociationObjectID the association data field definition AssociationFieldAssociationObjectID = "bk_asst_obj_id" // AssociationFieldAssociationName the association data field definition // AssociationFieldAssociationName = "bk_asst_name" // AssociationFieldAssociationId auto incr id AssociationFieldAssociationId = "id" AssociationFieldAssociationKind = "bk_asst_id" )
const ( // this is a default action, which is do nothing when a association between object is deleted. NoAction AssociationOnDeleteAction = "none" // delete related source object instances when the association is deleted. DeleteSource AssociationOnDeleteAction = "delete_src" // delete related destination object instances when the association is deleted. DeleteDestinatioin AssociationOnDeleteAction = "delete_dest" // the source object can be related with only one destination object OneToOneMapping AssociationMapping = "1:1" // the source object can be related with multiple destination objects OneToManyMapping AssociationMapping = "1:n" // multiple source object can be related with multiple destination objects ManyToManyMapping AssociationMapping = "n:n" )
const ( AttributeFieldID = "id" AttributeFieldSupplierAccount = "bk_supplier_account" AttributeFieldObjectID = "bk_obj_id" AttributeFieldPropertyID = "bk_property_id" AttributeFieldPropertyName = "bk_property_name" AttributeFieldPropertyGroup = "bk_property_group" AttributeFieldPropertyIndex = "bk_property_index" AttributeFieldUnit = "unit" AttributeFieldPlaceHolder = "placeholder" AttributeFieldIsEditable = "editable" AttributeFieldIsPre = "ispre" AttributeFieldIsRequired = "isrequired" AttributeFieldIsReadOnly = "isreadonly" AttributeFieldIsOnly = "isonly" AttributeFieldIsSystem = "bk_issystem" AttributeFieldIsAPI = "bk_isapi" AttributeFieldPropertyType = "bk_property_type" AttributeFieldOption = "option" AttributeFieldDescription = "description" AttributeFieldCreator = "creator" AttributeFieldCreateTime = "create_time" AttributeFieldLastTime = "last_time" )
const ( ClassificationFieldID = "id" ClassFieldClassificationID = "bk_classification_id" ClassFieldClassificationName = "bk_classification_name" )
const ( AWS string = "1" TencentCloud string = "2" )
云厂商 和属性表中的bk_cloud_vendor值相对应
const ( CloudSyncSuccess string = "cloud_sync_success" CloudSyncFail string = "cloud_sync_fail" CloudSyncInProgress string = "cloud_sync_in_progress" )
云同步任务同步状态
const ( EventActionCreate = "create" EventActionUpdate = "update" EventActionDelete = "delete" )
EventAction
const ( // 实例CRUD事件,实例类型通过event中的objType字段区分 EventTypeInstData = "instdata" // 实例间的绑定关系发生变化,目前主要用于主机转移 EventTypeRelation = "relation" EventTypeAssociation = "association" EventTypeResourcePoolModule = "resource" )
EventType enumeration
const ( EventObjTypeProcModule = "processmodule" EventObjTypeModuleTransfer = "moduletransfer" )
Event object type common instance's Event object type are model object id below are object type for relations
const ( GroupFieldID = "id" GroupFieldGroupID = "bk_group_id" GroupFieldGroupName = "bk_group_name" GroupFieldGroupIndex = "bk_group_index" GroupFieldObjectID = "bk_obj_id" GroupFieldSupplierAccount = "bk_supplier_account" GroupFieldIsDefault = "bk_isdefault" GroupFieldIsPre = "ispre" )
const ( TopoNodeKeyword = "keyword" // 主机更新时是否剔除绑定了主机属性自动应用的字段 HostUpdateWithoutHostApplyFiled = true )
const ( // LabelTrue and LabelFalse is used to define if the label value is a bool value, // which is true or false. LabelTrue string = "true" LabelFalse string = "false" // LabelBusinessID is used to define a label key which value is the business number value. LabelBusinessID string = "bk_biz_id" // LabelModelKind is used to define a label key which describe what kind of this object is. // this label key is always used with the value of PublicModelKindValue or BusinessModelKindValue. LabelModelKind string = "object_kind" PublicModelKindValue ModelKind = "public_object" BusinessModelKindValue ModelKind = "business_object" )
const ( BKMetadata string = "metadata" BKLabel string = "label" )
const ( CollectorStatusNormal = "normal" CollectorStatusAbnormal = "abnormal" CollectorConfigStatusNormal = "normal" CollectorConfigStatusPending = "pending" CollectorConfigStatusAbnormal = "abnormal" CollectorReportStatusNormal = "normal" CollectorReportStatusAbnormal = "abnormal" )
NetcollectorStatus define
const ( ReporctActionCreate = "create" ReporctActionUpdate = "update" ReporctActionDelete = "delete" )
const ( ReporctMethodAccept = "accept" ReporctMethodIgnore = "ignore" )
const ( ModelFieldID = "id" ModelFieldObjCls = "bk_classification_id" ModelFieldObjIcon = "bk_obj_icon" ModelFieldObjectID = "bk_obj_id" ModelFieldObjectName = "bk_obj_name" ModelFieldIsHidden = "bk_ishidden" ModelFieldIsPre = "ispre" ModelFieldIsPaused = "bk_ispaused" ModelFieldPosition = "position" ModelFieldOwnerID = "bk_supplier_account" ModelFieldDescription = "description" ModelFieldCreator = "creator" ModelFieldModifier = "modifier" ModelFieldCreateTime = "create_time" ModelFieldLastTime = "last_time" )
const ( PageName = "page" PageSort = "sort" PageStart = "start" DBFields = "fields" DBQueryCondition = "condition" )
const ( UniqueKeyKindProperty = "property" UniqueKeyKindAssociation = "association" )
const CCSystemUserConfigSwitch = "user_config_switch"
const (
CC_time_type_parse_flag = "cc_time_type"
)
Variables ¶
var ( ConfirmModeHTTPStatus = "httpstatus" ConfirmModeRegular = "regular" )
ConfirmMode define
var ( BizModuleHostChart = ChartConfig{ ReportType: common.BizModuleHostChart, } HostOsChart = ChartConfig{ ReportType: common.HostOSChart, Name: "按操作系统类型统计", ObjID: "host", Width: "50", ChartType: "pie", Field: "bk_os_type", XAxisCount: 10, } HostBizChart = ChartConfig{ ReportType: common.HostBizChart, Name: "按业务统计", ObjID: "host", Width: "50", ChartType: "bar", XAxisCount: 10, } HostCloudChart = ChartConfig{ ReportType: common.HostCloudChart, Name: "按云区域统计", Width: "100", ObjID: "host", ChartType: "bar", Field: common.BKCloudIDField, XAxisCount: 20, } HostChangeBizChart = ChartConfig{ ReportType: common.HostChangeBizChart, Name: "主机数量变化趋势", Width: "100", XAxisCount: 20, } ModelAndInstCountChart = ChartConfig{ ReportType: common.ModelAndInstCount, } ModelInstChart = ChartConfig{ ReportType: common.ModelInstChart, Name: "实例数量统计", Width: "50", ChartType: "bar", XAxisCount: 10, } ModelInstChangeChart = ChartConfig{ ReportType: common.ModelInstChangeChart, Name: "实例变更统计", Width: "50", ChartType: "bar", XAxisCount: 10, } InnerChartsMap = map[string]ChartConfig{ common.BizModuleHostChart: BizModuleHostChart, common.ModelAndInstCount: ModelAndInstCountChart, common.HostOSChart: HostOsChart, common.HostBizChart: HostBizChart, common.HostCloudChart: HostCloudChart, common.HostChangeBizChart: HostChangeBizChart, common.ModelInstChart: ModelInstChart, common.ModelInstChangeChart: ModelInstChangeChart, } InnerChartsArr = []string{ common.BizModuleHostChart, common.ModelAndInstCount, common.HostOSChart, common.HostBizChart, common.HostCloudChart, common.HostChangeBizChart, common.ModelInstChart, common.ModelInstChangeChart, } )
var ( SyncStatusWaiting = SyncStatus("waiting") // 等待同步 SyncStatusSyncing = SyncStatus("syncing") // 同步中 SyncStatusFinished = SyncStatus("finished") // 同步完成 SyncStatusFailure = SyncStatus("failure") // 同步失败 )
var ( ModuleDiffAdd = "add" ModuleDiffRemove = "remove" ModuleDiffChanged = "changed" ModuleDiffUnchanged = "unchanged" )
var BizLabelNotExist = mapstr.MapStr{"metadata.label.bk_biz_id": mapstr.MapStr{"$exists": false}}
var HostApplyFieldMap = map[string]bool{ common.BKOperatorField: true, common.BKBakOperatorField: true, "bk_state": true, "bk_sla": true, common.BKHostInnerIPField: false, common.BKHostOuterIPField: false, common.BKAssetIDField: false, common.BKSNField: false, "bk_comment": false, "bk_service_term": false, common.BKCloudIDField: false, "bk_state_name": false, "bk_province_name": false, "bk_isp_name": false, common.BKHostNameField: false, common.BKOSTypeField: false, common.BKOSNameField: false, "bk_os_version": false, "bk_os_bit": false, "bk_cpu": false, "bk_cpu_mhz": false, "bk_cpu_module": false, "bk_mem": false, "bk_disk": false, "bk_mac": false, "bk_outer_mac": false, common.HostFieldDockerClientVersion: false, common.HostFieldDockerServerVersion: false, common.CreateTimeField: false, common.LastTimeField: false, common.BKImportFrom: false, common.BKCloudInstIDField: false, common.BKCloudHostStatusField: false, common.BKCloudVendor: false, }
var (
LabelKeyNotExistError = errors.New("label key does not exist")
)
var MetadataBizField = "metadata.label.bk_biz_id"
var (
ProcessPortFormat = regexp.MustCompile(`^(((([1-9][0-9]{0,3})|([1-5][0-9]{4})|(6[0-4][0-9]{3})|(65[0-4][0-9]{2})|(655[0-2][0-9])|(6553[0-5]))-(([1-9][0-9]{0,3})|([1-5][0-9]{4})|(6[0-4][0-9]{3})|(65[0-4][0-9]{2})|(655[0-2][0-9])|(6553[0-5])))|((([1-9][0-9]{0,3})|([1-5][0-9]{4})|(6[0-4][0-9]{3})|(65[0-4][0-9]{2})|(655[0-2][0-9])|(6553[0-5]))))(,(((([1-9][0-9]{0,3})|([1-5][0-9]{4})|(6[0-4][0-9]{3})|(65[0-4][0-9]{2})|(655[0-2][0-9])|(6553[0-5])))|((([1-9][0-9]{0,3})|([1-5][0-9]{4})|(6[0-4][0-9]{3})|(65[0-4][0-9]{2})|(655[0-2][0-9])|(6553[0-5]))-(([1-9][0-9]{0,3})|([1-5][0-9]{4})|(6[0-4][0-9]{3})|(65[0-4][0-9]{2})|(655[0-2][0-9])|(6553[0-5])))))*$`)
)
var SuccessBaseResp = BaseResp{Result: true, Code: common.CCSuccess, ErrMsg: common.CCSuccessStr}
SuccessBaseResp default result
var SupportedCloudVendors = []string{AWS, TencentCloud}
支持的云厂商 实现了相应的云厂商插件
Functions ¶
func BizIDFromMetadata ¶
func CheckAllowHostApplyOnField ¶
CheckAllowHostApplyOnField 检查字段是否能用于主机属性自动应用
func ConvertHostSpecialStringToArray ¶
convert host ip and operator fields value from string to array
func FilterValidFields ¶
func GetAllProcessPropertyFields ¶
func GetAllProcessPropertyFields() []string
func GetAuditDict ¶
func GetAuditDict() []resourceTypeInfo
func GetBusinessIDFromMeta ¶
func GetBusinessIDFromMeta(data interface{}) string
func GetInstIDFieldByObjID ¶
func GetInstNameFieldName ¶
func GetSetTemplateSyncIndex ¶
GetSetTemplateSyncIndex 返回task_server中任务的检索值(flag)
func IsAsDefaultValue ¶
func NewPublicOrBizConditionByBizID ¶
NewPublicOrBizConditionByBizID new a query condition
func ParseBizIDFromData ¶
GetBizIDFromMetadata parse biz id from metadata, 0 for global case nil ==> 0, error [] ==> 0, error {} ==> 0, nil {"label": {}} ==> 0, nil {"label": []} ==> 0, error {"label": {"bk_biz_id": 1}} ==> 1, nil {"label": {"bk_biz_id": "a"}} ==> 0, error
func ParseCursorTypeFromEventType ¶
func ParseCursorTypeFromEventType(eventType string) watch.CursorType
ParseCursorTypeFromEventType returns target cursor type type base on event type.
func PublicAndBizCondition ¶
func Register ¶
func Register(propertyBindInfo ProcPropertyExtraBindInfoInterface, procBindInfo ProcExtraBindInfoInterface)
Register 实现, 替换已有的进程,进程模板中进程绑定信息实际结构的处理对象
func StringToTimeDurationHookFunc ¶
func StringToTimeDurationHookFunc() mapstructure.DecodeHookFunc
Types ¶
type APISubTaskDetail ¶
type APISubTaskDetail struct { SubTaskID string `json:"sub_task_id" bson:"sub_task_id"` Data interface{} `json:"data" bson:"data"` Status APITaskStatus `json:"status" bson:"status"` Response *Response `json:"response" bson:"response"` }
APISubTaskDetail task data and execute detail
type APITaskDetail ¶
type APITaskDetail struct { // task id TaskID string `json:"task_id" bson:"task_id"` // task name. 表示所在的任务队列 Name string `json:"name" bson:"name"` // flag task 任务标识,留给业务方做识别任务 Flag string `json:"flag" bson:"flag"` // task create user User string `json:"user" bson:"user"` // http header Header http.Header `json:"header" bson:"header"` // task status Status APITaskStatus `json:"status" bson:"status"` // sub task detail Detail []APISubTaskDetail `json:"detail" bson:"detail"` CreateTime time.Time `json:"create_time" bson:"create_time"` LastTime time.Time `json:"last_time" bson:"last_time"` }
APITaskDetail task info detaill
type APITaskStatus ¶
type APITaskStatus int64
APITaskStatus task status type
const ( // APITaskStatusNew new task ,waiting execute APITaskStatusNew APITaskStatus = 0 // APITaskStatusWaitExecute 正在执行的任务中断了。 补偿后。确定需要重新执行 APITaskStatusWaitExecute APITaskStatus = 1 // APITaskStatuExecute task executing APITaskStatuExecute APITaskStatus = 100 // APITaskStatusSuccess task execute success APITaskStatusSuccess APITaskStatus = 200 // APITAskStatusFail task execute failure APITAskStatusFail APITaskStatus = 500 )
func (APITaskStatus) IsFailure ¶
func (s APITaskStatus) IsFailure() bool
func (APITaskStatus) IsFinished ¶
func (s APITaskStatus) IsFinished() bool
func (APITaskStatus) IsSuccessful ¶
func (s APITaskStatus) IsSuccessful() bool
type AccountValidityInfo ¶
type ActionType ¶
type ActionType string
ActionType defines all the user's operation type
const ( // create a resource AuditCreate ActionType = "create" // update a resource AuditUpdate ActionType = "update" // delete a resource AuditDelete ActionType = "delete" // transfer a host from resource pool to biz AuditAssignHost ActionType = "assign_host" // transfer a host from biz to resource pool AuditUnassignHost ActionType = "unassign_host" // transfer host to another module AuditTransferHostModule ActionType = "transfer_host_module" // archive a resource AuditArchive ActionType = "archive" // recover a resource AuditRecover ActionType = "recover" // pause an object AuditPause ActionType = "stop" // resume using an object AuditResume ActionType = "resume" )
type AddConfigQuery ¶
type AddDeviceResult ¶
type AddDeviceResult struct {
DeviceID uint64 `json:"device_id"`
}
type AddHistoryResult ¶
type AddHostFromAgentHostList ¶
type AddHostFromAgentHostList struct {
HostInfo map[string]interface{} `json:"host_info"`
}
type AddHostToResourcePoolResult ¶
type AddHostToResourcePoolResult struct { Success []AddOneHostToResourcePoolResult `json:"success,omitempty"` Error []AddOneHostToResourcePoolResult `json:"error,omitempty"` }
type AddNetPropertyResult ¶
type AddNetPropertyResult struct {
NetcollectPropertyID uint64 `json:"netcollect_property_id"`
}
type AddToModuleInfo ¶
type AddToModuleInfo struct { ModuleID int64 `field:"bk_module_id" json:"bk_module_id"` ServiceTemplate *ServiceTemplateDetail `field:"service_template" json:"service_template"` }
type AggregateIntResponse ¶
type AggregateIntResponse struct { BaseResp `json:",inline"` Data []IntIDCount `json:"data"` }
type AggregateStringResponse ¶
type AggregateStringResponse struct { BaseResp `json:",inline"` Data []StringIDCount `json:"data"` }
type AppBasicInfoResult ¶
type AppBasicInfoResult struct { BaseResp Data BizBasicInfo `json:"data"` }
type AppQueryResult ¶
type AppQueryResult struct { BaseResp `json:",inline"` Data InstResult `json:"data"` }
type AssignHostToAppParams ¶
type Association ¶
type Association struct { ID int64 `field:"id" json:"id" bson:"id"` OwnerID string `field:"bk_supplier_account" json:"bk_supplier_account" bson:"bk_supplier_account"` // the unique id belongs to this association, should be generated with rules as follows: // "$ObjectID"_"$AsstID"_"$AsstObjID" AssociationName string `field:"bk_obj_asst_id" json:"bk_obj_asst_id" bson:"bk_obj_asst_id"` // the alias name of this association, which is a substitute name in the association kind $AsstKindID AssociationAliasName string `field:"bk_obj_asst_name" json:"bk_obj_asst_name" bson:"bk_obj_asst_name"` // describe which object this association is defined for. ObjectID string `field:"bk_obj_id" json:"bk_obj_id" bson:"bk_obj_id"` // describe where the Object associate with. AsstObjID string `field:"bk_asst_obj_id" json:"bk_asst_obj_id" bson:"bk_asst_obj_id"` // the association kind used by this association. AsstKindID string `field:"bk_asst_id" json:"bk_asst_id" bson:"bk_asst_id"` // defined which kind of association can be used between the source object and destination object. Mapping AssociationMapping `field:"mapping" json:"mapping" bson:"mapping"` // describe the action when this association is deleted. OnDelete AssociationOnDeleteAction `field:"on_delete" json:"on_delete" bson:"on_delete"` // describe whether this association is a pre-defined association or not, // if true, it means this association is used by cmdb itself. IsPre *bool `field:"ispre" json:"ispre" bson:"ispre"` ClassificationID string `field:"bk_classification_id" json:"-" bson:"-"` ObjectIcon string `field:"bk_obj_icon" json:"-" bson:"-"` ObjectName string `field:"bk_obj_name" json:"-" bson:"-"` }
Association defines the association between two objects.
func (*Association) CanUpdate ¶
func (a *Association) CanUpdate() (field string, can bool)
return field means which filed is set but is forbidden to update.
func (*Association) Parse ¶
func (cli *Association) Parse(data mapstr.MapStr) (*Association, error)
Parse load the data from mapstr attribute into attribute instance
type AssociationDetail ¶
type AssociationDetail struct { // the ID of the association kind. AssociationKindID string `json:"bk_asst_id"` Associations []Association `json:"assts"` }
type AssociationDirection ¶
type AssociationDirection string
关联类型
const ( NoneDirection AssociationDirection = "none" DestinationToSource AssociationDirection = "src_to_dest" SourceToDestination AssociationDirection = "dest_to_src" Bidirectional AssociationDirection = "bidirectional" )
type AssociationIdItem ¶
type AssociationIdItem struct {
BaseCfgItem `json:",inline"`
}
type AssociationKind ¶
type AssociationKind struct { ID int64 `field:"id" json:"id" bson:"id"` // a unique association id created by user. AssociationKindID string `field:"bk_asst_id" json:"bk_asst_id" bson:"bk_asst_id"` // a memorable name for this association kind, could be a chinese name, a english name etc. AssociationKindName string `field:"bk_asst_name" json:"bk_asst_name" bson:"bk_asst_name"` // the owner that this association type belongs to. OwnerID string `field:"bk_supplier_account" json:"bk_supplier_account" bson:"bk_supplier_account"` // the describe for the relationship from source object to the target(destination) object, which will be displayed // when the topology is constructed between objects. SourceToDestinationNote string `field:"src_des" json:"src_des" bson:"src_des"` // the describe for the relationship from the target(destination) object to source object, which will be displayed // when the topology is constructed between objects. DestinationToSourceNote string `field:"dest_des" json:"dest_des" bson:"dest_des"` // the association direction between two objects. Direction AssociationDirection `field:"direction" json:"direction" bson:"direction"` // whether this is a pre-defined kind. IsPre *bool `field:"ispre" json:"ispre" bson:"ispre"` }
func (*AssociationKind) Parse ¶
func (cli *AssociationKind) Parse(data mapstr.MapStr) (*AssociationKind, error)
type AssociationKindIDs ¶
type AssociationKindIDs struct { // the association kind ids. AsstIDs []string `json:"asst_ids"` }
type AssociationList ¶
type AssociationList struct {
Associations []AssociationDetail `json:"associations"`
}
type AssociationMapping ¶
type AssociationMapping string
type AssociationOnDeleteAction ¶
type AssociationOnDeleteAction string
type AssociationOpDetail ¶
type AssociationParams ¶
type AssociationParams struct { Page BasePage `json:"page,omitempty"` Fields map[string][]string `json:"fields,omitempty"` Condition map[string][]ConditionItem `json:"condition,omitempty"` }
AssociationParams association params
type Attribute ¶
type Attribute struct { BizID int64 `field:"bk_biz_id" json:"bk_biz_id" bson:"bk_biz_id"` ID int64 `field:"id" json:"id" bson:"id"` OwnerID string `field:"bk_supplier_account" json:"bk_supplier_account" bson:"bk_supplier_account"` ObjectID string `field:"bk_obj_id" json:"bk_obj_id" bson:"bk_obj_id"` PropertyID string `field:"bk_property_id" json:"bk_property_id" bson:"bk_property_id"` PropertyName string `field:"bk_property_name" json:"bk_property_name" bson:"bk_property_name"` PropertyGroup string `field:"bk_property_group" json:"bk_property_group" bson:"bk_property_group"` PropertyGroupName string `field:"bk_property_group_name,ignoretomap" json:"bk_property_group_name" bson:"-"` PropertyIndex int64 `field:"bk_property_index" json:"bk_property_index" bson:"bk_property_index"` Unit string `field:"unit" json:"unit" bson:"unit"` Placeholder string `field:"placeholder" json:"placeholder" bson:"placeholder"` IsEditable bool `field:"editable" json:"editable" bson:"editable"` IsPre bool `field:"ispre" json:"ispre" bson:"ispre"` IsRequired bool `field:"isrequired" json:"isrequired" bson:"isrequired"` IsReadOnly bool `field:"isreadonly" json:"isreadonly" bson:"isreadonly"` IsOnly bool `field:"isonly" json:"isonly" bson:"isonly"` IsSystem bool `field:"bk_issystem" json:"bk_issystem" bson:"bk_issystem"` IsAPI bool `field:"bk_isapi" json:"bk_isapi" bson:"bk_isapi"` PropertyType string `field:"bk_property_type" json:"bk_property_type" bson:"bk_property_type"` Option interface{} `field:"option" json:"option" bson:"option"` Description string `field:"description" json:"description" bson:"description"` Creator string `field:"creator" json:"creator" bson:"creator"` CreateTime *Time `json:"create_time" bson:"create_time"` LastTime *Time `json:"last_time" bson:"last_time"` }
Attribute attribute metadata definition
func (Attribute) PrettyValue ¶
type AttributeGroup ¶
type AttributeGroup struct { ID int64 `field:"id" json:"id" bson:"id"` OwnerID string `field:"bk_supplier_account" json:"bk_supplier_account" bson:"bk_supplier_account"` ObjectID string `field:"bk_obj_id" json:"bk_obj_id" bson:"bk_obj_id"` IsDefault bool `field:"bk_isdefault" json:"bk_isdefault" bson:"bk_isdefault"` IsPre bool `field:"ispre" json:"ispre" bson:"ispre"` GroupID string `field:"bk_group_id" json:"bk_group_id" bson:"bk_group_id"` GroupName string `field:"bk_group_name" json:"bk_group_name" bson:"bk_group_name"` GroupIndex int64 `field:"bk_group_index" json:"bk_group_index" bson:"bk_group_index"` }
AttributeGroup attribute metadata definition
type AttributeWrapper ¶
type AttributeWrapper struct { Attribute `json:",inline"` AssoType int `json:"bk_asst_type"` AsstForward string `json:"bk_asst_forward"` AssociationID string `json:"bk_asst_obj_id"` PropertyGroupName string `json:"bk_property_group_name"` }
AttributeWrapper wrapper, expansion field
type AttributesOption ¶
type AttributesOptions ¶
type AttributesOptions []AttributesOption
type AuditLog ¶
type AuditLog struct { ID int64 `json:"id" bson:"id"` // AuditType is a high level abstract of the resource managed by this cmdb. // Each kind of concept, resource must belongs to one of the resource type. AuditType AuditType `json:"audit_type" bson:"audit_type"` // the supplier account that this resource belongs to. SupplierAccount string `json:"bk_supplier_account" bson:"bk_supplier_account"` // name of the one who triggered this operation. User string `json:"user" bson:"user"` // the operated resource by the user ResourceType ResourceType `json:"resource_type" bson:"resource_type"` // ActionType represent the user's operation type, like CUD etc. Action ActionType `json:"action" bson:"action"` // OperateFrom describe which form does this audit come from. OperateFrom OperateFromType `json:"operate_from" bson:"operate_from"` // OperationDetail describe the details information by a user. // Note: when the ResourceType relevant to Business, then the business id field must // be bk_biz_id, otherwise the user can not search this operation log with business id. OperationDetail DetailFactory `json:"operation_detail" bson:"operation_detail"` // OperationTime is the time that user do the operation. OperationTime Time `json:"operation_time" bson:"operation_time"` // the business id of the resource if it belongs to a business. BusinessID int64 `json:"bk_biz_id,omitempty" bson:"bk_biz_id,omitempty"` // ResourceID is the id of the resource instance. which is a unique id, dynamic grouping id is string type. ResourceID interface{} `json:"resource_id" bson:"resource_id"` // ResourceName is the name of the resource, such as a switch model has a name "switch" ResourceName string `json:"resource_name" bson:"resource_name"` }
func (AuditLog) MarshalBSON ¶
func (*AuditLog) UnmarshalBSON ¶
func (*AuditLog) UnmarshalJSON ¶
type AuditQueryCondition ¶
type AuditQueryCondition struct { AuditType AuditType `json:"audit_type"` User string `json:"user"` ResourceType ResourceType `json:"resource_type" ` Action []ActionType `json:"action"` OperateFrom OperateFromType `json:"operate_from"` BizID int64 `json:"bk_biz_id"` ResourceID interface{} `json:"resource_id"` // ResourceName filters audit logs by resource name, such as instance name, host ip etc., support fuzzy query ResourceName string `json:"resource_name"` // OperationTime is an array of start time and end time, filters audit logs between them OperationTime OperationTimeCondition `json:"operation_time"` // Category is used by front end, filters audit logs as business(business resource related to business), resource(instance resource not related to business), host or other category Category string `json:"category"` // ObjID is used for instance audit log filter like host deletion history ObjID string `json:"bk_obj_id"` }
type AuditQueryInput ¶
type AuditQueryInput struct { Condition AuditQueryCondition `json:"condition"` Page BasePage `json:"page,omitempty"` }
func (*AuditQueryInput) Validate ¶
func (input *AuditQueryInput) Validate() errors.RawErrorInfo
Validate validates the input param
type AuditQueryResult ¶
type AuditType ¶
type AuditType string
const ( // BusinessKind represent business itself's operation audit. such as you change a business maintainer, it's // audit belongs to this kind. BusinessType AuditType = "business" // Business resource include resources as follows: // - service template // - set template // - service category // - dynamic group // - main line instance, such as user-defined topology level, set, module etc. // - service instance. // - others. // // Note: host does not belong to business resource, it's a independent resource kind. BusinessResourceType AuditType = "business_resource" // HostType represent all the host related resource's operation audit. HostType AuditType = "host" // ModelType represent all the operation audit related with model in the system ModelType AuditType = "model" // ModelInstanceType represent all the operation audit related with model instance in the system, // and the instance association is included. ModelInstanceType AuditType = "model_instance" // AssociationKindType represent all the association kind operation audit. AssociationKindType AuditType = "association_kind" // EventType represent all the event related operation audit. EventPushType AuditType = "event" // CloudResource represent all the operation audit related with cloud, such as: // - cloud area // - cloud account // - cloud synchronize job // - others CloudResourceType AuditType = "cloud_resource" )
func GetAuditTypeByObjID ¶
func GetAuditTypesByCategory ¶
type AuthBathVerifyRequest ¶
type AuthBathVerifyRequest struct {
Resources []AuthResource `json:"resources"`
}
type AuthBathVerifyResult ¶
type AuthBathVerifyResult struct { AuthResource // the authorize decision, whether a user has been authorized or not. Passed bool `json:"is_pass"` }
type AuthResource ¶
type AuthResource struct { BizID int64 `json:"bk_biz_id"` ResourceType string `json:"resource_type"` ResourceID int64 `json:"resource_id"` ResourceIDEx string `json:"resource_id_ex"` Action string `json:"action"` ParentLayers []struct { ResourceType string `json:"resource_type"` ResourceID int64 `json:"resource_id"` ResourceIDEx string `json:"resource_id_ex"` } `json:"parent_layers"` }
type BKResponse ¶
type BKResponse struct { BkBaseResp `json:",inline"` Data interface{} `json:"data"` }
type BackendCfg ¶
type BackendCfg struct { SnapshotBizName string `json:"snapshotBizName"` MaxBizTopoLevel int64 `json:"maxBizTopoLevel"` }
BackendCfg used to admin backend Config
func (BackendCfg) Validate ¶
func (b BackendCfg) Validate() error
Validate validate the fields of BackendCfg
type BaseCfgItem ¶
type BaseCfgItem struct { Value string `json:"value"` Description string `json:"description"` I18N I18N `json:"i18n"` }
BaseCfgItem the common base config item
func (*BaseCfgItem) IsEmpty ¶
func (b *BaseCfgItem) IsEmpty() bool
IsEmpty judge whether the value is empty
func (*BaseCfgItem) IsExceedMaxLength ¶
func (b *BaseCfgItem) IsExceedMaxLength() bool
IsExceedMaxLength judge whether the the length of value exceed the max value
func (*BaseCfgItem) ValidateRegex ¶
func (b *BaseCfgItem) ValidateRegex() error
ValidateRegex validate regex
func (*BaseCfgItem) ValidateValueFormat ¶
func (b *BaseCfgItem) ValidateValueFormat() error
ValidateValueFormat validate the value format
type BasePage ¶
type BasePage struct { Sort string `json:"sort,omitempty" mapstructure:"sort"` Limit int `json:"limit,omitempty" mapstructure:"limit"` Start int `json:"start" mapstructure:"start"` }
BasePage for paging query
func (BasePage) ToSearchSort ¶
func (page BasePage) ToSearchSort() []SearchSort
type BaseResp ¶
type BaseResp struct { Result bool `json:"result" mapstructure:"result"` Code int `json:"bk_error_code" mapstructure:"bk_error_code"` ErrMsg string `json:"bk_error_msg" mapstructure:"bk_error_msg"` Permissions *IamPermission `json:"permission" mapstructure:"permission"` }
BaseResp common result struct
func NewNoPermissionResp ¶
func NewNoPermissionResp(permission *IamPermission) BaseResp
func (*BaseResp) CCError ¶
func (br *BaseResp) CCError() errors.CCErrorCoder
CCError 根据response返回的信息产生错误
type BasicContent ¶
type BasicContent struct { // PreData the previous data before the deletion or updating operation PreData map[string]interface{} `json:"pre_data" bson:"pre_data"` // CurData the current date after the creation operation CurData map[string]interface{} `json:"cur_data" bson:"cur_data"` // UpdateFields the data that user uses to update the pre data, might not be the actual changed data UpdateFields map[string]interface{} `json:"update_fields" bson:"update_fields"` }
Content contains the details information with in a user's operation. Generally, works for business, model, model instance etc.
type BasicOpDetail ¶
type BasicOpDetail struct { // Details contains all the details information about a user's operation Details *BasicContent `json:"details" bson:"details"` }
func (*BasicOpDetail) WithName ¶
func (op *BasicOpDetail) WithName() string
type BatchAddDevice ¶
type BatchAddDevice struct {
Data []NetcollectDevice `json:"data"`
}
type BatchAddDeviceResult ¶
type BatchAddNetProperty ¶
type BatchAddNetProperty struct {
Data []NetcollectProperty `json:"data"`
}
type BatchCheckSetInstUpdateToDateStatusOption ¶
type BatchCheckSetInstUpdateToDateStatusOption struct {
SetTemplateIDs []int64 `field:"set_template_ids" json:"set_template_ids" bson:"set_template_ids" mapstructure:"set_template_ids"`
}
type BatchCreateOrUpdateApplyRuleOption ¶
type BatchCreateOrUpdateApplyRuleOption struct {
Rules []CreateOrUpdateApplyRuleOption `field:"host_apply_rules" json:"host_apply_rules" bson:"host_apply_rules" mapstructure:"host_apply_rules"`
}
type BatchCreateOrUpdateHostApplyRuleResult ¶
type BatchCreateOrUpdateHostApplyRuleResult struct {
Items []CreateOrUpdateHostApplyRuleResult `json:"items" mapstructure:"items"`
}
type BizBasicInfo ¶
type BkBaseResp ¶
BkBaseResp base response defined in blueking api protocol
type BkHostInfo ¶
type BkSystemInstallRequest ¶
type BkSystemInstallRequest struct { SetName string `json:"bk_set_name"` ModuleName string `json:"bk_module_name"` InnerIP string `json:"bk_host_innerip"` CloudID int64 `json:"bk_cloud_id"` HostInfo map[string]interface{} `json:"host_info"` ProcInfo map[string]map[string]interface{} `json:"proc_info"` }
type BoolResponse ¶
type BusinessDefaultSetModuleInfo ¶
type BusinessDefaultSetModuleInfo struct { IdleSetID int64 `json:"idle_set_id"` IdleModuleID int64 `json:"idle_module_id"` FaultModuleID int64 `json:"fault_module_id"` RecycleModuleID int64 `json:"recycle_module_id"` }
func (BusinessDefaultSetModuleInfo) IsInternalModule ¶
func (b BusinessDefaultSetModuleInfo) IsInternalModule(moduleID int64) bool
type BusinessDefaultSetModuleInfoResult ¶
type BusinessDefaultSetModuleInfoResult struct { BaseResp `json:",inline"` Data BusinessDefaultSetModuleInfo `json:"data"` }
type BusinessTopoInstNamesItem ¶
type BusinessTopoInstNamesItem struct {
BaseCfgItem `json:",inline"`
}
type ChartClassification ¶
type ChartClassification struct { Host []ChartConfig `json:"host"` Inst []ChartConfig `json:"inst"` }
type ChartConfig ¶
type ChartConfig struct { ConfigID uint64 `json:"config_id" bson:"config_id"` ReportType string `json:"report_type" bson:"report_type"` Name string `json:"name" bson:"name"` CreateTime Time `json:"create_time" bson:"create_time"` OwnerID string `json:"bk_supplier_account" bson:"bk_supplier_account"` ObjID string `json:"bk_obj_id" bson:"bk_obj_id"` Width string `json:"width" bson:"width"` ChartType string `json:"chart_type" bson:"chart_type"` Field string `json:"field" bson:"field"` XAxisCount int64 `json:"x_axis_count" bson:"x_axis_count"` }
type ChartPosition ¶
type ChartPosition struct { BizID int64 `json:"bk_biz_id" bson:"bk_biz_id"` Position PositionInfo `json:"position" bson:"position"` OwnerID string `json:"bk_supplier_account" bson:"bk_supplier_account"` }
type Classification ¶
type Classification struct { ID int64 `field:"id" json:"id" bson:"id"` ClassificationID string `field:"bk_classification_id" json:"bk_classification_id" bson:"bk_classification_id"` ClassificationName string `field:"bk_classification_name" json:"bk_classification_name" bson:"bk_classification_name"` ClassificationType string `field:"bk_classification_type" json:"bk_classification_type" bson:"bk_classification_type"` ClassificationIcon string `field:"bk_classification_icon" json:"bk_classification_icon" bson:"bk_classification_icon"` OwnerID string `field:"bk_supplier_account" json:"bk_supplier_account" bson:"bk_supplier_account" ` }
Classification the classification metadata definition
func (*Classification) Parse ¶
func (cli *Classification) Parse(data mapstr.MapStr) (*Classification, error)
Parse load the data from mapstr classification into classification instance
func (*Classification) ToMapStr ¶
func (cli *Classification) ToMapStr() mapstr.MapStr
ToMapStr to mapstr
type ClassificationWithObject ¶
type ClassificationWithObject struct { Classification `json:",inline"` Objects []Object `json:"bk_objects"` }
ClassificationWithObject classification with object
type ClassifyIdItem ¶
type ClassifyIdItem struct {
BaseCfgItem `json:",inline"`
}
type CloneHostPropertyParams ¶
type CloudAccount ¶
type CloudAccount struct { AccountName string `json:"bk_account_name" bson:"bk_account_name"` CloudVendor string `json:"bk_cloud_vendor" bson:"bk_cloud_vendor"` AccountID int64 `json:"bk_account_id" bson:"bk_account_id"` SecretID string `json:"bk_secret_id" bson:"bk_secret_id"` SecretKey string `json:"bk_secret_key" bson:"bk_secret_key"` Description string `json:"bk_description" bson:"bk_description"` OwnerID string `json:"bk_supplier_account" bson:"bk_supplier_account"` Creator string `json:"bk_creator" bson:"bk_creator"` LastEditor string `json:"bk_last_editor" bson:"bk_last_editor"` CreateTime time.Time `json:"create_time" bson:"create_time"` LastTime time.Time `json:"last_time" bson:"last_time"` }
云账户
func (*CloudAccount) ToMapStr ¶
func (c *CloudAccount) ToMapStr() mapstr.MapStr
func (*CloudAccount) Validate ¶
func (c *CloudAccount) Validate() (rawError errors.RawErrorInfo)
type CloudAccountConf ¶
type CloudAccountConf struct { AccountID int64 `json:"bk_account_id" bson:"bk_account_id"` VendorName string `json:"bk_cloud_vendor" bson:"bk_cloud_vendor"` SecretID string `json:"bk_secret_id" bson:"bk_secret_id"` SecretKey string `json:"bk_secret_key" bson:"bk_secret_key"` }
云厂商账户配置
type CloudAccountResult ¶
type CloudAccountResult struct { BaseResp `json:",inline"` Data CloudAccount `json:"data"` }
type CloudAccountVerify ¶
type CloudAccountWithExtraInfo ¶
type CloudAccountWithExtraInfo struct { CloudAccount `json:",inline"` // 是否能删除账户,只有该账户下不存在同步任务了,才能删除,此时才能为true,否则为false CanDeleteAccount bool `json:"bk_can_delete_account" bson:"bk_can_delete_account"` }
带有额外信息的云账户
type CloudArea ¶
type CloudArea struct { CloudID int64 `json:"bk_cloud_id" bson:"bk_cloud_id"` CloudName string `json:"bk_cloud_name" bson:"bk_cloud_name"` Status int `json:"bk_status" bson:"bk_status"` CloudVendor string `json:"bk_cloud_vendor" bson:"bk_cloud_vendor"` OwnerID string `json:"bk_supplier_account" bson:"bk_supplier_account"` VpcID string `json:"bk_vpc_id" bson:"bk_vpc_id"` VpcName string `json:"bk_vpc_name" bson:"bk_vpc_name"` Region string `json:"bk_region" bson:"bk_region"` AccountID int64 `json:"bk_account_id" bson:"bk_account_id"` Creator string `json:"bk_creator" bson:"bk_creator"` LastEditor string `json:"bk_last_editor" bson:"bk_last_editor"` CreateTime time.Time `json:"create_time" bson:"create_time"` LastTime time.Time `json:"last_time" bson:"last_time"` }
云区域
type CloudAreaSearchParam ¶
type CloudAreaSearchParam struct { SearchCloudOption `json:",inline"` HostCount bool `json:"host_count"` SyncTaskIDs bool `json:"sync_task_ids"` }
CloudAreaParameter search cloud area parameter
type CloudHostModuleParams ¶
type CloudHostModuleParams struct { ApplicationID int64 `json:"bk_biz_id"` HostInfoArr []BkHostInfo `json:"host_info"` ModuleID int64 `json:"bk_module_id"` }
type CloudHostResource ¶
type CloudHostResource struct { HostResource []*VpcInstances DestroyedVpcs []*VpcSyncInfo TaskID int64 `json:"bk_task_id" bson:"bk_task_id"` AccountConf *CloudAccountConf `json:"account_conf" bson:"account_conf"` }
云主机同步时的资源数据
type CloudMapping ¶
type CloudMapping struct { CreateTime Time `json:"create_time" bson:"create_time"` LastTime Time `json:"last_time" bson:"lsat_time"` CloudName string `json:"bk_cloud_name" bson:"bk_cloud_name"` OwnerID string `json:"bk_supplier_account" bson:"bk_supplier_account"` CloudID int64 `json:"bk_cloud_id" bson:"bk_cloud_id"` }
type CloudSyncTask ¶
type CloudSyncTask struct { TaskID int64 `json:"bk_task_id" bson:"bk_task_id"` TaskName string `json:"bk_task_name" bson:"bk_task_name"` ResourceType string `json:"bk_resource_type" bson:"bk_resource_type"` AccountID int64 `json:"bk_account_id" bson:"bk_account_id"` CloudVendor string `json:"bk_cloud_vendor" bson:"bk_cloud_vendor"` SyncStatus string `json:"bk_sync_status" bson:"bk_sync_status"` OwnerID string `json:"bk_supplier_account" bson:"bk_supplier_account"` StatusDescription SyncStatusDesc `json:"bk_status_description" bson:"bk_status_description"` LastSyncTime *time.Time `json:"bk_last_sync_time" bson:"bk_last_sync_time"` SyncAll bool `json:"bk_sync_all" bson:"bk_sync_all"` SyncAllDir int64 `json:"bk_sync_all_dir" bson:"bk_sync_all_dir"` SyncVpcs []VpcSyncInfo `json:"bk_sync_vpcs" bson:"bk_sync_vpcs"` Creator string `json:"bk_creator" bson:"bk_creator"` LastEditor string `json:"bk_last_editor" bson:"bk_last_editor"` CreateTime time.Time `json:"create_time" bson:"create_time"` LastTime time.Time `json:"last_time" bson:"last_time"` }
云同步任务
func (*CloudSyncTask) ToMapStr ¶
func (c *CloudSyncTask) ToMapStr() mapstr.MapStr
ToMapStr to mapstr
type CntInfoString ¶
type CommonInstTopo ¶
type CommonInstTopo struct { InstNameAsst Count int `json:"count"` Children []InstNameAsst `json:"children"` }
type CommonInstTopoV2 ¶
type CommonInstTopoV2 struct { Prev []*CommonInstTopo `json:"prev"` Next []*CommonInstTopo `json:"next"` Curr interface{} `json:"curr"` }
type CommonSearchChart ¶
type CommonSearchChart struct { Count uint64 `json:"count"` Info ChartConfig `json:"info"` }
type ConditionItem ¶
type ConditionItem struct { Field string `json:"field,omitempty"` Operator string `json:"operator,omitempty"` Value interface{} `json:"value,omitempty"` }
ConditionItem subcondition
type ConfigAdmin ¶
type ConfigAdmin struct { Backend BackendCfg `json:"backend"` Site SiteCfg `json:"site"` ValidationRules ValidationRulesCfg `json:"validationRules"` }
ConfigAdmin used to admin the cmdb config
func (*ConfigAdmin) DecodeWithBase64 ¶
func (c *ConfigAdmin) DecodeWithBase64() error
DecodeWithBase64 decode the base64 value of ValidationRules
func (*ConfigAdmin) EncodeWithBase64 ¶
func (c *ConfigAdmin) EncodeWithBase64() error
EncodeWithBase64 encode the value of ValidationRules to base64
func (*ConfigAdmin) Validate ¶
func (c *ConfigAdmin) Validate() error
Validate validate the fields of ConfigAdmin
type ConfigAdminParmams ¶
type ConfigAdminParmams struct {
Config ConfigAdmin `json:"config"`
}
ConfigAdminParams used to admin the cmdb config
type ConfigAdminResult ¶
type ConfigAdminResult struct { BaseResp `json:",inline"` Data ConfigAdmin `json:"data"` }
ConfigAdminResult the result with config admin
type ConfirmMode ¶
type ConfirmMode string
ConfirmMode define
func (*ConfirmMode) Scan ¶
func (n *ConfirmMode) Scan(value interface{}) error
Scan implement sql driver's Scan interface
type CoreUint64Response ¶
type CountSetTplInstItem ¶
type CountSetTplInstOption ¶
type CountSetTplInstOption struct {
SetTemplateIDs []int64 `field:"set_template_ids" json:"set_template_ids" bson:"set_template_ids"`
}
type CountTopoNodeHostsOption ¶
type CountTopoNodeHostsOption struct {
Nodes []TopoNode `json:"topo_nodes" mapstructure:"topo_nodes"`
}
type CreateAssociationInstRequest ¶
type CreateAssociationInstRequest struct { ObjectAsstID string `field:"bk_obj_asst_id" json:"bk_obj_asst_id,omitempty" bson:"bk_obj_asst_id,omitempty"` InstID int64 `field:"bk_inst_id" json:"bk_inst_id,omitempty" bson:"bk_inst_id,omitempty"` AsstInstID int64 `field:"bk_asst_inst_id" json:"bk_asst_inst_id,omitempty" bson:"bk_asst_inst_id,omitempty"` }
type CreateAssociationKind ¶
type CreateAssociationKind struct {
Data AssociationKind `json:"data"`
}
type CreateAuditLogParam ¶
type CreateAuditLogParam struct {
Data []AuditLog `json:"data"`
}
type CreateHostApplyRuleOption ¶
type CreateHostApplyRuleOption struct { AttributeID int64 `field:"bk_attribute_id" json:"bk_attribute_id" bson:"bk_attribute_id" mapstructure:"bk_attribute_id"` ModuleID int64 `field:"bk_module_id" json:"bk_module_id" bson:"bk_module_id" mapstructure:"bk_module_id"` PropertyValue interface{} `field:"bk_property_value" json:"bk_property_value" bson:"bk_property_value" mapstructure:"bk_property_value"` }
type CreateInstResult ¶
CreateInstResult create inst result
type CreateManyAssociationKind ¶
type CreateManyAssociationKind struct {
Datas []AssociationKind `json:"datas"`
}
type CreateManyCloudAreaElem ¶
type CreateManyCloudAreaResult ¶
type CreateManyCloudAreaResult struct { BaseResp `json:",inline"` Data []CreateManyCloudAreaElem `json:"data"` }
type CreateManyDataResult ¶
type CreateManyDataResult struct {
CreateManyInfoResult `json:",inline"`
}
CreateManyDataResult the data struct definition in create many function result
type CreateManyInfoResult ¶
type CreateManyInfoResult struct { Created []CreatedDataResult `json:"created"` Repeated []RepeatedDataResult `json:"repeated"` Exceptions []ExceptionResult `json:"exception"` }
CreateManyInfoResult create many function return this result struct
type CreateManyInstanceAssociation ¶
type CreateManyInstanceAssociation struct {
Datas []InstAsst `json:"datas"`
}
type CreateManyModelClassifiaction ¶
type CreateManyModelClassifiaction struct {
Data []Classification `json:"datas"`
}
CreateManyModelClassifiaction create many input params
type CreateManyModelInstance ¶
type CreateModel ¶
CreateModel create model params
type CreateModelAssociation ¶
type CreateModelAssociation struct {
Spec Association `json:"spec"`
}
type CreateModelAttrUnique ¶
type CreateModelAttrUnique struct {
Data ObjectUnique `json:"data"`
}
type CreateModelAttributeGroup ¶
type CreateModelAttributeGroup struct {
Data Group `json:"data"`
}
CreateModelAttributeGroup used to create a new group for some attributes
type CreateModelAttributes ¶
type CreateModelAttributes struct {
Attributes []Attribute `json:"attributes"`
}
CreateModelAttributes create model attributes
type CreateModelInstance ¶
type CreateModelResult ¶
type CreateObjectAttributeResult ¶
CreateObjectAttributeResult create object attribute result
type CreateObjectClassificationResult ¶
CreateObjectClassificationResult create the object classification result
type CreateObjectGroupResult ¶
CreateObjectGroupResult create the object group result
type CreateObjectResult ¶
CreateObjectResult create object result
type CreateOneDataResult ¶
type CreateOneDataResult struct {
Created CreatedDataResult `json:"created"`
}
CreateOneDataResult the data struct definition in create one function result
type CreateOneInstanceAssociation ¶
type CreateOneInstanceAssociation struct {
Data InstAsst `json:"data"`
}
type CreateOneModelClassification ¶
type CreateOneModelClassification struct {
Data Classification `json:"data"`
}
CreateOneModelClassification create one model classification
type CreateOrUpdateApplyRuleOption ¶
type CreateOrUpdateApplyRuleOption struct { AttributeID int64 `field:"bk_attribute_id" json:"bk_attribute_id" bson:"bk_attribute_id" mapstructure:"bk_attribute_id"` ModuleID int64 `field:"bk_module_id" json:"bk_module_id" bson:"bk_module_id" mapstructure:"bk_module_id"` PropertyValue interface{} `field:"bk_property_value" json:"bk_property_value" bson:"bk_property_value" mapstructure:"bk_property_value"` }
type CreateOrUpdateHostApplyRuleResult ¶
type CreateOrUpdateHostApplyRuleResult struct { ErrorContainer `json:",inline"` Index int `json:"index" mapstructure:"index"` Rule HostApplyRule `json:"rule" mapstructure:"rule"` }
type CreateProcessTemplateBatchInput ¶
type CreateProcessTemplateBatchInput struct { BizID int64 `json:"bk_biz_id"` ServiceTemplateID int64 `json:"service_template_id"` Processes []ProcessDetail `json:"processes"` }
type CreateRawProcessInstanceInput ¶
type CreateRawProcessInstanceInput struct { BizID int64 `json:"bk_biz_id"` ServiceInstanceID int64 `json:"service_instance_Id"` Processes []ProcessInstanceDetail `json:"processes"` }
type CreateResult ¶
type CreateResult struct { BaseResp `json:",inline"` Data []Association `json:"data"` }
CreateResult create result
type CreateServiceInstanceDetail ¶
type CreateServiceInstanceDetail struct { HostID int64 `json:"bk_host_id"` // Processes parameter usable only when create instance with raw Processes []ProcessInstanceDetail `json:"processes"` }
type CreateServiceInstanceForServiceTemplateInput ¶
type CreateServiceInstanceForServiceTemplateInput struct { BizID int64 `json:"bk_biz_id"` Name string `json:"name"` ModuleID int64 `json:"bk_module_id"` Instances []CreateServiceInstanceDetail `json:"instances"` HostApplyConflictResolvers []HostApplyConflictResolver `json:"host_apply_conflict_resolvers"` }
type CreateServiceInstanceOption ¶
type CreateServiceInstanceOption struct { ModuleID int64 `json:"bk_module_id"` HostID int64 `json:"bk_host_id"` // Processes parameter usable only when create instance with raw Processes []ProcessCreateOrUpdateInfo `json:"processes"` }
type CreateSetTemplateOption ¶
type CreateSyncHistoryesult ¶
type CreateSyncHistoryesult struct { BaseResp `json:",inline"` Data SyncHistory `json:"data"` }
type CreateSyncTaskResult ¶
type CreateSyncTaskResult struct { BaseResp `json:",inline"` Data CloudSyncTask `json:"data"` }
type CreateTaskRequest ¶
type CreateTaskRequest struct { // task name Name string `json:"name"` // flag task 任务标识,留给业务方做识别任务 Flag string `json:"flag"` Data []interface{} `json:"data"` }
CreateTaskRequest create task request parameters
type CreateTaskResponse ¶
type CreateTaskResponse struct { BaseResp Data APITaskDetail `json:"data"` }
type CreateUniqueRequest ¶
type CreateUniqueResult ¶
type CreatedCount ¶
type CreatedCount struct {
Count uint64 `json:"created_count"`
}
CreatedCount created count struct
type CreatedDataResult ¶
CreatedDataResult common created result definition
type CreatedManyOptionResult ¶
type CreatedManyOptionResult struct { BaseResp `json:",inline"` Data CreateManyDataResult `json:"data"` }
CreatedManyOptionResult create many api http response return this result struct
type CreatedOneOptionResult ¶
type CreatedOneOptionResult struct { BaseResp `json:",inline"` Data CreateOneDataResult `json:"data"` }
CreatedOneOptionResult create One api http response return this result struct
type DeleteArchive ¶
type DeleteArchive struct { Oid string `json:"oid" bson:"oid"` Detail interface{} `json:"detail" bson:"detail"` }
type DeleteCategoryInput ¶
type DeleteCategoryInput struct {
ID int64 `json:"id"`
}
type DeleteDestroyedHostRelatedOption ¶
type DeleteDestroyedHostRelatedOption struct {
HostIDs []int64 `json:"host_ids" bson:"host_ids"`
}
type DeleteHostApplyRuleOption ¶
type DeleteHostApplyRuleOption struct {
RuleIDs []int64 `field:"host_apply_rule_ids" json:"host_apply_rule_ids" bson:"host_apply_rule_ids" mapstructure:"host_apply_rule_ids"`
}
type DeleteHostBatchOpt ¶
type DeleteHostBatchOpt struct {
HostID string `json:"bk_host_id"`
}
type DeleteHostFromBizParameter ¶
type DeleteHostFromBizParameter struct { AppID int64 `json:"bk_biz_id"` HostIDArr []int64 `json:"bk_host_ids"` }
DeleteHostFromBizParameter delete host from business
type DeleteHostRequest ¶
type DeleteHostRequest struct { ApplicationID int64 `json:"bk_biz_id"` HostIDArr []int64 `json:"bk_host_ids"` }
DeleteHostRequest delete host from application
type DeleteModelAttrUnique ¶
type DeleteModelAttrUnique struct {
BizID int64 `field:"bk_biz_id" json:"bk_biz_id" bson:"bk_biz_id"`
}
type DeleteModelClassificationResult ¶
type DeleteModelClassificationResult struct { BaseResp `json:",inline"` Data DeletedCount `json:"data"` }
DeleteModelClassificationResult delete the model classification result
type DeleteNetDeviceBatchOpt ¶
type DeleteNetDeviceBatchOpt struct {
DeviceIDs []uint64 `json:"device_id"`
}
type DeleteNetPropertyBatchOpt ¶
type DeleteNetPropertyBatchOpt struct {
NetcollectPropertyIDs []uint64 `json:"netcollect_property_id"`
}
type DeleteOption ¶
DeleteOption common delete condition options
type DeleteProcessInstanceRelationOption ¶
type DeleteProcessInstanceRelationOption struct { BusinessID *int64 `json:"bk_biz_id"` ProcessIDs []int64 `json:"bk_process_id,omitempty"` ServiceInstanceIDs []int64 `json:"service_instance_id,omitempty"` ProcessTemplateIDs []int64 `json:"process_template_id,omitempty"` HostIDs []int64 `json:"bk_host_id,omitempty"` ModuleIDs []int64 `json:"bk_module_id,omitempty"` }
type DeleteResult ¶
type DeleteResult struct {
BaseResp `json:",inline"`
}
DeleteResult delete result
type DeleteSetTemplateOption ¶
type DeleteSetTemplateOption struct {
SetTemplateIDs []int64 `field:"set_template_ids" json:"set_template_ids" bson:"set_template_ids" mapstructure:"set_template_ids"`
}
type DeleteUniqueRequest ¶
type DeleteUniqueResult ¶
type DeleteUniqueResult struct {
BaseResp
}
type DeletedCount ¶
type DeletedCount struct {
Count uint64 `json:"deleted_count"`
}
DeletedCount created count struct
type DeletedOptionResult ¶
type DeletedOptionResult struct { BaseResp `json:",inline"` Data DeletedCount `json:"data"` }
DeletedCountResult delete api http response return result struct
type DepartmentData ¶
type DepartmentData struct { Count int64 `json:"count"` Results []DepartmentItem `json:"results"` }
type DepartmentItem ¶
type DepartmentProfileData ¶
type DepartmentProfileData struct { Count int64 `json:"count"` Results []DepartmentProfileItem `json:"results"` }
type DepartmentProfileItem ¶
type DepartmentProfileResult ¶
type DepartmentProfileResult struct { BaseResp `json:",inline"` Data *DepartmentProfileData `json:"data"` }
type DepartmentResult ¶
type DepartmentResult struct { BaseResp `json:",inline"` Data *DepartmentData `json:"data"` }
type DetailFactory ¶
type DetailFactory interface {
WithName() string
}
type DiffSetTplWithInstOption ¶
type DiffSetTplWithInstOption struct {
SetIDs []int64 `field:"bk_set_ids" json:"bk_set_ids" bson:"bk_set_ids" mapstructure:"bk_set_ids"`
}
type DifferenceDetail ¶
type DifferenceDetail struct { Unchanged []ProcessDifferenceDetail `json:"unchanged"` Changed []ProcessDifferenceDetail `json:"changed"` Added []ProcessDifferenceDetail `json:"added"` Removed []ProcessDifferenceDetail `json:"removed"` }
type DistInstCtx ¶
type DistinctHostIDByTopoRelationRequest ¶
type DistinctHostIDByTopoRelationRequest struct { ApplicationIDArr []int64 `json:"bk_biz_ids" bson:"bk_biz_ids" field:"bk_biz_ids" mapstructure:"bk_biz_ids"` SetIDArr []int64 `json:"bk_set_ids" bson:"bk_set_ids" field:"bk_set_ids" mapstructure:"bk_set_ids"` HostIDArr []int64 `json:"bk_host_ids" bson:"bk_host_ids" field:"bk_host_ids" mapstructure:"bk_host_ids"` ModuleIDArr []int64 `json:"bk_module_ids" bson:"bk_module_ids" field:"bk_module_ids" mapstructure:"bk_module_ids"` }
DistinctHostIDByTopoRelationRequest distinct host id by topology request
func (*DistinctHostIDByTopoRelationRequest) Empty ¶
func (h *DistinctHostIDByTopoRelationRequest) Empty() bool
Empty empty struct
type DistinctID ¶
type DistinctID struct {
IDArr []int64 `json:"id_arr"`
}
type DistinctIDResponse ¶
type DistinctIDResponse struct { BaseResp `json:",inline"` Data DistinctID `json:"data"` }
type EnumIdItem ¶
type EnumIdItem struct {
BaseCfgItem `json:",inline"`
}
type EnumNameItem ¶
type EnumNameItem struct {
BaseCfgItem `json:",inline"`
}
type EnumOption ¶
type EnumOption []EnumVal
EnumOption enum option
func ParseEnumOption ¶
func ParseEnumOption(ctx context.Context, val interface{}) (EnumOption, error)
ParseEnumOption convert val to []EnumVal
func (EnumOption) GetDefault ¶
func (opt EnumOption) GetDefault() *EnumVal
GetDefault returns EnumOption's default value
type EnumVal ¶
type EnumVal struct { ID string `bson:"id" json:"id"` Name string `bson:"name" json:"name"` Type string `bson:"type" json:"type"` IsDefault bool `bson:"is_default" json:"is_default"` }
EnumVal enum option val
type ErrorContainer ¶
type ErrorContainer struct { ErrCode int `json:"error_code" json:"error_code" bson:"error_code" mapstructure:"error_code"` ErrMsg string `json:"error_message" json:"error_message" bson:"error_message" mapstructure:"error_message"` }
func (*ErrorContainer) GetError ¶
func (container *ErrorContainer) GetError() errors.CCErrorCoder
func (*ErrorContainer) SetError ¶
func (container *ErrorContainer) SetError(err errors.CCErrorCoder)
type EsbBaseResponse ¶
type EsbDepartmentProfileResponse ¶
type EsbDepartmentProfileResponse struct { EsbBaseResponse `json:",inline"` Data DepartmentProfileData `json:"data"` }
type EsbDepartmentResponse ¶
type EsbDepartmentResponse struct { EsbBaseResponse `json:",inline"` Data DepartmentData `json:"data"` }
type EsbListUserResponse ¶
type EsbListUserResponse struct { EsbBaseResponse `json:",inline"` Data []ListUserItem `json:"data"` }
type EsbResponse ¶
type EsbResponse struct { EsbBaseResponse `json:",inline"` Data mapstr.MapStr `json:"data"` }
type EsbUserListResponse ¶
type EsbUserListResponse struct { EsbBaseResponse `json:",inline"` Data []UserInfo `json:"data"` }
type EventData ¶
type EventData struct { CurData interface{} `json:"cur_data"` PreData interface{} `json:"pre_data"` }
type EventInst ¶
type EventInst struct { ID int64 `json:"event_id,omitempty"` EventType string `json:"event_type"` Action string `json:"action"` ActionTime Time `json:"action_time"` ObjType string `json:"obj_type"` Data []EventData `json:"data"` OwnerID string `json:"bk_supplier_account"` Cursor string `json:"cursor"` UpdateFields []string `json:"update_fields"` DeletedFields []string `json:"deleted_fields"` }
func (*EventInst) MarshalBinary ¶
type EventInstCtx ¶
type ExcelAssocation ¶
type ExcelAssocation struct { ObjectAsstID string `json:"bk_obj_asst_id"` Operate ExcelAssocationOperate `json:"operate"` SrcPrimary string `json:"src_primary_key"` DstPrimary string `json:"dst_primary_key"` }
type ExcelAssocationOperate ¶
type ExcelAssocationOperate int
const ( ExcelAssocationOperateError ExcelAssocationOperate ExcelAssocationOperateAdd //ExcelAssocationOperateUpdate ExcelAssocationOperateDelete )
type ExceptionResult ¶
type ExceptionResult struct { Message string `json:"message"` Code int64 `json:"code"` Data interface{} `json:"data"` OriginIndex int64 `json:"origin_index"` }
ExceptionResult exception info
type FavoriteResult ¶
type FavouriteMeta ¶
type FavouriteMeta struct { BizID int64 `json:"bk_biz_id" bson:"bk_biz_id"` ID string `json:"id,omitempty" bson:"id,omitempty"` Info string `json:"info,omitempty" bson:"info,omitempty"` Name string `json:"name,omitempty" bson:"name,omitempty"` Count int `json:"count,omitempty" bson:"count,omitempty"` User string `json:"user,omitempty" bson:"user,omitempty"` OwnerID string `json:"bk_supplier_account,omitempty" bson:"bk_supplier_account,omitempty"` QueryParams string `json:"query_params,omitempty" bson:"query_params,omitempty"` CreateTime time.Time `json:"create_time,omitempty" bson:"create_time,omitempty"` UpdateTime time.Time `json:"last_time,omitempty" bson:"last_time,omitempty"` }
type FavouriteParms ¶
type FieldIdItem ¶
type FieldIdItem struct {
BaseCfgItem `json:",inline"`
}
type FilePriviewMap ¶
type FindHostsBySetTplOpt ¶
type FindHostsBySetTplOpt struct { SetTemplateIDs []int64 `json:"bk_set_template_ids"` SetIDs []int64 `json:"bk_set_ids"` Fields []string `json:"fields"` Page BasePage `json:"page"` }
func (*FindHostsBySetTplOpt) Validate ¶
func (o *FindHostsBySetTplOpt) Validate() (rawError errors.RawErrorInfo)
type FindHostsBySrvTplOpt ¶
type FindHostsBySrvTplOpt struct { ServiceTemplateIDs []int64 `json:"bk_service_template_ids"` ModuleIDs []int64 `json:"bk_module_ids"` Fields []string `json:"fields"` Page BasePage `json:"page"` }
func (*FindHostsBySrvTplOpt) Validate ¶
func (o *FindHostsBySrvTplOpt) Validate() (rawError errors.RawErrorInfo)
type FindHostsByTopoOpt ¶
type FindHostsByTopoOpt struct { ObjID string `json:"bk_obj_id"` InstID int64 `json:"bk_inst_id"` Fields []string `json:"fields"` Page BasePage `json:"page"` }
func (*FindHostsByTopoOpt) Validate ¶
func (o *FindHostsByTopoOpt) Validate() (rawError errors.RawErrorInfo)
type FindModuleHostRelationParameter ¶
type FindModuleHostRelationParameter struct { ModuleIDS []int64 `json:"bk_module_ids"` ModuleFields []string `json:"module_fields"` HostFields []string `json:"host_fields"` Page BasePage `json:"page"` }
func (FindModuleHostRelationParameter) Validate ¶
func (param FindModuleHostRelationParameter) Validate() errors.RawErrorInfo
type FindModuleHostRelationResp ¶
type FindModuleHostRelationResp struct { BaseResp `json:",inline"` Data FindModuleHostRelationResult `json:"data"` }
type FindModuleHostRelationResult ¶
type FindModuleHostRelationResult struct { Count int `json:"count"` Relation []ModuleHostRelation `json:"relation"` }
type FindServiceAndProcessInstanceOption ¶
type FindServiceAndProcessInstanceOption struct { BizID int64 `json:"bk_biz_id" field:"bk_biz_id" bson:"bk_biz_id"` ModuleID int64 `json:"bk_module_id" field:"bk_module_id" bson:"bk_module_id"` ServiceTemplateID int64 `json:"service_template_id" field:"service_template_id" bson:"service_template_id"` }
type FindTopoPathRequest ¶
type FindTopoPathRequest struct {
Nodes []TopoNode `json:"topo_nodes" mapstructure:"topo_nodes"`
}
type FloatItem ¶
type FloatItem struct {
BaseCfgItem `json:",inline"`
}
type FloatOption ¶
FloatOption float option
func ParseFloatOption ¶
func ParseFloatOption(ctx context.Context, val interface{}) FloatOption
parseFloatOption parse float data in option
type FooterItem ¶
type FooterItem struct {
}func (FooterItem) Validate ¶
func (s FooterItem) Validate() error
Validate validate the fields of FooterItem
type GetHistoryResult ¶
type GetHistoryResult struct { BaseResp `json:",inline"` Data HistoryResult `json:"data"` }
type GetHostFavoriteResult ¶
type GetHostFavoriteResult struct { BaseResp `json:",inline"` Data FavoriteResult `json:"data"` }
type GetHostFavoriteWithIDResult ¶
type GetHostFavoriteWithIDResult struct { BaseResp `json:",inline"` Data FavouriteMeta `json:"data"` }
type GetHostModuleIDsResult ¶
type GetHostSnapBatchResult ¶
type GetHostSnapResult ¶
type GetHostsResult ¶
type GetProc2ModuleOption ¶
type GetProc2ModuleResult ¶
type GetProc2ModuleResult struct { BaseResp `json:",inline"` Data []Proc2Module `json:"data"` }
type GetUserConfigDetailResult ¶
type GetUserConfigDetailResult struct { BaseResp `json:",inline"` Data UserConfigMeta `json:"data"` }
type GetUserConfigResult ¶
type GetUserConfigResult struct { BaseResp `json:",inline"` Data UserConfigResult `json:"data"` }
type GetUserCustomResult ¶
type GraphAsst ¶
type GraphAsst struct { AsstType string `json:"bk_asst_type"` NodeType string `json:"node_type"` ObjID string `json:"bk_obj_id"` InstID int64 `json:"bk_inst_id"` AssociationKindInstID int64 `json:"bk_asst_inst_id"` AsstName string `json:"bk_asst_name"` Label map[string]string `json:"label"` }
Asst the node association node
type Group ¶
type Group struct { BizID int64 `field:"bk_biz_id" json:"bk_biz_id" bson:"bk_biz_id"` ID int64 `field:"id" json:"id" bson:"id"` GroupID string `field:"bk_group_id" json:"bk_group_id" bson:"bk_group_id"` GroupName string `field:"bk_group_name" json:"bk_group_name" bson:"bk_group_name"` GroupIndex int64 `field:"bk_group_index" json:"bk_group_index" bson:"bk_group_index"` ObjectID string `field:"bk_obj_id" json:"bk_obj_id" bson:"bk_obj_id"` OwnerID string `field:"bk_supplier_account" json:"bk_supplier_account" bson:"bk_supplier_account"` IsDefault bool `field:"bk_isdefault" json:"bk_isdefault" bson:"bk_isdefault"` IsPre bool `field:"ispre" json:"ispre" bson:"ispre"` IsCollapse bool `field:"is_collapse" json:"is_collapse" bson:"is_collapse"` }
Group group metadata definition
type GseProcConfigmap ¶
type GseProcControl ¶
type GseProcControl struct { StartCmd string `json:"start_cmd,omitempty"` StopCmd string `json:"stop_cmd,omitempty"` RestartCmd string `json:"restart_cmd,omitempty"` ReloadCmd string `json:"reload_cmd,omitempty"` KillCmd string `json:"kill_cmd,omitempty"` VersionCmd string `json:"version_cmd,omitempty"` HealthCmd string `json:"health_cmd,omitempty"` }
type GseProcIdentity ¶
type GseProcIdentity struct { IndexKey string `json:"index_key,omitempty"` ProcName string `json:"proc_name,omitempty"` SetupPath string `json:"setup_path,omitempty"` PidPath string `json:"pid_path,omitempty"` ConfigPath string `json:"config_path,omitempty"` LogPath string `json:"log_path,omitempty"` }
type GseProcMeta ¶
type GseProcMonitorPlolicy ¶
type GseProcMonitorPlolicy struct { AutoType int `json:"auto_type,omitempty"` StartCheckSecs int `json:"start_check_secs,omitempty"` StopCheckSecs int `json:"stop_check_secs,omitempty"` StartRetries int `json:"start_retries,omitempty"` StartInterval int `json:"start_interval,omitempty"` CrontabRule string `json:"crontab_rule,omitempty"` }
type GseProcRequest ¶
type GseProcRequest struct { AppID int64 `json:"bk_biz_id" bson:"bk_biz_id"` ModuleID int64 `json:"bk_module_id" bson:"bk_module_id"` ProcID int64 `json:"bk_process_id" bson:"bk_process_id"` Meta GseProcMeta `json:"meta,omitempty" bson:"meta"` Hosts []GseHost `json:"hosts,omitempty" bson:"hosts"` OpType int `json:"op_type,omitempty" bson:"-"` Spec GseProcSpec `json:"spec,omitempty" bson:"spec"` }
type GseProcResource ¶
type GseProcSpec ¶
type GseProcSpec struct { Identity GseProcIdentity `json:"identity,omitempty"` Control GseProcControl `json:"control,omitempty"` Resource GseProcResource `json:"resource,omitempty"` MonitorPolicy GseProcMonitorPlolicy `json:"monitor_policy,omitempty"` WarnReportPolicy GseProcWarnReportPolicy `json:"warn_report_policy,omitempty"` Configmap []GseProcConfigmap `json:"configmap,omitempty"` }
type GseProcWarnReportPolicy ¶
type GseProcWarnReportPolicy struct {
ReportId int `json:"report_id,omitempty"`
}
type GseProcessOperateTaskResult ¶
type GseProcessOperateTaskResult struct { Data map[string]ProcessOperateTaskDetail `json:"data"` EsbBaseResponse `json:",inline"` }
type HistoryContent ¶
type HistoryContent struct {
Content string `json:"content"`
}
type HistoryMeta ¶
type HistoryMeta struct { ID string `json:"id,omitempty" bson:"id,omitempty" ` User string `json:"user,omitempty" bson:"user,omitempty"` Content string `json:"content,omitempty" bson:"content,omitempty"` CreateTime time.Time `json:"create_time,omitempty" bson:"create_time,omitempty"` OwnerID string `json:"bk_supplier_account" bson:"bk_supplier_account"` }
type HistoryResult ¶
type HistoryResult struct { Count uint64 `json:"count"` Info []HistoryMeta `json:"info"` }
type Host2Modules ¶
type HostApplyConflictField ¶
type HostApplyConflictField struct { AttributeID int64 `field:"bk_attribute_id" json:"bk_attribute_id" bson:"bk_attribute_id" mapstructure:"bk_attribute_id"` PropertyID string `field:"bk_property_id" json:"bk_property_id" mapstructure:"bk_property_id"` PropertyValue interface{} `field:"bk_property_value" json:"bk_property_value" mapstructure:"bk_property_value"` Rules []HostApplyRule `field:"host_apply_rules" json:"host_apply_rules" bson:"host_apply_rules" mapstructure:"host_apply_rules"` // UnresolvedConflictExist show whether conflict still exist after use possible conflict resolver // if there is a conflict, but has a resolver for it, ConflictedStillExist will be false UnresolvedConflictExist bool `field:"unresolved_conflict_exist" json:"unresolved_conflict_exist" mapstructure:"unresolved_conflict_exist"` }
type HostApplyConflictResolver ¶
type HostApplyConflictResolver struct { HostID int64 `field:"bk_host_id" json:"bk_host_id" bson:"bk_host_id" mapstructure:"bk_host_id"` AttributeID int64 `field:"bk_attribute_id" json:"bk_attribute_id" bson:"bk_attribute_id" mapstructure:"bk_attribute_id"` PropertyValue interface{} `field:"bk_property_value" json:"bk_property_value" bson:"bk_property_value" mapstructure:"bk_property_value"` }
ConflictResolver 定义单个冲突的解决办法
type HostApplyPlanOption ¶
type HostApplyPlanOption struct { Rules []HostApplyRule `field:"host_apply_rules" json:"host_apply_rules" bson:"host_apply_rules" mapstructure:"host_apply_rules"` HostModules []Host2Modules `field:"host_modules" json:"host_modules" bson:"host_modules" mapstructure:"host_modules"` ConflictResolvers []HostApplyConflictResolver `field:"conflict_resolvers" json:"conflict_resolvers" bson:"conflict_resolvers" mapstructure:"conflict_resolvers"` }
主机属性自动应用执行计划生成逻辑核心数据结构 设计背景:该数据结构需要支持如下三种场景 1. 应用模块配置到主机属性 2. 编辑模块配置(可能未保存), 预览应用效果(查看是否有冲突) 3. 将主机转移到模块下前预览应用效果(查看是否有冲突) 字段说明 - Rules: 主机属性应用规则,由于上述case2的存在,其中 ID 可能为0 - HostModules: 主机所有模块信息,case3的存在,导致不能直接从db中查询主机所属模块 - ConflictResolvers: 可选参数,用于表示主机属性应用出现冲突时,如何设置应用值,如果未设置则冲突的字段不会被更新
type HostApplyPlanRequest ¶
type HostApplyPlanRequest struct { RemoveRuleIDs []int64 `field:"remove_rule_ids" json:"remove_rule_ids" bson:"remove_rule_ids" mapstructure:"remove_rule_ids"` IgnoreRuleIDs []int64 `field:"ignore_rule_ids" json:"ignore_rule_ids" bson:"ignore_rule_ids" mapstructure:"ignore_rule_ids"` AdditionalRules []CreateHostApplyRuleOption `field:"additional_rules" json:"additional_rules" bson:"additional_rules" mapstructure:"additional_rules"` ConflictResolvers []HostApplyConflictResolver `field:"conflict_resolvers" json:"conflict_resolvers" bson:"conflict_resolvers" mapstructure:"conflict_resolvers"` ModuleIDs []int64 `field:"bk_module_ids" json:"bk_module_ids" bson:"bk_module_ids" mapstructure:"bk_module_ids"` // optional, if set, only hostID in HostIDs will be used HostIDs []int64 `field:"bk_host_ids" json:"bk_host_ids" bson:"bk_host_ids" mapstructure:"bk_host_ids"` }
type HostApplyPlanResult ¶
type HostApplyPlanResult struct { Plans []OneHostApplyPlan `field:"plans" json:"plans" bson:"plans" mapstructure:"plans"` // 未解决的冲突主机数 UnresolvedConflictCount int64 `field:"unresolved_conflict_count" json:"unresolved_conflict_count" mapstructure:"unresolved_conflict_count"` HostAttributes []Attribute `field:"host_attributes" json:"host_attributes" bson:"host_attributes" mapstructure:"host_attributes"` Count int `field:"count" json:"count" bson:"count" mapstructure:"count"` Rules []HostApplyRule `field:"final_rules" json:"final_rules" mapstructure:"final_rules"` }
type HostApplyResult ¶
type HostApplyResult struct { ErrorContainer `json:",inline"` HostID int64 `field:"bk_host_id" json:"bk_host_id" bson:"bk_host_id" mapstructure:"bk_host_id"` }
type HostApplyRule ¶
type HostApplyRule struct { ID int64 `field:"id" json:"id" bson:"id" mapstructure:"id"` BizID int64 `field:"bk_biz_id" json:"bk_biz_id" bson:"bk_biz_id" mapstructure:"bk_biz_id"` ModuleID int64 `field:"bk_module_id" json:"bk_module_id" bson:"bk_module_id" mapstructure:"bk_module_id"` // `id` field of table: `cc_AsstDes`, not the same with bk_property_id AttributeID int64 `field:"bk_attribute_id" json:"bk_attribute_id" bson:"bk_attribute_id" mapstructure:"bk_attribute_id"` PropertyValue interface{} `field:"bk_property_value" json:"bk_property_value" bson:"bk_property_value" mapstructure:"bk_property_value"` // 通用字段 Creator string `field:"creator" json:"creator" bson:"creator" mapstructure:"creator"` Modifier string `field:"modifier" json:"modifier" bson:"modifier" mapstructure:"modifier"` CreateTime time.Time `field:"create_time" json:"create_time" bson:"create_time" mapstructure:"create_time"` LastTime time.Time `field:"last_time" json:"last_time" bson:"last_time" mapstructure:"last_time"` SupplierAccount string `field:"bk_supplier_account" json:"bk_supplier_account" bson:"bk_supplier_account" mapstructure:"bk_supplier_account"` }
HostApplyRule represent one rule of host property auto apply
func (*HostApplyRule) Validate ¶
func (h *HostApplyRule) Validate() (string, error)
type HostApplyUpdateField ¶
type HostApplyUpdateField struct { AttributeID int64 `field:"bk_attribute_id" json:"bk_attribute_id" bson:"bk_attribute_id" mapstructure:"bk_attribute_id"` PropertyID string `field:"bk_property_id" json:"bk_property_id" mapstructure:"bk_property_id"` PropertyValue interface{} `field:"bk_property_value" json:"bk_property_value" mapstructure:"bk_property_value"` }
type HostBizTopo ¶
type HostChangeChartData ¶
type HostChangeChartData struct { ReportType string `json:"report_type" bson:"report_type"` Data []StringIDCount `json:"data" bson:"data"` OwnerID string `json:"bk_supplier_account" bson:"bk_supplier_account"` CreateTime string `json:"create_time" bson:"create_time"` }
type HostCloneInputParams ¶
type HostCommonSearch ¶
type HostCommonSearch struct { AppID int64 `json:"bk_biz_id,omitempty"` Ip IPInfo `json:"ip"` Condition []SearchCondition `json:"condition"` Page BasePage `json:"page"` Pattern string `json:"pattern,omitempty"` }
type HostConfig ¶
type HostConfig struct { BaseResp `json:",inline"` Data HostConfigData `json:"data"` }
type HostConfigData ¶
type HostConfigData struct { Count int64 `json:"count"` Info []ModuleHost `json:"data"` Page BasePage `json:"page"` }
type HostIdentModule ¶
type HostIdentModule struct { BizID int64 `json:"bk_biz_id"` // 业务ID BizName string `json:"bk_biz_name"` // 业务名称 SetID int64 `json:"bk_set_id"` // 所属集群(bk_set_id): 数字 SetName string `json:"bk_set_name"` // 所属集群名称(bk_set_name): 字符串(最大长度25) ModuleID int64 `json:"bk_module_id"` // 所属模块(bk_module_id): 数字 ModuleName string `json:"bk_module_name"` // 所属模块(bk_module_name): 字符串(最大长度25) SetStatus string `json:"bk_service_status"` // 集群服务状态(bk_set_status) 数字 SetEnv string `json:"bk_set_env"` // 环境类型(bk_set_type) 数字 Layer *Layer `json:"layer"` // 自定义层级 }
HostIdentModule HostIdentifier module define
type HostIdentProcess ¶
type HostIdentProcess struct { ProcessID int64 `json:"bk_process_id" bson:"bk_process_id"` // 进程名称 ProcessName string `json:"bk_process_name" bson:"bk_process_name"` // 进程名称 // deprecated 后续的版本会被废弃掉 BindIP string `json:"bind_ip" bson:"bind_ip"` // 绑定IP, 枚举: [{ID: "1", Name: "127.0.0.1"}, {ID: "2", Name: "0.0.0.0"}, {ID: "3", Name: "第一内网IP"}, {ID: "4", Name: "第一外网IP"}] // deprecated 后续的版本会被废弃掉 Port string `json:"port" bson:"port"` // 端口, 单个端口:"8080", 多个连续端口:"8080-8089", 多个不连续端口:"8080-8089,8199" // deprecated 后续的版本会被废弃掉 Protocol string `json:"protocol" bson:"protocol"` // 协议, 枚举: [{ID: "1", Name: "TCP"}, {ID: "2", Name: "UDP"}], FuncID string `json:"bk_func_id" bson:"bk_func_id"` // 功能ID FuncName string `json:"bk_func_name" bson:"bk_func_name"` // 功能名称 StartParamRegex string `json:"bk_start_param_regex" bson:"bk_start_param_regex"` // 启动参数匹配规则 BindModules []int64 `json:"bind_modules" bson:"bind_modules"` // 进程绑定的模块ID,数字数组 // deprecated 后续的版本会被废弃掉 PortEnable bool `field:"bk_enable_port" json:"bk_enable_port" bson:"bk_enable_port"` // BindInfo 进程绑定信息 BindInfo []ProcBindInfo `field:"bind_info" json:"bind_info" bson:"bind_info"` }
type HostIdentProcessSorter ¶
type HostIdentProcessSorter []HostIdentProcess
func (HostIdentProcessSorter) Len ¶
func (p HostIdentProcessSorter) Len() int
func (HostIdentProcessSorter) Less ¶
func (p HostIdentProcessSorter) Less(i, j int) bool
func (HostIdentProcessSorter) Swap ¶
func (p HostIdentProcessSorter) Swap(i, j int)
type HostIdentifier ¶
type HostIdentifier struct { HostID int64 `json:"bk_host_id" bson:"bk_host_id"` // 主机ID(host_id) 数字 HostName string `json:"bk_host_name" bson:"bk_host_name"` // 主机名称 SupplierAccount string `json:"bk_supplier_account"` // 开发商帐号(bk_supplier_account) 数字 CloudID int64 `json:"bk_cloud_id" bson:"bk_cloud_id"` // 所属云区域id(bk_cloud_id) 数字 CloudName string `json:"bk_cloud_name" bson:"bk_cloud_name"` // 所属云区域名称(bk_cloud_name) 字符串(最大长度25) InnerIP StringArrayToString `json:"bk_host_innerip" bson:"bk_host_innerip"` // 内网IP OuterIP StringArrayToString `json:"bk_host_outerip" bson:"bk_host_outerip"` // 外网IP OSType string `json:"bk_os_type" bson:"bk_os_type"` // 操作系统类型 OSName string `json:"bk_os_name" bson:"bk_os_name"` // 操作系统名称 Memory int64 `json:"bk_mem" bson:"bk_mem"` // 内存容量 CPU int64 `json:"bk_cpu" bson:"bk_cpu"` // CPU逻辑核心数 Disk int64 `json:"bk_disk" bson:"bk_disk"` // 磁盘容量 HostIdentModule map[string]*HostIdentModule `json:"associations" bson:"associations"` Process []HostIdentProcess `json:"process" bson:"process"` }
func (*HostIdentifier) MarshalBinary ¶
func (identifier *HostIdentifier) MarshalBinary() (data []byte, err error)
type HostInputType ¶
type HostInputType string
const ( ExcelType HostInputType = "excel" CollectType HostInputType = "collect" )
type HostInstanceProperties ¶
type HostInstancePropertiesResult ¶
type HostInstancePropertiesResult struct { BaseResp `json:",inline"` Data []HostInstanceProperties `json:"data"` }
type HostInstanceResult ¶
type HostList ¶
type HostList struct { ApplicationID int64 `json:"bk_biz_id"` HostInfo map[int64]map[string]interface{} `json:"host_info"` InputType HostInputType `json:"input_type"` }
type HostLockData ¶
type HostLockQueryResponse ¶
type HostLockQueryResponse struct { BaseResp `json:",inline"` Data struct { Info []HostLockData `json:"info"` Count int64 `json:"count"` } }
type HostLockRequest ¶
type HostLockRequest struct {
IDS []int64 `json:"id_list"`
}
type HostLockResponse ¶
type HostLockResultResponse ¶
type HostMapStr ¶
type HostMapStr map[string]interface{}
host map with string type ip and operator, can only get host from db with this map
func (*HostMapStr) UnmarshalBSON ¶
func (h *HostMapStr) UnmarshalBSON(b []byte) error
type HostModuleConfig ¶
type HostModuleFind ¶
type HostModuleRelationParameter ¶
type HostModuleRelationParameter struct { AppID int64 `json:"bk_biz_id"` HostID []int64 `json:"bk_host_id"` }
HostModuleRelationParameter get host and module relation parameter
func (*HostModuleRelationParameter) Validate ¶
func (h *HostModuleRelationParameter) Validate() (rawError errors.RawErrorInfo)
type HostModuleRelationRequest ¶
type HostModuleRelationRequest struct { ApplicationID int64 `json:"bk_biz_id" bson:"bk_biz_id" field:"bk_biz_id" mapstructure:"bk_biz_id"` SetIDArr []int64 `json:"bk_set_ids" bson:"bk_set_ids" field:"bk_set_ids" mapstructure:"bk_set_ids"` HostIDArr []int64 `json:"bk_host_ids" bson:"bk_host_ids" field:"bk_host_ids" mapstructure:"bk_host_ids"` ModuleIDArr []int64 `json:"bk_module_ids" bson:"bk_module_ids" field:"bk_module_ids" mapstructure:"bk_module_ids"` Page BasePage `json:"page" bson:"page" field:"page" mapstructure:"page"` Fields []string `json:"field" bson:"field" field:"field" mapstructure:"field"` }
HostModuleRelationRequest gethost module relation request parameter
func (*HostModuleRelationRequest) Empty ¶
func (h *HostModuleRelationRequest) Empty() bool
Empty empty struct
type HostObjAttDes ¶
type HostProcessInstance ¶
type HostProcessInstance struct { HostID int64 `json:"bk_host_id"` ProcessID int64 `json:"bk_process_id"` BindIP string `json:"bind_ip"` Port string `json:"port"` Protocol ProtocolType `json:"protocol"` }
type HostProcessRelation ¶
type HostSnapBatchInput ¶
type HostSnapBatchInput struct {
HostIDs []int64 `json:"host_ids"`
}
type HostSnapBatchOption ¶
func (*HostSnapBatchOption) Validate ¶
func (h *HostSnapBatchOption) Validate() (rawError errors.RawErrorInfo)
type HostSnapBatchResult ¶
type HostSnapResult ¶
type HostSyncInfo ¶
type HostSyncInfo struct { HostID int64 `json:"bk_host_id" bson:"bk_host_id"` CloudID int64 `json:"bk_cloud_id" bson:"bk_cloud_id"` InstanceId string `json:"bk_cloud_inst_id" bson:"bk_cloud_inst_id"` PrivateIp string `json:"bk_host_innerip" bson:"bk_host_innerip"` PublicIp string `json:"bk_host_outerip" bson:"bk_host_outerip"` InstanceState string `json:"bk_cloud_host_status" bson:"bk_cloud_host_status"` OwnerID string `json:"bk_supplier_account" bson:"bk_supplier_account"` CreateTime time.Time `json:"create_time" bson:"create_time"` LastTime time.Time `json:"last_time" bson:"last_time"` }
type HostSyncList ¶
type HostSyncList struct { ApplicationID int64 `json:"bk_biz_id"` HostInfo map[int64]map[string]interface{} `json:"host_info"` ModuleID []int64 `json:"bk_module_id"` InputType HostInputType `json:"input_type"` }
type HostToAppModule ¶
type HostToAppModule struct { Ips []string `json:"ips"` HostName []string `json:"bk_host_name"` ModuleName string `json:"bk_module_name"` SetName string `json:"bk_set_name"` AppName string `json:"bk_biz_name"` OsType string `json:"bk_os_type"` OwnerID string `json:"bk_supplier_account"` PlatID int64 `json:"bk_cloud_id"` IsIncrement bool `json:"is_increment"` }
type HostTopoResult ¶
type HostTransferOpDetail ¶
type HostTransferOpDetail struct { // PreData the previous biz topology of the host before transfer PreData HostBizTopo `json:"pre_data" bson:"pre_data"` // CurData the current biz topology of the host before transfer CurData HostBizTopo `json:"cur_data" bson:"cur_data"` }
func (*HostTransferOpDetail) WithName ¶
func (op *HostTransferOpDetail) WithName() string
type HostTransferPlan ¶
type HostTransferPlan struct { HostID int64 `field:"bk_host_id" json:"bk_host_id"` FinalModules []int64 `field:"final_modules" json:"final_modules"` ToRemoveFromModules []int64 `field:"to_remove_from_modules" json:"to_remove_from_modules"` ToAddToModules []int64 `field:"to_add_to_modules" json:"to_add_to_modules"` IsTransferToInnerModule bool `field:"is_transfer_to_inner_module" json:"is_transfer_to_inner_module"` HostApplyPlan OneHostApplyPlan `field:"host_apply_plan" json:"host_apply_plan" mapstructure:"host_apply_plan"` }
type HostTransferPreview ¶
type HostTransferPreview struct { HostID int64 `field:"bk_host_id" json:"bk_host_id"` FinalModules []int64 `field:"final_modules" json:"final_modules"` ToRemoveFromModules []RemoveFromModuleInfo `field:"to_remove_from_modules" json:"to_remove_from_modules"` ToAddToModules []AddToModuleInfo `field:"to_add_to_modules" json:"to_add_to_modules"` HostApplyPlan OneHostApplyPlan `field:"host_apply_plan" json:"host_apply_plan"` }
type HostsModuleRelation ¶
type IPInfo ¶
type IPInfo struct { Data []string `json:"data"` Exact int64 `json:"exact"` Flag string `json:"flag"` }
ip search info
type IamAction ¶
type IamAction struct { ID string `json:"id"` RelatedResourceTypes []IamResourceType `json:"related_resource_types"` }
type IamCreatorActionPolicy ¶
type IamInstance ¶
type IamInstance struct { ID string `json:"id"` Name string `json:"name"` Ancestors []IamInstanceAncestor `json:"ancestors,omitempty"` }
type IamInstanceAncestor ¶
type IamInstanceWithCreator ¶
type IamInstancesWithCreator ¶
type IamInstancesWithCreator struct { System string `json:"system"` Type string `json:"type"` Creator string `json:"creator"` Instances []IamInstance `json:"instances"` }
type IamPermission ¶
type IamResourceAttribute ¶
type IamResourceAttribute struct { ID string `json:"id"` Values []IamResourceAttributeValue `json:"values"` }
type IamResourceAttributeValue ¶
type IamResourceAttributeValue struct {
ID string `json:"id"`
}
type IamResourceInstance ¶
type IamResourceType ¶
type IamResourceType struct { SystemID string `json:"system_id"` Type string `json:"type"` Instances [][]IamResourceInstance `json:"instances,omitempty"` Attributes []IamResourceAttribute `json:"attributes,omitempty"` }
type InlineProcInfo ¶
type InlineProcInfo struct { //Meta GseProcMeta //Spec GseProcSpec ProcInfo map[string]interface{} ProcNum int64 AppID int64 // use gse proc namespace FunID int64 ProcID int64 }
InlineProcInfo process info convert gse proc info
type InnerModule ¶
type InnerModule struct { ModuleID int64 `field:"bk_module_id" json:"bk_module_id" bson:"bk_module_id" mapstructure:"bk_module_id"` ModuleName string `field:"bk_module_name" bson:"bk_module_name" json:"bk_module_name" mapstructure:"bk_module_name"` Default int64 `field:"default" bson:"default" json:"default" mapstructure:"default"` HostApplyEnabled bool `field:"host_apply_enabled" bson:"host_apply_enabled" json:"host_apply_enabled" mapstructure:"host_apply_enabled"` }
type InnterAppTopo ¶
type InnterAppTopo struct { SetID int64 `json:"bk_set_id" field:"bk_set_id"` SetName string `json:"bk_set_name" field:"bk_set_name"` Module []InnerModule `json:"module" field:"module"` }
type InstAsst ¶
type InstAsst struct { // sequence ID ID int64 `field:"id" json:"id"` // inst id associate to ObjectID InstID int64 `field:"bk_inst_id" json:"bk_inst_id" bson:"bk_inst_id"` // association source ObjectID ObjectID string `field:"bk_obj_id" json:"bk_obj_id" bson:"bk_obj_id"` // inst id associate to AsstObjectID AsstInstID int64 `field:"bk_asst_inst_id" json:"bk_asst_inst_id" bson:"bk_asst_inst_id"` // association target ObjectID AsstObjectID string `field:"bk_asst_obj_id" json:"bk_asst_obj_id" bson:"bk_asst_obj_id"` // bk_supplier_account OwnerID string `field:"bk_supplier_account" json:"bk_supplier_account" bson:"bk_supplier_account"` // association id between two object ObjectAsstID string `field:"bk_obj_asst_id" json:"bk_obj_asst_id" bson:"bk_obj_asst_id"` // association kind id AssociationKindID string `field:"bk_asst_id" json:"bk_asst_id" bson:"bk_asst_id"` // BizID the business ID BizID int64 `field:"bk_biz_id" json:"bk_biz_id" bson:"bk_biz_id"` }
InstAsst an association definition between instances.
type InstBaseInfo ¶
InstBaseInfo instance base info
type InstChangeCount ¶
type InstDataInfo ¶
InstDataInfo response instance data result Data field
type InstNameAsst ¶
type InstNameAsst struct { ID string `json:"id"` ObjID string `json:"bk_obj_id"` ObjIcon string `json:"bk_obj_icon"` InstID int64 `json:"bk_inst_id"` ObjectName string `json:"bk_obj_name"` InstName string `json:"bk_inst_name"` AssoID int64 `json:"asso_id"` // AsstName string `json:"bk_asst_name"` // AsstID string `json:"bk_asst_id"` InstInfo map[string]interface{} `json:"inst_info,omitempty"` }
type InstResult ¶
InstResult inst item result
type Instance ¶
type Instance struct { InstanceId string `json:"bk_cloud_inst_id" bson:"bk_cloud_inst_id"` PrivateIp string `json:"bk_host_innerip" bson:"bk_host_innerip"` PublicIp string `json:"bk_host_outerip" bson:"bk_host_outerip"` InstanceState string `json:"bk_cloud_host_status" bson:"bk_cloud_host_status"` VpcId string `json:"bk_vpc_id" bson:"bk_vpc_id"` }
type InstanceAssociationOpDetail ¶
type InstanceAssociationOpDetail struct { AssociationOpDetail `bson:",inline"` // SourceModelID the source instance's object ID SourceModelID string `json:"src_obj_id" bson:"src_obj_id"` // TargetModelID the target instance's object ID TargetModelID string `json:"dest_obj_id" bson:"dest_obj_id"` // TargetInstanceID the target instance ID TargetInstanceID int64 `json:"dest_inst_id" bson:"dest_inst_id"` // TargetInstanceID the target instance name TargetInstanceName string `json:"dest_inst_name" bson:"dest_inst_name"` }
func (*InstanceAssociationOpDetail) WithName ¶
func (ao *InstanceAssociationOpDetail) WithName() string
type InstanceOpDetail ¶
type InstanceOpDetail struct { BasicOpDetail `bson:",inline"` // BkObjID the object ID of the instance's model ModelID string `json:"bk_obj_id" bson:"bk_obj_id"` }
func (*InstanceOpDetail) WithName ¶
func (op *InstanceOpDetail) WithName() string
type InstanceTagKeyItem ¶
type InstanceTagKeyItem struct {
BaseCfgItem `json:",inline"`
}
type InstanceTagValueItem ¶
type InstanceTagValueItem struct {
BaseCfgItem `json:",inline"`
}
type InstancesInfo ¶
type IntIDArrayCount ¶
type IntIDArrayCount struct { ID int64 `json:"id" bson:"_id"` Count []int64 `json:"count" bson:"count"` }
IntIDArrayCount int类型字段做mongoDB聚合,且结果为数组时使用
type IntIDCount ¶
IntIDCount int类型字段做mongoDB聚合时使用
type IntOption ¶
IntOption integer option
func ParseIntOption ¶
parseIntOption parse int data in option
type JsonCntInfoResp ¶
type JsonCntInfoResp struct { BaseResp Data CntInfoString `json:"data"` }
JsonCntInfoResp defines a response that do not parse the data's count and info fields to a struct but decode it to a json string if possible
type JsonStringResp ¶
JsonStringResp defines a response that do not parse the data field to a struct but decode it to a json string if possible
type Label ¶
Label define the Label type used to limit the scope of application of resources
func (Label) GetBusinessID ¶
func (Label) GetModelKind ¶
func (Label) Int64 ¶
int64 is used to get a int64 value from a label key. if the key does not exist, it will return with a LabelKeyNotExistError, which can be used to check it, if you do care about it.
func (Label) IsTrue ¶
isTrue is used to check if the label key is a true value or not. if the key does not exist, it will return with a LabelKeyNotExistError, which can be used to check it, if you do care about it.
func (Label) SetBusinessID ¶
func (Label) SetModelKind ¶
type LabelAggregationOption ¶
type LimiterRule ¶
type LimiterRule struct { RuleName string `json:"rulename"` AppCode string `json:"appcode"` User string `json:"user"` IP string `json:"ip"` Method string `json:"method"` Url string `json:"url"` Limit int64 `json:"limit"` TTL int64 `json:"ttl"` DenyAll bool `json:"denyall"` }
LimiterRule is a rule for api limiter
func (LimiterRule) Verify ¶
func (r LimiterRule) Verify() error
Verify to check the fields of LimiterRule
type LinksItem ¶
type LinksItem struct { BaseCfgItem `json:",inline"` Enabled bool `json:"enabled"` }
type ListAPITaskData ¶
type ListAPITaskData struct { Info []APITaskDetail `json:"info"` Count int64 `json:"count"` Page BasePage `json:"page"` }
type ListAPITaskRequest ¶
type ListAPITaskResponse ¶
type ListAPITaskResponse struct { BaseResp Data ListAPITaskData `json:"data"` }
type ListAssociationsWithAssociationKindResult ¶
type ListAssociationsWithAssociationKindResult struct { BaseResp `json:",inline"` Data AssociationList `json:"data"` }
type ListHostApplyRuleOption ¶
type ListHostApplyRuleOption struct { ModuleIDs []int64 `field:"bk_module_ids" json:"bk_module_ids" bson:"bk_module_ids" mapstructure:"bk_module_ids"` AttributeIDs []int64 `field:"bk_attribute_ids" json:"bk_attribute_ids" bson:"bk_attribute_ids" mapstructure:"bk_attribute_ids"` Page BasePage `field:"page" json:"page" bson:"page" mapstructure:"page"` }
type ListHostResult ¶
type ListHostWithPage ¶
type ListHostWithPage struct { // length range is [1,1000] HostIDs []int64 `json:"bk_host_ids"` // only return these fields in hosts. Fields []string `json:"fields"` // sort field is not used. // max page limit is 1000 Page BasePage `json:"page"` }
list hosts with page in cache, which page info is in redis cache. store in a zset.
type ListHostWithoutAppResponse ¶
type ListHostWithoutAppResponse struct { BaseResp `json:",inline"` Data ListHostResult `json:"data"` }
type ListHosts ¶
type ListHosts struct { BizID int64 `json:"bk_biz_id,omitempty"` SetIDs []int64 `json:"bk_set_ids"` ModuleIDs []int64 `json:"bk_module_ids"` HostPropertyFilter *querybuilder.QueryFilter `json:"host_property_filter"` Fields []string `json:"fields"` Page BasePage `json:"page"` }
func (ListHosts) GetHostPropertyFilter ¶
type ListHostsParameter ¶
type ListHostsParameter struct { SetIDs []int64 `json:"bk_set_ids"` SetCond []ConditionItem `json:"set_cond"` ModuleIDs []int64 `json:"bk_module_ids"` HostPropertyFilter *querybuilder.QueryFilter `json:"host_property_filter"` Fields []string `json:"fields"` Page BasePage `json:"page"` }
func (ListHostsParameter) Validate ¶
func (option ListHostsParameter) Validate() (string, error)
type ListHostsWithNoBizParameter ¶
type ListHostsWithNoBizParameter struct { HostPropertyFilter *querybuilder.QueryFilter `json:"host_property_filter"` Fields []string `json:"fields"` Page BasePage `json:"page"` }
func (ListHostsWithNoBizParameter) Validate ¶
func (option ListHostsWithNoBizParameter) Validate() (string, error)
type ListProcessInstanceRelationOption ¶
type ListProcessInstanceRelationOption struct { BusinessID int64 `json:"bk_biz_id"` ProcessIDs []int64 `json:"process_ids,omitempty"` ServiceInstanceIDs []int64 `json:"service_instance_id,omitempty"` ProcessTemplateID int64 `json:"process_template_id,omitempty"` HostID int64 `json:"host_id,omitempty"` Page BasePage `json:"page" field:"page"` }
type ListProcessInstancesDetailsByIDsOption ¶
type ListProcessInstancesDetailsByIDsOption struct { BizID int64 `json:"bk_biz_id"` ProcessIDs []int64 `json:"process_ids"` Page BasePage `json:"page"` }
func (*ListProcessInstancesDetailsByIDsOption) Validate ¶
func (o *ListProcessInstancesDetailsByIDsOption) Validate() (rawError cErr.RawErrorInfo)
Validate validates the input param
type ListProcessInstancesNameIDsOption ¶
type ListProcessInstancesNameIDsOption struct { BizID int64 `json:"bk_biz_id"` ModuleID int64 `json:"bk_module_id"` ProcessName string `json:"process_name"` Page BasePage `json:"page"` }
func (*ListProcessInstancesNameIDsOption) Validate ¶
func (o *ListProcessInstancesNameIDsOption) Validate() (rawError cErr.RawErrorInfo)
Validate validates the input param
type ListProcessTemplatesOption ¶
type ListProcessTemplatesOption struct { BusinessID int64 `json:"bk_biz_id" bson:"bk_biz_id"` ProcessTemplateIDs []int64 `json:"process_template_ids,omitempty" bson:"process_template_ids"` ServiceTemplateIDs []int64 `json:"service_template_ids,omitempty" bson:"service_template_ids"` Page BasePage `json:"page" field:"page" bson:"page"` }
type ListServiceInstanceDetailOption ¶
type ListServiceInstanceDetailOption struct { BusinessID int64 `json:"bk_biz_id"` SetID int64 `json:"bk_set_id"` ModuleID int64 `json:"bk_module_id"` HostID int64 `json:"bk_host_id"` ServiceInstanceIDs []int64 `json:"service_instance_ids"` Selectors selector.Selectors `json:"selectors,omitempty"` Page BasePage `json:"page,omitempty"` }
type ListServiceInstanceDetailRequest ¶
type ListServiceInstanceDetailRequest struct { BizID int64 `json:"bk_biz_id"` SetID int64 `json:"bk_set_id"` ModuleID int64 `json:"bk_module_id"` HostID int64 `json:"bk_host_id"` ServiceInstanceIDs []int64 `json:"service_instance_ids"` Page BasePage `json:"page"` Selectors selector.Selectors `json:"selectors"` }
type ListServiceInstanceOption ¶
type ListServiceInstanceOption struct { BusinessID int64 `json:"bk_biz_id"` ServiceTemplateID int64 `json:"service_template_id"` HostIDs []int64 `json:"bk_host_ids"` ModuleIDs []int64 `json:"bk_module_ids"` SearchKey *string `json:"search_key"` ServiceInstanceIDs []int64 `json:"service_instance_ids"` Selectors selector.Selectors `json:"selectors"` Page BasePage `json:"page"` }
type ListServiceTemplateWithDetailResult ¶
type ListServiceTemplateWithDetailResult struct { ServiceTemplate ServiceTemplate `json:"service_template"` ProcessTemplateCount int64 `json:"process_template_count"` ServiceInstanceCount int64 `json:"service_instance_count"` ModuleCount int64 `json:"module_count"` }
type ListSetByTemplateOption ¶
type ListSetTemplateOption ¶
type ListSetTemplateResult ¶
type ListSetTemplateResult struct { BaseResp Data MultipleSetTemplateResult `json:"data"` }
type ListSetTemplateSyncStatusOption ¶
type ListSetTemplateSyncStatusOption struct { BizID int64 `field:"bk_biz_id" json:"bk_biz_id" bson:"bk_biz_id" mapstructure:"bk_biz_id"` SetIDs []int64 `field:"bk_set_ids" json:"bk_set_ids" bson:"bk_set_ids" mapstructure:"bk_set_ids"` TaskIDs []string `field:"task_ids" json:"task_ids" bson:"task_ids" mapstructure:"task_ids"` SearchKey string `field:"search" json:"search" bson:"search" mapstructure:"search"` SetTemplateID int64 `field:"set_template_id" json:"set_template_id" bson:"set_template_id" mapstructure:"set_template_id"` Creator string `field:"creator" json:"creator,omitempty" bson:"creator" mapstructure:"creator"` StartTime *Time `field:"start_time" json:"start_time,omitempty" bson:"create_time" mapstructure:"start_time"` EndTime *Time `field:"end_time" json:"end_time,omitempty" bson:"end_time" mapstructure:"end_time"` Status SyncStatus `field:"status" json:"status" bson:"status" mapstructure:"status"` Page BasePage `field:"page" json:"page" bson:"page" mapstructure:"page"` }
func (ListSetTemplateSyncStatusOption) ToFilter ¶
func (option ListSetTemplateSyncStatusOption) ToFilter() map[string]interface{}
type ListUserItem ¶
type ListWithIDOption ¶
type LoginPluginInfo ¶
type LoginPluginInfo struct { Name string // plugin info Version string // In what version is used HandleFunc LoginUserPluginInerface }
type LoginSystemUserInfo ¶
type LoginUserInfo ¶
type LoginUserInfo struct { UserName string `json:"username"` ChName string `json:"chname"` Phone string `json:"phone"` Email string `json:"email"` Role string `json:"-"` BkToken string `json:"bk_token"` OnwerUin string `json:"current_supplier"` OwnerUinArr []LoginUserInfoOwnerUinList `json:"supplier_list"` //user all owner uin IsOwner bool `json:"-"` // is master Extra map[string]interface{} `json:"extra"` //custom information Language string `json:"-"` AvatarUrl string `json:"avatar_url"` MultiSupplier bool `json:"multi_supplier"` }
type LoginUserInfoDetail ¶
type LoginUserInfoDetail struct { UserName string `json:"username"` ChName string `json:"chname"` OnwerUin string `json:"current_supplier"` OwnerUinArr []LoginUserInfoOwnerUinList `json:"supplier_list"` //user all owner uin AvatarUrl string `json:"avatar_url"` MultiSupplier bool `json:"multi_supplier"` }
type LoginUserInfoResult ¶
type LoginUserInfoResult struct { BaseResp `json:",inline"` Data LoginUserInfoDetail `json:"data"` }
type LoginUserPluginInerface ¶
type LoginUserPluginInerface interface { LoginUser(c *gin.Context, config map[string]string, isMultiOwner bool) (user *LoginUserInfo, loginSucc bool) GetLoginUrl(c *gin.Context, config map[string]string, input *LogoutRequestParams) string GetUserList(c *gin.Context, config map[string]string) ([]*LoginSystemUserInfo, *errors.RawErrorInfo) }
type LoginUserPluginParams ¶
type LogoutRequestParams ¶
type LogoutRequestParams struct {
HTTPScheme string `json:"http_scheme"`
}
type LogoutResult ¶
type LongcharItem ¶
type LongcharItem struct {
BaseCfgItem `json:",inline"`
}
type LonginSystemUserListResult ¶
type LonginSystemUserListResult struct { BaseResp `json:",inline"` Data []*LoginSystemUserInfo `json:"data"` }
type MainLineObject ¶
MainLineObject main line object definition
type MainLineResult ¶
type MainlineInstInfo ¶
type MainlineObjectTopo ¶
type MainlineObjectTopo struct { ObjID string `field:"bk_obj_id" json:"bk_obj_id"` ObjName string `field:"bk_obj_name" json:"bk_obj_name"` OwnerID string `field:"bk_supplier_account" json:"bk_supplier_account"` NextObj string `field:"bk_next_obj" json:"bk_next_obj"` NextName string `field:"bk_next_name" json:"bk_next_name"` PreObjID string `field:"bk_pre_obj_id" json:"bk_pre_obj_id"` PreObjName string `field:"bk_pre_obj_name" json:"bk_pre_obj_name"` }
MainlineObjectTopo the mainline object topo
func (*MainlineObjectTopo) Parse ¶
func (cli *MainlineObjectTopo) Parse(data mapstr.MapStr) (*MainlineObjectTopo, error)
Parse load the data from mapstr attribute into attribute instance
func (*MainlineObjectTopo) ToMapStr ¶
func (cli *MainlineObjectTopo) ToMapStr() mapstr.MapStr
ToMapStr to mapstr
type MainlineObjectTopoResult ¶
type MainlineObjectTopoResult struct { BaseResp `json:",inline"` Data []MainlineObjectTopo `json:"data"` }
type MapArrayResponse ¶
type MatchProcInstParam ¶
type MatchProcInstParam struct { ApplicationID int64 `json:"bk_biz_id" bson:"bk_biz_id"` SetName string `json:"bk_set_name" bson:"bk_set_name"` ModuleName string `json:"bk_module_name" bson:"bk_module_name"` FuncID string `json:"bk_func_id" bson:"bk_func_id"` HostInstanceID string `json:"bk_host_instance_id" bson:"bk_host_instance_id"` }
type Metadata ¶
type Metadata struct {
Label Label `field:"label" json:"label" bson:"label"`
}
Metadata used to define the metadata for the resources
func NewMetadata ¶
func (*Metadata) ParseBizID ¶
type MetadataWrapper ¶
type MetadataWrapper struct {
Metadata Metadata `json:"metadata"`
}
type ModelAssociationOpDetail ¶
type ModelAssociationOpDetail struct { AssociationOpDetail `bson:",inline"` // AssociationName the alias name of the association AssociationName string `json:"asst_name" bson:"asst_name"` // Mapping the association mapping, defines which kind of association can be used Mapping AssociationMapping `json:"mapping" bson:"mapping"` // OnDelete the association on delete action OnDelete AssociationOnDeleteAction `json:"on_delete" bson:"on_delete"` // IsPre describe whether this association is a pre-defined association or not IsPre *bool `json:"is_pre" bson:"is_pre"` // TargetModelID the target object ID TargetModelID string `json:"dest_obj_id" bson:"dest_obj_id"` // TargetModelID the target object name TargetModelName int64 `json:"dest_obj_name" bson:"dest_obj_name"` }
func (*ModelAssociationOpDetail) WithName ¶
func (ao *ModelAssociationOpDetail) WithName() string
type ModelAttrOpDetail ¶
type ModelAttrOpDetail struct { BasicOpDetail `bson:",inline"` // BkObjID the attribute object ID BkObjID string `json:"bk_obj_id" bson:"bk_obj_id"` // BkObjName the attribute object name BkObjName string `json:"bk_obj_name" bson:"bk_obj_name"` }
func (*ModelAttrOpDetail) WithName ¶
func (op *ModelAttrOpDetail) WithName() string
type ModelIdItem ¶
type ModelIdItem struct {
BaseCfgItem `json:",inline"`
}
type ModelInstChange ¶
type ModelInstChange map[string]*InstChangeCount
type ModelInstChartData ¶
type ModelInstChartData struct { ReportType string `json:"report_type" bson:"report_type"` Data []StringIDCount `json:"data" data:"data"` OwnerID string `json:"bk_supplier_account" bson:"bk_supplier_account"` LastTime time.Time `json:"last_time" bson:"last_time"` }
type ModuleChangedAttribute ¶
type ModuleDiffWithTemplateDetail ¶
type ModuleDiffWithTemplateDetail struct { ModuleID int64 `json:"bk_module_id"` Unchanged []ServiceInstanceDifference `json:"unchanged"` Changed []ServiceInstanceDifference `json:"changed"` Added []ServiceInstanceDifference `json:"added"` Removed []ServiceInstanceDifference `json:"removed"` ChangedAttributes []ModuleChangedAttribute `json:"changed_attributes"` HasDifference bool `json:"has_difference"` }
ModuleDiffWithTemplateDetail 模块与服务模板间的差异
type ModuleHost ¶
type ModuleHost struct { AppID int64 `json:"bk_biz_id" bson:"bk_biz_id"` HostID int64 `json:"bk_host_id" bson:"bk_host_id"` ModuleID int64 `json:"bk_module_id" bson:"bk_module_id"` SetID int64 `json:"bk_set_id" bson:"bk_set_id"` OwnerID string `json:"bk_supplier_account" bson:"bk_supplier_account"` }
type ModuleHostConfigParams ¶
type ModuleHostRelation ¶
type ModuleInst ¶
type ModuleInst struct { BizID int64 `bson:"bk_biz_id" json:"bk_biz_id" field:"bk_biz_id" mapstructure:"bk_biz_id"` ModuleID int64 `bson:"bk_module_id" json:"bk_module_id" field:"bk_module_id" mapstructure:"bk_module_id"` ModuleName string `bson:"bk_module_name" json:"bk_module_name" field:"bk_module_name" mapstructure:"bk_module_name"` SupplierAccount string `bson:"bk_supplier_account" json:"bk_supplier_account" field:"bk_supplier_account" mapstructure:"bk_supplier_account"` ServiceCategoryID int64 `bson:"service_category_id" json:"service_category_id" field:"service_category_id" mapstructure:"service_category_id"` ServiceTemplateID int64 `bson:"service_template_id" json:"service_template_id" field:"service_template_id" mapstructure:"service_template_id"` ParentID int64 `bson:"bk_parent_id" json:"bk_parent_id" field:"bk_parent_id" mapstructure:"bk_parent_id"` SetTemplateID int64 `bson:"set_template_id" json:"set_template_id" field:"set_template_id" mapstructure:"set_template_id"` Default int64 `bson:"default" json:"default" field:"default" mapstructure:"default"` HostApplyEnabled bool `bson:"host_apply_enabled" json:"host_apply_enabled" field:"host_apply_enabled" mapstructure:"host_apply_enabled"` }
ModuleInst contains partial fields of a real module
type MultipleCloudAccount ¶
type MultipleCloudAccount struct { Count int64 `json:"count"` Info []CloudAccountWithExtraInfo `json:"info"` }
type MultipleCloudAccountConf ¶
type MultipleCloudAccountConf struct { Count int64 `json:"count"` Info []CloudAccountConf `json:"info"` }
type MultipleCloudAccountConfResult ¶
type MultipleCloudAccountConfResult struct { BaseResp `json:",inline"` Data MultipleCloudAccountConf `json:"data"` }
type MultipleCloudAccountResult ¶
type MultipleCloudAccountResult struct { BaseResp `json:",inline"` Data MultipleCloudAccount `json:"data"` }
type MultipleCloudSyncTask ¶
type MultipleCloudSyncTask struct { Count int64 `json:"count"` Info []CloudSyncTask `json:"info"` }
type MultipleCloudSyncTaskResult ¶
type MultipleCloudSyncTaskResult struct { BaseResp `json:",inline"` Data MultipleCloudSyncTask `json:"data"` }
type MultipleHostApplyResult ¶
type MultipleHostApplyResult struct { ErrorContainer `json:",inline"` HostResults []HostApplyResult `field:"host_results" json:"host_results" bson:"host_results" mapstructure:"host_results"` }
type MultipleHostApplyRuleResult ¶
type MultipleHostApplyRuleResult struct { Count int64 `json:"count" mapstructure:"count"` Info []HostApplyRule `json:"info" mapstructure:"info"` }
type MultipleHostProcessRelation ¶
type MultipleHostProcessRelation struct { Count uint64 `json:"count"` Info []HostProcessRelation `json:"info"` }
type MultipleHostProcessRelationResult ¶
type MultipleHostProcessRelationResult struct { BaseResp `json:",inline"` Data MultipleHostProcessRelation `json:"data"` }
type MultipleMap ¶
type MultipleProcessInstanceRelation ¶
type MultipleProcessInstanceRelation struct { Count uint64 `json:"count"` Info []ProcessInstanceRelation `json:"info"` }
type MultipleProcessInstanceRelationResult ¶
type MultipleProcessInstanceRelationResult struct { BaseResp `json:",inline"` Data MultipleProcessInstanceRelation `json:"data"` }
type MultipleProcessTemplate ¶
type MultipleProcessTemplate struct { Count uint64 `json:"count"` Info []ProcessTemplate `json:"info"` }
type MultipleProcessTemplateResult ¶
type MultipleProcessTemplateResult struct { BaseResp `json:",inline"` Data MultipleProcessTemplate `json:"data"` }
type MultipleServiceCategory ¶
type MultipleServiceCategory struct { Count int64 `json:"count"` Info []ServiceCategory `json:"info"` }
type MultipleServiceCategoryResult ¶
type MultipleServiceCategoryResult struct { BaseResp `json:",inline"` Data MultipleServiceCategory `json:"data"` }
type MultipleServiceCategoryWithStatistics ¶
type MultipleServiceCategoryWithStatistics struct { Count int64 `json:"count"` Info []ServiceCategoryWithStatistics `json:"info"` }
type MultipleServiceCategoryWithStatisticsResult ¶
type MultipleServiceCategoryWithStatisticsResult struct { BaseResp `json:",inline"` Data MultipleServiceCategoryWithStatistics `json:"data"` }
type MultipleServiceInstance ¶
type MultipleServiceInstance struct { Count uint64 `json:"count"` Info []ServiceInstance `json:"info"` }
type MultipleServiceInstanceDetail ¶
type MultipleServiceInstanceDetail struct { Count uint64 `json:"count"` Info []ServiceInstanceDetail `json:"info"` }
type MultipleServiceInstanceDetailResult ¶
type MultipleServiceInstanceDetailResult struct { BaseResp `json:",inline"` Data MultipleServiceInstanceDetail `json:"data"` }
type MultipleServiceInstanceResult ¶
type MultipleServiceInstanceResult struct { BaseResp `json:",inline"` Data MultipleServiceInstance `json:"data"` }
type MultipleServiceTemplate ¶
type MultipleServiceTemplate struct { Count uint64 `json:"count"` Info []ServiceTemplate `json:"info"` }
type MultipleServiceTemplateDetail ¶
type MultipleServiceTemplateDetail struct { Count uint64 `json:"count"` Info []ServiceTemplateDetail `json:"info"` }
type MultipleServiceTemplateDetailResult ¶
type MultipleServiceTemplateDetailResult struct { BaseResp `json:",inline"` Data MultipleServiceTemplateDetail `json:"data"` }
type MultipleServiceTemplateResult ¶
type MultipleServiceTemplateResult struct { BaseResp `json:",inline"` Data MultipleServiceTemplate `json:"data"` }
type MultipleSetTemplateResult ¶
type MultipleSetTemplateResult struct { Count int64 `json:"count"` Info []SetTemplate `json:"info"` }
type MultipleSetTemplateSyncStatus ¶
type MultipleSetTemplateSyncStatus struct { Count int64 `json:"count"` Info []SetTemplateSyncStatus `field:"info" json:"info" bson:"info" mapstructure:"info"` }
type MultipleSetTemplateWithStatisticsResult ¶
type MultipleSetTemplateWithStatisticsResult struct { Count int64 `json:"count"` Info []SetTemplateWithStatistics `json:"info"` }
type MultipleSyncHistory ¶
type MultipleSyncHistory struct { Count int64 `json:"count"` Info []SyncHistory `json:"info"` }
type MultipleSyncHistoryResult ¶
type MultipleSyncHistoryResult struct { BaseResp `json:",inline"` Data MultipleSyncHistory `json:"data"` }
type NamedCharacterItem ¶
type NamedCharacterItem struct {
BaseCfgItem `json:",inline"`
}
type NetCollSearchParams ¶
type NetCollSearchParams struct { Page BasePage `json:"page,omitempty"` Fields []string `json:"fields,omitempty"` Condition []ConditionItem `json:"condition,omitempty"` }
type NetcollectConfig ¶
type NetcollectDevice ¶
type NetcollectDevice struct { DeviceID uint64 `json:"device_id,omitempty" bson:"device_id,omitempty"` DeviceName string `json:"device_name,omitempty" bson:"device_name,omitempty"` DeviceModel string `json:"device_model,omitempty" bson:"device_model,omitempty"` ObjectID string `json:"bk_obj_id" bson:"bk_obj_id,omitempty"` ObjectName string `json:"bk_obj_name,omitempty" bson:"-"` BkVendor string `json:"bk_vendor,omitempty" bson:"bk_vendor,omitempty"` OwnerID string `json:"-" bson:"bk_supplier_account,omitempty"` CreateTime *time.Time `field:"create_time,omitempty" json:"create_time,omitempty" bson:"create_time,omitempty"` LastTime *time.Time `field:"last_time" json:"last_time,omitempty" bson:"last_time,omitempty"` }
type NetcollectHistory ¶
type NetcollectHistory struct { NetcollectReport `json:",inline" bson:",inline"` Success bool `json:"success" bson:"success"` }
type NetcollectProperty ¶
type NetcollectProperty struct { NetcollectPropertyID uint64 `json:"netcollect_property_id,omitempty" bson:"netcollect_property_id,omitempty"` PropertyID string `json:"bk_property_id" bson:"bk_property_id,omitempty"` PropertyName string `json:"bk_property_name" bson:"-"` DeviceID uint64 `json:"device_id" bson:"device_id,omitempty"` DeviceName string `json:"device_name" bson:"-"` ObjectID string `json:"bk_obj_id,omitempty" bson:"-"` ObjectName string `json:"bk_obj_name,omitempty" bson:"-"` OID string `json:"oid,omitempty" bson:"oid,omitempty"` Period string `json:"period,omitempty" bson:"period,omitempty"` Action string `json:"action,omitempty" bson:"action,omitempty"` OwnerID string `json:"-" bson:"bk_supplier_account,omitempty"` CreateTime *time.Time `field:"create_time,omitempty" json:"create_time,omitempty" bson:"create_time,omitempty"` LastTime *time.Time `field:"last_time,omitempty" json:"last_time,omitempty" bson:"last_time,omitempty"` Unit string `json:"unit,omitempty" bson:"-"` DeviceModel string `json:"device_model,omitempty" bson:"-"` }
type NetcollectReport ¶
type NetcollectReport struct { Action string `json:"action" bson:"action"` CloudID int64 `json:"bk_cloud_id" bson:"bk_cloud_id"` CloudName string `json:"bk_cloud_name" bson:"-"` ObjectID string `json:"bk_obj_id" bson:"bk_obj_id"` ObjectName string `json:"bk_obj_name" bson:"-"` InnerIP string `json:"bk_host_innerip" bson:"bk_host_innerip"` Configuration string `json:"configuration" bson:"configuration"` OwnerID string `json:"bk_supplier_account" bson:"bk_supplier_account"` InstID int64 `json:"bk_inst_id" bson:"bk_inst_id"` InstKey string `json:"bk_inst_key" bson:"bk_inst_key"` LastTime Time `json:"last_time" bson:"last_time"` Attributes []NetcollectReportAttribute `json:"attributes" bson:"attributes"` Associations []NetcollectReportAssociation `json:"associations" bson:"associations"` }
type NetcollectReportAssociation ¶
type NetcollectReportAssociation struct { Action string `json:"action" bson:"-"` AsstInstName string `json:"bk_asst_inst_name" bson:"bk_asst_inst_name"` // AsstPropertyID string `json:"bk_asst_property_id" bson:"bk_asst_property_id"` AsstObjectID string `json:"bk_asst_obj_id" bson:"bk_asst_obj_id"` AsstObjectName string `json:"bk_asst_obj_name" bson:"bk_asst_obj_name"` ObjectAsstID string `json:"bk_obj_asst_id" bson:"bk_obj_asst_id"` Configuration string `json:"configuration" bson:"configuration"` }
type NetcollectReportAttribute ¶
type NetcollectReportAttribute struct { PropertyID string `json:"bk_property_id" bson:"bk_property_id"` PropertyName string `json:"bk_property_name" bson:"-"` IsRequired bool `json:"isrequired" bson:"-"` CurValue interface{} `json:"value" bson:"value"` PreValue interface{} `json:"pre_value" bson:"-"` Method string `json:"method,omitempty" bson:"-"` Success bool `json:"success,omitempty" bson:"-"` Error string `json:"error,omitempty" bson:"-"` }
type NetcollectReportSummary ¶
type Netcollector ¶
type Netcollector struct { CloudID int64 `json:"bk_cloud_id" bson:"bk_cloud_id"` CloudName string `json:"bk_cloud_name" bson:"-"` BizID int64 `json:"bk_biz_id" bson:"bk_biz_id" bson:"bk_biz_id"` InnerIP string `json:"bk_host_innerip" bson:"bk_host_innerip"` Status NetcollectorStatus `json:"status" bson:"status"` TaskID int64 `json:"task_id" bson:"task_id"` DeployTime *time.Time `json:"deploy_time" bson:"deploy_time"` Version string `json:"version" bson:"version"` LatestVersion string `json:"latest_ersion" bson:"latest_ersion"` ReportTotal int64 `json:"report_total" bson:"report_total"` Config NetcollectConfig `json:"config" bson:"config"` }
type NetcollectorStatus ¶
type NodeTopoPath ¶
type NodeTopoPath struct { BizID int64 `json:"bk_biz_id" mapstructure:"bk_biz_id"` Node TopoNode `json:"topo_node" mapstructure:"topo_node"` Path []*TopoInstanceNodeSimplify `json:"topo_path" mapstructure:"topo_path"` }
type NumberItem ¶
type NumberItem struct {
BaseCfgItem `json:",inline"`
}
type ObjAttDes ¶
type ObjAttDes struct { Attribute `json:",inline" bson:",inline"` PropertyGroupName string `json:"bk_property_group_name"` }
ObjAttDes 对象模型属性
type ObjClassificationObject ¶
type ObjClassificationObject struct { Classification `bson:",inline"` Objects []Object `json:"bk_objects"` AsstObjects map[string][]interface{} `json:"bk_asst_objects"` }
ObjClassificationObject define the class object class
type ObjQueryInput ¶
type ObjQueryInput struct { Condition interface{} `json:"condition"` Fields string `json:"fields"` Start int `json:"start"` Limit int `json:"limit"` Sort string `json:"sort"` }
func (*ObjQueryInput) ConvTime ¶
func (o *ObjQueryInput) ConvTime() error
ConvTime 将查询条件中字段包含cc_type key ,子节点变为time.Time
type Object ¶
type Object struct { ID int64 `field:"id" json:"id" bson:"id"` ObjCls string `field:"bk_classification_id" json:"bk_classification_id" bson:"bk_classification_id"` ObjIcon string `field:"bk_obj_icon" json:"bk_obj_icon" bson:"bk_obj_icon"` ObjectID string `field:"bk_obj_id" json:"bk_obj_id" bson:"bk_obj_id"` ObjectName string `field:"bk_obj_name" json:"bk_obj_name" bson:"bk_obj_name"` // IsHidden front-end don't display the object if IsHidden is true IsHidden bool `field:"bk_ishidden" json:"bk_ishidden" bson:"bk_ishidden"` IsPre bool `field:"ispre" json:"ispre" bson:"ispre"` IsPaused bool `field:"bk_ispaused" json:"bk_ispaused" bson:"bk_ispaused"` Position string `field:"position" json:"position" bson:"position"` OwnerID string `field:"bk_supplier_account" json:"bk_supplier_account" bson:"bk_supplier_account"` Description string `field:"description" json:"description" bson:"description"` Creator string `field:"creator" json:"creator" bson:"creator"` Modifier string `field:"modifier" json:"modifier" bson:"modifier"` CreateTime *Time `field:"create_time" json:"create_time" bson:"create_time"` LastTime *Time `field:"last_time" json:"last_time" bson:"last_time"` }
Object object metadata definition
func (*Object) GetDefaultInstPropertyName ¶
GetDefaultInstPropertyName get default inst
func (*Object) GetInstIDFieldName ¶
GetInstIDFieldName get instid filed
func (*Object) GetInstNameFieldName ¶
GetInstNameFieldName get the inst name
func (*Object) GetObjectType ¶
GetObjectType get the object type
type ObjectAttr ¶
type ObjectAttr struct {
Attr []interface{} `json:"attr"`
}
type ObjectAttrBatchResult ¶
type ObjectAttrBatchResult struct { BaseResp `json:",inline"` Data map[string]ObjectAttr `json:"data"` }
type ObjectAttrGroupResult ¶
type ObjectAttrGroupResult struct { BaseResp `json:",inline"` Data []AttributeGroup `json:"data"` }
type ObjectAttrResult ¶
type ObjectClsDes ¶
type ObjectClsDes struct { ID int `json:"id" bson:"id"` ClsID string `json:"bk_classification_id" bson:"bk_classification_id"` ClsName string `json:"bk_classification_name" bson:"bk_classification_name"` ClsType string `json:"bk_classification_type" bson:"bk_classification_type" ` ClsIcon string `json:"bk_classification_icon" bson:"bk_classification_icon"` }
type ObjectIDName ¶
type ObjectTopo ¶
type ObjectTopo struct { LabelType string `json:"label_type"` LabelName string `json:"label_name"` Label string `json:"label"` From TopoItem `json:"from"` To TopoItem `json:"to"` Arrows string `json:"arrows"` }
ObjectTopo define the common object topo
type ObjectUnique ¶
type ObjectUnique struct { ID uint64 `json:"id" bson:"id"` ObjID string `json:"bk_obj_id" bson:"bk_obj_id"` MustCheck bool `json:"must_check" bson:"must_check"` Keys []UniqueKey `json:"keys" bson:"keys"` Ispre bool `json:"ispre" bson:"ispre"` OwnerID string `json:"bk_supplier_account" bson:"bk_supplier_account"` LastTime Time `json:"last_time" bson:"last_time"` }
func (ObjectUnique) KeysHash ¶
func (u ObjectUnique) KeysHash() string
func (*ObjectUnique) Parse ¶
func (cli *ObjectUnique) Parse(data mapstr.MapStr) (*ObjectUnique, error)
Parse load the data from mapstr attribute into ObjectUnique instance
type OneHostApplyPlan ¶
type OneHostApplyPlan struct { ErrorContainer `json:",inline"` HostID int64 `field:"bk_host_id" json:"bk_host_id" bson:"bk_host_id" mapstructure:"bk_host_id"` CloudInfo CloudInst `field:"cloud_area" json:"cloud_area" bson:"cloud_area" mapstructure:"cloud_area"` ModuleIDs []int64 `field:"bk_module_ids" json:"bk_module_ids" bson:"bk_module_ids" mapstructure:"bk_module_ids"` // 预计执行后端主机信息 ExpectHost map[string]interface{} `field:"expect_host" json:"expect_host" bson:"expect_host" mapstructure:"expect_host"` UpdateFields []HostApplyUpdateField `field:"update_fields" json:"update_fields" bson:"update_fields" mapstructure:"update_fields"` ConflictFields []HostApplyConflictField `field:"conflicts" json:"conflicts" bson:"conflicts" mapstructure:"conflicts"` // 未解决的冲突字段数 UnresolvedConflictCount int64 `field:"unresolved_conflict_count" json:"unresolved_conflict_count" mapstructure:"unresolved_conflict_count"` }
func (OneHostApplyPlan) GetUpdateData ¶
func (plan OneHostApplyPlan) GetUpdateData() map[string]interface{}
func (OneHostApplyPlan) GetUpdateDataStr ¶
func (plan OneHostApplyPlan) GetUpdateDataStr() string
type OneProcessInstanceRelationResult ¶
type OneProcessInstanceRelationResult struct { BaseResp `json:",inline"` Data ProcessInstanceRelation `json:"data"` }
type OneProcessTemplateResult ¶
type OneProcessTemplateResult struct { BaseResp `json:",inline"` Data ProcessTemplate `json:"data"` }
type OneServiceCategoryResult ¶
type OneServiceCategoryResult struct { BaseResp `json:",inline"` Data ServiceCategory `json:"data"` }
type OneServiceCategoryWithStatisticsResult ¶
type OneServiceCategoryWithStatisticsResult struct { BaseResp `json:",inline"` Data ServiceCategoryWithStatistics `json:"data"` }
type OneServiceInstanceResult ¶
type OneServiceInstanceResult struct { BaseResp `json:",inline"` Data ServiceInstance `json:"data"` }
type OneServiceTemplateResult ¶
type OneServiceTemplateResult struct { BaseResp `json:",inline"` Data ServiceTemplate `json:"data"` }
type OneServiceTemplateWithStatisticsResult ¶
type OneServiceTemplateWithStatisticsResult struct { BaseResp `json:",inline"` Data ServiceTemplateWithStatistics `json:"data"` }
type OperateFromType ¶
type OperateFromType string
const ( // FromCCSystem means this audit come from cc system operation, such as upgrader. FromCCSystem OperateFromType = "cc_system" // FromUser means this audit come from a user's operation, such as web. FromUser OperateFromType = "user" // FromDataCollection means this audit is created by data collection. FromDataCollection OperateFromType = "data_collection" // FromSynchronizer means this audit is created by the data synchronizer. FromSynchronizer OperateFromType = "synchronizer" // FromCloudSync means this audit is created by cloud sync. FromCloudSync OperateFromType = "cloud_sync" )
type OperaterException ¶
type OperaterException struct { BaseResp `json:",inline"` Data []ExceptionResult `json:"data"` }
OperaterException result
type OperationTimeCondition ¶
type ParamNetcollectComfirm ¶
type ParamNetcollectComfirm struct {
Reports []NetcollectReport `json:"reports"`
}
type ParamNetcollectDiscover ¶
type ParamNetcollectDiscover struct {
Collectors []Netcollector `json:"collectors"`
}
type ParamNetcollectorSearch ¶
type ParamSearchNetcollectReport ¶
type ParamSearchNetcollectReport struct { Action string `json:"action"` ObjectID string `json:"bk_object_id"` Query string `json:"query"` CloudName string `json:"bk_cloud_name"` CloudID int64 `json:"bk_cloud_id"` InnerIP string `json:"bk_host_innerip"` LastTime []Time `json:"last_time"` Page BasePage `json:"page"` }
type ParamSubscriptionSearch ¶
type ParamSubscriptionTelnet ¶
type ParamSubscriptionTelnet struct {
CallbackUrl string `json:"callback_url"`
}
type ParamSubscriptionTestCallback ¶
type ParamSubscriptionTestCallback struct { ParamSubscriptionTelnet `json:",inline"` Data string `json:"data"` }
type Permission ¶
type Permission struct { SystemID string `json:"system_id"` SystemName string `json:"system_name"` ScopeType string `json:"scope_type"` ScopeTypeName string `json:"scope_type_name"` ScopeID string `json:"scope_id"` ScopeName string `json:"scope_name"` ActionID string `json:"action_id"` ActionName string `json:"action_name"` // newly added two field. ResourceTypeName string `json:"resource_type_name"` ResourceType string `json:"resource_type"` Resources [][]Resource `json:"resources"` }
Permission describes all the authorities that a user is need, when he attempts to operate a resource. Permission is used only when a user do not have the authority to access a resources with a action.
type PositionInfo ¶
type Proc2Module ¶
type ProcBindInfo ¶
type ProcBindInfo struct { // 标准属性 Std *stdProcBindInfo // contains filtered or unexported fields }
ProcBindInfo 给服务模板使用的,来存储,校验服务实例中进程绑定的信息
func (ProcBindInfo) MarshalBSON ¶
func (pbi ProcBindInfo) MarshalBSON() ([]byte, error)
func (ProcBindInfo) MarshalJSON ¶
func (pbi ProcBindInfo) MarshalJSON() ([]byte, error)
func (ProcBindInfo) SetExtraItem ¶
func (pbi ProcBindInfo) SetExtraItem(key string, value interface{}) error
SetExtraItem 设置额外配置项,不可为标准属性赋值
func (*ProcBindInfo) UnmarshalBSON ¶
func (pbi *ProcBindInfo) UnmarshalBSON(data []byte) error
func (*ProcBindInfo) UnmarshalJSON ¶
func (pbi *ProcBindInfo) UnmarshalJSON(data []byte) error
func (ProcBindInfo) Value ¶
func (pbi ProcBindInfo) Value() map[string]interface{}
type ProcExtraBindInfoInterface ¶
type ProcExtraBindInfoInterface interface { UJSON(data []byte, bindInfo *ProcBindInfo) error UBSON(data []byte, bindInfo *ProcBindInfo) error }
ProcExtraBindInfoInterface 用来处理进程中bind info 数据的序反序列化, 序列号使用默认的方法,目前只支持json, bson, 如果需要其他请新加
type ProcInfoArrResult ¶
type ProcInstModelResult ¶
type ProcInstModelResult struct { BaseResp `json:",inline"` Data struct { Count int `json:"count"` Info []ProcInstanceModel `json:"info"` } `json:"data"` }
type ProcInstanceDetail ¶
type ProcInstanceDetail struct { GseProcRequest `json:",inline" bson:",inline"` OwnerID string `json:"bk_supplier_account" bson:"bk_supplier_account"` HostID int64 `json:"bk_host_id" bson:"bk_host_id"` Status ProcInstanceDetailStatus `json:"status" bson:"status"` //1 register gse sucess, 2 register error need retry 3 unregister error need retry }
type ProcInstanceDetailResult ¶
type ProcInstanceDetailResult struct { BaseResp `json:",inline"` Data struct { Count int `json:"count"` Info []ProcInstanceDetail `json:"info"` } `json:"data"` }
type ProcInstanceDetailStatus ¶
type ProcInstanceDetailStatus int64
var ( ProcInstanceDetailStatusRegisterSucc ProcInstanceDetailStatus = 1 ProcInstanceDetailStatusRegisterFailed ProcInstanceDetailStatus = 2 ProcInstanceDetailStatusUnRegisterFailed ProcInstanceDetailStatus = 10 )
type ProcInstanceModel ¶
type ProcInstanceModel struct { ApplicationID int64 `json:"bk_biz_id" bson:"bk_biz_id"` SetID int64 `json:"bk_set_id" bson:"bk_set_id,omitempty"` ModuleID int64 `json:"bk_module_id" bson:"bk_module_id,omitempty"` ProcID int64 `json:"bk_process_id" bson:"bk_process_id"` FuncID int64 `json:"bk_func_id" bson:"bk_func_id"` ProcInstanceID uint64 `json:"proc_instance_id" bson:"proc_instance_id"` HostID int64 `json:"bk_host_id" bson:"bk_host_id"` HostInstanID uint64 `json:"bk_host_instance_id" bson:"bk_host_instance_id"` HostProcID uint64 `json:"host_proc_id" bson:"host_proc_id"` OwnerID string `json:"bk_supplier_account" bson:"bk_supplier_account"` }
type ProcModuleConfig ¶
type ProcModuleResult ¶
type ProcModuleResult struct { BaseResp `json:",inline"` Data []ProcModuleConfig `json:"data"` }
type ProcOpTaskStatus ¶
type ProcOpTaskStatus int64
var ( ProcOpTaskStatusWaitOP ProcOpTaskStatus = 1 ProcOpTaskStatusExecuteing ProcOpTaskStatus = 115 ProcOpTaskStatusErr ProcOpTaskStatus = 2 ProcOpTaskStatusSucc ProcOpTaskStatus = 3 ProcOpTaskStatusHTTPErr ProcOpTaskStatus = 1101 ProcOpTaskStatusNotTaskIDErr ProcOpTaskStatus = 1112 )
type ProcPropertyBindInfo ¶
type ProcPropertyBindInfo struct { // 通过Unmarshal 方法实现不同的数据类型 Value []ProcPropertyBindInfoValue `field:"value" json:"value" bson:"value"` // 给前端做兼容 AsDefaultValue *bool `field:"as_default_value" json:"as_default_value" bson:"as_default_value"` }
ProcPropertyBindInfo 给服务模板使用的,来存储,校验服务模板中进程绑定的信息
func (*ProcPropertyBindInfo) DiffWithProcessTemplate ¶
func (pbi *ProcPropertyBindInfo) DiffWithProcessTemplate(procBindInfoArr []ProcBindInfo, host map[string]interface{}) (newBindInfoArr []ProcBindInfo, change bool)
Compare 对比模板和实例数据,发现数据是否变化
func (*ProcPropertyBindInfo) ExtractChangeInfoBindInfo ¶
func (pbi *ProcPropertyBindInfo) ExtractChangeInfoBindInfo(i *Process, host map[string]interface{}) ([]ProcBindInfo, bool, bool)
func (*ProcPropertyBindInfo) ExtractInstanceUpdateData ¶
func (pbi *ProcPropertyBindInfo) ExtractInstanceUpdateData(input *Process, host map[string]interface{}) []ProcBindInfo
func (ProcPropertyBindInfo) NewProcBindInfo ¶
func (pbi ProcPropertyBindInfo) NewProcBindInfo(host map[string]interface{}) []ProcBindInfo
NewProcBindInfo 通过模板生成进程的时候使用
func (*ProcPropertyBindInfo) Update ¶
func (pbi *ProcPropertyBindInfo) Update(input ProcessProperty, rawProperty map[string]interface{})
Update bind info 每次更新采用的是全量更新
func (*ProcPropertyBindInfo) Validate ¶
func (pbi *ProcPropertyBindInfo) Validate() (string, error)
type ProcPropertyBindInfoValue ¶
type ProcPropertyBindInfoValue struct { // 标准属性 Std *stdProcPropertyBindInfoValue // contains filtered or unexported fields }
ProcPropertyBindInfoValue 给服务模板使用的,来存储,校验服务模板中进程绑定的信息, 用来做管理的
func (ProcPropertyBindInfoValue) MarshalBSON ¶
func (pbi ProcPropertyBindInfoValue) MarshalBSON() ([]byte, error)
func (ProcPropertyBindInfoValue) MarshalJSON ¶
func (pbi ProcPropertyBindInfoValue) MarshalJSON() ([]byte, error)
func (ProcPropertyBindInfoValue) SetExtraItem ¶
func (pbi ProcPropertyBindInfoValue) SetExtraItem(key string, value interface{}) error
SetExtraItem 新加一项数据
func (*ProcPropertyBindInfoValue) UnmarshalBSON ¶
func (pbi *ProcPropertyBindInfoValue) UnmarshalBSON(data []byte) error
func (*ProcPropertyBindInfoValue) UnmarshalJSON ¶
func (pbi *ProcPropertyBindInfoValue) UnmarshalJSON(data []byte) error
func (*ProcPropertyBindInfoValue) Validate ¶
func (pbi *ProcPropertyBindInfoValue) Validate() (string, error)
type ProcPropertyExtraBindInfoInterface ¶
type ProcPropertyExtraBindInfoInterface interface { UJSON(data []byte, bindInfo *ProcPropertyBindInfoValue) error UBSON(data []byte, bindInfo *ProcPropertyBindInfoValue) error }
ProcPropertyExtraBindInfoInterface 用来处理进程模板中bind info 数据的反序列化, 序列号使用默认的方法,目前只支持json, bson, 如果需要其他请新加
type Process ¶
type Process struct { ProcNum *int64 `field:"proc_num" json:"proc_num" bson:"proc_num" structs:"proc_num" mapstructure:"proc_num"` StopCmd *string `field:"stop_cmd" json:"stop_cmd" bson:"stop_cmd" structs:"stop_cmd" mapstructure:"stop_cmd"` RestartCmd *string `field:"restart_cmd" json:"restart_cmd" bson:"restart_cmd" structs:"restart_cmd" mapstructure:"restart_cmd"` ForceStopCmd *string `field:"face_stop_cmd" json:"face_stop_cmd" bson:"face_stop_cmd" structs:"face_stop_cmd" mapstructure:"face_stop_cmd"` ProcessID int64 `field:"bk_process_id" json:"bk_process_id" bson:"bk_process_id" structs:"bk_process_id" mapstructure:"bk_process_id"` FuncName *string `field:"bk_func_name" json:"bk_func_name" bson:"bk_func_name" structs:"bk_func_name" mapstructure:"bk_func_name"` WorkPath *string `field:"work_path" json:"work_path" bson:"work_path" structs:"work_path" mapstructure:"work_path"` //BindIP *string `field:"bind_ip" json:"bind_ip" bson:"bind_ip" structs:"bind_ip" mapstructure:"bind_ip"` Priority *int64 `field:"priority" json:"priority" bson:"priority" structs:"priority" mapstructure:"priority"` ReloadCmd *string `field:"reload_cmd" json:"reload_cmd" bson:"reload_cmd" structs:"reload_cmd" mapstructure:"reload_cmd"` ProcessName *string `` /* 126-byte string literal not displayed */ //Port *string `field:"port" json:"port" bson:"port" structs:"port" mapstructure:"port"` PidFile *string `field:"pid_file" json:"pid_file" bson:"pid_file" structs:"pid_file" mapstructure:"pid_file"` AutoStart *bool `field:"auto_start" json:"auto_start" bson:"auto_start" structs:"auto_start" mapstructure:"auto_start"` AutoTimeGap *int64 `field:"auto_time_gap" json:"auto_time_gap" bson:"auto_time_gap" structs:"auto_time_gap" mapstructure:"auto_time_gap"` LastTime time.Time `field:"last_time" json:"last_time" bson:"last_time" structs:"last_time" mapstructure:"last_time"` CreateTime time.Time `field:"create_time" json:"create_time" bson:"create_time" structs:"create_time" mapstructure:"create_time"` BusinessID int64 `field:"bk_biz_id" json:"bk_biz_id" bson:"bk_biz_id" structs:"bk_biz_id" mapstructure:"bk_biz_id"` StartCmd *string `field:"start_cmd" json:"start_cmd" bson:"start_cmd" structs:"start_cmd" mapstructure:"start_cmd"` FuncID *string `field:"bk_func_id" json:"bk_func_id" bson:"bk_func_id" structs:"bk_func_id" mapstructure:"bk_func_id"` User *string `field:"user" json:"user" bson:"user" structs:"user" mapstructure:"user"` TimeoutSeconds *int64 `field:"timeout" json:"timeout" bson:"timeout" structs:"timeout" mapstructure:"timeout"` //Protocol *ProtocolType `field:"protocol" json:"protocol" bson:"protocol" structs:"protocol" mapstructure:"protocol"` Description *string `field:"description" json:"description" bson:"description" structs:"description" mapstructure:"description"` SupplierAccount string `` /* 146-byte string literal not displayed */ StartParamRegex *string `` /* 151-byte string literal not displayed */ BindInfo []ProcBindInfo `field:"bind_info" json:"bind_info" bson:"bind_info" structs:"bind_info" mapstructure:"bind_info"` }
type ProcessChangedAttribute ¶
type ProcessDetail ¶
type ProcessDetail struct {
Spec *ProcessProperty `json:"spec"`
}
type ProcessDifferenceDetail ¶
type ProcessDifferenceDetail struct { ProcessTemplateID int64 `json:"process_template_id"` ProcessInstance Process `json:"process_instance"` ChangedAttributes []ProcessChangedAttribute `json:"changed_attributes"` }
type ProcessInst ¶
type ProcessInst struct { ProcessID int64 `json:"bk_process_id" bson:"bk_process_id"` // 进程名称 ProcessName string `json:"bk_process_name" bson:"bk_process_name"` // 进程名称 BindIP string `json:"bind_ip" bson:"bind_ip"` // 绑定IP, 枚举: [{ID: "1", Name: "127.0.0.1"}, {ID: "2", Name: "0.0.0.0"}, {ID: "3", Name: "第一内网IP"}, {ID: "4", Name: "第一外网IP"}] PORT string `json:"port" bson:"port"` // 端口, 单个端口:"8080", 多个连续端口:"8080-8089", 多个不连续端口:"8080-8089,8199" PROTOCOL string `json:"protocol" bson:"protocol"` // 协议, 枚举: [{ID: "1", Name: "TCP"}, {ID: "2", Name: "UDP"}], FuncID string `json:"bk_func_id" bson:"bk_func_id"` // 功能ID FuncName string `json:"bk_func_name" bson:"bk_func_name"` // 功能名称 StartParamRegex string `json:"bk_start_param_regex" bson:"bk_start_param_regex"` // 启动参数匹配规则 }
type ProcessInstance ¶
type ProcessInstance struct { Property mapstr.MapStr `json:"property"` Relation ProcessInstanceRelation `json:"relation"` }
type ProcessInstanceDetail ¶
type ProcessInstanceDetailByID ¶
type ProcessInstanceDetailByID struct { ProcessID int64 `json:"process_id"` ServiceInstanceName string `json:"service_instance_name"` Property mapstr.MapStr `json:"property"` Relation ProcessInstanceRelation `json:"relation"` }
type ProcessInstanceNG ¶
type ProcessInstanceNG struct { Process Process `json:"process"` Relation ProcessInstanceRelation `json:"relation"` }
type ProcessInstanceNameIDs ¶
type ProcessInstanceRelation ¶
type ProcessInstanceRelation struct { BizID int64 `field:"bk_biz_id" json:"bk_biz_id" bson:"bk_biz_id"` // unique field, 1:1 mapping with ProcessInstance. ProcessID int64 `field:"bk_process_id" json:"bk_process_id" bson:"bk_process_id"` ServiceInstanceID int64 `field:"service_instance_id" json:"service_instance_id" bson:"service_instance_id"` // ProcessTemplateID indicate which template are current process instantiate from. ProcessTemplateID int64 `field:"process_template_id" json:"process_template_id" bson:"process_template_id"` // redundant field for accelerating processes by HostID HostID int64 `field:"bk_host_id" json:"bk_host_id" bson:"bk_host_id"` SupplierAccount string `field:"bk_supplier_account" json:"bk_supplier_account" bson:"bk_supplier_account"` }
ProcessInstanceRelation record which service instance and process template are current process binding, process identified by ProcessID
func (*ProcessInstanceRelation) Validate ¶
func (pir *ProcessInstanceRelation) Validate() (field string, err error)
type ProcessModule ¶
type ProcessOperate ¶
type ProcessOperate struct { MatchProcInstParam `json:",inline"` OpType int `json:"bk_proc_optype"` }
type ProcessOperateTask ¶
type ProcessOperateTask struct { OperateInfo *ProcessOperate `json:"operate_info" bson:"operate_info"` TaskID string `json:"task_id" bson:"task_id"` GseTaskID string `json:"gse_task_id" bson:"gse_task_id"` Namespace string `json:"namespace" bson:"namespace"` Status ProcOpTaskStatus `json:"status" bson:"status"` CreateTime time.Time `json:"create_time" bson:"create_time"` OwnerID string `json:"bk_supplier_account" bson:"bk_supplier_account"` User string `json:"user,omitempty" bson:"user,omitempty"` Detail map[string]ProcessOperateTaskDetail `json:"detail" bson:"detail"` Host []GseHost `json:"host_info" bson:"host_info"` ProcName string `json:"bk_process_name" bson:"bk_process_name"` HTTPHeader http.Header `json:"http_header" bson:"http_header"` }
type ProcessOperateTaskResult ¶
type ProcessOperateTaskResult struct { BaseResp `json:",inline"` Data struct { Count int `json:"count"` Info []ProcessOperateTask `json:"info"` } `json:"data"` }
type ProcessProperty ¶
type ProcessProperty struct { ProcNum PropertyInt64 `field:"proc_num" json:"proc_num" bson:"proc_num" validate:"max=10000,min=1"` StopCmd PropertyString `field:"stop_cmd" json:"stop_cmd" bson:"stop_cmd"` RestartCmd PropertyString `field:"restart_cmd" json:"restart_cmd" bson:"restart_cmd"` ForceStopCmd PropertyString `field:"face_stop_cmd" json:"face_stop_cmd" bson:"face_stop_cmd"` FuncName PropertyString `field:"bk_func_name" json:"bk_func_name" bson:"bk_func_name" validate:"required"` WorkPath PropertyString `field:"work_path" json:"work_path" bson:"work_path"` //BindIP PropertyBindIP `field:"bind_ip" json:"bind_ip" bson:"bind_ip"` Priority PropertyInt64 `field:"priority" json:"priority" bson:"priority" validate:"max=10000,min=1"` ReloadCmd PropertyString `field:"reload_cmd" json:"reload_cmd" bson:"reload_cmd"` ProcessName PropertyString `field:"bk_process_name" json:"bk_process_name" bson:"bk_process_name" validate:"required"` //Port PropertyPort `field:"port" json:"port" bson:"port"` PidFile PropertyString `field:"pid_file" json:"pid_file" bson:"pid_file"` AutoStart PropertyBool `field:"auto_start" json:"auto_start" bson:"auto_start"` AutoTimeGapSeconds PropertyInt64 `field:"auto_time_gap" json:"auto_time_gap" bson:"auto_time_gap" validate:"max=10000,min=1"` StartCmd PropertyString `field:"start_cmd" json:"start_cmd" bson:"start_cmd"` FuncID PropertyString `field:"bk_func_id" json:"bk_func_id" bson:"bk_func_id"` User PropertyString `field:"user" json:"user" bson:"user"` TimeoutSeconds PropertyInt64 `field:"timeout" json:"timeout" bson:"timeout" validate:"max=10000,min=1"` //Protocol PropertyProtocol `field:"protocol" json:"protocol" bson:"protocol"` Description PropertyString `field:"description" json:"description" bson:"description"` StartParamRegex PropertyString `field:"bk_start_param_regex" json:"bk_start_param_regex" bson:"bk_start_param_regex"` BindInfo ProcPropertyBindInfo `field:"bind_info" json:"bind_info" bson:"bind_info" structs:"bind_info" mapstructure:"bind_info"` }
func (*ProcessProperty) Update ¶
func (pt *ProcessProperty) Update(input ProcessProperty, rawProperty map[string]interface{})
Update all not nil field from input to pt rawProperty allows us set property field to nil
参数rawProperty,input 数据是一样的,只不过一个是map,一个struct。 因为struct 是有默认行为的。 rawProperty为了获取用户是否输入
func (*ProcessProperty) Validate ¶
func (pt *ProcessProperty) Validate() (field string, err error)
type ProcessPropertyInterface ¶
type ProcessPropertyInterface interface {
Validate() error
}
type ProcessTemplate ¶
type ProcessTemplate struct { ID int64 `field:"id" json:"id" bson:"id"` ProcessName string `field:"bk_process_name" json:"bk_process_name" bson:"bk_process_name"` BizID int64 `field:"bk_biz_id" json:"bk_biz_id" bson:"bk_biz_id"` // the service template's, which this process template belongs to. ServiceTemplateID int64 `field:"service_template_id" json:"service_template_id" bson:"service_template_id"` // stores a process instance's data includes all the process's // properties's value. Property *ProcessProperty `field:"property" json:"property" bson:"property"` Creator string `field:"creator" json:"creator" bson:"creator"` Modifier string `field:"modifier" json:"modifier" bson:"modifier"` CreateTime time.Time `field:"create_time" json:"create_time" bson:"create_time"` LastTime time.Time `field:"last_time" json:"last_time" bson:"last_time"` SupplierAccount string `field:"bk_supplier_account" json:"bk_supplier_account" bson:"bk_supplier_account"` }
this works for the process instance which is used for a template.
func (*ProcessTemplate) ExtractChangeInfo ¶
func (pt *ProcessTemplate) ExtractChangeInfo(i *Process, host map[string]interface{}) (mapstr.MapStr, bool, bool)
ExtractChangeInfo get changes that will be applied to process instance
func (*ProcessTemplate) ExtractEditableFields ¶
func (pt *ProcessTemplate) ExtractEditableFields() []string
func (*ProcessTemplate) ExtractInstanceUpdateData ¶
func (pt *ProcessTemplate) ExtractInstanceUpdateData(input *Process, host map[string]interface{}) map[string]interface{}
InstanceUpdate is used for update instance's value
func (*ProcessTemplate) GetEditableFields ¶
func (pt *ProcessTemplate) GetEditableFields(fields []string) []string
FilterEditableFields only return editable fields
func (*ProcessTemplate) NewProcess ¶
func (pt *ProcessTemplate) NewProcess(bizID int64, supplierAccount string, host map[string]interface{}) *Process
func (*ProcessTemplate) Validate ¶
func (pt *ProcessTemplate) Validate() (field string, err error)
type PropertyBindIP ¶
type PropertyBindIP struct { Value *SocketBindType `field:"value" json:"value" bson:"value"` AsDefaultValue *bool `field:"as_default_value" json:"as_default_value" bson:"as_default_value"` }
func (*PropertyBindIP) Validate ¶
func (ti *PropertyBindIP) Validate() error
type PropertyBool ¶
type PropertyBool struct { Value *bool `field:"value" json:"value" bson:"value"` AsDefaultValue *bool `field:"as_default_value" json:"as_default_value" bson:"as_default_value"` }
func (*PropertyBool) Validate ¶
func (ti *PropertyBool) Validate() error
type PropertyGroupCondition ¶
type PropertyGroupCondition struct { Condition map[string]interface{} `json:"condition"` Data map[string]interface{} `json:"data"` }
PropertyGroupCondition used to reflect the property group json
type PropertyGroupObjectAtt ¶
type PropertyGroupObjectAtt struct { Condition struct { OwnerID string `field:"bk_supplier_account" json:"bk_supplier_account"` ObjectID string `field:"bk_obj_id" json:"bk_obj_id"` PropertyID string `field:"bk_property_id" json:"bk_property_id"` } `json:"condition"` Data struct { PropertyGroupID string `field:"bk_property_group" json:"bk_property_group"` PropertyIndex int `field:"bk_property_index" json:"bk_property_index"` } `json:"data"` }
PropertyGroupObjectAtt uset to update or delete the property group object attribute
type PropertyInt64 ¶
type PropertyInt64 struct { Value *int64 `field:"value" json:"value" bson:"value"` // AsDefaultValue records the relations between process instance's property and // whether it's used as a default value, the empty value can also be a default value. // If the property's value is used as a default value, then this property // can not be changed in all the process instance's created by this process // template. or, it can only be changed to this default value. AsDefaultValue *bool `field:"as_default_value" json:"as_default_value" bson:"as_default_value"` }
func (*PropertyInt64) Validate ¶
func (ti *PropertyInt64) Validate() error
type PropertyInt64String ¶
type PropertyInt64String struct { Value *string `field:"value" json:"value" bson:"value"` // AsDefaultValue records the relations between process instance's property and // whether it's used as a default value, the empty value can also be a default value. // If the property's value is used as a default value, then this property // can not be changed in all the process instance's created by this process // template. or, it can only be changed to this default value. AsDefaultValue *bool `field:"as_default_value" json:"as_default_value" bson:"as_default_value"` }
PropertyInt64String is a string field that parse into int64
func (*PropertyInt64String) Validate ¶
func (ti *PropertyInt64String) Validate() error
type PropertyPort ¶
type PropertyPort struct { Value *string `field:"value" json:"value" bson:"value"` AsDefaultValue *bool `field:"as_default_value" json:"as_default_value" bson:"as_default_value"` }
func (*PropertyPort) Validate ¶
func (ti *PropertyPort) Validate() error
type PropertyProtocol ¶
type PropertyProtocol struct { Value *ProtocolType `field:"value" json:"value" bson:"value"` AsDefaultValue *bool `field:"as_default_value" json:"as_default_value" bson:"as_default_value"` }
func (*PropertyProtocol) Validate ¶
func (ti *PropertyProtocol) Validate() error
type PropertyString ¶
type PropertyString struct { Value *string `field:"value" json:"value" bson:"value"` AsDefaultValue *bool `field:"as_default_value" json:"as_default_value" bson:"as_default_value"` }
func (*PropertyString) Validate ¶
func (ti *PropertyString) Validate() error
type ProtocolType ¶
type ProtocolType string
const ( ProtocolTypeTCP ProtocolType = "1" ProtocolTypeUDP ProtocolType = "2" )
func (ProtocolType) String ¶
func (p ProtocolType) String() string
func (ProtocolType) Validate ¶
func (p ProtocolType) Validate() error
type PullResourceParam ¶
type PullResourceResponse ¶
type PullResourceResponse struct { BaseResp `json:",inline"` Data PullResourceResult `json:"data"` }
type PullResourceResult ¶
type QueryBusinessRequest ¶
type QueryCondition ¶
type QueryCondition struct { Fields []string `json:"fields"` Page BasePage `json:"page"` Condition mapstr.MapStr `json:"condition"` }
QueryCondition the common query condition definition
func (*QueryCondition) IsIllegal ¶
func (qc *QueryCondition) IsIllegal() bool
IsIllegal limit is illegal, if limit = 0; change to default page size
type QueryConditionResult ¶
type QueryConditionResult ResponseInstData
type QueryHostLockRequest ¶
type QueryHostLockRequest struct {
IDS []int64 `json:"id_list"`
}
type QueryInput ¶
type QueryInstResult ¶
type QueryInstResult struct { BaseResp `json:",inline"` Data InstResult `json:"data"` }
QueryInstResult query inst result
type QueryModelAttributeDataResult ¶
type QueryModelAttributeDataResult struct { Count int64 `json:"count"` Info []Attribute `json:"info"` }
QueryModelAttributeDataResult search model attr data result
type QueryModelAttributeGroupDataResult ¶
type QueryModelAttributeGroupDataResult struct { Count int64 `json:"count"` Info []Group `json:"info"` }
QueryModelAttributeGroupDataResult query model attribute group result definition
type QueryModelClassificationDataResult ¶
type QueryModelClassificationDataResult struct { Count int64 `json:"count"` Info []Classification `json:"info"` }
QueryModelClassificationDataResult query model classification result definition
type QueryModelDataResult ¶
QueryModelDataResult used to define the model query
type QueryModelWithAttributeDataResult ¶
type QueryModelWithAttributeDataResult struct { Count int64 `json:"count"` Info []SearchModelInfo `json:"info"` }
QueryModelWithAttributeDataResult used to define the model with attribute query
type QueryObjectAssociationResult ¶
type QueryObjectAssociationResult struct { BaseResp `json:",inline"` Data []Association `json:"data"` }
QueryObjectAssociationResult query object association result
type QueryObjectAttributeResult ¶
QueryObjectAttributeResult query object attribute result
type QueryObjectAttributeWrapperResult ¶
type QueryObjectAttributeWrapperResult struct { BaseResp `json:",inline"` Data []AttributeWrapper `json:"data"` }
QueryObjectAttributeWrapperResult query object attribute with association info result
type QueryObjectClassificationResult ¶
type QueryObjectClassificationResult struct { BaseResp `json:",inline"` Data []Classification `json:"data"` }
QueryObjectClassificationResult query the object classification result
type QueryObjectClassificationWithObjectsResult ¶
type QueryObjectClassificationWithObjectsResult struct { BaseResp `json:",inline"` Data []ClassificationWithObject `json:"data"` }
QueryObjectClassificationWithObjectsResult query the object classification with objects result
type QueryObjectGroupResult ¶
QueryObjectGroupResult query the object group result
type QueryObjectResult ¶
QueryObjectResult query object result
type QueryResult ¶
QueryResult common query result
type QueryUniqueResult ¶
type QueryUniqueResult struct { Count uint64 `json:"count"` Info []ObjectUnique `json:"info"` }
type ReadModelAssociationResult ¶
type ReadModelAssociationResult struct { BaseResp Data struct { Count uint64 `json:"count"` Info []Association `json:"info"` } }
type ReadModelAttrResult ¶
type ReadModelAttrResult struct { BaseResp `json:",inline"` Data QueryModelAttributeDataResult `json:"data"` }
ReadModelAttrResult read model attribute api http response return result struct
type ReadModelAttributeGroupResult ¶
type ReadModelAttributeGroupResult struct { BaseResp `json:",inline"` Data QueryModelAttributeGroupDataResult `json:"data"` }
type ReadModelClassifitionResult ¶
type ReadModelClassifitionResult struct { BaseResp `json:",inline"` Data QueryModelClassificationDataResult `json:"data"` }
ReadModelClassifitionResult read model classifition api http response return result struct
type ReadModelResult ¶
type ReadModelResult struct { BaseResp `json:",inline"` Data QueryModelWithAttributeDataResult `json:"data"` }
ReadModelResult read model classifition api http response return result struct
type ReadModelUniqueResult ¶
type ReadModelUniqueResult struct { BaseResp `json:",inline"` Data QueryUniqueResult `json:"data"` }
type RemoveFromModuleHost ¶
type RemoveFromModuleInfo ¶
type RemoveFromModuleInfo struct { ModuleID int64 `field:"bk_module_id" json:"bk_module_id"` ServiceInstances []ServiceInstance `field:"service_instances" json:"service_instances"` }
type RepeatedDataResult ¶
type RepeatedDataResult struct { OriginIndex int64 `json:"origin_index"` Data mapstr.MapStr `json:"data"` }
RepeatedDataResult repeated data
type ReponseSysUserConfig ¶
type ReponseSysUserConfig struct { BaseResp `json:",inline"` Data ResponseSysUserConfigData `json:"data"` }
type RequestImportAssociation ¶
type RequestImportAssociation struct {
AssociationInfoMap map[int]ExcelAssocation `json:"association_info"`
}
ResponeImportAssociation import association result
type RequestInstAssociationObjectID ¶
type RequestInstAssociationObjectID struct { Condition RequestInstAssociationObjectIDCondition `json:"condition"` Page BasePage `json:"page"` }
RequestInstAssociationObjectID 要求根据实例信息(实例的模型ID,实例ID)和模型ID(关联关系中的源,目的模型ID), 返回关联关系的请求参数
type RequestInstAssociationObjectIDCondition ¶
type RequestInstAssociationObjectIDCondition struct { // 实例得模型ID ObjectID string `json:"bk_obj_id"` // 实例ID InstID int64 `json:"bk_inst_id"` // ObjectID是否为目标模型, 默认false, 关联关系中的源模型,否则是目标模型 IsTargetObject bool `json:"is_target_object"` // 关联对象的模型ID AssociationObjectID string `json:"association_obj_id"` }
RequestInstAssociationObjectIDCondition query condition
type ResourceType ¶
type ResourceType string
const ( // business related operation type BusinessRes ResourceType = "business" ServiceTemplateRes ResourceType = "service_template" SetTemplateRes ResourceType = "set_template" ServiceCategoryRes ResourceType = "service_category" DynamicGroupRes ResourceType = "dynamic_group" ServiceInstanceRes ResourceType = "service_instance" ServiceInstanceLabelRes ResourceType = "service_instance_label" SetRes ResourceType = "set" ModuleRes ResourceType = "module" ProcessRes ResourceType = "process" HostApplyRes ResourceType = "host_apply" CustomFieldRes ResourceType = "custom_field" // model related operation type ModelRes ResourceType = "model" ModelInstanceRes ResourceType = "model_instance" MainlineInstanceRes ResourceType = "mainline_instance" ModelAssociationRes ResourceType = "model_association" ModelAttributeRes ResourceType = "model_attribute" ModelAttributeGroupRes ResourceType = "model_attribute_group" ModelClassificationRes ResourceType = "model_classification" InstanceAssociationRes ResourceType = "instance_association" ModelGroupRes ResourceType = "model_group" ModelUniqueRes ResourceType = "model_unique" ResourceDirectoryRes ResourceType = "resource_directory" AssociationKindRes ResourceType = "association_kind" EventPushRes ResourceType = "event" CloudAreaRes ResourceType = "cloud_area" CloudAccountRes ResourceType = "cloud_account" CloudSyncTaskRes ResourceType = "cloud_sync_task" // host related operation type HostRes ResourceType = "host" ResourceDirRes ResourceType = "resource_directory" )
func GetResourceTypeByObjID ¶
func GetResourceTypeByObjID(objID string, isMainline bool) ResourceType
type ResponeImportAssociation ¶
type ResponeImportAssociation struct { BaseResp `json:",inline"` Data ResponeImportAssociationData `json:"data"` }
ResponeImportAssociation import association result
type ResponeImportAssociationData ¶
type ResponeImportAssociationData struct {
ErrMsgMap []RowMsgData `json:"err_msg"`
}
type Response ¶
type Response struct { BaseResp `json:",inline"` Data interface{} `json:"data" mapstructure:"data"` }
func NewSuccessResp ¶
func NewSuccessResp(data interface{}) *Response
data is the data you want to return to client.
type ResponseDataMapStr ¶
type ResponseInstData ¶
type ResponseInstData struct { BaseResp `json:",inline"` Data InstDataInfo `json:"data"` }
ResponseInstData
type ResponseSysUserConfigData ¶
type ResponseSysUserConfigData struct { RowType string `json:"type"` BluekingModify SysUserConfigItem `json:"blueking_modify"` }
type RoleAppResult ¶
type RolePriResult ¶
type RowMsgData ¶
type RspNetcollectConfirm ¶
type RspNetcollectConfirm struct { ChangeAttributeSuccess int `json:"change_attribute_success"` ChangeAttributeFailure int `json:"change_attribute_failure"` ChangeAssociationsSuccess int `json:"change_associations_success"` ChangeAssociationsFailure int `json:"change_associations_failure"` Errors []string `json:"errors"` }
type RspNetcollectHistory ¶
type RspNetcollectHistory struct { Count uint64 `json:"count"` Info []NetcollectHistory `json:"info"` }
type RspNetcollectReport ¶
type RspNetcollectReport struct { Count uint64 `json:"count"` Info []NetcollectReport `json:"info"` }
type RspNetcollectorSearch ¶
type RspNetcollectorSearch struct { Count int64 `json:"count"` Info []Netcollector `json:"info"` }
type RspSubscriptionCreate ¶
type RspSubscriptionSearch ¶
type RspSubscriptionSearch struct { Count uint64 `json:"count"` Info []Subscription `json:"info"` }
type SearchAccountValidityOption ¶
type SearchAccountValidityOption struct {
AccountIDs []int64 `json:"account_ids" bson:"account_ids"`
}
func (*SearchAccountValidityOption) Validate ¶
func (s *SearchAccountValidityOption) Validate() (rawError errors.RawErrorInfo)
type SearchAssociationInstRequestCond ¶
type SearchAssociationInstRequestCond struct { ObjectAsstID string `field:"bk_obj_asst_id" json:"bk_obj_asst_id,omitempty" bson:"bk_obj_asst_id,omitempty"` AsstID string `field:"bk_asst_id" json:"bk_asst_id,omitempty" bson:"bk_asst_id,omitempty"` ObjectID string `field:"bk_obj_id" json:"bk_obj_id,omitempty" bson:"bk_obj_id,omitempty"` AsstObjID string `field:"bk_asst_obj_id" json:"bk_asst_obj_id,omitempty" bson:"bk_asst_obj_id,omitempty"` InstID []int64 `field:"bk_inst_id" json:"bk_inst_id,omitempty" bson:"bk_inst_id,omitempty"` AsstInstID []int64 `field:"bk_asst_inst_id" json:"bk_asst_inst_id,omitempty" bson:"bk_asst_inst_id,omitempty"` BothObjectID string `field:"both_obj_id" json:"both_obj_id" bson:"both_obj_id"` BothInstID []int64 `field:"both_inst_id" json:"both_inst_id" bson:"both_inst_id"` }
type SearchAssociationKindResult ¶
type SearchAssociationKindResult struct { Count uint64 `json:"count"` Info []AssociationKind `json:"info"` }
SearchAssociationKindResult search association kind result definition
type SearchAssociationObjectResult ¶
type SearchAssociationObjectResult struct { BaseResp `json:",inline"` Data []*Association `json:"data"` }
type SearchAssociationTopoResult ¶
type SearchAssociationTopoResult struct { BaseResp `json:",inline"` Data []CommonInstTopoV2 `json:"data"` }
type SearchAssociationTypeResult ¶
type SearchAssociationTypeResult struct { BaseResp `json:",inline"` Data struct { Count int `json:"count"` Info []*AssociationKind `json:"info"` } `json:"data"` }
type SearchChartCommon ¶
type SearchChartCommon struct { BaseResp `json:",inline"` Data CommonSearchChart `json:"data"` }
type SearchChartConfig ¶
type SearchChartConfig struct { Count uint64 `json:"count"` Info map[string][]ChartConfig `json:"info"` }
type SearchChartResponse ¶
type SearchChartResponse struct { BaseResp `json:",inline"` Data SearchChartConfig `json:"data"` }
type SearchCloudOption ¶
type SearchCloudOption struct { Condition mapstr.MapStr `json:"condition" bson:"condition" field:"condition"` Page BasePage `json:"page" bson:"page" field:"page"` Fields []string `json:"fields,omitempty" bson:"fields,omitempty"` // 对于condition里的属性值是否精确匹配,默认为false,即使用模糊匹配和忽略大小写 Exact bool `json:"exact" bson:"exact"` }
type SearchCondition ¶
type SearchCondition struct { Fields []string `json:"fields"` Condition []ConditionItem `json:"condition"` ObjectID string `json:"bk_obj_id"` }
search condition
type SearchDataResult ¶
SearchDataResult common search data result
type SearchHost ¶
func (SearchHost) ExtractHostIDs ¶
func (sh SearchHost) ExtractHostIDs() *[]int64
type SearchHostIdentifierData ¶
type SearchHostIdentifierData struct { Count int `json:"count"` Info []HostIdentifier `json:"info"` }
SearchHostIdentifierData host identifier detail
type SearchHostIdentifierParam ¶
type SearchHostIdentifierParam struct {
HostIDs []int64 `json:"host_ids"`
}
SearchHostIdentifierParam 查询主机身份的条件
type SearchHostIdentifierResult ¶
type SearchHostIdentifierResult struct { BaseResp `json:",inline"` Data SearchHostIdentifierData `json:"data"` }
type SearchHostResult ¶
type SearchHostResult struct { BaseResp `json:",inline"` Data *SearchHost `json:"data"` }
type SearchHostWithIDOption ¶
type SearchIdentifierParam ¶
SearchIdentifierParam defines the param
type SearchInnterAppTopoResult ¶
type SearchInnterAppTopoResult struct { BaseResp `json:",inline"` Data InnterAppTopo }
type SearchInstBatchOption ¶
func (*SearchInstBatchOption) Validate ¶
func (s *SearchInstBatchOption) Validate() (rawError errors.RawErrorInfo)
type SearchInstResult ¶
type SearchInstResult struct { BaseResp `json:",inline"` Data InstResult `json:"data"` }
type SearchLimit
deprecated
type SearchModelInfo ¶
type SearchModelInfo struct { Spec Object `json:"spec"` Attributes []Attribute `json:"attributes"` }
SearchModelInfo search model params
type SearchModelResult ¶
type SearchNetDevice ¶
type SearchNetDevice struct { Count uint64 `json:"count"` Info []NetcollectDevice `json:"info"` }
type SearchNetDeviceResult ¶
type SearchNetDeviceResult struct { BaseResp `json:",inline"` Data SearchNetDevice `json:"data"` }
type SearchNetProperty ¶
type SearchNetProperty struct { Count uint64 `json:"count"` Info []NetcollectProperty `json:"info"` }
type SearchNetPropertyResult ¶
type SearchNetPropertyResult struct { BaseResp `json:",inline"` Data SearchNetProperty `json:"data"` }
type SearchParams ¶
type SearchParams struct { Condition map[string]interface{} `json:"condition"` Page map[string]interface{} `json:"page,omitempty"` Fields []string `json:"fields,omitempty"` }
common search struct
type SearchResourceDirParams ¶
type SearchResourceDirResult ¶
type SearchResp ¶
type SearchResp struct { BaseResp `json:",inline"` Data SearchDataResult `json:"data"` }
SearchResp common search response
type SearchRuleRelatedModulesOption ¶
type SearchRuleRelatedModulesOption struct { Keyword string `json:"keyword" field:"keyword" mapstructure:"keyword"` QueryFilter *querybuilder.QueryFilter `json:"query_filter" field:"query_filter" mapstructure:"query_filter"` }
type SearchSort ¶
SearchSort sub condition
type SearchSortParse ¶
type SearchSortParse interface { String(sort string) SearchSortParse Field(field string, isDesc bool) SearchSortParse Set(ssArr []SearchSort) SearchSortParse ToMongo() string ToSearchSortArr() []SearchSort }
SearchSortParse SearchSort parse interface
func NewSearchSortParse ¶
func NewSearchSortParse() SearchSortParse
type SearchSyncHistoryOption ¶
type SearchSyncHistoryOption struct { SearchCloudOption `json:",inline"` TaskID int64 `json:"bk_task_id" bson:"bk_task_id"` StarTime string `json:"start_time" bson:"start_time"` EndTime string `json:"end_time" bson:"end_time"` }
type SearchSyncRegionOption ¶
type SearchSyncTaskOption ¶
type SearchSyncTaskOption struct { SearchCloudOption `json:",inline"` // 是否实时获取云厂商vpc下最新的主机数 LastestHostCount bool `json:"latest_hostcount" bson:"latest_host_count"` }
type SearchTopoGraphicsResult ¶
type SearchTopoGraphicsResult struct { BaseResp `json:",inline"` Data []TopoGraphics `json:"data"` }
type SearchTopoInstanceNodeResult ¶
type SearchTopoInstanceNodeResult struct { BaseResp `json:",inline"` Data TopoInstanceNode `json:"data"` }
type SearchTopoModelNodeResult ¶
type SearchTopoModelNodeResult struct { BaseResp `json:",inline"` Data TopoModelNode `json:"data"` }
type SearchTopoResult ¶
type SearchTopoResult struct { BaseResp `json:",inline"` Data []*CommonInstTopo `json:"data"` }
type SearchUniqueRequest ¶
type SearchUniqueRequest struct {
ObjID string `json:"bk_obj_id"`
}
type SearchUniqueResult ¶
type SearchUniqueResult struct { BaseResp Data []ObjectUnique `json:"data"` }
type SearchVpcHostCntOption ¶
type SearchVpcHostCntOption struct {
RegionVpcs []RegionVpc
}
type SearchVpcOption ¶
type SearchVpcOption struct {
Region string `json:"bk_region"`
}
type SearchVpcResult ¶
type SearchVpcResult struct { Count string `json:"count"` Info []VpcInstancesCnt `json:"info"` }
type SecretContent ¶
type SecretContent struct {
SecretKey string `json:"secret_key"`
}
type SecretKeyInfo ¶
type SecretKeyInfo struct {
Content SecretContent `json:"content"`
}
type SecretKeyResult ¶
type SecretKeyResult struct { Code int `json:"code"` Message string `json:"message"` Result bool `json:"result"` Data SecretKeyInfo `json:"data"` }
type ServiceCategory ¶
type ServiceCategory struct { BizID int64 `field:"bk_biz_id" json:"bk_biz_id" bson:"bk_biz_id"` ID int64 `field:"id" json:"id" bson:"id"` Name string `field:"name" json:"name" bson:"name"` RootID int64 `field:"bk_root_id" json:"bk_root_id" bson:"bk_root_id"` ParentID int64 `field:"bk_parent_id" json:"bk_parent_id" bson:"bk_parent_id"` SupplierAccount string `field:"bk_supplier_account" json:"bk_supplier_account" bson:"bk_supplier_account"` // IsBuiltIn indicates internal system service category, which shouldn't be modified. IsBuiltIn bool `field:"is_built_in" json:"is_built_in" bson:"is_built_in"` }
func (*ServiceCategory) Validate ¶
func (sc *ServiceCategory) Validate() (field string, err error)
type ServiceCategoryWithStatistics ¶
type ServiceCategoryWithStatistics struct { ServiceCategory ServiceCategory `field:"category" json:"category" bson:"category"` UsageAmount int64 `field:"usage_amount" json:"usage_amount" bson:"usage_amount"` }
type ServiceDifferenceDetails ¶
type ServiceDifferenceDetails struct { ServiceInstance ServiceInstance `json:"service_instance"` Process *Process `json:"process"` ChangedAttributes []ProcessChangedAttribute `json:"changed_attributes"` }
ServiceDifferenceDetails 服务实例与模板差异信息
type ServiceInstance ¶
type ServiceInstance struct { BizID int64 `field:"bk_biz_id" json:"bk_biz_id" bson:"bk_biz_id"` ID int64 `field:"id" json:"id" bson:"id"` Name string `field:"name" json:"name" bson:"name"` Labels selector.Labels `field:"labels" json:"labels" bson:"labels"` // the template id can not be updated, once the service is created. // it can be 0 when the service is not created with a service template. ServiceTemplateID int64 `field:"service_template_id" json:"service_template_id" bson:"service_template_id"` HostID int64 `field:"bk_host_id" json:"bk_host_id" bson:"bk_host_id"` // the module that this service belongs to. ModuleID int64 `field:"bk_module_id" json:"bk_module_id" bson:"bk_module_id"` Creator string `field:"creator" json:"creator" bson:"creator"` Modifier string `field:"modifier" json:"modifier" bson:"modifier"` CreateTime time.Time `field:"create_time" json:"create_time" bson:"create_time"` LastTime time.Time `field:"last_time" json:"last_time" bson:"last_time"` SupplierAccount string `field:"bk_supplier_account" json:"bk_supplier_account" bson:"bk_supplier_account"` }
ServiceInstance is a service, which created when a host binding with a service template.
func (*ServiceInstance) Validate ¶
func (si *ServiceInstance) Validate() (field string, err error)
type ServiceInstanceDeletePreview ¶
type ServiceInstanceDeletePreview struct { ToMoveModuleHosts []RemoveFromModuleHost `field:"to_move_module_hosts" json:"to_move_module_hosts"` HostApplyPlan HostApplyPlanResult `field:"host_apply_plan" json:"host_apply_plan"` }
type ServiceInstanceDetail ¶
type ServiceInstanceDetail struct { ServiceInstance ServiceCategoryID int64 `field:"service_category_id" json:"service_category_id" bson:"service_category_id"` ProcessInstances []ProcessInstanceNG `field:"process_instances" json:"process_instances" bson:"process_instances"` }
type ServiceInstanceDifference ¶
type ServiceInstanceDifference struct { ProcessTemplateID int64 `json:"process_template_id"` ProcessTemplateName string `json:"process_template_name"` ServiceInstanceCount int `json:"service_instance_count"` ServiceInstances []ServiceDifferenceDetails `json:"service_instances"` }
ServiceInstanceDifference 服务实例内的进程信息与进程模板ID不一致的服务实例列表
type ServiceInstanceWithTopoPath ¶
type ServiceInstanceWithTopoPath struct { ServiceInstance TopoPath []TopoInstanceNodeSimplify `field:"topo_path" json:"topo_path" bson:"topo_path"` }
type ServiceProcessInstanceDifference ¶
type ServiceProcessInstanceDifference struct { ServiceInstanceID int64 `json:"service_instance_id" field:"service_instance_id" bson:"service_instance_id"` ServiceInstanceName string `json:"service_instance_name" field:"service_instance_name" bson:"service_instance_name"` BizID int64 `json:"bk_biz_id" field:"bk_biz_id" bson:"bk_biz_id"` HostID int64 `json:"bk_host_id" field:"bk_host_id" bson:"bk_host_id"` Differences *DifferenceDetail `json:"differences" field:"differences" bson:"differences"` }
to describe the differences between service instance and it's service template's process template's attribute.
type ServiceTemplate ¶
type ServiceTemplate struct { BizID int64 `field:"bk_biz_id" json:"bk_biz_id" bson:"bk_biz_id"` ID int64 `field:"id" json:"id" bson:"id"` // name of this service, can not be empty Name string `field:"name" json:"name" bson:"name"` // the class of this service, each field means a class label. // now, the class must have two labels. ServiceCategoryID int64 `field:"service_category_id" json:"service_category_id" bson:"service_category_id"` Creator string `field:"creator" json:"creator" bson:"creator"` Modifier string `field:"modifier" json:"modifier" bson:"modifier"` CreateTime time.Time `field:"create_time" json:"create_time" bson:"create_time"` LastTime time.Time `field:"last_time" json:"last_time" bson:"last_time"` SupplierAccount string `field:"bk_supplier_account" json:"bk_supplier_account" bson:"bk_supplier_account"` }
func (*ServiceTemplate) Validate ¶
func (st *ServiceTemplate) Validate() (field string, err error)
type ServiceTemplateDetail ¶
type ServiceTemplateDetail struct { ServiceTemplate ServiceTemplate `field:"service_template" json:"service_template" bson:"service_template" mapstructure:"service_template"` ProcessTemplates []ProcessTemplate `field:"process_templates" json:"process_templates" bson:"process_templates" mapstructure:"process_templates"` }
type ServiceTemplateWithStatistics ¶
type ServiceTemplateWithStatistics struct { Template ServiceTemplate `field:"template" json:"template" bson:"template"` ServiceInstanceCount int64 `field:"service_instance_count" json:"service_instance_count" bson:"service_instance_count"` ProcessInstanceCount int64 `field:"process_instance_count" json:"process_instance_count" bson:"process_instance_count"` }
type SetAssociationKind ¶
type SetAssociationKind CreateAssociationKind
type SetDataResult ¶
type SetDataResult struct { UpdatedCount `json:",inline"` CreatedCount `json:",inline"` Created []CreatedDataResult `json:"created"` Updated []UpdatedDataResult `json:"updated"` Exceptions []ExceptionResult `json:"exception"` }
SetDataResult common set result definition
type SetDiff ¶
type SetDiff struct { ModuleDiffs []SetModuleDiff `json:"module_diffs"` SetID int64 `json:"bk_set_id"` SetDetail SetInst `json:"set_detail"` TopoPath []TopoInstanceNodeSimplify `json:"topo_path"` NeedSync bool `json:"need_sync"` SetTemplateVersion int64 `json:"set_template_version"` }
func (*SetDiff) UpdateNeedSyncField ¶
func (sd *SetDiff) UpdateNeedSyncField()
type SetHostConfigParams ¶
type SetIdenifierFlag ¶
type SetIdenifierFlag struct { DataType SynchronizeOperateDataType `json:"data_type"` // DataType = SynchronizeOperateDataTypeInstance, // DataType = object_id, eg:host,plat,module,proc etc. // DataType = SynchronizeOperateDataTypeModel, // DataClassify = common.SynchronizeModelDescTypeGroupInfo,common.SynchronizeModelDescTypeModuleAttribute etc DataClassify string `json:"data_classify"` IdentifierID []int64 `json:"identifier_id"` // 需要同步到第三方系统的身份标志 Flag string `json:"flag"` // 1:新增,在原有的基础新加同步标志。 // 2:覆盖,删除 原有的同步标志 // 3:删除, 删除同步标志 OperateType SynchronizeOperateType `json:"op_type"` }
SetIdenifierFlag update idenifier flag data
type SetInst ¶
type SetInst struct { BizID int64 `bson:"bk_biz_id" json:"bk_biz_id" mapstructure:"bk_biz_id"` SetID int64 `bson:"bk_set_id" json:"bk_set_id" mapstructure:"bk_set_id"` SetName string `bson:"bk_set_name" json:"bk_set_name" mapstructure:"bk_set_name"` SetStatus string `bson:"bk_service_status" json:"bk_service_status" mapstructure:"bk_service_status"` SetEnv string `bson:"bk_set_env" json:"bk_set_env" mapstructure:"bk_set_env"` SetTemplateID int64 `bson:"set_template_id" json:"set_template_id" mapstructure:"set_template_id"` ParentID int64 `bson:"bk_parent_id" json:"bk_parent_id" mapstructure:"bk_parent_id"` Creator string `field:"creator" json:"creator,omitempty" bson:"creator" mapstructure:"creator"` CreateTime Time `field:"create_time" json:"create_time,omitempty" bson:"create_time" mapstructure:"create_time"` LastTime Time `field:"last_time" json:"last_time,omitempty" bson:"last_time" mapstructure:"last_time"` SupplierAccount string `` /* 126-byte string literal not displayed */ SetTemplateVersion int64 `bson:"set_template_version" json:"set_template_version" mapstructure:"set_template_version"` }
SetInst contains partial fields of a real set
type SetManyAssociationKind ¶
type SetManyAssociationKind CreateManyAssociationKind
type SetManyInstanceAssociation ¶
type SetManyInstanceAssociation CreateManyInstanceAssociation
type SetManyModelClassification ¶
type SetManyModelClassification CreateManyModelClassifiaction
SetManyModelClassification set many input params
type SetManyModelInstance ¶
type SetManyModelInstance CreateManyModelInstance
type SetModelAssociation ¶
type SetModelAssociation CreateModelAssociation
type SetModelAttributeGroup ¶
type SetModelAttributeGroup CreateModelAttributeGroup
SetModelAttributeGroup used to create a new group for some attributes, if it is exists, then update it
type SetModelAttributes ¶
type SetModelAttributes CreateModelAttributes
type SetModelInstance ¶
type SetModelInstance CreateModelInstance
type SetModuleDiff ¶
type SetModuleDiff struct { ModuleID int64 `json:"bk_module_id" mapstructure:"bk_module_id"` ModuleName string `json:"bk_module_name" mapstructure:"bk_module_name"` ServiceTemplateID int64 `json:"service_template_id" mapstructure:"service_template_id"` ServiceTemplateName string `json:"service_template_name" mapstructure:"service_template_name"` DiffType string `json:"diff_type" mapstructure:"diff_type"` }
type SetOneInstanceAssociation ¶
type SetOneInstanceAssociation CreateOneInstanceAssociation
type SetOneModelClassification ¶
type SetOneModelClassification CreateOneModelClassification
SetOneModelClassification set one input params
type SetOptionResult ¶
type SetOptionResult struct { BaseResp `json:",inline"` Data SetDataResult `json:"data"` }
SetOptionResult set api http response return this result struct
type SetServiceTemplateRelation ¶
type SetServiceTemplateRelation struct { BizID int64 `field:"bk_biz_id" json:"bk_biz_id" bson:"bk_biz_id"` SetTemplateID int64 `field:"set_template_id" json:"set_template_id" bson:"set_template_id"` ServiceTemplateID int64 `field:"service_template_id" json:"service_template_id" bson:"service_template_id"` SupplierAccount string `field:"bk_supplier_account" json:"bk_supplier_account" bson:"bk_supplier_account"` }
拓扑模板与服务模板多对多关系, 记录拓扑模板的构成
type SetSyncStatusOption ¶
type SetSyncStatusOption struct {
SetIDs []int64 `field:"bk_set_ids" json:"bk_set_ids" bson:"bk_set_ids" mapstructure:"bk_set_ids"`
}
type SetTemplate ¶
type SetTemplate struct { ID int64 `field:"id" json:"id" bson:"id"` Name string `field:"name" json:"name" bson:"name"` BizID int64 `field:"bk_biz_id" json:"bk_biz_id" bson:"bk_biz_id"` Version int64 `field:"version" json:"version" bson:"version" mapstructure:"version"` // 通用字段 Creator string `field:"creator" json:"creator" bson:"creator"` Modifier string `field:"modifier" json:"modifier" bson:"modifier"` CreateTime time.Time `field:"create_time" json:"create_time" bson:"create_time"` LastTime time.Time `field:"last_time" json:"last_time" bson:"last_time"` SupplierAccount string `field:"bk_supplier_account" json:"bk_supplier_account" bson:"bk_supplier_account"` }
SetTemplate 集群模板
func (SetTemplate) Validate ¶
func (st SetTemplate) Validate() (key string, err error)
type SetTemplateResult ¶
type SetTemplateResult struct { BaseResp Data SetTemplate `field:"data" json:"data" bson:"data"` }
type SetTemplateSyncStatus ¶
type SetTemplateSyncStatus struct { SetID int64 `field:"bk_set_id" json:"bk_set_id" bson:"bk_set_id" mapstructure:"bk_set_id"` Name string `field:"bk_set_name" json:"bk_set_name" bson:"bk_set_name" mapstructure:"bk_set_name"` BizID int64 `field:"bk_biz_id" json:"bk_biz_id" bson:"bk_biz_id" mapstructure:"bk_biz_id"` SetTemplateID int64 `field:"set_template_id" json:"set_template_id" bson:"set_template_id" mapstructure:"set_template_id"` Creator string `field:"creator" json:"creator" bson:"creator" mapstructure:"creator"` CreateTime Time `field:"create_time" json:"create_time" bson:"create_time" mapstructure:"create_time"` LastTime Time `field:"last_time" json:"last_time" bson:"last_time" mapstructure:"last_time"` SupplierAccount string `field:"bk_supplier_account" json:"bk_supplier_account" bson:"bk_supplier_account" mapstructure:"bk_supplier_account"` Status SyncStatus `field:"status" json:"status" bson:"status" mapstructure:"status"` TaskID string `field:"task_id" json:"task_id" bson:"task_id" mapstructure:"task_id"` }
type SetTemplateUpdateToDateStatus ¶
type SetTemplateUpdateToDateStatus struct { Sets []SetUpdateToDateStatus `json:"sets"` SetTemplateVersion int64 `json:"set_template_version"` SetTemplateID int64 `json:"set_template_id"` NeedSync bool `json:"need_sync"` }
type SetTemplateWithStatistics ¶
type SetTemplateWithStatistics struct { SetInstanceCount int64 `json:"set_instance_count"` SetTemplate SetTemplate `json:"set_template"` }
type SetTplDiffResult ¶
type SetUpdateToDateStatus ¶
type SinglecharItem ¶
type SinglecharItem struct {
BaseCfgItem `json:",inline"`
}
type SiteCfg ¶
type SiteCfg struct { Title TitleItem `json:"title"` }
SiteCfg used to admin Site Config
type SocketBindType ¶
type SocketBindType string
const ( BindLocalHost SocketBindType = "1" BindAll SocketBindType = "2" BindInnerIP SocketBindType = "3" BindOuterIP SocketBindType = "4" )
func (*SocketBindType) IP ¶
func (p *SocketBindType) IP(host map[string]interface{}) string
func (*SocketBindType) NeedIPFromHost ¶
func (p *SocketBindType) NeedIPFromHost() bool
func (*SocketBindType) String ¶
func (p *SocketBindType) String() string
func (SocketBindType) Validate ¶
func (p SocketBindType) Validate() error
type StatisticInstOperation ¶
type StatisticInstOperation struct { Create []StringIDCount `json:"create"` Delete []StringIDCount `json:"delete"` Update []UpdateInstCount `json:"update"` }
type Statistics ¶
Report define sending statistic
type StringArrayToString ¶
type StringArrayToString string
special field whose string array value is parsed into string value from db
func (*StringArrayToString) UnmarshalBSONValue ¶
func (s *StringArrayToString) UnmarshalBSONValue(typo bsontype.Type, raw []byte) error
type StringIDCount ¶
type StringIDCount struct { ID string `json:"id" bson:"_id"` Count int64 `json:"count" bson:"count"` }
StringIDCount string类型字段做mongoDB聚合时使用
type SubAttribute ¶
type SubAttribute struct { PropertyID string `field:"bk_property_id" json:"bk_property_id" bson:"bk_property_id"` PropertyName string `field:"bk_property_name" json:"bk_property_name" bson:"bk_property_name"` Placeholder string `field:"placeholder" json:"placeholder" bson:"placeholder"` IsEditable bool `field:"editable" json:"editable" bson:"editable"` IsRequired bool `field:"isrequired" json:"isrequired" bson:"isrequired"` IsReadOnly bool `field:"isreadonly" json:"isreadonly" bson:"isreadonly"` IsSystem bool `field:"bk_issystem" json:"bk_issystem" bson:"bk_issystem"` IsAPI bool `field:"bk_isapi" json:"bk_isapi" bson:"bk_isapi"` PropertyType string `field:"bk_property_type" json:"bk_property_type" bson:"bk_property_type"` Option interface{} `field:"option" json:"option" bson:"option"` Description string `field:"description" json:"description" bson:"description"` PropertyGroup string `field:"bk_property_group" json:"bk_property_group" bson:"bk_property_group"` }
SubAttribute sub attribute metadata definition
func (*SubAttribute) Validate ¶
func (sa *SubAttribute) Validate(ctx context.Context, data interface{}, key string) (rawError errors.RawErrorInfo)
type Subscription ¶
type Subscription struct { SubscriptionID int64 `bson:"subscription_id" json:"subscription_id"` SubscriptionName string `bson:"subscription_name" json:"subscription_name"` SystemName string `bson:"system_name" json:"system_name"` CallbackURL string `bson:"callback_url" json:"callback_url"` ConfirmMode string `bson:"confirm_mode" json:"confirm_mode"` ConfirmPattern string `bson:"confirm_pattern" json:"confirm_pattern"` TimeOutSeconds int64 `bson:"time_out" json:"time_out"` // second // SubscriptionForm is a list of event types split by comma SubscriptionForm string `bson:"subscription_form" json:"subscription_form"` Operator string `bson:"operator" json:"operator"` OwnerID string `bson:"bk_supplier_account" json:"bk_supplier_account"` LastTime Time `bson:"last_time" json:"last_time"` Statistics *Statistics `bson:"-" json:"statistics"` }
Subscription define
func (Subscription) GetCacheKey ¶
func (s Subscription) GetCacheKey() string
func (Subscription) GetTimeout ¶
func (s Subscription) GetTimeout() time.Duration
func (Subscription) TableName ¶
func (Subscription) TableName() string
type SuccessResponse ¶
type SuccessResponse struct { BaseResp `json:",inline"` Data interface{} `json:"data"` }
func NewSuccessResponse ¶
func NewSuccessResponse(data interface{}) *SuccessResponse
type SyncDetail ¶
type SyncDetail struct { NewAdd SyncSuccessInfo `json:"new_add" bson:"new_add"` Update SyncSuccessInfo `json:"update" bson:"update"` }
type SyncFailInfo ¶
type SyncHistory ¶
type SyncHistory struct { HistoryID int64 `json:"bk_history_id" bson:"bk_history_id"` TaskID int64 `json:"bk_task_id" bson:"bk_task_id"` SyncStatus string `json:"bk_sync_status" bson:"bk_sync_status"` OwnerID string `json:"bk_supplier_account" bson:"bk_supplier_account"` StatusDescription SyncStatusDesc `json:"bk_status_description" bson:"bk_status_description"` Detail SyncDetail `json:"bk_detail" bson:"bk_detail"` CreateTime time.Time `json:"create_time" bson:"create_time"` }
同步历史记录
type SyncModuleServiceInstanceByTemplateOption ¶
type SyncModuleServiceInstanceByTemplateOption struct { BizID int64 `json:"bk_biz_id"` ModuleID int64 `json:"bk_module_id"` }
用于同步单个模块的服务实例
type SyncModuleTask ¶
type SyncModuleTask struct { Set SetInst `json:"set"` SetTopoPath []TopoInstanceNodeSimplify `json:"set_topo_path"` ModuleDiff SetModuleDiff `json:"module_diff"` SetTemplateVersion int64 `json:"set_template_version"` }
type SyncRegion ¶
type SyncResult ¶
type SyncResult struct { SuccessInfo SyncSuccessInfo `json:"success_info" bson:"success_info"` FailInfo SyncFailInfo `json:"fail_info" bson:"fail_info"` Detail SyncDetail `json:"detail" bson:"detail"` SyncStatus string `json:"bk_sync_status" bson:"bk_sync_status"` StatusDescription SyncStatusDesc `json:"bk_status_description" bson:"bk_status_description"` }
type SyncSetTplToInstOption ¶
type SyncSetTplToInstOption struct {
SetIDs []int64 `field:"bk_set_ids" json:"bk_set_ids" bson:"bk_set_ids" mapstructure:"bk_set_ids"`
}
type SyncStatus ¶
type SyncStatus string
func (SyncStatus) IsFinished ¶
func (ss SyncStatus) IsFinished() bool
type SyncStatusDesc ¶
type SyncSuccessInfo ¶
type SynchronizeClearDataParameter ¶
type SynchronizeClearDataParameter struct { Tamestamp int64 `json:"tamestamp"` Sign string `json:"sign"` Version int64 `json:"version"` SynchronizeFlag string `json:"synchronizeFlag"` }
SynchronizeClearDataParameter synchronize data clear data http request parameter
func (*SynchronizeClearDataParameter) GenerateSign ¶
func (s *SynchronizeClearDataParameter) GenerateSign(key string)
GenerateSign generate sign
func (*SynchronizeClearDataParameter) Legality ¶
func (s *SynchronizeClearDataParameter) Legality(key string) bool
Legality sign is legal
type SynchronizeDataInfo ¶
type SynchronizeDataInfo struct { OperateDataType SynchronizeOperateDataType `json:"operate_data_type"` // OperateDataType = SynchronizeOperateDataTypeInstance, // DataClassify = object_id, eg:host,plat,module,proc etc. // OperateDataType = SynchronizeOperateDataTypeModel, // DataClassify = common.SynchronizeModelDescTypeGroupInfo,common.SynchronizeModelDescTypeModuleAttribute etc // OperateDataType = SynchronizeOperateDataTypeAssociation // DataClassify = common.SynchronizeAssociationTypeModelHost etc. DataClassify string `json:"data_classify"` InfoArray []mapstr.MapStr `json:"instance_info_array"` // OffSet current data offset start location Offset int64 `json:"offset"` // Count total data count Count int64 `json:"count"` Version int64 `json:"version"` SynchronizeFlag string `json:"synchronize_flag"` }
SynchronizeDataInfo synchronize instance data http request parameter
type SynchronizeDataResult ¶
type SynchronizeDataResult struct { //Created []CreatedDataResult `json:"created"` //Updated []UpdatedDataResult `json:"updated"` Exceptions []ExceptionResult `json:"exception"` }
SynchronizeDataResult common Synchronize result definition
type SynchronizeFindInfoParameter ¶
type SynchronizeFindInfoParameter struct { DataType SynchronizeOperateDataType `json:"data_type"` DataClassify string `json:"data_classify"` Condition mapstr.MapStr `json:"condition"` Start uint64 `json:"start"` Limit uint64 `json:"limit"` }
SynchronizeFindInfoParameter synchronize data fetch data http request parameter
type SynchronizeItem ¶
SynchronizeItem synchronize data information
type SynchronizeOperateDataType ¶
type SynchronizeOperateDataType int64
SynchronizeOperateDataType synchronize data operate type
const ( // SynchronizeOperateDataTypeInstance synchronize data is instance SynchronizeOperateDataTypeInstance SynchronizeOperateDataType = iota + 1 // SynchronizeOperateDataTypeModel synchronize data is model SynchronizeOperateDataTypeModel //SynchronizeOperateDataTypeAssociation synchronize data is association SynchronizeOperateDataTypeAssociation )
type SynchronizeOperateType ¶
type SynchronizeOperateType int64
SynchronizeOperateType synchronize data operate type
const ( // SynchronizeOperateTypeAdd synchronize data add SynchronizeOperateTypeAdd SynchronizeOperateType = iota + 1 // SynchronizeOperateTypeUpdate synchronize data update SynchronizeOperateTypeUpdate // SynchronizeOperateTypeRepalce synchronize data add or update SynchronizeOperateTypeRepalce // SynchronizeOperateTypeDelete synchronize data delete SynchronizeOperateTypeDelete )
type SynchronizeParameter ¶
type SynchronizeParameter struct { OperateType SynchronizeOperateType `json:"op_type"` // synchronize data type OperateDataType SynchronizeOperateDataType `json:"operate_data_type"` // OperateDataType = SynchronizeOperateDataTypeInstance, // DataClassify = object_id, eg:host,plat,module,proc etc. // OperateDataType = SynchronizeOperateDataTypeModel, // DataClassify = common.SynchronizeModelDescTypeGroupInfo,common.SynchronizeModelDescTypeModuleAttribute etc // OperateDataType = SynchronizeOperateDataTypeAssociation // DataClassify = common.SynchronizeAssociationTypeModelHost etc. DataClassify string `json:"data_classify"` InfoArray []*SynchronizeItem `json:"instance_info_array"` Version int64 `json:"version"` SynchronizeFlag string `json:"synchronize_flag"` }
SynchronizeParameter synchronize instance data http request parameter
type SynchronizeResult ¶
type SynchronizeResult struct { BaseResp `json:",inline"` Data SetDataResult `json:"data"` }
SynchronizeResult synchronize result
type SysUserConfigItem ¶
type SysUserConfigItem struct { Flag bool `json:"flag" bson:"flag"` ExpireAt int64 `json:"expire_at" bson:"expire_at"` }
SysUserConfigItem 用户在cc_System表中的用户自定义配置
type TaskDetailResponse ¶
type TaskDetailResponse struct { BaseResp Data struct { Info APITaskDetail `json:"info"` } `json:"data"` }
type TemplateVersion ¶
type Time ¶
func ParseTimeInUnixTS ¶
ParseTimeInUnixTS return Time object base on unix timestamp.
func (Time) MarshalBSONValue ¶
MarshalBSONValue implements bson.MarshalBSON interface
func (Time) MarshalJSON ¶
func (*Time) UnmarshalBSONValue ¶
UnmarshalBSONValue implements bson.UnmarshalBSONValue interface
func (*Time) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface. The time is expected to be a quoted string in RFC 3339 format.
type TitleItem ¶
type TitleItem struct {
BaseCfgItem `json:",inline"`
}
type TopoGraphics ¶
type TopoGraphics struct { ScopeType string `json:"scope_type,omitempty" bson:"scope_type,omitempty"` // biz,user,global,classification ScopeID string `json:"scope_id,omitempty" bson:"scope_id,omitempty"` // ID for ScopeType NodeType string `json:"node_type" bson:"node_type"` // obj inst ObjID string `json:"bk_obj_id" bson:"bk_obj_id"` IsPre bool `json:"ispre" bson:"ispre"` InstID int `json:"bk_inst_id" bson:"bk_inst_id"` NodeName string `json:"node_name,omitempty" bson:"node_name,omitempty"` Position Position `json:"position" bson:"position"` Ext map[string]interface{} `json:"ext,omitempty" bson:"ext,omitempty"` Icon string `json:"bk_obj_icon,omitempty" bson:"bk_obj_icon,omitempty"` SupplierAccount string `json:"bk_supplier_account,omitempty" bson:"bk_supplier_account,omitempty"` // bk_supplier_account Assts []GraphAsst `json:"assts,omitempty"` }
func (*TopoGraphics) FillBlank ¶
func (t *TopoGraphics) FillBlank() *TopoGraphics
func (*TopoGraphics) SetExt ¶
func (t *TopoGraphics) SetExt(val map[string]interface{})
func (*TopoGraphics) SetIcon ¶
func (t *TopoGraphics) SetIcon(val string)
func (*TopoGraphics) SetInstID ¶
func (t *TopoGraphics) SetInstID(val int)
func (*TopoGraphics) SetIsPre ¶
func (t *TopoGraphics) SetIsPre(val bool)
func (*TopoGraphics) SetNodeName ¶
func (t *TopoGraphics) SetNodeName(val string)
func (*TopoGraphics) SetNodeType ¶
func (t *TopoGraphics) SetNodeType(val string)
func (*TopoGraphics) SetObjID ¶
func (t *TopoGraphics) SetObjID(val string)
func (*TopoGraphics) SetPosition ¶
func (t *TopoGraphics) SetPosition(val Position)
func (*TopoGraphics) SetScopeID ¶
func (t *TopoGraphics) SetScopeID(val string)
func (*TopoGraphics) SetScopeType ¶
func (t *TopoGraphics) SetScopeType(val string)
func (*TopoGraphics) SetSupplierAccount ¶
func (t *TopoGraphics) SetSupplierAccount(val string)
type TopoInst ¶
type TopoInst struct { InstID int64 `json:"bk_inst_id"` InstName string `json:"bk_inst_name"` ObjID string `json:"bk_obj_id"` ObjName string `json:"bk_obj_name"` Default int `json:"default"` HostCount int64 `json:"host_count"` ServiceInstanceCount int64 `json:"service_instance_count,omitempty"` ServiceTemplateID int64 `json:"service_template_id,omitempty"` SetTemplateID int64 `json:"set_template_id,omitempty"` HostApplyEnabled *bool `json:"host_apply_enabled,omitempty"` HostApplyRuleCount *int64 `json:"host_apply_rule_count,omitempty"` }
TopoInst 实例拓扑结构
type TopoInstRst ¶
type TopoInstRst struct { TopoInst `json:",inline"` Child []*TopoInstRst `json:"child"` }
TopoInstRst 拓扑实例
func (*TopoInstRst) DeepFirstTraverse ¶
func (tir *TopoInstRst) DeepFirstTraverse(visitor TopoInstRstVisitor)
type TopoInstRstVisitor ¶
type TopoInstRstVisitor func(tir *TopoInstRst)
type TopoInstance ¶
type TopoInstance struct { ObjectID string InstanceID int64 InstanceName string ParentInstanceID int64 Detail map[string]interface{} Default int64 }
func (*TopoInstance) Key ¶
func (ti *TopoInstance) Key() string
Key generate a unique key for instance(as instances's of different object type maybe conflict)
type TopoInstanceNode ¶
type TopoInstanceNode struct { Children []*TopoInstanceNode ObjectID string InstanceID int64 InstanceName string Detail map[string]interface{} }
func (*TopoInstanceNode) DeepFirstTraversal ¶
func (node *TopoInstanceNode) DeepFirstTraversal(f func(node *TopoInstanceNode))
func (*TopoInstanceNode) Name ¶
func (node *TopoInstanceNode) Name() string
func (*TopoInstanceNode) ToSimplify ¶
func (node *TopoInstanceNode) ToSimplify() *TopoInstanceNodeSimplify
func (*TopoInstanceNode) TraversalFindModule ¶
func (node *TopoInstanceNode) TraversalFindModule(targetID int64) []*TopoInstanceNode
func (*TopoInstanceNode) TraversalFindNode ¶
func (node *TopoInstanceNode) TraversalFindNode(objectType string, targetID int64) []*TopoInstanceNode
common.BKInnerObjIDObject used for matching custom level node
type TopoItem ¶
type TopoItem struct { ClassificationID string `json:"bk_classification_id"` Position string `json:"position"` ObjID string `json:"bk_obj_id"` OwnerID string `json:"bk_supplier_account"` ObjName string `json:"bk_obj_name"` }
TopoItem define topo item
type TopoModelNode ¶
type TopoModelNode struct { Children []*TopoModelNode ObjectID string }
func (*TopoModelNode) LeftestObjectIDList ¶
func (tn *TopoModelNode) LeftestObjectIDList() []string
LeftestObjectIDList extract leftest node's id of each level, arrange as a list it's useful in model mainline topo case, as bk_mainline relationship degenerate to a list.
type TopoNode ¶
type TopoNodeHostCount ¶
type TopoPathResult ¶
type TopoPathResult struct {
Nodes []NodeTopoPath `json:"nodes" mapstructure:"nodes"`
}
type TransferException ¶
type TransferExceptionResult ¶
type TransferExceptionResult struct { BaseResp `json:",inline"` Data TransferException `json:"data"` }
type TransferHostAcrossBusinessParameter ¶
type TransferHostAcrossBusinessParameter struct { SrcAppID int64 `json:"src_bk_biz_id"` DstAppID int64 `json:"dst_bk_biz_id"` HostID []int64 `json:"bk_host_id"` DstModuleIDArr []int64 `json:"bk_module_ids"` }
TransferHostAcrossBusinessParameter Transfer host across business request parameter
type TransferHostToInnerModule ¶
type TransferHostToInnerModule struct { ApplicationID int64 `json:"bk_biz_id"` ModuleID int64 `json:"bk_module_id"` HostID []int64 `json:"bk_host_id"` }
TransferHostToInnerModule transfer host to inner module eg:idle module ,fault module
type TransferHostWithAutoClearServiceInstanceOption ¶
type TransferHostWithAutoClearServiceInstanceOption struct { HostIDs []int64 `field:"bk_host_ids" json:"bk_host_ids"` RemoveFromNode *TopoNode `field:"remove_from_node" json:"remove_from_node"` AddToModules []int64 `field:"add_to_modules" json:"add_to_modules"` // 主机从 RemoveFromNode 移除后如果不再属于其它模块, 默认转移到空闲机模块 // DefaultInternalModule 支持调整这种模型行为,可设置成待回收模块或者故障机模块 DefaultInternalModule int64 `field:"default_internal_module" json:"default_internal_module"` Options TransferOptions `field:"options" json:"options"` }
type TransferHostsCrossBusinessRequest ¶
type TransferHostsCrossBusinessRequest struct { SrcApplicationID int64 `json:"src_bk_biz_id"` DstApplicationID int64 `json:"dst_bk_biz_id"` HostIDArr []int64 `json:"bk_host_id"` DstModuleIDArr []int64 `json:"bk_module_ids"` }
TransferHostsCrossBusinessRequest Transfer host across business request parameter
type TransferOptions ¶
type TransferOptions struct { ServiceInstanceOptions []CreateServiceInstanceOption `field:"service_instance_options" json:"service_instance_options"` HostApplyConflictResolvers []HostApplyConflictResolver `` /* 156-byte string literal not displayed */ }
type TxnCapable ¶
type Uint64DataResponse ¶
type Uint64Response ¶
type UpdateAssociationObjectRequest ¶
type UpdateAssociationObjectRequest struct {
AsstName string `field:"bk_asst_name" json:"bk_asst_name" bson:"bk_asst_name"`
}
type UpdateAssociationTypeRequest ¶
type UpdateAssociationTypeRequest struct { AsstName string `field:"bk_asst_name" json:"bk_asst_name" bson:"bk_asst_name"` SrcDes string `field:"src_des" json:"src_des" bson:"src_des"` DestDes string `field:"dest_des" json:"dest_des" bson:"dest_des"` Direction string `field:"direction" json:"direction" bson:"direction"` }
type UpdateAttrIndexData ¶
type UpdateAttrIndexData struct { Info []*UpdateAttributeIndex `json:"info"` Count uint64 `json:"count"` }
type UpdateAttributeIndex ¶
UpdateAttributeIndex created bk_property_index info struct
type UpdateBusinessStatusOption ¶
type UpdateBusinessStatusOption struct {
BizName string `json:"bk_biz_name" mapstructure:"bk_biz_name"`
}
type UpdateGroupCondition ¶
type UpdateGroupCondition struct { ModelBizID int64 `json:"bk_biz_id"` Condition struct { ID int64 `field:"id" json:"id,omitempty"` } `json:"condition"` Data struct { IsCollapse *bool `field:"is_collapse" json:"is_collapse,omitempty"` Name *string `field:"bk_group_name" json:"bk_group_name,omitempty"` Index *int64 `field:"bk_group_index" json:"bk_group_index,omitempty"` } `json:"data"` }
UpdateGroupCondition update group condition struct
type UpdateHostApplyRuleOption ¶
type UpdateHostApplyRuleOption struct {
PropertyValue interface{} `field:"bk_property_value" json:"bk_property_value" bson:"bk_property_value" mapstructure:"bk_property_value"`
}
type UpdateHostByHostApplyRuleOption ¶
type UpdateHostByHostApplyRuleOption struct {
HostIDs []int64 `field:"bk_host_ids" json:"bk_host_ids" bson:"bk_host_ids" mapstructure:"bk_host_ids"`
}
type UpdateHostPropertyBatchParameter ¶
type UpdateHostPropertyBatchParameter struct {
Update []updateHostProperty `json:"update"`
}
UpdateHostPropertyBatchParameter batch update host property parameter
type UpdateInstCount ¶
type UpdateModelAttrUnique ¶
type UpdateModelAttrUnique struct {
Data UpdateUniqueRequest `json:"data"`
}
type UpdateOption ¶
type UpdateOption struct { Data mapstr.MapStr `json:"data" mapstructure:"data"` Condition mapstr.MapStr `json:"condition" mapstructure:"condition"` // can edit all fields, including not editable properties, used by collectors CanEditAll bool `json:"can_edit_all" mapstructure:"can_edit_all"` }
UpdateOption common update options
type UpdateParams ¶
type UpdateProcessByIDsInput ¶
type UpdateProcessByIDsInput struct { BizID int64 `json:"bk_biz_id"` ProcessIDs []int64 `json:"process_ids"` UpdateData map[string]interface{} `json:"update_data"` }
func (*UpdateProcessByIDsInput) Validate ¶
func (o *UpdateProcessByIDsInput) Validate() (rawError cErr.RawErrorInfo)
Validate validates the input param
type UpdateResult ¶
type UpdateResult struct {
BaseResp `json:",inline"`
}
UpdateResult update result
type UpdateServiceTemplateOption ¶
type UpdateServiceTemplateOption struct { BizID int64 `field:"bk_biz_id" json:"bk_biz_id" bson:"bk_biz_id"` ID int64 `field:"id" json:"id,omitempty" bson:"id"` Name string `field:"name" json:"name,omitempty" bson:"name"` ServiceCategoryID int64 `field:"service_category_id" json:"service_category_id,omitempty" bson:"service_category_id"` }
type UpdateSetTemplateOption ¶
type UpdateSetTemplateOption struct { Name string `field:"name" json:"name" bson:"name"` ServiceTemplateIDs []int64 `field:"service_template_ids" json:"service_template_ids" bson:"service_template_ids"` }
func (UpdateSetTemplateOption) Validate ¶
func (option UpdateSetTemplateOption) Validate() (string, error)
type UpdateTopoGraphicsInput ¶
type UpdateTopoGraphicsInput struct {
Origin []TopoGraphics `field:"origin" json:"origin" bson:"origin"`
}
type UpdateUniqueRequest ¶
type UpdateUniqueResult ¶
type UpdateUniqueResult struct {
BaseResp
}
type UpdatedAttrIndexResult ¶
type UpdatedAttrIndexResult struct { BaseResp `json:",inline"` Data *UpdateAttrIndexData `json:"data"` }
UpdatedAttrIndexResult update attributes index result
type UpdatedCount ¶
type UpdatedCount struct {
Count uint64 `json:"updated_count"`
}
UpdatedCount created count struct
type UpdatedDataResult ¶
UpdatedDataResult common update operation result
type UpdatedOptionResult ¶
type UpdatedOptionResult struct { BaseResp `json:",inline"` Data UpdatedCount `json:"data" mapstructure:"data"` }
UpdatedOptionResult common update result
type UserConfig ¶
type UserConfig struct { Info string `json:"info" bson:"info"` Name string `json:"name" bson:"name"` ID string `json:"id" bson:"id"` CreateTime time.Time `json:"create_time" bson:"create_time"` UpdateTime time.Time `json:"last_time" bson:"last_time"` AppID int64 `json:"bk_biz_id" bson:"bk_biz_id"` CreateUser string `json:"create_user" bson:"create_user"` ModifyUser string `json:"modify_user" bson:"modify_user"` }
type UserConfigMeta ¶
type UserConfigMeta struct { AppID int64 `json:"bk_biz_id,omitempty" bson:"bk_biz_id,omitempty"` Info string `json:"info,omitempty" bson:"info,omitempty"` Name string `json:"name,omitempty" bson:"name,omitempty"` ID string `json:"id,omitempty" bson:"id,omitempty"` CreateTime time.Time `json:"create_time" bson:"create_time,omitempty"` CreateUser string `json:"create_user" bson:"create_user,omitempty"` ModifyUser string `json:"modify_user" bson:"modify_user,omitempty"` UpdateTime time.Time `json:"last_time" bson:"last_time,omitempty"` OwnerID string `json:"bk_supplier_account" bson:"bk_supplier_account"` }
type UserConfigResult ¶
type UserConfigResult struct { Count uint64 `json:"count"` Info []interface{} `json:"info"` }
type UserInfo ¶
type UserInfo struct { Qq string `json:"qq"` Status string `json:"status"` WxUserid string `json:"wx_userid"` DisplayName string `json:"display_name"` Language string `json:"language"` StaffStatus string `json:"staff_status"` BkUsername string `json:"bk_username"` Telephone string `json:"telephone"` BkRole int `json:"bk_role"` TimeZone string `json:"time_zone"` Email string `json:"email"` }
type ValidationRulesCfg ¶
type ValidationRulesCfg struct { Number NumberItem `json:"number"` Float FloatItem `json:"float"` Singlechar SinglecharItem `json:"singlechar"` Longchar LongcharItem `json:"longchar"` AssociationId AssociationIdItem `json:"associationId"` ClassifyId ClassifyIdItem `json:"classifyId"` ModelId ModelIdItem `json:"modelId"` EnumId EnumIdItem `json:"enumId"` EnumName EnumNameItem `json:"enumName"` FieldId FieldIdItem `json:"fieldId"` NamedCharacter NamedCharacterItem `json:"namedCharacter"` InstanceTagKey InstanceTagKeyItem `json:"instanceTagKey"` InstanceTagValue InstanceTagValueItem `json:"instanceTagValue"` BusinessTopoInstNames BusinessTopoInstNamesItem `json:"businessTopoInstNames"` }
ValidationRulesCfg used to admin valiedation rules Config
func (ValidationRulesCfg) Validate ¶
func (v ValidationRulesCfg) Validate() error
Validate validate the fields of ValidationRulesCfg
type VpcHostCntResult ¶
type VpcHostCntResult struct { Count int64 `json:"count"` Info []VpcSyncInfo `json:"info"` }
type VpcInstances ¶
type VpcInstances struct { Vpc *VpcSyncInfo CloudID int64 `json:"bk_cloud_id" bson:"bk_cloud_id"` Instances []*Instance }
type VpcInstancesCnt ¶
type VpcSyncInfo ¶
type VpcSyncInfo struct { VpcID string `json:"bk_vpc_id" bson:"bk_vpc_id"` VpcName string `json:"bk_vpc_name" bson:"bk_vpc_name"` Region string `json:"bk_region" bson:"bk_region"` VpcHostCount int64 `json:"bk_host_count" bson:"bk_host_count"` SyncDir int64 `json:"bk_sync_dir,omitempty" bson:"bk_sync_dir,omitempty"` CloudID int64 `json:"bk_cloud_id" bson:"bk_cloud_id"` // 该vpc在云端是否被销毁 Destroyed bool `json:"destroyed" bson:"destroyed"` }
Source Files
¶
- adminserver.go
- apilimiter.go
- apiserver.go
- association.go
- attribute.go
- audit.go
- auth.go
- authserver.go
- cache.go
- classification.go
- cloud.go
- common.go
- configadmin.go
- core_service.go
- core_service_synchronize.go
- create.go
- datacollection.go
- delete.go
- eventserver.go
- graphic.go
- group.go
- host.go
- host_apply_rule.go
- hostcontroller.go
- hostlock.go
- hostserver.go
- inst.go
- metadata.go
- netdevice.go
- object.go
- object_controller.go
- operation.go
- page.go
- process.go
- process_bind_info.go
- process_request.go
- procserver.go
- query.go
- querycondition.go
- result.go
- set.go
- set_template.go
- set_template_request.go
- special.go
- taskserver.go
- time.go
- toposerver.go
- transaction.go
- unique.go
- update.go
- webserver.go