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.
Index ¶
- Constants
- Variables
- func GetTags(target interface{}) []string
- func SetValueToMapStrByTags(source interface{}) types.MapStr
- func SetValueToStructByTags(target interface{}, values types.MapStr) error
- type AddConfigQuery
- type AddHistoryResult
- type AddHostFromAgentHostList
- type AssignHostToAppParams
- type Association
- type AssociationParams
- type Attribute
- type AttributeWrapper
- type AuditAppParams
- type AuditHostLogParams
- type AuditHostsLogParams
- type AuditModuleParams
- type AuditModulesParams
- type AuditObjParams
- type AuditObjsParams
- type AuditProcParams
- type AuditProcsParams
- type AuditQueryResult
- type AuditSetParams
- type AuditSetsParams
- type BasePage
- type BaseResp
- type BizInst
- type BkHostInfo
- type Classification
- type ClassificationWithObject
- type CloneHostPropertyParams
- type CloudHostModuleParams
- type CloudInst
- type ConditionItem
- type ConfirmMode
- type Content
- type CreateInstResult
- type CreateModelResult
- type CreateObjectAttributeResult
- type CreateObjectClassificationResult
- type CreateObjectGroupResult
- type CreateObjectResult
- type CreateResult
- type DefaultModuleHostConfigParams
- type DeleteHostBatchOpt
- type DeleteResult
- type DistInst
- type DistInstCtx
- type EventData
- type EventInst
- type EventInstCtx
- type EventType
- type FavoriteResult
- type FavouriteMeta
- type FavouriteParms
- type GetAgentStatusResult
- type GetHistoryResult
- type GetHostAppByCompanyIDParams
- type GetHostFavoriteResult
- type GetHostFavoriteWithIDResult
- type GetHostModuleIDsResult
- type GetHostSnapResult
- type GetHostsResult
- type GetIPAndProxyByCompanyParams
- type GetUserConfigDetailResult
- type GetUserConfigResult
- type GetUserCustomResult
- type GitServerIpParams
- type Gprivilege
- type GraphAsst
- type Group
- type GroupPriviResult
- type GroupPrivilege
- type GseHost
- type GseProcConfigmap
- type GseProcControl
- type GseProcIdentity
- type GseProcMeta
- type GseProcMonitorPlolicy
- type GseProcRequest
- type GseProcResource
- type GseProcRespone
- type GseProcSpec
- type GseProcWarnReportPolicy
- type Header
- type HistoryContent
- type HistoryMeta
- type HistoryResult
- type HostCloneInputParams
- type HostCommonSearch
- type HostConfig
- 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 HostSearchByAppIDParams
- type HostSearchByIPParams
- type HostSearchByModuleIDParams
- type HostSearchBySetIDParams
- type HostSnap
- type HostSnapResult
- type HostSyncList
- type HostToAppModule
- type HostsModuleRelation
- type ID
- type IDResult
- type IPInfo
- type IPParam
- type InnerModule
- type InnterAppTopo
- type InstAsst
- type InstNameAsst
- type InstResult
- type LoginChangeSupplierResult
- type LoginPluginInfo
- type LoginSystemUserInfo
- type LoginUserInfo
- type LoginUserInfoDetail
- type LoginUserInfoOwnerUinList
- type LoginUserInfoResult
- type LoginUserPluginInerface
- type LoginUserPluginParams
- type LogoutRequestParams
- type LogoutResult
- type LonginSystemUserListResult
- type MainLineObject
- type MainlineObjectTopo
- type MainlineObjectTopoResult
- type ModuleHost
- type ModuleHostConfigParams
- type ModuleInst
- 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) GetObjectType() string
- func (o *Object) IsCommon() bool
- func (o *Object) Parse(data types.MapStr) (*Object, error)
- func (o *Object) ToMapStr() types.MapStr
- type ObjectClsDes
- type ObjectDes
- type ObjectTopo
- type OperationLog
- type ParamData
- type ParamSubscriptionSearch
- type ParamSubscriptionTelnet
- type ParamSubscriptionTestCallback
- type PermissionGroupListResult
- type PermissionSystemResponse
- type Position
- type Privilege
- type PrivilegeUserGroup
- type ProcInfoArrResult
- type ProcInstModelResult
- type ProcInstanceModel
- type ProcModuleConfig
- type ProcModuleResult
- type ProcessInst
- type ProcessModule
- type ProcessOperate
- type PropertyGroupCondition
- type PropertyGroupObjectAtt
- type QueryHostLockRequest
- type QueryInput
- type QueryInstResult
- type QueryObjectAssociationResult
- type QueryObjectAttributeResult
- type QueryObjectAttributeWrapperResult
- type QueryObjectClassificationResult
- type QueryObjectClassificationWithObjectsResult
- type QueryObjectGroupResult
- type QueryObjectResult
- type Ref
- type RespError
- type Response
- type RspID
- type RspSubscriptionCreate
- type RspSubscriptionSearch
- type RspSubscriptionTestCallback
- type SearchCondition
- type SearchGroup
- type SearchHost
- type SearchHostIdentifierResult
- type SearchHostResult
- type SearchIdentifierParam
- type SearchInnterAppTopoResult
- type SearchInstResult
- type SearchMainLine
- type SearchModelResult
- type SearchParams
- type SearchTopoGraphicsResult
- type SetHostConfigParams
- type SetInst
- type Statistics
- type Subscription
- type SysConfigStruct
- type TopoGraphics
- func (t *TopoGraphics) FillBlank() *TopoGraphics
- func (t *TopoGraphics) SetBizID(val int)
- 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 TopoItem
- type UpdateGroupCondition
- type UpdateHostParams
- type UpdateResult
- type UserConfig
- type UserConfigMeta
- type UserConfigResult
- type UserCustomQueryDetailResult
- type UserGroup
- type UserPriviResult
- type UserPrivilege
Constants ¶
const ( // AssociationFieldObjectID the association data field definition AssociationFieldObjectID = "bk_obj_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" )
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" AttributeFieldPlaceHoler = "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" ClassFieldClassificationType = "bk_classification_type" ClassFieldClassificationIcon = "bk_classification_icon" )
const ( EventActionCreate = "create" EventActionUpdate = "update" EventActionDelete = "delete" )
EventAction
const ( EventTypeInstData = "instdata" EventTypeRelation = "relation" EventTypeResourcePoolModule = "resource" )
EventType enumeration
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 ( ModelFieldID = "id" ModelFieldObjCls = "bk_classification_id" ModelFieldObjIcon = "bk_obj_icon" ModelFieldObjectID = "bk_obj_id" ModelFieldObjectName = "bk_obj_name" 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" )
const (
CC_time_type_parse_flag = "cc_time_type"
)
Variables ¶
var ( ConfirmmodeHttpstatus = "httpstatus" ConfirmmodeRegular = "regular" )
ConfirmMode define
var DelHostInAppParams struct { AppID string `json:"appId"` HostID string `json:"hostId"` }
var SuccessBaseResp = BaseResp{Result: true, Code: common.CCSuccess, ErrMsg: common.CCSuccessStr}
Functions ¶
func GetTags ¶
func GetTags(target interface{}) []string
GetTags parse a object and get the all tags
func SetValueToMapStrByTags ¶
SetValueToMapStrByTags convert a struct to MapStr by tags
func SetValueToStructByTags ¶
SetValueToStructByTags set the struct object field value by tags
Types ¶
type AddConfigQuery ¶
type AddHistoryResult ¶
type AddHostFromAgentHostList ¶
type AddHostFromAgentHostList struct {
HostInfo map[string]interface{} `json:"host_info"`
}
type AssignHostToAppParams ¶
type Association ¶
type Association struct { ID int64 `field:"id" json:"id" bson:"id"` 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"` AsstForward string `field:"bk_asst_forward" json:"bk_asst_forward" bson:"bk_asst_forward"` AsstObjID string `field:"bk_asst_obj_id" json:"bk_asst_obj_id" bson:"bk_asst_obj_id"` AsstName string `field:"bk_asst_name" json:"bk_asst_name" bson:"bk_asst_name"` ObjectAttID string `field:"bk_object_att_id" json:"bk_object_att_id" bson:"bk_object_att_id"` ClassificationID string `field:"bk_classification_id" bson:"-"` ObjectIcon string `field:"bk_obj_icon" bson:"-"` ObjectName string `field:"bk_obj_name" bson:"-"` }
Association define object association struct
func (*Association) Parse ¶
func (cli *Association) Parse(data types.MapStr) (*Association, error)
Parse load the data from mapstr attribute into attribute instance
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 { 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.Time `json:"create_time" bson:"creaet_time"` LastTime *time.Time `json:"last_time" bson:"last_time"` }
Attribute 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 AuditAppParams ¶
type AuditAppParams struct { Content string `json:"content"` OpDesc string `json:"op_desc"` OpType auditoplog.AuditOpType `json:"op_type"` AppID int64 `json:"inst_id"` }
AuditAppParams add application log parameter
type AuditHostLogParams ¶
type AuditHostLogParams struct { Content interface{} `json:"content"` OpDesc string `json:"op_desc"` InnerIP string `json:"bk_host_innerip"` OpType auditoplog.AuditOpType `json:"op_type"` HostID int64 `json:"inst_id"` }
AuditHostLogParams add single host log parammeter
type AuditHostsLogParams ¶
type AuditHostsLogParams struct { Content []auditoplog.AuditLogExt `json:"content"` OpDesc string `json:"op_desc"` OpType auditoplog.AuditOpType `json:"op_type"` }
AuditHostsLogParams add multiple host log parameter
type AuditModuleParams ¶
type AuditModuleParams struct { Content interface{} `json:"content"` OpDesc string `json:"op_desc"` OpType auditoplog.AuditOpType `json:"op_type"` ModuleID int64 `json:"inst_id"` }
AuditModuleParams add module single log parammete
type AuditModulesParams ¶
type AuditModulesParams struct { Content []auditoplog.AuditLogContext `json:"content"` OpDesc string `json:"op_desc"` OpType auditoplog.AuditOpType `json:"op_type"` }
AuditModuleParams add module multiple log parammete
type AuditObjParams ¶
type AuditObjParams struct { Content interface{} `json:"content"` OpDesc string `json:"op_desc"` OpType auditoplog.AuditOpType `json:"op_type"` OpTarget string `json:"op_target"` InstID int64 `json:"inst_id"` }
AuditObjParams add object single log parameter
type AuditObjsParams ¶
type AuditObjsParams struct { Content []auditoplog.AuditLogContext `json:"content"` OpDesc string `json:"op_desc"` OpType auditoplog.AuditOpType `json:"op_type"` OpTarget string `json:"op_target"` }
AuditObjsParams add object multiple log parameter
type AuditProcParams ¶
type AuditProcParams struct { Content interface{} `json:"content"` OpDesc string `json:"op_desc"` OpType auditoplog.AuditOpType `json:"op_type"` ProcID int64 `json:"inst_id"` }
AuditProcParams add process single log parameter
type AuditProcsParams ¶
type AuditProcsParams struct { Content []auditoplog.AuditLogContext `json:"bk_content"` OpDesc string `json:"bk_op_desc"` OpType auditoplog.AuditOpType `json:"bk_op_type"` }
AuditProcsParams add process multiple log parameter
type AuditQueryResult ¶
type AuditQueryResult struct { BaseResp `json:",inline"` Data struct { Count int `json:"count"` Info []OperationLog `json:"info"` } `json:"data"` }
type AuditSetParams ¶
type AuditSetParams struct { Content interface{} `json:"content"` OpDesc string `json:"op_desc"` OpType auditoplog.AuditOpType `json:"op_type"` SetID int64 `json:"inst_id"` }
AuditSetParams add set single log parameter
type AuditSetsParams ¶
type AuditSetsParams struct { Content []auditoplog.AuditLogContext `json:"content"` OpDesc string `json:"op_desc"` OpType auditoplog.AuditOpType `json:"op_type"` }
AuditSetParams add set multiple log parameter
type BasePage ¶
type BasePage struct { Sort string `json:"sort,omitempty"` Limit int `json:"limit,omitempty"` Start int `json:"start,omitempty"` }
BasePage for paging query
type BkHostInfo ¶
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 types.MapStr) (*Classification, error)
Parse load the data from mapstr classification into classification instance
func (*Classification) ToMapStr ¶
func (cli *Classification) ToMapStr() types.MapStr
ToMapStr to mapstr
type ClassificationWithObject ¶
type ClassificationWithObject struct { Classification `json:",inline"` Objects []Object `json:"bk_objects"` AsstObjects map[string][]Object `json:"bk_asst_objects"` }
ClassificationWithObject classification with object
type CloneHostPropertyParams ¶
type CloudHostModuleParams ¶
type CloudHostModuleParams struct { ApplicationID int64 `json:"bk_biz_id"` HostInfoArr []BkHostInfo `json:"host_info"` ModuleID int64 `json:"bk_module_id"` }
type ConditionItem ¶
type ConditionItem struct { Field string `json:"field,omitempty"` Operator string `json:"operator,omitempty"` Value interface{} `json:"value,omitempty"` }
ConditionItem subcondition
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 Content ¶
type Content struct { PreData interface{} `json:"pre_data"` CurData interface{} `json:"cur_data"` Headers []Header `json:"header"` }
type CreateInstResult ¶
CreateInstResult create inst result
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 CreateResult ¶
type CreateResult struct {
BaseResp `json:",inline"`
}
CreateResult create result
type DeleteHostBatchOpt ¶
type DeleteHostBatchOpt struct {
HostID string `json:"bk_host_id"`
}
type DeleteResult ¶
type DeleteResult struct {
BaseResp `json:",inline"`
}
DeleteResult delete result
type DistInstCtx ¶
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 types.Time `json:"action_time"` ObjType string `json:"obj_type"` Data []EventData `json:"data"` OwnerID string `json:"bk_supplier_account"` RequestID string `json:"request_id"` RequestTime types.Time `json:"request_time"` }
func (*EventInst) MarshalBinary ¶
type EventInstCtx ¶
type FavoriteResult ¶
type FavouriteMeta ¶
type FavouriteMeta struct { 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"` IsDefault int `json:"is_default,omitempty" bson:"is_default,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 GetAgentStatusResult ¶
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 GetHostSnapResult ¶
type GetHostsResult ¶
type GetIPAndProxyByCompanyParams ¶
type GetIPAndProxyByCompanyParams struct { Ips []string `json:"ips"` AppIDStr *string `json:"bk_biz_id"` CloudIDStr *string `json:"bk_cloud_id"` }
GetIPAndProxyByCompanyParams get id and proxy by company
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 GitServerIpParams ¶
type Gprivilege ¶
type Gprivilege struct { ModelConfig map[string]map[string][]string `json:"model_config" bson:"model_config"` SysConfig SysConfigStruct `json:"sys_config,omitempty" bson:"sys_config"` IsHostCrossBiz bool `json:"is_host_cross_biz" bson:"is_host_cross_biz"` }
type GraphAsst ¶
type GraphAsst struct { AsstType string `json:"bk_asst_type"` NodeType string `json:"node_type"` ObjID string `json:"bk_obj_id"` InstID int `json:"bk_inst_id"` ObjAtt string `json:"bk_object_att_id"` AsstName string `json:"bk_asst_name"` Label map[string]string `json:"label"` }
Asst the node association node
type Group ¶
type Group struct { 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"` }
Group group metadata definition
type GroupPriviResult ¶
type GroupPriviResult struct { BaseResp `json:",inline"` Data GroupPrivilege `json:"data"` }
type GroupPrivilege ¶
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 { Meta GseProcMeta `json:"meta,omitempty"` Hosts []GseHost `json:"hosts,omitempty"` OpType int `json:"op_type,omitempty"` Spec GseProcSpec `json:"spec,omitempty"` }
type GseProcResource ¶
type GseProcRespone ¶
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 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 int `json:"count"` Info []HistoryMeta `json:"info"` }
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 []ModuleHost `json:"data"` }
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) 数字 }
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"` // 进程名称 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"` // 启动参数匹配规则 BindModules []int64 `json:"bind_modules" bson:"bind_modules"` // 进程绑定的模块ID,数字数组 }
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"` // 主机名称 SupplierID int64 `json:"bk_supplier_id"` // 开发商ID(bk_supplier_id) 数字 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 string `json:"bk_host_innerip" bson:"bk_host_innerip"` // 内网IP OuterIP string `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"` }
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"` SupplierID int64 `json:"bk_supplier_id"` 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 HostLockResponse ¶
type HostLockResultResponse ¶
type HostSearchByAppIDParams ¶
type HostSearchByAppIDParams struct {
ApplicationID *int64 `json:"bk_biz_id"`
}
HostSearchByAppIDParams host search by app
type HostSearchByIPParams ¶
type HostSearchBySetIDParams ¶
type HostSnapResult ¶
type HostSyncList ¶
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 HostsModuleRelation ¶
type IPInfo ¶
type IPInfo struct { Data []string `json:"data"` Exact int64 `json:"exact"` Flag string `json:"flag"` }
ip search info
type InnerModule ¶
type InnterAppTopo ¶
type InnterAppTopo struct { SetID int64 `json:"bk_set_id"` SetName string `json:"bk_set_name"` Module []InnerModule `json:"module"` }
type InstAsst ¶
type InstAsst struct { ID int64 `field:"id" json:"-"` InstID int64 `field:"bk_inst_id" json:"bk_inst_id"` ObjectID string `field:"bk_obj_id" json:"bk_obj_id"` AsstInstID int64 `field:"bk_asst_inst_id" json:"bk_asst_inst_id"` AsstObjectID string `field:"bk_asst_obj_id" json:"bk_asst_obj_id"` }
InstAsst an association definition between instances.
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"` 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 LoginPluginInfo ¶
type LoginPluginInfo struct { Name string // plugin info Version string // In what version is used //CookieEnv string // Reserved word, not used now, When the cookie has the current key, it is used preferentially. 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) GetUserList(c *gin.Context, config map[string]string) ([]*LoginSystemUserInfo, error) GetLoginUrl(c *gin.Context, config map[string]string, input *LogoutRequestParams) string }
type LoginUserPluginParams ¶
type LogoutRequestParams ¶
type LogoutRequestParams struct {
HTTPScheme string `json:"http_scheme"`
}
type LogoutResult ¶
type LonginSystemUserListResult ¶
type LonginSystemUserListResult struct { BaseResp `json",inline"` Data []*LoginSystemUserInfo `json:"data"` }
type MainLineObject ¶
type MainLineObject struct { ObjectDes `json:",inline"` AssociationID string `json:"bk_asst_obj_id"` }
MainLineObject main line object definition
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 types.MapStr) (*MainlineObjectTopo, error)
Parse load the data from mapstr attribute into attribute instance
func (*MainlineObjectTopo) ToMapStr ¶
func (cli *MainlineObjectTopo) ToMapStr() types.MapStr
ToMapStr to mapstr
type MainlineObjectTopoResult ¶
type MainlineObjectTopoResult struct { BaseResp `json:",inline"` Data []MainlineObjectTopo `json:"data"` }
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 ModuleInst ¶
type ObjAttDes ¶
type ObjAttDes 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"` }
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"` 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.Time `field:"create_time" json:"create_time" bson:"create_time"` LastTime *time.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 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 ObjectDes ¶
type ObjectDes struct { ID int `bson:"id" json:"id"` ObjCls string `bson:"bk_classification_id" json:"bk_classification_id"` ObjIcon string `bson:"bk_obj_icon" json:"bk_obj_icon"` ObjectID string `bson:"bk_obj_id" json:"bk_obj_id"` ObjectName string `bson:"bk_obj_name" json:"bk_obj_name"` IsPre bool `bson:"ispre" json:"ispre"` IsPaused bool `bson:"bk_ispaused" json:"bk_ispaused"` Position string `bson:"position" json:"position"` OwnerID string `bson:"bk_supplier_account" json:"bk_supplier_account"` Description string `bson:"description" json:"description"` Creator string `bson:"creator" json:"creator"` Modifier string `bson:"modifier" json:"modifier"` CreateTime *time.Time `bson:"create_time" json:"create_time"` LastTime *time.Time `bson:"last_time" json:"last_time"` Page *BasePage `bson:"-" json:"page,omitempty"` }
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 OperationLog ¶
type OperationLog struct { OwnerID string `bson:"bk_supplier_account" json:"bk_supplier_account"` ApplicationID int64 `bson:"bk_biz_id" json:"bk_biz_id"` ExtKey string `bson:"ext_key" json:"ext_key"` OpDesc string `bson:"op_desc" json:"op_desc"` OpType int `bson:"op_type" json:"op_type"` OpTarget string `bson:"op_target" json:"op_target"` Content interface{} `bson:"content" json:"content"` User string `bson:"operator" json:"operator"` OpFrom string `bson:"op_from" json:"op_from"` ExtInfo string `bson:"ext_info" json:"ext_info"` CreateTime time.Time `bson:"op_time" json:"op_time"` InstID int64 `bson:"inst_id" json:"inst_id"` }
OperationLog opeartion log item definition
func (OperationLog) TableName ¶
func (OperationLog) TableName() string
TableName return the table name
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 Privilege ¶
type Privilege struct { ModelConfig map[string]map[string][]string `json:"model_config,omitempty" bson:"model_config"` SysConfig *SysConfigStruct `json:"sys_config,omitempty" bson:"sys_config"` }
type PrivilegeUserGroup ¶
type PrivilegeUserGroup struct { SupplierAccount string `field:"bk_supplier_account" json:"bk_supplier_account" bson:"bk_supplier_account"` GroupID string `field:"group_id" json:"group_id" bson:"bk_supplier_account"` ModelConfig types.MapStr `field:"model_config" json:"model_config" bson:"model_config"` SystemConfig types.MapStr `field:"sys_config" json:"sys_config" bson:"sys_config"` }
PrivilegeUserGroup the user group permission configure
func (*PrivilegeUserGroup) Parse ¶
func (p *PrivilegeUserGroup) Parse(data types.MapStr) (*PrivilegeUserGroup, error)
Parse load the data from mapstr object into object instance
func (*PrivilegeUserGroup) ToMapStr ¶
func (p *PrivilegeUserGroup) ToMapStr() types.MapStr
ToMapStr to mapstr
type ProcInfoArrResult ¶
type ProcInstModelResult ¶
type ProcInstModelResult struct { BaseResp `json:",inline"` Data []ProcInstanceModel `json:"data"` }
type ProcInstanceModel ¶
type ProcInstanceModel struct { ApplicationID uint64 `json: "bk_biz_id" bson:"bk_biz_id"` SetID uint64 `json: "bk_set_id" bson:"bk_set_id,omitempty"` SetName string `json: "bk_set_name" bson:"bk_set_name"` ModuleID uint64 `json: "bk_module_id" bson:"bk_module_id,omitempty"` ModuleName string `json: "bk_module_name" bson:"bk_module_name"` ProcID uint64 `json: "bk_process_id" bson:"bk_process_id"` FuncID uint64 `json: "bk_func_id" bson:"bk_func_id"` InstanceID uint64 `json: "bk_instance_id" bson:"bk_instance_id"` HostId uint64 `json: "bk_host_id" bson:"bk_host_id"` }
type ProcModuleConfig ¶
type ProcModuleResult ¶
type ProcModuleResult struct { BaseResp `json:",inline"` Data []ProcModuleConfig `json:"data"` }
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 ProcessModule ¶
type ProcessOperate ¶
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 `json:"bk_supplier_account"` ObjectID string `json:"bk_obj_id"` PropertyID string `json:"bk_property_id"` } `json:"condition"` Data struct { PropertyGroupID string `json:"bk_property_group"` PropertyIndex int `json:"bk_property_index"` } `json:"data"` }
PropertyGroupObjectAtt uset to update or delete the property group object attribute
type QueryHostLockRequest ¶
type QueryInput ¶
type QueryInput struct { Condition interface{} `json:"condition"` Fields string `json:"fields,omitempty"` Start int `json:"start,omitempty"` Limit int `json:"limit,omitempty"` Sort string `json:"sort,omitempty"` }
func (*QueryInput) ConvTime ¶
func (o *QueryInput) ConvTime() error
ConvTime ??????????cc_type key ??????time.Time
type QueryInstResult ¶
type QueryInstResult struct { BaseResp `json:",inline"` Data InstResult `json:"data"` }
QueryInstResult query inst result
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 Response ¶
type Response struct { BaseResp `json:",inline"` Data interface{} `json:"data"` }
func NewSuccessResp ¶
func NewSuccessResp(data interface{}) *Response
data is the data you want to return to client.
type RspSubscriptionCreate ¶
type RspSubscriptionSearch ¶
type RspSubscriptionSearch struct { Count int `json:"count"` Info []Subscription `json:"info"` }
type SearchCondition ¶
type SearchCondition struct { Fields []string `json:"fields"` Condition []ConditionItem `json:"condition"` ObjectID string `json:"bk_obj_id"` }
search condition
type SearchGroup ¶
type SearchHost ¶
type SearchHostIdentifierResult ¶
type SearchHostIdentifierResult struct { BaseResp `json:",inline"` Data struct { Count int `json:"count"` Info []HostIdentifier `json:"info"` } `json:"data"` }
type SearchHostResult ¶
type SearchHostResult struct { BaseResp `json:",inline"` Data SearchHost `json:"data"` }
type SearchIdentifierParam ¶
SearchIdentifierParam defines the param
type SearchInnterAppTopoResult ¶
type SearchInnterAppTopoResult struct { BaseResp `json:",inline"` Data InnterAppTopo }
type SearchInstResult ¶
type SearchInstResult struct { BaseResp `json",inline"` Data InstResult `json:"data"` }
type SearchMainLine ¶
type SearchModelResult ¶
type SearchParams ¶
type SearchParams struct { Condition map[string]interface{} `json:"condition"` Page map[string]interface{} `json:"page,omitempty"` Fields []string `json:"fields,omitempty"` Native int `json:"native,omitempty"` }
common search struct
type SearchTopoGraphicsResult ¶
type SearchTopoGraphicsResult struct { BaseResp `json:",inline"` Data []TopoGraphics `json:"data"` }
type SetHostConfigParams ¶
type Statistics ¶
Report define sending statistic
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"` TimeOut int64 `bson:"time_out" json:"time_out"` // second SubscriptionForm string `bson:"subscription_form" json:"subscription_form"` // json format Operator string `bson:"operator" json:"operator"` OwnerID string `bson:"bk_supplier_account" json:"bk_supplier_account"` LastTime *types.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 SysConfigStruct ¶
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,omitempty" bson:"node_type,omitempty"` // obj inst ObjID *string `json:"bk_obj_id,omitempty" bson:"bk_obj_id,omitempty"` IsPre *bool `json:"ispre,omitempty" bson:"ispre,omitempty"` InstID *int `json:"bk_inst_id,omitempty" bson:"bk_inst_id,omitempty"` NodeName *string `json:"node_name,omitempty" bson:"node_name,omitempty"` Position *Position `json:"position,omitempty" bson:"position,omitempty"` Ext map[string]interface{} `json:"ext,omitempty" bson:"ext,omitempty"` Icon *string `json:"bk_obj_icon,omitempty" bson:"bk_obj_icon,omitempty"` BizID *int `json:"bk_biz_id,omitempty" bson:"bk_biz_id,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) SetBizID ¶
func (t *TopoGraphics) SetBizID(val int)
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"` }
TopoInst 实例拓扑结构
type TopoInstRst ¶
type TopoInstRst struct { TopoInst `json:",inline"` Child []*TopoInstRst `json:"child"` }
TopoInstRst 拓扑实例
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 UpdateGroupCondition ¶
type UpdateGroupCondition struct { Condition struct { ID int64 `json:"id,omitempty"` GroupID string `json:"bk_group_id,omitempty"` ObjID string `json:"bk_obj_id,omitempty"` } `json:"condition"` Data struct { Name string `json:"bk_group_name,omitempty"` Index int64 `json:"bk_group_index"` } `json:"data"` }
UpdateGroupCondition update group condition struct
type UpdateHostParams ¶
type UpdateHostParams struct { ProxyList []interface{} `json:"bk_proxy_list"` CloudID int64 `json:"bk_cloud_id"` }
type UpdateResult ¶
type UpdateResult struct {
BaseResp `json:",inline"`
}
UpdateResult 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 int `json:"count"` Info []interface{} `json:"info"` }
type UserGroup ¶
type UserGroup struct { GroupName string `field:"group_name" json:"group_name" bson:"group_name"` UserList string `field:"user_list" json:"user_list" bson:"user_list"` SupplierAccount string `field:"bk_supplier_account" json:"bk_supplier_account" bson:"bk_supplier_account"` GroupID string `field:"group_id" json:"group_id" bson:"group_id"` }
UserGroup the privilege user group definition
type UserPriviResult ¶
type UserPriviResult struct { Result bool `json:"result"` Code int `json:"code"` Message interface{} `json:"message"` Data UserPrivilege `json:"data"` }
type UserPrivilege ¶
type UserPrivilege struct { GroupID string `json:"bk_group_id" bson:"bk_group_id"` ModelConfig map[string]map[string][]string `json:"model_config" bson:"model_config"` SysConfig SysConfigStruct `json:"sys_config" bson:"sys_config"` }