object

package
v3.0.6-alpha+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2018 License: MIT Imports: 8 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(data []byte) (int, error)

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

func (*Client) CreateMetaObjectAsst

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

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

func (*Client) CreateMetaObjectAtt

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

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

func (*Client) CreateMetaObjectAttGroup

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

CreateMetaObjectAttGroup create a new object attribute group, return the id

func (*Client) CreateMetaObjectCls

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

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

func (*Client) DeleteMetaObject

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

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

func (*Client) DeleteMetaObjectAsst

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

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

func (*Client) DeleteMetaObjectAtt

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

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

func (*Client) DeleteMetaObjectAttGroup

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

DeleteMetaObjectAttGroup delete the property group

func (*Client) DeleteMetaObjectAttGroupProperty

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

DeleteMetaObjectAttGroupProperty delete the group property

func (*Client) DeleteMetaObjectCls

func (cli *Client) DeleteMetaObjectCls(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(data []byte) ([]ObjDes, error)

SearchMetaobject 查询元数据对象集合

func (*Client) SearchMetaObjectAsst

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

SearchMetaobject 查询元数据对象集合

func (*Client) SearchMetaObjectAtt

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

SearchMetaObjectAtt 查询元数据对象集合

func (*Client) SearchMetaObjectAttByID

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

SearchMetaobjectAttByID 查询元数据对象集合

func (*Client) SearchMetaObjectAttExceptInnerFiled

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

SearchMetaObjectAttExceptInnerFiled 排除内置字段

func (*Client) SearchMetaObjectCls

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

SearchMetaobjectCls 仅返回分组信息

func (*Client) SearchMetaObjectClsObjects

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

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

func (*Client) SelectPropertyGroup

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

func (*Client) SelectPropertyGroupByObjectID

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

SelectPropertyGroupByObjectID 查询元数据对象集合

func (*Client) SetAddress

func (cli *Client) SetAddress(address string)

SetAddress

func (*Client) UpdateMetaObject

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

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

func (*Client) UpdateMetaObjectAsst

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

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

func (*Client) UpdateMetaObjectAtt

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

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

func (*Client) UpdateMetaObjectAttGroup

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

UpdateMetaObjectAttGroup update object attribute group

func (*Client) UpdateMetaObjectAttGroupProperty

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

UpdateMetaObjectAttGroupProperty update object attribute group

func (*Client) UpdateMetaObjectCls

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

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

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 返回的数据结构

Jump to

Keyboard shortcuts

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