manager

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: 3 Imported by: 0

Documentation

Index

Constants

View Source
const Object = "object"

Object const definition

View Source
const ObjectAsst = "object_asst"

ObjectAsst const definition

View Source
const ObjectAttribute = "object_attribute"

ObjectAttribute const definition

View Source
const ObjectClass = "object_class"

ObjectClass const definition

View Source
const ObjectGroup = "object_group"

ObjectGroup const definition

View Source
const TopoGraphics = "topo_graphics"

TopoGraphics const definition

Variables

This section is empty.

Functions

func RegisterLogic

func RegisterLogic(logicName string, logic interface{}) error

RegisterLogic register the logic object

func SetManager

func SetManager(target Hooker) error

SetManager set register

func SetObjectAddress

func SetObjectAddress(address func() string)

SetObjectAddress TODO: need to delete

Types

type Configer

type Configer interface {
	Get(target interface{}) string
}

Configer define the configer interface

type Hooker

type Hooker interface {
	SetManager(mgr Manager) error
}

Hooker define callback hook

type Manager

type Manager interface {

	// object asst interface
	ObjectAsstLogic

	// object class interface
	ObjectClassLogic

	// object interface
	ObjectLogic

	// object attribute interface
	ObjectAttLogic

	// object attribute group interface
	ObjectAttGroupLogic

	// TopoGraphicsLogic interface
	TopoGraphicsLogic
}

Manager define manager interface

type ObjectAsstLogic

type ObjectAsstLogic interface {
	CreateObjectAsst(forward *api.ForwardParam, obj map[string]interface{}, errProxy errors.DefaultCCErrorIf) (int, error)
	SelectObjectAsst(forward *api.ForwardParam, obj map[string]interface{}, errProxy errors.DefaultCCErrorIf) ([]api.ObjAsstDes, error)
	UpdateObjectAsst(forward *api.ForwardParam, selector, obj map[string]interface{}, errProxy errors.DefaultCCErrorIf) error
	DeleteObjectAsstByID(forward *api.ForwardParam, id int, errProxy errors.DefaultCCErrorIf) error
	DeleteObjectAsst(forward *api.ForwardParam, obj map[string]interface{}, errProxy errors.DefaultCCErrorIf) error
}

ObjectAsstLogic define the logic interface

type ObjectAttGroupLogic

type ObjectAttGroupLogic interface {
	CreateObjectGroup(forward *api.ForwardParam, params []byte, errProxy errors.DefaultCCErrorIf) (int, error)
	UpdateObjectGroup(forward *api.ForwardParam, params []byte, errProxy errors.DefaultCCErrorIf) error
	UpdateObjectGroupProperty(forward *api.ForwardParam, params []byte, errProxy errors.DefaultCCErrorIf) error
	DeleteObjectGroup(forward *api.ForwardParam, id int, errProxy errors.DefaultCCErrorIf) error
	DeleteObjectGroupProperty(forward *api.ForwardParam, ownerID, objectID, propertyID, groupID string, errProxy errors.DefaultCCErrorIf) error
	SelectPropertyGroupByObjectID(forward *api.ForwardParam, ownerID, objectID string, data []byte, errProxy errors.DefaultCCErrorIf) ([]api.ObjAttGroupDes, error)
}

ObjectAttGroupLogic define the logic interface

type ObjectAttLogic

type ObjectAttLogic interface {
	CreateTopoModel(forward *api.ForwardParam, obj api.ObjAttDes, errProxy errors.DefaultCCErrorIf) (int, error)
	SelectTopoModel(forward *api.ForwardParam, rstitems []TopoModelRsp, ownerid, objid, clsid, preid, prename string, errProxy errors.DefaultCCErrorIf) ([]TopoModelRsp, error)
	DeleteTopoModel(forward *api.ForwardParam, ownerid, objid string, assotype int, errProxy errors.DefaultCCErrorIf) error
	CreateObjectAtt(forward *api.ForwardParam, params api.ObjAttDes, errProxy errors.DefaultCCErrorIf) (int, error)
	SelectObjectAtt(forward *api.ForwardParam, params []byte, errProxy errors.DefaultCCErrorIf) ([]api.ObjAttDes, error)
	UpdateObjectAtt(forward *api.ForwardParam, id int, params []byte, errProxy errors.DefaultCCErrorIf) error
	DeleteObjectAtt(forward *api.ForwardParam, id int, params []byte, errProxy errors.DefaultCCErrorIf) error
}

ObjectAttLogic define the logic interface

type ObjectClassLogic

type ObjectClassLogic interface {
	CreateObjectClass(forward *api.ForwardParam, params []byte, errProxy errors.DefaultCCErrorIf) (int, error)
	SelectObjectClass(forward *api.ForwardParam, params []byte, errProxy errors.DefaultCCErrorIf) ([]api.ObjClsDes, error)
	SelectObjectClassWithObjects(forward *api.ForwardParam, ownerID string, params []byte, errProxy errors.DefaultCCErrorIf) ([]api.ObjClsObjectDes, error)
	UpdateObjectClass(forward *api.ForwardParam, id int, params []byte, errProxy errors.DefaultCCErrorIf) error
	DeleteObjectClass(forward *api.ForwardParam, id int, params []byte, errProxy errors.DefaultCCErrorIf) error
}

ObjectClassLogic define the logic interface

type ObjectLogic

type ObjectLogic interface {
	CreateObject(forward *api.ForwardParam, params []byte, errProxy errors.DefaultCCErrorIf) (int, error)
	SelectObject(forward *api.ForwardParam, params []byte, errProxy errors.DefaultCCErrorIf) ([]api.ObjDes, error)
	UpdateObject(forward *api.ForwardParam, id int, params []byte, errProxy errors.DefaultCCErrorIf) error
	DeleteObject(forward *api.ForwardParam, id int, params []byte, errProxy errors.DefaultCCErrorIf) error
}

ObjectLogic define the logic interface

type SetConfiger

type SetConfiger interface {
	Set(cfg Configer)
}

SetConfiger define the set configer interface

type TopoGraphicsLogic

type TopoGraphicsLogic interface {
	SearchGraphics(forward *api.ForwardParam, params *api.TopoGraphics, errProxy errors.DefaultCCErrorIf) ([]api.TopoGraphics, error)
	UpdateGraphics(forward *api.ForwardParam, params []api.TopoGraphics, errProxy errors.DefaultCCErrorIf) error
}

TopoGraphics define the TopoGraphics interface

type TopoInst

type TopoInst struct {
	InstID   int    `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
	Child []TopoInstRst `json:"child"`
}

TopoInstRst 拓扑实例

type TopoModelRsp

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

TopoModelRsp 拓扑模型结构

Jump to

Keyboard shortcuts

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