object

package
v3.0.8-rc.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Err_Not_Found_Anything = errors.New("found nothing")
	Err_Not_Set_Input      = errors.New("input nothing")
	Err_Not_Set_ObjID      = errors.New("not set objid")
	Err_Request_Object     = errors.New("http request failed")
	Err_Decode_Json        = errors.New("decode json failed")
	Err_Creaate_Object     = errors.New("create object failed")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client

func NewClient

func NewClient(address string) *Client

NewMetaObjectClient 创建Object 操作接口

func (*Client) CreateMetaObject

func (cli *Client) CreateMetaObject(forward *ForwardParam, data []byte) (int, error)

CreateMetaObject 创建元对象, 如果成功则返回 新数据的ID

func (*Client) CreateMetaObjectAsst

func (cli *Client) CreateMetaObjectAsst(forward *ForwardParam, data []byte) (int, error)

CreateMetaObject 创建元对象, 如果成功则返回 新数据的ID

func (*Client) CreateMetaObjectAtt

func (cli *Client) CreateMetaObjectAtt(forward *ForwardParam, data []byte) (int, error)

CreateMetaObject 创建元对象, 如果成功则返回 新数据的ID

func (*Client) CreateMetaObjectAttGroup

func (cli *Client) CreateMetaObjectAttGroup(forward *ForwardParam, data []byte) (int, error)

CreateMetaObjectAttGroup create a new object attribute group, return the id

func (*Client) CreateMetaObjectCls

func (cli *Client) CreateMetaObjectCls(forward *ForwardParam, data []byte) (int, error)

CreateMetaObjectCls 创建元对象分类, 如果成功则返回 新数据的ID

func (*Client) DeleteMetaObject

func (cli *Client) DeleteMetaObject(forward *ForwardParam, objID int, data []byte) error

DeleteMetaObject, objID 如果为0, 则必须要设置obj,如果设置了 objID,那么会自动忽略obj 的值

func (*Client) DeleteMetaObjectAsst

func (cli *Client) DeleteMetaObjectAsst(forward *ForwardParam, objAsstID int, data []byte) error

DeleteMetaObject, objID 如果为0, 则必须要设置obj,如果设置了 objID,那么会自动忽略obj 的值

func (*Client) DeleteMetaObjectAtt

func (cli *Client) DeleteMetaObjectAtt(forward *ForwardParam, objAttID int, data []byte) error

DeleteMetaObject, objID 如果为0, 则必须要设置obj,如果设置了 objID,那么会自动忽略obj 的值

func (*Client) DeleteMetaObjectAttGroup

func (cli *Client) DeleteMetaObjectAttGroup(forward *ForwardParam, id int, data []byte) error

DeleteMetaObjectAttGroup delete the property group

func (*Client) DeleteMetaObjectAttGroupProperty

func (cli *Client) DeleteMetaObjectAttGroupProperty(forward *ForwardParam, ownerID, objectID, propertyID, groupID string) error

DeleteMetaObjectAttGroupProperty delete the group property

func (*Client) DeleteMetaObjectCls

func (cli *Client) DeleteMetaObjectCls(forward *ForwardParam, objClsID int, data []byte) error

DeleteMetaObject, objID 如果为0, 则必须要设置obj,如果设置了 objID,那么会自动忽略obj 的值

func (*Client) GetAddress

func (cli *Client) GetAddress() string

func (*Client) SearchMetaObject

func (cli *Client) SearchMetaObject(forward *ForwardParam, data []byte) ([]ObjDes, error)

SearchMetaobject 查询元数据对象集合

func (*Client) SearchMetaObjectAsst

func (cli *Client) SearchMetaObjectAsst(forward *ForwardParam, data []byte) ([]ObjAsstDes, error)

SearchMetaobject 查询元数据对象集合

func (*Client) SearchMetaObjectAtt

func (cli *Client) SearchMetaObjectAtt(forward *ForwardParam, data []byte) ([]ObjAttDes, error)

SearchMetaObjectAtt 查询元数据对象集合

func (*Client) SearchMetaObjectAttByID

func (cli *Client) SearchMetaObjectAttByID(forward *ForwardParam, attrID int) (*ObjAttDes, error)

SearchMetaobjectAttByID 查询元数据对象集合

func (*Client) SearchMetaObjectAttExceptInnerFiled

func (cli *Client) SearchMetaObjectAttExceptInnerFiled(forward *ForwardParam, data []byte) ([]ObjAttDes, error)

SearchMetaObjectAttExceptInnerFiled 排除内置字段

func (*Client) SearchMetaObjectCls

func (cli *Client) SearchMetaObjectCls(forward *ForwardParam, data []byte) ([]ObjClsDes, error)

SearchMetaobjectCls 仅返回分组信息

func (*Client) SearchMetaObjectClsObjects

func (cli *Client) SearchMetaObjectClsObjects(forward *ForwardParam, ownerID string, data []byte) ([]ObjClsObjectDes, error)

SearchMetaObjectClsObjects 查询所有的分类及分类下属的所有分组信息

func (*Client) SearchTopoGraphics

func (cli *Client) SearchTopoGraphics(forward *ForwardParam, params *TopoGraphics) ([]TopoGraphics, error)

SearchTopoGraphics search topo graphics

func (*Client) SelectPropertyGroup

func (cli *Client) SelectPropertyGroup(forward *ForwardParam, data []byte) ([]ObjAttGroupDes, error)

func (*Client) SelectPropertyGroupByObjectID

func (cli *Client) SelectPropertyGroupByObjectID(forward *ForwardParam, ownerID, objectID string, data []byte) ([]ObjAttGroupDes, error)

SelectPropertyGroupByObjectID 查询元数据对象集合

func (*Client) SetAddress

func (cli *Client) SetAddress(address string)

SetAddress

func (*Client) UpdateGraphics

func (cli *Client) UpdateGraphics(forward *ForwardParam, params []TopoGraphics) error

UpdateGraphics search topo graphics

func (*Client) UpdateMetaObject

func (cli *Client) UpdateMetaObject(forward *ForwardParam, objID int, data []byte) error

UpdateMetaObject objID 被更新的对象的ID,val 新的ID值

func (*Client) UpdateMetaObjectAsst

func (cli *Client) UpdateMetaObjectAsst(forward *ForwardParam, objAsstID int, data []byte) error

UpdateMetaObject objID 被更新的对象的ID,val 新的ID值

func (*Client) UpdateMetaObjectAtt

func (cli *Client) UpdateMetaObjectAtt(forward *ForwardParam, objAttID int, data []byte) error

UpdateMetaObjectAtt objID 被更新的对象的ID,val 新的ID值

func (*Client) UpdateMetaObjectAttGroup

func (cli *Client) UpdateMetaObjectAttGroup(forward *ForwardParam, data []byte) error

UpdateMetaObjectAttGroup update object attribute group

func (*Client) UpdateMetaObjectAttGroupProperty

func (cli *Client) UpdateMetaObjectAttGroupProperty(forward *ForwardParam, data []byte) error

UpdateMetaObjectAttGroupProperty update object attribute group

func (*Client) UpdateMetaObjectCls

func (cli *Client) UpdateMetaObjectCls(forward *ForwardParam, objClsID int, data []byte) error

UpdateMetaObjectCls objID 被更新的对象的ID,val 新的ID值

type ForwardParam

type ForwardParam struct {
	Header http.Header
}

ForwardParam define logic layer common param

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"`
	Lable    map[string]string `json:"lable"`
}

Asst the node association node

type ObjAsstDes

type ObjAsstDes struct {
	metadata.ObjectAsst `json:",inline"`
}

ObjAsstDes association

type ObjAsstRsp

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

ObjAsstRsp 用于提取congtroller 返回的数据结构

type ObjAttDes

type ObjAttDes struct {
	metadata.ObjectAttDes `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 ObjAttGroupDes

type ObjAttGroupDes struct {
	metadata.PropertyGroup `json:",inline"`
}

ObjAttGroupDes define property group

type ObjAttGroupRsp

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

ObjAttGroupRsp 用于提取controller 返回的数据结构

type ObjAttRsp

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

ObjAttRsp 用于提取controller 返回的数据结构

type ObjClsDes

type ObjClsDes struct {
	metadata.ObjClassification `json:",inline"`
}

ObjClsDes 对象分类(分栏/分组)

type ObjClsObjectDes

type ObjClsObjectDes struct {
	metadata.ObjClassificationObject `json:",inline"`
}

ObjClsObjectDes 分类下的对象模型

type ObjClsObjectRsp

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

ObjClsObjectRsp 用于提起controller返回的数据结构

type ObjClsRsp

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

ObjClsRsp 用于提起controller返回的数据结构

type ObjDes

type ObjDes struct {
	metadata.ObjectDes `json:",inline"`
}

ObjDes

type ObjDesRsp

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

ObjDesRsp 用于提取congtroller 返回的数据结构

type TopoGraphics

type TopoGraphics struct {
	metadata.TopoGraphics `json:",inline"`
	Assts                 []GraphAsst `json:"assts,omitempty"`
}

TopoGraphics Topo Graphics

Jump to

Keyboard shortcuts

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