metadata

package
v0.0.0-...-be0592b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2019 License: GPL-3.0 Imports: 25 Imported by: 0

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.

Index

Constants

View Source
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"
)
View Source
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"
)
View Source
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"
)
View Source
const (
	ClassificationFieldID                   = "id"
	ClassFieldClassificationID              = "bk_classification_id"
	ClassFieldClassificationName            = "bk_classification_name"
	ClassFieldClassificationType            = "bk_classification_type"
	ClassFieldClassificationIcon            = "bk_classification_icon"
	ClassFieldClassificationSupplierAccount = "bk_supplier_account"
)
View Source
const (
	EventActionCreate = "create"
	EventActionUpdate = "update"
	EventActionDelete = "delete"
)

EventAction

View Source
const (
	EventTypeInstData           = "instdata"
	EventTypeRelation           = "relation"
	EventTypeAssociation        = "association"
	EventTypeResourcePoolModule = "resource"
)

EventType enumeration

View Source
const (
	EventObjTypeProcModule     = "processmodule"
	EventObjTypeModuleTransfer = "moduletransfer"
)

Event object type

View Source
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"
)
View Source
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"
)
View Source
const (
	BKMetadata string = "metadata"
	BKLabel    string = "label"
)
View Source
const (
	CollectorStatusNormal   = "normal"
	CollectorStatusAbnormal = "abnormal"

	CollectorConfigStatusNormal   = "normal"
	CollectorConfigStatusPending  = "pending"
	CollectorConfigStatusAbnormal = "abnormal"

	CollectorReportStatusNormal   = "normal"
	CollectorReportStatusAbnormal = "abnormal"
)

NetcollectorStatus define

View Source
const (
	ReporctActionCreate = "create"
	ReporctActionUpdate = "update"
	ReporctActionDelete = "delete"
)
View Source
const (
	ReporctMethodAccept = "accept"
	ReporctMethodIgnore = "ignore"
)
View Source
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"
)
View Source
const (
	PageName         = "page"
	PageSort         = "sort"
	PageStart        = "start"
	DBFields         = "fields"
	DBQueryCondition = "condition"
)
View Source
const (
	UniqueKeyKindProperty    = "property"
	UniqueKeyKindAssociation = "association"
)
View Source
const (
	CC_time_type_parse_flag = "cc_time_type"
)

Variables

View Source
var (
	ConfirmmodeHttpstatus = "httpstatus"
	ConfirmmodeRegular    = "regular"
)

ConfirmMode define

View Source
var BizLabelNotExist = mapstr.MapStr{"metadata.label.bk_biz_id": mapstr.MapStr{"$exists": false}}
View Source
var DelHostInAppParams struct {
	AppID  string `json:"appId"`
	HostID string `json:"hostId"`
}
View Source
var (
	LabelKeyNotExistError = errors.New("label key does not exist")
)
View Source
var SuccessBaseResp = BaseResp{Result: true, Code: common.CCSuccess, ErrMsg: common.CCSuccessStr}

SuccessBaseResp default result

Functions

func BizIDFromMetadata

func BizIDFromMetadata(meta Metadata) (int64, error)

func GetBusinessIDFromMeta

func GetBusinessIDFromMeta(data interface{}) string

func GetInstIDFieldByObjID

func GetInstIDFieldByObjID(objID string) string

func NewPublicOrBizConditionByBizID

func NewPublicOrBizConditionByBizID(businessID int64) mapstr.MapStr

NewPublicOrBizConditionByBizID new a query condition

func ParseBizIDFromData

func ParseBizIDFromData(rawData mapstr.MapStr) (int64, error)

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 PublicAndBizCondition

func PublicAndBizCondition(meta Metadata) mapstr.MapStr

Types

type AddConfigQuery

type AddConfigQuery struct {
	AppID      int64  `json:"bk_biz_id,omitempty"`
	Info       string `json:"info,omitempty"`
	Name       string `json:"name,omitempty"`
	CreateUser string `json:"create_user,omitempty"`
}

type AddDeviceResult

type AddDeviceResult struct {
	DeviceID uint64 `json:"device_id"`
}

type AddHistoryResult

type AddHistoryResult struct {
	BaseResp `json:",inline"`
	Data     ID `json:"data"`
}

type AddHostFromAgentHostList

type AddHostFromAgentHostList struct {
	HostInfo map[string]interface{} `json:"host_info"`
}

type AddNetPropertyResult

type AddNetPropertyResult struct {
	NetcollectPropertyID uint64 `json:"netcollect_property_id"`
}

type AppQueryResult

type AppQueryResult struct {
	BaseResp `json:",inline"`
	Data     InstResult `json:"data"`
}

type AssignHostToAppParams

type AssignHostToAppParams struct {
	ApplicationID      int64   `json:"bk_biz_id"`
	HostID             []int64 `json:"bk_host_id"`
	ModuleID           int64   `json:"bk_module_id"`
	OwnerApplicationID int64   `json:"bk_owner_biz_id"`
	OwnerModuleID      int64   `json:"bk_owner_module_id"`
}

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:"-"`

	//	define the metadata of assocication
	Metadata `field:"metadata" json:"metadata" bson:"metadata"`
}

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

func (*Association) ToMapStr

func (cli *Association) ToMapStr() mapstr.MapStr

ToMapStr to mapstr

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 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"`
	//	define the metadata of association kind
	Metadata `field:"metadata" json:"metadata" bson:"metadata"`
}

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 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 {
	Metadata          `field:"metadata" json:"metadata" bson:"metadata"`
	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) Parse

func (cli *Attribute) Parse(data mapstr.MapStr) (*Attribute, error)

Parse load the data from mapstr attribute into attribute instance

func (*Attribute) ToMapStr

func (cli *Attribute) ToMapStr() mapstr.MapStr

ToMapStr to mapstr

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 AuditQueryResult

type AuditQueryResult struct {
	BaseResp `json:",inline"`
	Data     struct {
		Count int            `json:"count"`
		Info  []OperationLog `json:"info"`
	} `json:"data"`
}

AuditQueryResult add single host log paramm

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"`
	// the detailed reason for this authorize.
	Reason string `json:"reason"`
}

type AuthResource

type AuthResource struct {
	BizID        int64  `json:"bk_biz_id"`
	ResourceType string `json:"resource_type"`
	ResourceID   int64  `json:"resource_id"`
	Action       string `json:"action"`
	ParentLayers []struct {
		ResourceType string `json:"resource_type"`
		ResourceID   int64  `json:"resource_id"`
	} `json:"parent_layers"`
}

type BasePage

type BasePage struct {
	Sort  string `json:"sort,omitempty"`
	Limit int    `json:"limit,omitempty"`
	Start int    `json:"start,omitempty"`
}

BasePage for paging query

func ParsePage

func ParsePage(origin interface{}) BasePage

type BaseResp

type BaseResp struct {
	Result      bool         `json:"result"`
	Code        int          `json:"bk_error_code"`
	ErrMsg      string       `json:"bk_error_msg"`
	Permissions []Permission `json:"permission"`
}

BaseResp common result struct

func NewNoPermissionResp

func NewNoPermissionResp(permission []Permission) BaseResp

type BatchAddDevice

type BatchAddDevice struct {
	Data []NetcollectDevice `json:"data"`
}

type BatchAddDeviceResult

type BatchAddDeviceResult struct {
	Result   bool   `json:"result"`
	ErrMsg   string `json:"error_msg"`
	DeviceID uint64 `json:"device_id"`
}

type BatchAddNetProperty

type BatchAddNetProperty struct {
	Data []NetcollectProperty `json:"data"`
}

type BatchAddNetPropertyResult

type BatchAddNetPropertyResult struct {
	Result               bool   `json:"result"`
	ErrMsg               string `json:"error_msg"`
	NetcollectPropertyID uint64 `json:"netcollect_property_id"`
}

type BizInst

type BizInst struct {
	BizID           int64  `bson:"bk_biz_id"`
	BizName         string `bson:"bk_biz_name"`
	SupplierID      int64  `bson:"bk_supplier_id"`
	SupplierAccount string `bson:"bk_supplier_account"`
}

type BkHostInfo

type BkHostInfo struct {
	IP      string `json:"bk_host_innerip"`
	CloudID int    `json:"bk_cloud_id"`
}

type Classification

type Classification struct {
	Metadata           `field:"metadata" json:"metadata" bson:"metadata"`
	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"`
	AsstObjects    map[string][]Object `json:"bk_asst_objects"`
}

ClassificationWithObject classification with object

type CloneHostPropertyParams

type CloneHostPropertyParams struct {
	AppID   int64  `json:"bk_biz_id"`
	OrgIP   string `json:"bk_org_ip"`
	DstIP   string `json:"bk_dst_ip"`
	CloudID int64  `json:"bk_cloud_id"`
}

type CloudHistory

type CloudHistory struct {
	ObjID       string `json:"bk_obj_id"`
	Status      string `json:"bk_status"`
	TimeConsume string `json:"bk_time_consume"`
	NewAdd      int    `json:"new_add"`
	AttrChanged int    `json:"attr_changed"`
	StartTime   string `json:"bk_start_time"`
	TaskID      int64  `json:"bk_task_id"`
	HistoryID   int64  `json:"bk_history_id"`
	FailReason  string `json:"fail_reason"`
}

type CloudHostInfo

type CloudHostInfo struct {
	PrivateIpAddresses []string `json:"PrivateIpAddresses"`
	PublicIpAddresses  []string `json:"PublicIpAddresses"`
	OsName             string   `json:"OsName"`
}

type CloudHostModuleParams

type CloudHostModuleParams struct {
	ApplicationID int64        `json:"bk_biz_id"`
	HostInfoArr   []BkHostInfo `json:"host_info"`
	ModuleID      int64        `json:"bk_module_id"`
}

type CloudInst

type CloudInst struct {
	CloudID   int64  `bson:"bk_cloud_id"`
	CloudName string `bson:"bk_cloud_name"`
}

type CloudSyncRedisAlreadyStarted

type CloudSyncRedisAlreadyStarted struct {
	LastSyncTime time.Time   `json:"last_sync_time"`
	NewHeader    http.Header `json:"new_header"`
	TaskID       int64       `json:"bk_task_id"`
	TaskItemInfo TaskInfo    `json:"task_item_info"`
	OwnerID      string      `json:"bk_supplier_account"`
}

type CloudSyncRedisPendingStart

type CloudSyncRedisPendingStart struct {
	NewHeader    http.Header `json:"new_header"`
	TaskID       int64       `json:"bk_task_id"`
	TaskItemInfo TaskInfo    `json:"task_item_info"`
	OwnerID      string      `json:"bk_supplier_account"`
}

type CloudSyncRedisPendingStop

type CloudSyncRedisPendingStop struct {
	TaskID  int64  `json:"bk_task_id"`
	OwnerID string `json:"bk_supplier_account"`
}

type CloudTaskInfo

type CloudTaskInfo struct {
	User            string `json:"bk_user" bson:"bk_user"`
	TaskName        string `json:"bk_task_name" bson:"bk_task_name"`
	TaskID          int64  `json:"bk_task_id" bson:"bk_task_id"`
	AccountType     string `json:"bk_account_type" bson:"bk_account_type"`
	AccountAdmin    string `json:"bk_account_admin" bson:"bk_account_admin"`
	PeriodType      string `json:"bk_period_type" bson:"bk_period_type"`
	Period          string `json:"bk_period" bson:"bk_period"`
	LastSyncTime    string `json:"bk_last_sync_time" bson:"bk_last_sync_time"`
	ObjID           string `json:"bk_obj_id" bson:"bk_obj_id"`
	Status          bool   `json:"bk_status" bson:"bk_status"`
	ResourceConfirm bool   `json:"bk_confirm" bson:"bk_confirm"`
	AttrConfirm     bool   `json:"bk_attr_confirm" bson:"bk_attr_confirm"`
	SecretID        string `json:"bk_secret_id" bson:"bk_secret_id"`
	SecretKey       string `json:"bk_secret_key" bson:"bk_secret_key"`
	SyncStatus      string `json:"bk_sync_status" bson:"bk_sync_status"`
	NewAdd          int64  `json:"new_add" bson:"new_add"`
	AttrChanged     int64  `json:"attr_changed" bson:"attr_changed"`
	OwnerID         string `json:"bk_supplier_account" bson:"bk_supplier_account"`
}

type CloudTaskList

type CloudTaskList struct {
	User            string `json:"bk_user"`
	TaskName        string `json:"bk_task_name"`
	TaskID          int64  `json:"bk_task_id"`
	AccountType     string `json:"bk_account_type"`
	AccountAdmin    string `json:"bk_account_admin"`
	PeriodType      string `json:"bk_period_type"`
	Period          string `json:"bk_period"`
	LastSyncTime    string `json:"bk_last_sync_time"`
	ObjID           string `json:"bk_obj_id"`
	Status          bool   `json:"bk_status"`
	ResourceConfirm bool   `json:"bk_confirm"`
	AttrConfirm     bool   `json:"bk_attr_confirm"`
	SecretID        string `json:"bk_secret_id"`
	SecretKey       string `json:"bk_secret_key"`
}

type CloudTaskSearch

type CloudTaskSearch struct {
	Count uint64          `json:"count"`
	Info  []CloudTaskInfo `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 ConfirmMode

type ConfirmMode string

ConfirmMode define

func (*ConfirmMode) Scan

func (n *ConfirmMode) Scan(value interface{}) error

Scan implement sql driver's Scan interface

func (ConfirmMode) Value

func (n ConfirmMode) Value() (driver.Value, error)

Value implement sql driver's Value interface

type Content

type Content struct {
	PreData interface{} `json:"pre_data"`
	CurData interface{} `json:"cur_data"`
	Headers []Header    `json:"header"`
}

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 CreateAssociationInstResult

type CreateAssociationInstResult struct {
	BaseResp `json:",inline"`
	Data     RspID `json:"data"`
}

type CreateAssociationKind

type CreateAssociationKind struct {
	Data AssociationKind `json:"data"`
}

type CreateAssociationObjectResult

type CreateAssociationObjectResult struct {
	BaseResp `json:",inline"`
	Data     RspID `json:"data"`
}

type CreateAssociationTypeResult

type CreateAssociationTypeResult struct {
	BaseResp `json:",inline"`
	Data     RspID `json:"data"`
}

type CreateInstResult

type CreateInstResult struct {
	BaseResp `json:",inline"`
	Data     mapstr.MapStr `json:"data"`
}

CreateInstResult create inst result

type CreateManyAssociationKind

type CreateManyAssociationKind struct {
	Datas []AssociationKind `json:"datas"`
}

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 CreateManyModelInstance struct {
	Datas []mapstr.MapStr `json:"datas"`
}

type CreateModel

type CreateModel struct {
	Spec       Object      `json:"spec"`
	Attributes []Attribute `json:"attributes"`
}

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 CreateModelInstance struct {
	Data mapstr.MapStr `json:"data"`
}

type CreateModelResult

type CreateModelResult struct {
	BaseResp `json:",inline"`
	Data     Object `json:"data"`
}

type CreateObjectAttributeResult

type CreateObjectAttributeResult struct {
	BaseResp `json:",inline"`
	Data     RspID `json:"data"`
}

CreateObjectAttributeResult create object attribute result

type CreateObjectClassificationResult

type CreateObjectClassificationResult struct {
	BaseResp `json:",inline"`
	Data     RspID `json:"data"`
}

CreateObjectClassificationResult create the object classification result

type CreateObjectGroupResult

type CreateObjectGroupResult struct {
	BaseResp `json:",inline"`
	Data     RspID `json:"data"`
}

CreateObjectGroupResult create the object group result

type CreateObjectResult

type CreateObjectResult struct {
	BaseResp `json:",inline"`
	Data     RspID `json:"data"`
}

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 CreateResult

type CreateResult struct {
	BaseResp `json:",inline"`
	Data     []Association `json:"data"`
}

CreateResult create result

type CreateUniqueRequest

type CreateUniqueRequest struct {
	ObjID     string      `json:"bk_obj_id" bson:"bk_obj_id"`
	MustCheck bool        `json:"must_check" bson:"must_check"`
	Keys      []UniqueKey `json:"keys" bson:"keys"`
	Metadata  `field:"metadata" json:"metadata" bson:"metadata"`
}

type CreateUniqueResult

type CreateUniqueResult struct {
	BaseResp
	Data RspID `json:"data"`
}

type CreatedCount

type CreatedCount struct {
	Count uint64 `json:"created_count"`
}

CreatedCount created count struct

type CreatedDataResult

type CreatedDataResult struct {
	OriginIndex int64  `json:"origin_index"`
	ID          uint64 `json:"id"`
}

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 DefaultModuleHostConfigParams

type DefaultModuleHostConfigParams struct {
	ApplicationID int64    `json:"bk_biz_id"`
	HostID        []int64  `json:"bk_host_id"`
	Metadata      Metadata `field:"metadata" json:"metadata" bson:"metadata"`
}

type DeleteAssociationInstRequest

type DeleteAssociationInstRequest struct {
	Condition mapstr.MapStr `json:"condition"`
}

type DeleteAssociationInstResult

type DeleteAssociationInstResult struct {
	BaseResp `json:",inline"`
	Data     string `json:"data"`
}

type DeleteAssociationObjectResult

type DeleteAssociationObjectResult struct {
	BaseResp `json:",inline"`
	Data     string `json:"data"`
}

type DeleteAssociationTypeResult

type DeleteAssociationTypeResult struct {
	BaseResp `json:",inline"`
	Data     string `json:"data"`
}

type DeleteCloudTask

type DeleteCloudTask struct {
	TaskID int64 `json:"bk_task_id"`
}

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 {
	Metadata `field:"metadata" json:"metadata" bson:"metadata"`
}

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

type DeleteOption struct {
	Condition mapstr.MapStr `json:"condition"`
}

DeleteOption common delete condition options

type DeleteResult

type DeleteResult struct {
	BaseResp `json:",inline"`
}

DeleteResult delete result

type DeleteUniqueRequest

type DeleteUniqueRequest struct {
	ID    uint64 `json:"id"`
	ObjID string `json:"bk_obj_id"`
}

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 Dimension

type Dimension struct {
	AppID int64 `json:"bk_biz_id"`
}

type DistInst

type DistInst struct {
	EventInst
	DstbID         int64 `json:"distribution_id"`
	SubscriptionID int64 `json:"subscription_id"`
}

type DistInstCtx

type DistInstCtx struct {
	DistInst
	Raw string
}

type EsbBaseResponse

type EsbBaseResponse struct {
	Result       bool   `json:"result"`
	Code         int    `json:"code"`
	Message      string `json:"message"`
	EsbRequestID string `json:"request_id"`
}

type EsbResponse

type EsbResponse struct {
	EsbBaseResponse `json:",inline"`
	Data            mapstr.MapStr `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"`
	TxnID       string      `json:"txn_id"`
	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"`
	RequestID   string      `json:"request_id"`
	RequestTime Time        `json:"request_time"`
}

func (*EventInst) GetType

func (e *EventInst) GetType() string

func (*EventInst) MarshalBinary

func (e *EventInst) MarshalBinary() (data []byte, err error)

type EventInstCtx

type EventInstCtx struct {
	EventInst
	Raw string
}

type EventType

type EventType string

EventType define

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 FavoriteResult struct {
	Count uint64                   `json:"count"`
	Info  []map[string]interface{} `json:"info"`
}

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 FavouriteParms struct {
	ID          string `json:"id,omitempty"`
	Info        string `json:"info,omitempty"`
	QueryParams string `json:"query_params,omitempty"`
	Name        string `json:"name,omitempty"`
	IsDefault   int    `json:"is_default,omitempty"`
	Count       int    `json:"count,omitempty"`
}

type FilePriviewMap

type FilePriviewMap struct {
	Content string `json:"content"`
	Inst    string `json:"inst"`
}

type GetAgentStatusResult

type GetAgentStatusResult struct {
	AgentNorCnt    int                      `json:"agentNorCnt"`
	AgentAbnorCnt  int                      `json:"agentAbnorCnt"`
	AgentNorList   []map[string]interface{} `json:"agentNorList"`
	AgentAbnorList []map[string]interface{} `json:"agentAbnorList"`
}

type GetHistoryResult

type GetHistoryResult struct {
	BaseResp `json:",inline"`
	Data     HistoryResult `json:"data"`
}

type GetHostAppByCompanyIDParams

type GetHostAppByCompanyIDParams struct {
	CompaynID  string `json:"bk_supplier_account"`
	IPs        string `json:"ip"`
	CloudIDStr string `json:"bk_cloud_id"`
}

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 GetHostModuleIDsResult struct {
	BaseResp `json:",inline"`
	Data     []int64 `json:"data"`
}

type GetHostSnapResult

type GetHostSnapResult struct {
	BaseResp `json:",inline"`
	Data     HostSnap `json:"data"`
}

type GetHostsResult

type GetHostsResult struct {
	BaseResp `json:",inline"`
	Data     HostInfo `json:"data"`
}

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 GetUserCustomResult struct {
	BaseResp `json:",inline"`
	Data     map[string]interface{} `json:"data"`
}

type GitServerIpParams

type GitServerIpParams struct {
	AppName    string `json:"bk_biz_name"`
	SetName    string `json:"bk_set_name"`
	ModuleName string `json:"bk_module_name"`
}

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                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 {
	Metadata   `field:"metadata" json:"metadata" bson:"metadata"`
	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

func (*Group) Parse

func (cli *Group) Parse(data mapstr.MapStr) (*Group, error)

Parse load the data from mapstr group into group instance

func (*Group) ToMapStr

func (cli *Group) ToMapStr() mapstr.MapStr

ToMapStr to mapstr

type GroupPriviResult

type GroupPriviResult struct {
	BaseResp `json:",inline"`
	Data     GroupPrivilege `json:"data"`
}

type GroupPrivilege

type GroupPrivilege struct {
	GroupID   string     `json:"group_id" bson:"group_id"`
	OwnerID   string     `json:"bk_supplier_account" bson:"bk_supplier_account"`
	Privilege *Privilege `json:"privilege"`
}

type GseHost

type GseHost struct {
	HostID       int64  `json:"bk_host_id,omitempty"`
	Ip           string `json:"ip,omitempty"`
	BkCloudId    int64  `json:"bk_cloud_id"`
	BkSupplierId int64  `json:"bk_supplier_id"`
}

type GseProcConfigmap

type GseProcConfigmap struct {
	Path string `json:"path,omitempty"`
	Md5  string `json:"md5,omitempty"`
}

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 GseProcMeta struct {
	Namespace string            `json:"namespace,omitempty"`
	Name      string            `json:"name,omitempty"`
	Labels    map[string]string `json:"labels,omitempty"`
}

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 GseProcResource struct {
	Cpu  float64 `json:"cpu,omitempty"`
	Mem  float64 `json:"mem,omitempty"`
	Fd   int     `json:"fd,omitempty"`
	Disk int     `json:"disk,omitempty"`
	Net  int     `json:"net,omitempty"`
}

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 Header struct {
	PropertyID   string `json:"bk_property_id"`
	PropertyName string `json:"bk_property_name"`
}

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 HostCloneInputParams

type HostCloneInputParams struct {
	OrgIP  string `json:"bk_org_ip"`
	DstIP  string `json:"bk_dst_ip"`
	AppID  int64  `json:"bk_biz_id"`
	PlatID int64  `json:"bk_cloud_id"`
}

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 HostInfo

type HostInfo struct {
	Count int             `json:"count"`
	Info  []mapstr.MapStr `json:"info"`
}

type HostInputType

type HostInputType string
const (
	ExecelType  HostInputType = "excel"
	CollectType HostInputType = "collect"
)

type HostInstanceProperties

type HostInstanceProperties struct {
	PropertyID    string      `json:"bk_property_id"`
	PropertyName  string      `json:"bk_property_name"`
	PropertyValue interface{} `json:"bk_property_value"`
}

type HostInstancePropertiesResult

type HostInstancePropertiesResult struct {
	BaseResp `json:",inline"`
	Data     []HostInstanceProperties `json:"data"`
}

type HostInstanceResult

type HostInstanceResult struct {
	BaseResp `json:",inline"`
	Data     map[string]interface{} `json:"data"`
}

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 HostLockData struct {
	User       string    `json:"bk_user" bson:"bk_user"`
	IP         string    `json:"bk_host_innerip" bson:"bk_host_innerip"`
	CloudID    int64     `json:"bk_cloud_id" bson:"bk_cloud_id"`
	CreateTime time.Time `json:"create_time" bson:"create_time"`
	OwnerID    string    `json:"-" bson:"bk_supplier_account"`
}

type HostLockQueryResponse

type HostLockQueryResponse struct {
	BaseResp `json:",inline"`
	Data     struct {
		Info  []HostLockData `json:"info"`
		Count int64          `json:"count"`
	}
}

type HostLockRequest

type HostLockRequest struct {
	IPS     []string `json:"ip_list"`
	CloudID int64    `json:"bk_cloud_id"`
}

type HostLockResponse

type HostLockResponse struct {
	BaseResp `json:",inline"`
	Data     mapstr.MapStr `json:"data"`
}

type HostLockResultResponse

type HostLockResultResponse struct {
	BaseResp `json:",inline"`
	Data     map[string]bool `json:"data"`
}

type HostModuleFind

type HostModuleFind struct {
	ModuleIDS []int64  `json:"bk_module_ids"`
	Metadata  Metadata `json:"metadata"`
	Page      BasePage `json:"page"`
}

type HostModuleRelationParameter

type HostModuleRelationParameter struct {
	AppID  int64   `json:"bk_biz_id"`
	HostID []int64 `json:"bk_host_id"`
}

HostModuleRelationParameter get host and module relation parameter

type HostModuleRelationRequest

type HostModuleRelationRequest struct {
	ApplicationID int64   `json:"bk_biz_id"`
	SetIDArr      []int64 `json:"bk_set_ids"`
	HostIDArr     []int64 `json:"bk_host_ids"`
	ModuleIDArr   []int64 `json:"bk_module_ids"`
}

HostModuleRelationRequest gethost module relation request parameter

func (*HostModuleRelationRequest) Empty

func (h *HostModuleRelationRequest) Empty() bool

Empty empty struct

type HostResponse

type HostResponse struct {
	HostResponse InstanceSet `json:"Response"`
}

type HostSearchByAppIDParams

type HostSearchByAppIDParams struct {
	ApplicationID *int64 `json:"bk_biz_id"`
}

HostSearchByAppIDParams host search by app

type HostSearchByIPParams

type HostSearchByIPParams struct {
	IpList  []string `json:"ip_list"`
	CloudID *int64   `json:"bk_cloud_id"`
	AppID   []int64  `json:"bk_biz_id"`
}

type HostSearchByModuleIDParams

type HostSearchByModuleIDParams struct {
	ApplicationID *int64  `json:"bk_biz_id"`
	ModuleID      []int64 `json:"bk_module_id"`
}

type HostSearchBySetIDParams

type HostSearchBySetIDParams struct {
	ApplicationID *int64  `json:"bk_biz_id"`
	SetID         []int64 `json:"bk_set_id"`
}

type HostSnap

type HostSnap struct {
	Data string `json:"data"`
}

type HostSnapResult

type HostSnapResult struct {
	BaseResp `json:",inline"`
	Data     map[string]interface{} `json:"data"`
}

type HostSyncList

type HostSyncList struct {
	ApplicationID int64                            `json:"bk_biz_id"`
	HostInfo      map[int64]map[string]interface{} `json:"host_info"`
	SupplierID    int64                            `json:"bk_supplier_id"`
	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 HostsModuleRelation

type HostsModuleRelation struct {
	ApplicationID int64   `json:"bk_biz_id"`
	HostID        []int64 `json:"bk_host_id"`
	ModuleID      []int64 `json:"bk_module_id"`
	IsIncrement   bool    `json:"is_increment"`
}

type ID

type ID struct {
	ID string `json:"id"`
}

type IDResult

type IDResult struct {
	BaseResp `json:",inline"`
	Data     ID `json:"data"`
}

type IPInfo

type IPInfo struct {
	Data  []string `json:"data"`
	Exact int64    `json:"exact"`
	Flag  string   `json:"flag"`
}

ip search info

type IPParam

type IPParam struct {
	Data    []string `json:"data"`
	CloudID *int64   `json:"bk_cloud_id"`
}

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  `json:"bk_module_id"`
	ModuleName string `json:"bk_module_name"`
}

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 {
	// 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"`

	//	define the metadata of assocication kind
	Metadata `field:"metadata" json:"metadata" bson:"metadata"`
}

InstAsst an association definition between instances.

func (InstAsst) GetInstID

func (asst InstAsst) GetInstID(objID string) (instID int64, ok bool)

func (*InstAsst) Parse

func (cli *InstAsst) Parse(data mapstr.MapStr) (*InstAsst, error)

Parse load the data from mapstr attribute into attribute instance

func (*InstAsst) ToMapStr

func (cli *InstAsst) ToMapStr() mapstr.MapStr

ToMapStr to mapstr

type InstDataInfo

type InstDataInfo struct {
	Count int             `json:"count"`
	Info  []mapstr.MapStr `json:"info"`
}

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

type InstResult struct {
	Count int             `json:"count"`
	Info  []mapstr.MapStr `json:"info"`
}

InstResult inst item result

type InstanceSet

type InstanceSet struct {
	InstanceSet []CloudHostInfo `json:"InstanceSet"`
}

type Label

type Label map[string]string

Label define the Label type used to limit the scope of application of resources

func (Label) Get

func (label Label) Get(key string) (exist bool, value string)

func (Label) GetBusinessID

func (label Label) GetBusinessID() (int64, error)

func (Label) GetModelKind

func (label Label) GetModelKind() (ModelKind, error)

func (Label) Int64

func (label Label) Int64(key string) (int64, error)

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

func (label Label) IsTrue(key string) (bool, error)

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) Set

func (label Label) Set(key, value string)

func (Label) SetBusinessID

func (label Label) SetBusinessID(id int64)

func (Label) SetModelKind

func (label Label) SetModelKind(kind ModelKind)

type ListAssociationsWithAssociationKindResult

type ListAssociationsWithAssociationKindResult struct {
	BaseResp `json:",inline"`
	Data     AssociationList `json:"data"`
}

type LoginChangeSupplierResult

type LoginChangeSupplierResult struct {
	BaseResp `json:",inline"`
	Data     struct {
		ID string `json:"bk_supplier_account"`
	} `json:"data"`
}

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 LoginSystemUserInfo struct {
	CnName string `json:"chinese_name"`
	EnName string `json:"english_name"`
}

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"`
	SupplierID    int64                       `json:"supplier_id"`
	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 LoginUserInfoOwnerUinList

type LoginUserInfoOwnerUinList struct {
	OwnerID    string `json:"id"`
	OwnerName  string `json:"name"`
	SupplierID int64  `json:"supplier_id"`
	Role       int64  `json:"role"`
}

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 LoginUserPluginParams struct {
	Url          string
	IsMultiOwner bool
	Cookie       []*http.Cookie // Reserved word, not used now
	Header       http.Header    // Reserved word, not used now
}

type LogoutRequestParams

type LogoutRequestParams struct {
	HTTPScheme string `json:"http_scheme"`
}

type LogoutResult

type LogoutResult struct {
	BaseResp `json:",inline"`
	Data     struct {
		LogoutURL string `json:"url"`
	} `json:"data"`
}

type LonginSystemUserListResult

type LonginSystemUserListResult struct {
	BaseResp `json:",inline"`
	Data     []*LoginSystemUserInfo `json:"data"`
}

type MainLineObject

type MainLineObject struct {
	Object        `json:",inline"`
	AssociationID string `json:"bk_asst_obj_id"`
}

MainLineObject main line object definition

type MainLineResult

type MainLineResult struct {
	BaseResp `json:",inline"`
	Data     []map[string]interface{} `json:"data"`
}

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

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 MapArrayResponse struct {
	BaseResp `json:",inline"`
	Data     []mapstr.MapStr `json:"data"`
}

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 NewMetaDataFromBusinessID

func NewMetaDataFromBusinessID(value string) Metadata

type ModelKind

type ModelKind string

type ModifyProcInstanceDetail

type ModifyProcInstanceDetail struct {
	Conds map[string]interface{} `json:"condition"`
	Data  map[string]interface{} `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 ModuleHostConfigParams struct {
	ApplicationID int64   `json:"bk_biz_id"`
	HostID        int64   `json:"bk_host_id"`
	ModuleID      []int64 `json:"bk_module_id"`
	OwnerID       string  `json:"bk_supplier_account" bson:"bk_supplier_account"`
}

type ModuleInst

type ModuleInst struct {
	BizID      int64  `bson:"bk_biz_id"`
	ModuleID   int64  `bson:"bk_module_id"`
	ModuleName string `bson:"bk_module_name"`
}

type NetCollSearchParams

type NetCollSearchParams struct {
	Page      BasePage        `json:"page,omitempty"`
	Fields    []string        `json:"fields,omitempty"`
	Condition []ConditionItem `json:"condition,omitempty"`
}

type NetcollectConfig

type NetcollectConfig struct {
	ScanRange []string `json:"scan_range" bson:"scan_range"`
	Period    string   `json:"period" bson:"period"`
	Community string   `json:"community" bson:"community"`
}

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 NetcollectReportAsstCond

type NetcollectReportAsstCond struct {
	PropertyID   string      `json:"bk_property_id" bson:"bk_property_id"`
	PropertyName string      `json:"bk_property_name" bson:"bk_property_name"`
	Value        interface{} `json:"value" bson:"value"`
}

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 NetcollectReportSummary struct {
	CloudID    int64          `json:"bk_cloud_id"`
	CloudName  string         `json:"bk_cloud_name"`
	LastTime   Time           `json:"last_time"`
	Statistics map[string]int `json:"statistics"`
}

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 NetcollectorStatus struct {
	CollectorStatus string `json:"collector_status" bson:"collector_status"`
	ConfigStatus    string `json:"config_status" bson:"config_status"`
	ReportStatus    string `json:"report_status" bson:"report_status"`
}

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 {
	Metadata    `field:"metadata" json:"metadata" bson:"metadata"`
	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  `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

func (o *Object) GetDefaultInstPropertyName() string

GetDefaultInstPropertyName get default inst

func (*Object) GetInstIDFieldName

func (o *Object) GetInstIDFieldName() string

GetInstIDFieldName get instid filed

func (*Object) GetInstNameFieldName

func (o *Object) GetInstNameFieldName() string

GetInstNameFieldName get the inst name

func (*Object) GetObjectID

func (o *Object) GetObjectID() string

GetObjectID get the object type

func (*Object) GetObjectType

func (o *Object) GetObjectType() string

GetObjectType get the object type

func (*Object) IsCommon

func (o *Object) IsCommon() bool

IsCommon is common object

func (*Object) Parse

func (o *Object) Parse(data mapstr.MapStr) (*Object, error)

Parse load the data from mapstr object into object instance

func (*Object) ToMapStr

func (o *Object) ToMapStr() mapstr.MapStr

ToMapStr to mapstr

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 ObjectAttrResult struct {
	BaseResp `json:",inline"`
	Data     []Attribute `json:"data"`
}

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 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"`
	Metadata  `field:"metadata" json:"metadata" bson:"metadata"`
	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 OperaterException

type OperaterException struct {
	BaseResp `json:",inline"`
	Data     []ExceptionResult `json:"data"`
}

OperaterException result

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 ParamData

type ParamData struct {
	ApplicationID       int64   `json:"bk_biz_id"`
	HostID              []int64 `json:"bk_host_id"`
	OwnerModuleID       int64   `json:"bk_owner_module_id"`
	OwnerAppplicationID int64   `json:"bk_owner_biz_id"`
}

type ParamNetcollectComfirm

type ParamNetcollectComfirm struct {
	Reports []NetcollectReport `json:"reports"`
}

type ParamNetcollectDiscover

type ParamNetcollectDiscover struct {
	Collectors []Netcollector `json:"collectors"`
}

type ParamNetcollectorSearch

type ParamNetcollectorSearch struct {
	Query string   `json:"query"`
	Page  BasePage `json:"page"`
}

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 ParamSubscriptionSearch struct {
	Fields    []string               `json:"fields"`
	Condition map[string]interface{} `json:"condition"`
	Page      BasePage               `json:"page"`
}

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"`
	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 PermissionGroupListResult

type PermissionGroupListResult struct {
	BaseResp `json:",inline"`
	Data     []UserGroup `json:"data"`
}

type PermissionSystemResponse

type PermissionSystemResponse struct {
	BaseResp `json:",inline"`
	Data     mapstr.MapStr `json:"data"`
}

type Position

type Position struct {
	X *int64 `json:"x" bson:"x"`
	Y *int64 `json:"y" bson:"y"`
}

Position the node position in graph

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     mapstr.MapStr `field:"model_config" json:"model_config" bson:"model_config"`
	SystemConfig    mapstr.MapStr `field:"sys_config" json:"sys_config" bson:"sys_config"`
}

PrivilegeUserGroup the user group permission configure

func (*PrivilegeUserGroup) Parse

Parse load the data from mapstr object into object instance

func (*PrivilegeUserGroup) ToMapStr

func (p *PrivilegeUserGroup) ToMapStr() mapstr.MapStr

ToMapStr to mapstr

type ProcInfoArrResult

type ProcInfoArrResult struct {
	BaseResp `json:",inline"`
	Data     []mapstr.MapStr `json:"data"`
}

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 ProcModuleConfig struct {
	ApplicationID int64  `json:"bk_biz_id"`
	ModuleName    string `json:"bk_module_name"`
	ProcessID     int64  `json:"bk_process_id"`
}

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 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 ProcessModule struct {
	AppID      int64  `json:"bk_biz_id" bson:"bk_biz_id"`
	ModuleName string `json:"bk_module_name" bson:"bk_module_name"`
	ProcessID  int64  `json:"bk_process_id" bson:"bk_process_id"`
	OwnerID    string `json:"bk_supplier_account" bson:"bk_supplier_account"`
}

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 ProcessOperateTaskDetail

type ProcessOperateTaskDetail struct {
	Errcode int    `json:"errcode" bson:"error_code"`
	ErrMsg  string `json:"errmsg" bson:"error_msg"`
}

type ProcessOperateTaskResult

type ProcessOperateTaskResult struct {
	BaseResp `json:",inline"`
	Data     struct {
		Count int                  `json:"count"`
		Info  []ProcessOperateTask `json:"info"`
	} `json:"data"`
}

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 QueryCondition

type QueryCondition struct {
	Fields    []string      `json:"fields"`
	Limit     SearchLimit   `json:"limit"`
	SortArr   []SearchSort  `json:"sort"`
	Condition mapstr.MapStr `json:"condition"`
}

QueryCondition the common query condition definition

type QueryConditionResult

type QueryConditionResult ResponseInstData

type QueryHostLockRequest

type QueryHostLockRequest struct {
	IPS     []string `json:"ip_list"`
	CloudID int64    `json:"bk_cloud_id"`
}

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

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

type QueryModelDataResult struct {
	Count int64    `json:"count"`
	Info  []Object `json:"info"`
}

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

type QueryObjectAttributeResult struct {
	BaseResp `json:",inline"`
	Data     []Attribute `json:"data"`
}

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

type QueryObjectGroupResult struct {
	BaseResp `json:",inline"`
	Data     []Group `json:"data"`
}

QueryObjectGroupResult query the object group result

type QueryObjectResult

type QueryObjectResult struct {
	BaseResp `json:",inline"`
	Data     []Object `json:"data"`
}

QueryObjectResult query object result

type QueryResult

type QueryResult struct {
	Count uint64          `json:"count"`
	Info  []mapstr.MapStr `json:"info"`
}

QueryResult common query result

type QueryUniqueResult

type QueryUniqueResult struct {
	Count uint64         `json:"count"`
	Info  []ObjectUnique `json:"info"`
}

type ReadInstAssociationResult

type ReadInstAssociationResult struct {
	BaseResp
	Data struct {
		Count uint64     `json:"count"`
		Info  []InstAsst `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 Ref

type Ref struct {
	RefID   int64  `json:"ref_id"`
	RefName string `json:"ref_name"`
}

type Region

type Region struct {
	Region string `json:"Region"`
}

type RegionResponse

type RegionResponse struct {
	Response RegionSet `json:"Response"`
}

type RegionSet

type RegionSet struct {
	Data []Region `json:"RegionSet"`
}

type RepeatedDataResult

type RepeatedDataResult struct {
	OriginIndex int64         `json:"origin_index"`
	Data        mapstr.MapStr `json:"data"`
}

RepeatedDataResult repeated data

type RequestImportAssociation

type RequestImportAssociation struct {
	AssociationInfoMap map[int]ExcelAssocation `json:"association_info"`
}

ResponeImportAssociation import association result

type Resource

type Resource struct {
	ResourceTypeName string `json:"resource_type_name"`
	ResourceType     string `json:"resource_type"`
	ResourceName     string `json:"resource_name"`
	ResourceID       string `json:"resource_id"`
}

type ResourceConfirm

type ResourceConfirm struct {
	ObjID        string          `json:"bk_obj_id"`
	ResourceName []mapstr.MapStr `json:"bk_resource_name"`
	SourceType   string          `json:"bk_source_type"`
	SourceName   string          `json:"bk_source_name"`
	CreateTime   string          `json:"bk_create_time"`
	TaskID       string          `json:"bk_task_id"`
	ResourceID   int64           `json:"bk_resource_id"`
	ConfirmType  string          `json:"bk_confirm_type"`
	Incharge     string          `json:"bk_in_charge"`
}

type RespError

type RespError struct {
	// error message
	Msg error
	// error code
	ErrCode int
	Data    interface{}
}

RespError

func (*RespError) Error

func (r *RespError) Error() string

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"`
}

func NewSuccessResp

func NewSuccessResp(data interface{}) *Response

data is the data you want to return to client.

type ResponseDataMapStr

type ResponseDataMapStr struct {
	BaseResp `json:",inline"`
	Data     mapstr.MapStr `json:"data"`
}

type ResponseInstData

type ResponseInstData struct {
	BaseResp `json:",inline"`
	Data     InstDataInfo `json:"data"`
}

ResponseInstData

type RoleAppResult

type RoleAppResult struct {
	BaseResp `json:",inline"`
	Data     []map[string]interface{} `json:"data"`
}

type RolePriResult

type RolePriResult struct {
	BaseResp `json:",inline"`
	Data     []string `json:"data"`
}

type RowMsgData

type RowMsgData struct {
	Row int    `json:"row"`
	Msg string `json:"message"`
}

type RspID

type RspID struct {
	ID int64 `json:"id"`
}

RspID response id

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 RspSubscriptionCreate struct {
	BaseResp `json:",inline"`
	Data     struct {
		SubscriptionID int64 `json:"subscription_id"`
	} `json:"data"`
}

type RspSubscriptionSearch

type RspSubscriptionSearch struct {
	Count uint64         `json:"count"`
	Info  []Subscription `json:"info"`
}

type RspSubscriptionTestCallback

type RspSubscriptionTestCallback struct {
	HttpStatus   int    `json:"http_status"`
	ResponseBody string `json:"response_body"`
}

type SaveAuditLogParams

type SaveAuditLogParams struct {
	ID      int64                  `json:"inst_id"`
	Model   string                 `json:"op_target"`
	Content interface{}            `json:"content"`
	ExtKey  string                 `json:"ext"`
	OpDesc  string                 `json:"op_desc"`
	OpType  auditoplog.AuditOpType `json:"op_type"`
	BizID   int64                  `json:"biz_id"`
}

type SearchAssociationInstRequest

type SearchAssociationInstRequest struct {
	Condition mapstr.MapStr `json:"condition"` // construct condition mapstr by condition.Condition
}

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 SearchAssociationInstResult

type SearchAssociationInstResult struct {
	BaseResp `json:",inline"`
	Data     []*InstAsst `json:"data"`
}

type SearchAssociationObjectRequest

type SearchAssociationObjectRequest struct {
	Condition mapstr.MapStr `json:"condition"`
}

type SearchAssociationObjectResult

type SearchAssociationObjectResult struct {
	BaseResp `json:",inline"`
	Data     []*Association `json:"data"`
}

type SearchAssociationTypeRequest

type SearchAssociationTypeRequest struct {
	BasePage  `json:"page"`
	Condition map[string]interface{} `json:"condition"`
}

type SearchAssociationTypeResult

type SearchAssociationTypeResult struct {
	BaseResp `json:",inline"`
	Data     struct {
		Count int                `json:"count"`
		Info  []*AssociationKind `json:"info"`
	} `json:"data"`
}

type SearchCondition

type SearchCondition struct {
	Fields    []string        `json:"fields"`
	Condition []ConditionItem `json:"condition"`
	ObjectID  string          `json:"bk_obj_id"`
}

search condition

type SearchDataResult

type SearchDataResult struct {
	Count int64           `json:"count"`
	Info  []mapstr.MapStr `json:"info"`
}

SearchDataResult common search data result

type SearchGroup

type SearchGroup struct {
	Code    int         `json:"code"`
	Result  bool        `json:"result"`
	Message interface{} `json:"message"`
	Data    interface{} `json:"data"`
}

type SearchHost

type SearchHost struct {
	Count int             `json:"count"`
	Info  []mapstr.MapStr `json:"info"`
}

func (SearchHost) ExtractHostIDs

func (sh SearchHost) ExtractHostIDs() *[]int64

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

type SearchIdentifierParam struct {
	IP   IPParam `json:"ip"`
	Page BasePage
}

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 SearchLimit

type SearchLimit struct {
	Offset int64 `json:"start"`
	Limit  int64 `json:"limit"`
}

SearchLimit sub condition

type SearchMainLine

type SearchMainLine struct {
	Code    int                      `json:"code"`
	Result  bool                     `json:"result"`
	Message interface{}              `json:"message"`
	Data    []map[string]interface{} `json:"data"`
}

type SearchModelInfo

type SearchModelInfo struct {
	Spec       Object      `json:"spec"`
	Attributes []Attribute `json:"attributes"`
}

SearchModelInfo search model params

type SearchModelResult

type SearchModelResult struct {
	BaseResp `json:",inline"`
	Data     []Object `json:"data"`
}

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"`
	Native    int                    `json:"native,omitempty"`
}

common search struct

type SearchSort

type SearchSort struct {
	IsDsc bool   `json:"is_dsc"`
	Field string `json:"field"`
}

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 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 SearchUniqueRequest

type SearchUniqueRequest struct {
	ObjID string `json:"bk_obj_id"`
}

type SearchUniqueResult

type SearchUniqueResult struct {
	BaseResp
	Data []ObjectUnique `json:"data"`
}

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 SetHostConfigParams

type SetHostConfigParams struct {
	ApplicationID int64 `json:"bk_biz_id"`
	SetID         int64 `json:"bk_set_id"`
	ModuleID      int64 `json:"bk_module_id"`
}

type SetInst

type SetInst struct {
	SetID     int64  `bson:"bk_set_id"`
	SetName   string `bson:"bk_set_name"`
	SetStatus string `bson:"bk_service_status"`
	SetEnv    string `bson:"bk_set_env"`
}

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 SetModel

type SetModel CreateModel

SetModel define SetMode method input params

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 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 Statistics

type Statistics struct {
	Total   int64 `json:"total"`
	Failure int64 `json:"failure"`
}

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         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 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

type SynchronizeItem struct {
	Info mapstr.MapStr `json:"info"`
	ID   int64         `json:"id"`
}

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 SysConfigStruct

type SysConfigStruct struct {
	Globalbusi []string `json:"global_busi"`
	BackConfig []string `json:"back_config"`
}

type TaskInfo

type TaskInfo struct {
	Args        CloudTaskInfo
	Method      string
	NextTrigger int64
}

type TemplateVersion

type TemplateVersion struct {
	Content     string `json:"content" field:"content"`
	Status      string `json:"status" field:"status"`
	Description string `json:"description" field:"description"`
}

type Time

type Time struct {
	time.Time `bson:",inline" json:",inline"`
}

func Now

func Now() Time

Now retruns now

func (Time) GetBSON

func (t Time) GetBSON() (interface{}, error)

GetBSON implements bson.GetBSON interface

func (Time) MarshalBSONValue

func (t Time) MarshalBSONValue() (bsontype.Type, []byte, error)

MarshalBSONValue implements bson.MarshalBSON interface

func (Time) MarshalJSON

func (t Time) MarshalJSON() ([]byte, error)

func (*Time) Scan

func (t *Time) Scan(value interface{}) error

Scan implement sql driver's Scan interface

func (*Time) SetBSON

func (t *Time) SetBSON(raw mgobson.Raw) error

SetBSON implements bson.SetBSON interface

func (*Time) UnmarshalBSONValue

func (t *Time) UnmarshalBSONValue(typo bsontype.Type, raw []byte) error

UnmarshalBSONValue implements bson.UnmarshalBSONValue interface

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface. The time is expected to be a quoted string in RFC 3339 format.

func (Time) Value

func (t Time) Value() (driver.Value, error)

Value implement sql driver's Value interface

type TopoGraphics

type TopoGraphics struct {
	Metadata  `field:"metadata" json:"metadata" bson:"metadata"`
	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"`
	// 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) 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) SetMetaData

func (t *TopoGraphics) SetMetaData(val Metadata)

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 TopoInstance

type TopoInstance struct {
	ObjectID         string
	InstanceID       int64
	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
	Detail     map[string]interface{}
}

func (*TopoInstanceNode) Name

func (node *TopoInstanceNode) Name() string

func (*TopoInstanceNode) TraversalFindModule

func (node *TopoInstanceNode) TraversalFindModule(targetID int64) []*TopoInstanceNode

func (*TopoInstanceNode) TraversalFindNode

func (node *TopoInstanceNode) TraversalFindNode(objectType string, targetID int64) []*TopoInstanceNode

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 extrac 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 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 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 UniqueKey

type UniqueKey struct {
	Kind string `json:"key_kind" bson:"key_kind"`
	ID   uint64 `json:"key_id" bson:"key_id"`
}

type UpdateAssociationObjectRequest

type UpdateAssociationObjectRequest struct {
	AsstName string `field:"bk_asst_name" json:"bk_asst_name" bson:"bk_asst_name"`
}

type UpdateAssociationObjectResult

type UpdateAssociationObjectResult struct {
	BaseResp `json:",inline"`
	Data     string `json:"data"`
}

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 UpdateAssociationTypeResult

type UpdateAssociationTypeResult struct {
	BaseResp `json:",inline"`
	Data     string `json:"data"`
}

type UpdateGroupCondition

type UpdateGroupCondition struct {
	Condition struct {
		ID      int64  `field:"id" json:"id,omitempty"`
		GroupID string `field:"bk_group_id" json:"bk_group_id,omitempty"`
		ObjID   string `field:"bk_obj_id" json:"bk_obj_id,omitempty"`
	} `json:"condition"`

	Data struct {
		Name  string `field:"bk_group_name" json:"bk_group_name,omitempty"`
		Index int64  `field:"bk_group_index" 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 UpdateModelAttrUnique

type UpdateModelAttrUnique struct {
	Data UpdateUniqueRequest `json:"data"`
}

type UpdateOption

type UpdateOption struct {
	Data      mapstr.MapStr `json:"data"`
	Condition mapstr.MapStr `json:"condition"`
}

UpdateOption common update options

type UpdateParams

type UpdateParams struct {
	Condition map[string]interface{} `json:"condition"`
	Data      map[string]interface{} `json:"data"`
}

type UpdateResult

type UpdateResult struct {
	BaseResp `json:",inline"`
}

UpdateResult update result

type UpdateTopoGraphicsInput

type UpdateTopoGraphicsInput struct {
	Metadata `field:"metadata" json:"metadata" bson:"metadata"`
	Origin   []TopoGraphics `field:"origin" json:"origin" bson:"origin"`
}

type UpdateUniqueRequest

type UpdateUniqueRequest struct {
	MustCheck bool        `json:"must_check" bson:"must_check"`
	Keys      []UniqueKey `json:"keys" bson:"keys"`
	LastTime  Time        `json:"last_time" bson:"last_time"`
	Metadata  `field:"metadata" json:"metadata" bson:"metadata"`
}

type UpdateUniqueResult

type UpdateUniqueResult struct {
	BaseResp
}

type UpdatedCount

type UpdatedCount struct {
	Count uint64 `json:"updated_count"`
}

UpdatedCount created count struct

type UpdatedDataResult

type UpdatedDataResult struct {
	OriginIndex int64  `json:"origin_index"`
	ID          uint64 `json:"id"`
}

UpdatedDataResult common update operation result

type UpdatedOptionResult

type UpdatedOptionResult struct {
	BaseResp `json:",inline"`
	Data     UpdatedCount `json:"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 UserCustomQueryDetailResult

type UserCustomQueryDetailResult struct {
	BaseResp `json:",inline"`
	Data     map[string]interface{} `json:"data"`
}

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

func (*UserGroup) Parse

func (u *UserGroup) Parse(data mapstr.MapStr) (*UserGroup, error)

Parse load the data from mapstr object into object instance

func (*UserGroup) ToMapStr

func (u *UserGroup) ToMapStr() mapstr.MapStr

ToMapStr to mapstr

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL