metadata

package
v3.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2018 License: MIT Imports: 20 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.

Index

Constants

View Source
const (
	// AssociationFieldObjectID the association data field definition
	AssociationFieldObjectID = "bk_obj_id"
	// AssociationFieldObjectAttributeID the association data field definition
	AssociationFieldObjectAttributeID = "bk_object_att_id"
	// AssociationFieldSupplierAccount the association data field definition
	AssociationFieldSupplierAccount = "bk_supplier_account"
	// AssociationFieldAssociationForward the association data field definition
	AssociationFieldAssociationForward = "bk_asst_forward"
	// AssociationFieldAssociationObjectID the association data field definition
	AssociationFieldAssociationObjectID = "bk_asst_obj_id"
	// AssociationFieldAssociationName the association data field definition
	AssociationFieldAssociationName = "bk_asst_name"
)
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"
)
View Source
const (
	EventActionCreate = "create"
	EventActionUpdate = "update"
	EventActionDelete = "delete"
)

EventAction

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

EventType enumeration

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 (
	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"
)
View Source
const (
	CC_time_type_parse_flag = "cc_time_type"
)

Variables

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

ConfirmMode define

View Source
var DelHostInAppParams struct {
	AppID  string `json:"appId"`
	HostID string `json:"hostId"`
}
View Source
var SuccessBaseResp = BaseResp{Result: true, Code: common.CCSuccess, ErrMsg: common.CCSuccessStr}

Functions

func GetTags

func GetTags(target interface{}) []string

GetTags parse a object and get the all tags

func SetValueToMapStrByTags

func SetValueToMapStrByTags(source interface{}) types.MapStr

SetValueToMapStrByTags convert a struct to MapStr by tags

func SetValueToStructByTags

func SetValueToStructByTags(target interface{}, values types.MapStr) error

SetValueToStructByTags set the struct object field value by tags

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 AddHistoryResult

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

type AddHostFromAgentHostList

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

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"`
	ObjectID         string `field:"bk_obj_id" json:"bk_obj_id" bson:"bk_obj_id"`
	OwnerID          string `field:"bk_supplier_account" json:"bk_supplier_account" bson:"bk_supplier_account"`
	AsstForward      string `field:"bk_asst_forward" json:"bk_asst_forward" bson:"bk_asst_forward"`
	AsstObjID        string `field:"bk_asst_obj_id" json:"bk_asst_obj_id" bson:"bk_asst_obj_id"`
	AsstName         string `field:"bk_asst_name" json:"bk_asst_name" bson:"bk_asst_name"`
	ObjectAttID      string `field:"bk_object_att_id" json:"bk_object_att_id" bson:"bk_object_att_id"`
	ClassificationID string `field:"bk_classification_id" bson:"-"`
	ObjectIcon       string `field:"bk_obj_icon" bson:"-"`
	ObjectName       string `field:"bk_obj_name" bson:"-"`
}

Association define object association struct

func (*Association) Parse

func (cli *Association) Parse(data types.MapStr) (*Association, error)

Parse load the data from mapstr attribute into attribute instance

func (*Association) ToMapStr

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

ToMapStr to mapstr

type AssociationParams

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

AssociationParams association params

type Attribute

type Attribute struct {
	ID                int64       `field:"id" json:"id" bson:"id"`
	OwnerID           string      `field:"bk_supplier_account" json:"bk_supplier_account" bson:"bk_supplier_account"`
	ObjectID          string      `field:"bk_obj_id" json:"bk_obj_id" bson:"bk_obj_id"`
	PropertyID        string      `field:"bk_property_id" json:"bk_property_id" bson:"bk_property_id"`
	PropertyName      string      `field:"bk_property_name" json:"bk_property_name" bson:"bk_property_name"`
	PropertyGroup     string      `field:"bk_property_group" json:"bk_property_group" bson:"bk_property_group"`
	PropertyGroupName string      `field:"bk_property_group_name,ignoretomap" json:"bk_property_group_name" bson:"-"`
	PropertyIndex     int64       `field:"bk_property_index" json:"bk_property_index" bson:"bk_property_index"`
	Unit              string      `field:"unit" json:"unit" bson:"unit"`
	Placeholder       string      `field:"placeholder" json:"placeholder" bson:"placeholder"`
	IsEditable        bool        `field:"editable" json:"editable" bson:"editable"`
	IsPre             bool        `field:"ispre" json:"ispre" bson:"ispre"`
	IsRequired        bool        `field:"isrequired" json:"isrequired" bson:"isrequired"`
	IsReadOnly        bool        `field:"isreadonly" json:"isreadonly" bson:"isreadonly"`
	IsOnly            bool        `field:"isonly" json:"isonly" bson:"isonly"`
	IsSystem          bool        `field:"bk_issystem" json:"bk_issystem" bson:"bk_issystem"`
	IsAPI             bool        `field:"bk_isapi" json:"bk_isapi" bson:"bk_isapi"`
	PropertyType      string      `field:"bk_property_type" json:"bk_property_type" bson:"bk_property_type"`
	Option            interface{} `field:"option" json:"option" bson:"option"`
	Description       string      `field:"description" json:"description" bson:"description"`
	Creator           string      `field:"creator" json:"creator" bson:"creator"`
	CreateTime        *time.Time  `json:"create_time" bson:"creaet_time"`
	LastTime          *time.Time  `json:"last_time" bson:"last_time"`
}

Attribute attribute metadata definition

func (*Attribute) Parse

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

Parse load the data from mapstr attribute into attribute instance

func (*Attribute) ToMapStr

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

ToMapStr to mapstr

type AttributeWrapper

type AttributeWrapper struct {
	Attribute         `json:",inline"`
	AssoType          int    `json:"bk_asst_type"`
	AsstForward       string `json:"bk_asst_forward"`
	AssociationID     string `json:"bk_asst_obj_id"`
	PropertyGroupName string `json:"bk_property_group_name"`
}

AttributeWrapper wrapper, expansion field

type AuditAppParams

type AuditAppParams struct {
	Content string                 `json:"content"`
	OpDesc  string                 `json:"op_desc"`
	OpType  auditoplog.AuditOpType `json:"op_type"`
	AppID   int64                  `json:"inst_id"`
}

AuditAppParams add application log parameter

type AuditHostLogParams

type AuditHostLogParams struct {
	Content interface{}            `json:"content"`
	OpDesc  string                 `json:"op_desc"`
	InnerIP string                 `json:"bk_host_innerip"`
	OpType  auditoplog.AuditOpType `json:"op_type"`
	HostID  int64                  `json:"inst_id"`
}

AuditHostLogParams add single host log parammeter

type AuditHostsLogParams

type AuditHostsLogParams struct {
	Content []auditoplog.AuditLogExt `json:"content"`
	OpDesc  string                   `json:"op_desc"`
	OpType  auditoplog.AuditOpType   `json:"op_type"`
}

AuditHostsLogParams add multiple host log parameter

type AuditModuleParams

type AuditModuleParams struct {
	Content  interface{}            `json:"content"`
	OpDesc   string                 `json:"op_desc"`
	OpType   auditoplog.AuditOpType `json:"op_type"`
	ModuleID int64                  `json:"inst_id"`
}

AuditModuleParams add module single log parammete

type AuditModulesParams

type AuditModulesParams struct {
	Content []auditoplog.AuditLogContext `json:"content"`
	OpDesc  string                       `json:"op_desc"`
	OpType  auditoplog.AuditOpType       `json:"op_type"`
}

AuditModuleParams add module multiple log parammete

type AuditObjParams

type AuditObjParams struct {
	Content  interface{}            `json:"content"`
	OpDesc   string                 `json:"op_desc"`
	OpType   auditoplog.AuditOpType `json:"op_type"`
	OpTarget string                 `json:"op_target"`
	InstID   int64                  `json:"inst_id"`
}

AuditObjParams add object single log parameter

type AuditObjsParams

type AuditObjsParams struct {
	Content  []auditoplog.AuditLogContext `json:"content"`
	OpDesc   string                       `json:"op_desc"`
	OpType   auditoplog.AuditOpType       `json:"op_type"`
	OpTarget string                       `json:"op_target"`
}

AuditObjsParams add object multiple log parameter

type AuditProcParams

type AuditProcParams struct {
	Content interface{}            `json:"content"`
	OpDesc  string                 `json:"op_desc"`
	OpType  auditoplog.AuditOpType `json:"op_type"`
	ProcID  int64                  `json:"inst_id"`
}

AuditProcParams add process single log parameter

type AuditProcsParams

type AuditProcsParams struct {
	Content []auditoplog.AuditLogContext `json:"bk_content"`
	OpDesc  string                       `json:"bk_op_desc"`
	OpType  auditoplog.AuditOpType       `json:"bk_op_type"`
}

AuditProcsParams add process multiple log parameter

type AuditQueryResult

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

type AuditSetParams

type AuditSetParams struct {
	Content interface{}            `json:"content"`
	OpDesc  string                 `json:"op_desc"`
	OpType  auditoplog.AuditOpType `json:"op_type"`
	SetID   int64                  `json:"inst_id"`
}

AuditSetParams add set single log parameter

type AuditSetsParams

type AuditSetsParams struct {
	Content []auditoplog.AuditLogContext `json:"content"`
	OpDesc  string                       `json:"op_desc"`
	OpType  auditoplog.AuditOpType       `json:"op_type"`
}

AuditSetParams add set multiple log parameter

type BasePage

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

BasePage for paging query

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

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 {
	ID                 int64  `field:"id" json:"id" bson:"id"`
	ClassificationID   string `field:"bk_classification_id"  json:"bk_classification_id" bson:"bk_classification_id"`
	ClassificationName string `field:"bk_classification_name" json:"bk_classification_name" bson:"bk_classification_name"`
	ClassificationType string `field:"bk_classification_type" json:"bk_classification_type" bson:"bk_classification_type"`
	ClassificationIcon string `field:"bk_classification_icon" json:"bk_classification_icon" bson:"bk_classification_icon"`
	OwnerID            string `field:"bk_supplier_account" json:"bk_supplier_account" bson:"bk_supplier_account"  `
}

Classification the classification metadata definition

func (*Classification) Parse

func (cli *Classification) Parse(data types.MapStr) (*Classification, error)

Parse load the data from mapstr classification into classification instance

func (*Classification) ToMapStr

func (cli *Classification) ToMapStr() types.MapStr

ToMapStr to mapstr

type ClassificationWithObject

type ClassificationWithObject struct {
	Classification `json:",inline"`
	Objects        []Object            `json:"bk_objects"`
	AsstObjects    map[string][]Object `json:"bk_asst_objects"`
}

ClassificationWithObject classification with object

type CloneHostPropertyParams

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

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

CreateInstResult create inst result

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 CreateResult

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

CreateResult create result

type DefaultModuleHostConfigParams

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

type DeleteHostBatchOpt

type DeleteHostBatchOpt struct {
	HostID string `json:"bk_host_id"`
}

type DeleteResult

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

DeleteResult delete result

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 EventData

type EventData struct {
	CurData interface{} `json:"cur_data"`
	PreData interface{} `json:"pre_data"`
}

type EventInst

type EventInst struct {
	ID          int64       `json:"event_id,omitempty"`
	EventType   string      `json:"event_type"`
	Action      string      `json:"action"`
	ActionTime  types.Time  `json:"action_time"`
	ObjType     string      `json:"obj_type"`
	Data        []EventData `json:"data"`
	OwnerID     string      `json:"bk_supplier_account"`
	RequestID   string      `json:"request_id"`
	RequestTime types.Time  `json:"request_time"`
}

func (*EventInst) 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 FavoriteResult

type FavoriteResult struct {
	Count int                      `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 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   int               `json:"bk_inst_id"`
	ObjAtt   string            `json:"bk_object_att_id"`
	AsstName string            `json:"bk_asst_name"`
	Label    map[string]string `json:"label"`
}

Asst the node association node

type Group

type Group struct {
	ID         int64  `field:"id" json:"id" bson:"id"`
	GroupID    string `field:"bk_group_id" json:"bk_group_id" bson:"bk_group_id"`
	GroupName  string `field:"bk_group_name" json:"bk_group_name" bson:"bk_group_name"`
	GroupIndex int64  `field:"bk_group_index" json:"bk_group_index" bson:"bk_group_index"`
	ObjectID   string `field:"bk_obj_id" json:"bk_obj_id" bson:"bk_obj_id"`
	OwnerID    string `field:"bk_supplier_account" json:"bk_supplier_account" bson:"bk_supplier_account"`
	IsDefault  bool   `field:"bk_isdefault" json:"bk_isdefault" bson:"bk_isdefault"`
	IsPre      bool   `field:"ispre" json:"ispre" bson:"ispre"`
}

Group group metadata definition

func (*Group) Parse

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

Parse load the data from mapstr group into group instance

func (*Group) ToMapStr

func (cli *Group) ToMapStr() types.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 {
	Ip           string `json:"ip,omitempty"`
	BkCloudId    int    `json:"bk_cloud_id,omitempty"`
	BkSupplierId int    `json:"bk_supplier_ed,omitempty"`
}

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 {
	Meta   GseProcMeta `json:"meta,omitempty"`
	Hosts  []GseHost   `json:"hosts,omitempty"`
	OpType int         `json:"op_type,omitempty"`
	Spec   GseProcSpec `json:"spec,omitempty"`
}

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 GseProcRespone

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

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 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 int           `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  []map[string]interface{} `json:"info"`
}

type HostInputType

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

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

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 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 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 {
	ID           int64  `field:"id" json:"-"`
	InstID       int64  `field:"bk_inst_id" json:"bk_inst_id"`
	ObjectID     string `field:"bk_obj_id" json:"bk_obj_id"`
	AsstInstID   int64  `field:"bk_asst_inst_id" json:"bk_asst_inst_id"`
	AsstObjectID string `field:"bk_asst_obj_id" json:"bk_asst_obj_id"`
}

InstAsst an association definition between instances.

func (*InstAsst) Parse

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

Parse load the data from mapstr attribute into attribute instance

func (*InstAsst) ToMapStr

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

ToMapStr to mapstr

type InstNameAsst

type InstNameAsst struct {
	ID         string                 `json:"id"`
	ObjID      string                 `json:"bk_obj_id"`
	ObjIcon    string                 `json:"bk_obj_icon"`
	InstID     int64                  `json:"bk_inst_id"`
	ObjectName string                 `json:"bk_obj_name"`
	InstName   string                 `json:"bk_inst_name"`
	AsstName   string                 `json:"bk_asst_name"`
	AsstID     string                 `json:"bk_asst_id"`
	InstInfo   map[string]interface{} `json:"inst_info,omitempty"`
}

type InstResult

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

InstResult inst item result

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"`
	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"`
	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 {
	ObjectDes     `json:",inline"`
	AssociationID string `json:"bk_asst_obj_id"`
}

MainLineObject main line object definition

type MainlineObjectTopo

type MainlineObjectTopo struct {
	ObjID      string `field:"bk_obj_id" json:"bk_obj_id"`
	ObjName    string `field:"bk_obj_name" json:"bk_obj_name"`
	OwnerID    string `field:"bk_supplier_account" json:"bk_supplier_account"`
	NextObj    string `field:"bk_next_obj" json:"bk_next_obj"`
	NextName   string `field:"bk_next_name" json:"bk_next_name"`
	PreObjID   string `field:"bk_pre_obj_id" json:"bk_pre_obj_id"`
	PreObjName string `field:"bk_pre_obj_name" json:"bk_pre_obj_name"`
}

MainlineObjectTopo the mainline object topo

func (*MainlineObjectTopo) Parse

Parse load the data from mapstr attribute into attribute instance

func (*MainlineObjectTopo) ToMapStr

func (cli *MainlineObjectTopo) ToMapStr() types.MapStr

ToMapStr to mapstr

type MainlineObjectTopoResult

type MainlineObjectTopoResult struct {
	BaseResp `json:",inline"`
	Data     []MainlineObjectTopo `json:"data"`
}

type ModuleHost

type ModuleHost struct {
	AppID    int64  `json:"bk_biz_id" bson:"bk_biz_id"`
	HostID   int64  `json:"bk_host_id" bson:"bk_host_id"`
	ModuleID int64  `json:"bk_module_id" bson:"bk_module_id"`
	SetID    int64  `json:"bk_set_id" bson:"bk_set_id"`
	OwnerID  string `json:"bk_supplier_account" bson:"bk_supplier_account"`
}

type ModuleHostConfigParams

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

type ObjAttDes struct {
	Attribute         `json:",inline"`
	AssoType          int    `json:"bk_asst_type"`
	AsstForward       string `json:"bk_asst_forward"`
	AssociationID     string `json:"bk_asst_obj_id"`
	PropertyGroupName string `json:"bk_property_group_name"`
}

ObjAttDes 对象模型属性

type ObjClassificationObject

type ObjClassificationObject struct {
	Classification `bson:",inline"`
	Objects        []Object                 `json:"bk_objects"`
	AsstObjects    map[string][]interface{} `json:"bk_asst_objects"`
}

ObjClassificationObject define the class object class

type ObjQueryInput

type ObjQueryInput struct {
	Condition interface{} `json:"condition"`
	Fields    string      `json:"fields"`
	Start     int         `json:"start"`
	Limit     int         `json:"limit"`
	Sort      string      `json:"sort"`
}

func (*ObjQueryInput) ConvTime

func (o *ObjQueryInput) ConvTime() error

ConvTime 将查询条件中字段包含cc_type key ,子节点变为time.Time

type Object

type Object struct {
	ID          int64      `field:"id" json:"id" bson:"id"`
	ObjCls      string     `field:"bk_classification_id" json:"bk_classification_id" bson:"bk_classification_id"`
	ObjIcon     string     `field:"bk_obj_icon" json:"bk_obj_icon" bson:"bk_obj_icon"`
	ObjectID    string     `field:"bk_obj_id" json:"bk_obj_id" bson:"bk_obj_id"`
	ObjectName  string     `field:"bk_obj_name" json:"bk_obj_name" bson:"bk_obj_name"`
	IsPre       bool       `field:"ispre" json:"ispre" bson:"ispre"`
	IsPaused    bool       `field:"bk_ispaused" json:"bk_ispaused" bson:"bk_ispaused"`
	Position    string     `field:"position" json:"position" bson:"position"`
	OwnerID     string     `field:"bk_supplier_account" json:"bk_supplier_account" bson:"bk_supplier_account"`
	Description string     `field:"description" json:"description" bson:"description"`
	Creator     string     `field:"creator" json:"creator" bson:"creator"`
	Modifier    string     `field:"modifier" json:"modifier" bson:"modifier"`
	CreateTime  *time.Time `field:"create_time" json:"create_time" bson:"create_time"`
	LastTime    *time.Time `field:"last_time" json:"last_time" bson:"last_time"`
}

Object object metadata definition

func (*Object) GetDefaultInstPropertyName

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) 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 types.MapStr) (*Object, error)

Parse load the data from mapstr object into object instance

func (*Object) ToMapStr

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

ToMapStr to mapstr

type ObjectClsDes

type ObjectClsDes struct {
	ID      int    `json:"id" bson:"id"`
	ClsID   string `json:"bk_classification_id" bson:"bk_classification_id"`
	ClsName string `json:"bk_classification_name" bson:"bk_classification_name"`
	ClsType string `json:"bk_classification_type" bson:"bk_classification_type" `
	ClsIcon string `json:"bk_classification_icon" bson:"bk_classification_icon"`
}

type ObjectDes

type ObjectDes struct {
	ID          int        `bson:"id"                json:"id"`
	ObjCls      string     `bson:"bk_classification_id" json:"bk_classification_id"`
	ObjIcon     string     `bson:"bk_obj_icon"          json:"bk_obj_icon"`
	ObjectID    string     `bson:"bk_obj_id"            json:"bk_obj_id"`
	ObjectName  string     `bson:"bk_obj_name"          json:"bk_obj_name"`
	IsPre       bool       `bson:"ispre"             json:"ispre"`
	IsPaused    bool       `bson:"bk_ispaused"          json:"bk_ispaused"`
	Position    string     `bson:"position"          json:"position"`
	OwnerID     string     `bson:"bk_supplier_account"  json:"bk_supplier_account"`
	Description string     `bson:"description"       json:"description"`
	Creator     string     `bson:"creator"           json:"creator"`
	Modifier    string     `bson:"modifier"          json:"modifier"`
	CreateTime  *time.Time `bson:"create_time"       json:"create_time"`
	LastTime    *time.Time `bson:"last_time"         json:"last_time"`
	Page        *BasePage  `bson:"-"                    json:"page,omitempty"`
}

type ObjectTopo

type ObjectTopo struct {
	LabelType string   `json:"label_type"`
	LabelName string   `json:"label_name"`
	Label     string   `json:"label"`
	From      TopoItem `json:"from"`
	To        TopoItem `json:"to"`
	Arrows    string   `json:"arrows"`
}

ObjectTopo define the common object topo

type OperationLog

type OperationLog struct {
	OwnerID       string      `bson:"bk_supplier_account"    json:"bk_supplier_account"`
	ApplicationID int64       `bson:"bk_biz_id"              json:"bk_biz_id"`
	ExtKey        string      `bson:"ext_key"             json:"ext_key"`
	OpDesc        string      `bson:"op_desc"             json:"op_desc"`
	OpType        int         `bson:"op_type"             json:"op_type"`
	OpTarget      string      `bson:"op_target"           json:"op_target"`
	Content       interface{} `bson:"content"             json:"content"`
	User          string      `bson:"operator"                json:"operator"`
	OpFrom        string      `bson:"op_from"             json:"op_from"`
	ExtInfo       string      `bson:"ext_info"            json:"ext_info"`
	CreateTime    time.Time   `bson:"op_time"         json:"op_time"`
	InstID        int64       `bson:"inst_id"             json:"inst_id"`
}

OperationLog opeartion log item definition

func (OperationLog) TableName

func (OperationLog) TableName() string

TableName return the table name

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

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

type PermissionSystemResponse

type PermissionSystemResponse struct {
	BaseResp `json:",inline"`
	Data     types.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     types.MapStr `field:"model_config" json:"model_config" bson:"model_config"`
	SystemConfig    types.MapStr `field:"sys_config" json:"sys_config" bson:"sys_config"`
}

PrivilegeUserGroup the user group permission configure

func (*PrivilegeUserGroup) Parse

Parse load the data from mapstr object into object instance

func (*PrivilegeUserGroup) ToMapStr

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

ToMapStr to mapstr

type ProcInfoArrResult

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

type ProcInstModelResult

type ProcInstModelResult struct {
	BaseResp `json:",inline"`
	Data     []ProcInstanceModel `json:"data"`
}

type ProcInstanceModel

type ProcInstanceModel struct {
	ApplicationID uint64 `json: "bk_biz_id" bson:"bk_biz_id"`
	SetID         uint64 `json: "bk_set_id" bson:"bk_set_id,omitempty"`
	SetName       string `json: "bk_set_name" bson:"bk_set_name"`
	ModuleID      uint64 `json: "bk_module_id" bson:"bk_module_id,omitempty"`
	ModuleName    string `json: "bk_module_name" bson:"bk_module_name"`
	ProcID        uint64 `json: "bk_process_id" bson:"bk_process_id"`
	FuncID        uint64 `json: "bk_func_id" bson:"bk_func_id"`
	InstanceID    uint64 `json: "bk_instance_id" bson:"bk_instance_id"`
	HostId        uint64 `json: "bk_host_id" bson:"bk_host_id"`
}

type ProcModuleConfig

type ProcModuleConfig struct {
	ApplicationID int    `json:"bk_biz_id"`
	ModuleName    string `json:"bk_module_name"`
	ProcessID     int    `json:"bk_process_id"`
}

type ProcModuleResult

type ProcModuleResult struct {
	BaseResp `json:",inline"`
	Data     []ProcModuleConfig `json:"data"`
}

type ProcessInst

type ProcessInst struct {
	ProcessID       int64  `json:"bk_process_id" bson:"bk_process_id"`               // 进程名称
	ProcessName     string `json:"bk_process_name" bson:"bk_process_name"`           // 进程名称
	BindIP          string `json:"bind_ip" bson:"bind_ip"`                           // 绑定IP, 枚举: [{ID: "1", Name: "127.0.0.1"}, {ID: "2", Name: "0.0.0.0"}, {ID: "3", Name: "第一内网IP"}, {ID: "4", Name: "第一外网IP"}]
	PORT            string `json:"port" bson:"port"`                                 // 端口, 单个端口:"8080", 多个连续端口:"8080-8089", 多个不连续端口:"8080-8089,8199"
	PROTOCOL        string `json:"protocol" bson:"protocol"`                         // 协议, 枚举: [{ID: "1", Name: "TCP"}, {ID: "2", Name: "UDP"}],
	FuncID          string `json:"bk_func_id" bson:"bk_func_id"`                     // 功能ID
	FuncName        string `json:"bk_func_name" bson:"bk_func_name"`                 // 功能名称
	StartParamRegex string `json:"bk_start_param_regex" bson:"bk_start_param_regex"` // 启动参数匹配规则
}

type ProcessModule

type 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 {
	ApplicationID string `json: "bk_biz_id"`
	SetName       string `json: "bk_set_name"`
	ModuleName    string `json: "bk_module_name"`
	FuncID        string `json: "bk_func_id"`
	InstanceID    string `json: "bk_instance_id"`
	OpType        int    `json: "bk_proc_optype"`
}

type PropertyGroupCondition

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

PropertyGroupCondition used to reflect the property group json

type PropertyGroupObjectAtt

type PropertyGroupObjectAtt struct {
	Condition struct {
		OwnerID    string `json:"bk_supplier_account"`
		ObjectID   string `json:"bk_obj_id"`
		PropertyID string `json:"bk_property_id"`
	} `json:"condition"`
	Data struct {
		PropertyGroupID string `json:"bk_property_group"`
		PropertyIndex   int    `json:"bk_property_index"`
	} `json:"data"`
}

PropertyGroupObjectAtt uset to update or delete the property group object attribute

type QueryHostLockRequest

type 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 ??????time.Time

type QueryInstResult

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

QueryInstResult query inst result

type QueryObjectAssociationResult

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

QueryObjectAssociationResult query object association result

type QueryObjectAttributeResult

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 Ref

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

type RespError

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

func (*RespError) Error

func (r *RespError) Error() string

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 RspID

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

RspID response id

type RspSubscriptionCreate

type RspSubscriptionCreate struct {
	BaseResp `json:",inline"`
	Data     struct {
		SubscriptionID int64 `json:"subscription_id"`
	} `json:"data"`
}

type RspSubscriptionSearch

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

type RspSubscriptionTestCallback

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

type SearchCondition

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

search condition

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

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 SearchMainLine

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

type SearchModelResult

type SearchModelResult struct {
	BaseResp `json:",inline"`
	Data     []Object `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 SearchTopoGraphicsResult

type SearchTopoGraphicsResult struct {
	BaseResp `json:",inline"`
	Data     []TopoGraphics `json:"data"`
}

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 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         *types.Time `bson:"last_time" json:"last_time"`
	Statistics       *Statistics `bson:"-" json:"statistics"`
}

Subscription define

func (Subscription) GetCacheKey

func (s Subscription) GetCacheKey() string

func (Subscription) GetTimeout

func (s Subscription) GetTimeout() time.Duration

func (Subscription) TableName

func (Subscription) TableName() string

type SysConfigStruct

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

type TopoGraphics

type TopoGraphics struct {
	ScopeType       *string                `json:"scope_type,omitempty" bson:"scope_type,omitempty"` // biz,user,global,classification
	ScopeID         *string                `json:"scope_id,omitempty" bson:"scope_id,omitempty"`     // ID for ScopeType
	NodeType        *string                `json:"node_type,omitempty" bson:"node_type,omitempty"`   // obj inst
	ObjID           *string                `json:"bk_obj_id,omitempty" bson:"bk_obj_id,omitempty"`
	IsPre           *bool                  `json:"ispre,omitempty"             bson:"ispre,omitempty"`
	InstID          *int                   `json:"bk_inst_id,omitempty" bson:"bk_inst_id,omitempty"`
	NodeName        *string                `json:"node_name,omitempty" bson:"node_name,omitempty"`
	Position        *Position              `json:"position,omitempty" bson:"position,omitempty"`
	Ext             map[string]interface{} `json:"ext,omitempty" bson:"ext,omitempty"`
	Icon            *string                `json:"bk_obj_icon,omitempty" bson:"bk_obj_icon,omitempty"`
	BizID           *int                   `json:"bk_biz_id,omitempty" bson:"bk_biz_id,omitempty"`
	SupplierAccount *string                `json:"bk_supplier_account,omitempty" bson:"bk_supplier_account,omitempty"` // bk_supplier_account
	Assts           []GraphAsst            `json:"assts,omitempty"`
}

func (*TopoGraphics) FillBlank

func (t *TopoGraphics) FillBlank() *TopoGraphics

func (*TopoGraphics) SetBizID

func (t *TopoGraphics) SetBizID(val int)

func (*TopoGraphics) SetExt

func (t *TopoGraphics) SetExt(val map[string]interface{})

func (*TopoGraphics) SetIcon

func (t *TopoGraphics) SetIcon(val string)

func (*TopoGraphics) SetInstID

func (t *TopoGraphics) SetInstID(val int)

func (*TopoGraphics) SetIsPre

func (t *TopoGraphics) SetIsPre(val bool)

func (*TopoGraphics) SetNodeName

func (t *TopoGraphics) SetNodeName(val string)

func (*TopoGraphics) SetNodeType

func (t *TopoGraphics) SetNodeType(val string)

func (*TopoGraphics) SetObjID

func (t *TopoGraphics) SetObjID(val string)

func (*TopoGraphics) SetPosition

func (t *TopoGraphics) SetPosition(val *Position)

func (*TopoGraphics) SetScopeID

func (t *TopoGraphics) SetScopeID(val string)

func (*TopoGraphics) SetScopeType

func (t *TopoGraphics) SetScopeType(val string)

func (*TopoGraphics) SetSupplierAccount

func (t *TopoGraphics) SetSupplierAccount(val string)

type TopoInst

type TopoInst struct {
	InstID   int64  `json:"bk_inst_id"`
	InstName string `json:"bk_inst_name"`
	ObjID    string `json:"bk_obj_id"`
	ObjName  string `json:"bk_obj_name"`
	Default  int    `json:"default"`
}

TopoInst 实例拓扑结构

type TopoInstRst

type TopoInstRst struct {
	TopoInst `json:",inline"`
	Child    []*TopoInstRst `json:"child"`
}

TopoInstRst 拓扑实例

type TopoItem

type TopoItem struct {
	ClassificationID string `json:"bk_classification_id"`
	Position         string `json:"position"`
	ObjID            string `json:"bk_obj_id"`
	OwnerID          string `json:"bk_supplier_account"`
	ObjName          string `json:"bk_obj_name"`
}

TopoItem define topo item

type UpdateGroupCondition

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

	Data struct {
		Name  string `json:"bk_group_name,omitempty"`
		Index int64  `json:"bk_group_index"`
	} `json:"data"`
}

UpdateGroupCondition update group condition struct

type UpdateHostParams

type UpdateHostParams struct {
	ProxyList []interface{} `json:"bk_proxy_list"`
	CloudID   int64         `json:"bk_cloud_id"`
}

type UpdateResult

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

UpdateResult update result

type UserConfig

type UserConfig struct {
	Info       string    `json:"info" bson:"info"`
	Name       string    `json:"name" bson:"name"`
	ID         string    `json:"id" bson:"id"`
	CreateTime time.Time `json:"create_time" bson:"create_time"`
	UpdateTime time.Time `json:"last_time" bson:"last_time"`
	AppID      int64     `json:"bk_biz_id" bson:"bk_biz_id"`
	CreateUser string    `json:"create_user" bson:"create_user"`
	ModifyUser string    `json:"modify_user" bson:"modify_user"`
}

type UserConfigMeta

type UserConfigMeta struct {
	AppID      int64     `json:"bk_biz_id,omitempty" bson:"bk_biz_id,omitempty"`
	Info       string    `json:"info,omitempty" bson:"info,omitempty"`
	Name       string    `json:"name,omitempty" bson:"name,omitempty"`
	ID         string    `json:"id,omitempty" bson:"id,omitempty"`
	CreateTime time.Time `json:"create_time" bson:"create_time,omitempty"`
	CreateUser string    `json:"create_user" bson:"create_user,omitempty"`
	ModifyUser string    `json:"modify_user" bson:"modify_user,omitempty"`
	UpdateTime time.Time `json:"last_time" bson:"last_time,omitempty"`
	OwnerID    string    `json:"bk_supplier_account" bson:"bk_supplier_account"`
}

type UserConfigResult

type UserConfigResult struct {
	Count int           `json:"count"`
	Info  []interface{} `json:"info"`
}

type 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 types.MapStr) (*UserGroup, error)

Parse load the data from mapstr object into object instance

func (*UserGroup) ToMapStr

func (u *UserGroup) ToMapStr() types.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