apiserver

package
v0.0.0-...-1242a22 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GET_DM    = "/get/dm/"
	UPDATE_DM = "/update/dm/"

	GET_PARAMS    = "/get/params/"
	SET_PARAMS    = "/set/params/"
	UPDATE_PARAMS = "/update/params/"

	GET_INSTANCES    = "/get/instances/"
	ADD_INSTANCES    = "/add/instances/"
	DELETE_INSTANCES = "/delete/instances/"
	UPDATE_INSTANCES = "/update/instances/"

	OPERATE_CMD = "/operate/cmd/"

	RECONNECT_MTP = "/reconnect/mtp/"
	RECONNECT_DB  = "/reconnect/db/"

	DELETE_DBCOLL = "/delete/dbcoll/"

	GET_AGENTS  = "/get/agents/"
	GET_MTPINFO = "/get/mtpinfo/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiServer

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

func (*ApiServer) CntlrAddInstanceReq

func (as *ApiServer) CntlrAddInstanceReq(epId string, objs []*object) ([]*Instance, error)

func (*ApiServer) CntlrDeleteInstanceReq

func (as *ApiServer) CntlrDeleteInstanceReq(epId string, objPath string) error

func (*ApiServer) CntlrGetAgentMsgs

func (as *ApiServer) CntlrGetAgentMsgs(epId string) error

func (*ApiServer) CntlrGetDatamodelReq

func (as *ApiServer) CntlrGetDatamodelReq(epId string, path string) error

func (*ApiServer) CntlrGetInstancesReq

func (as *ApiServer) CntlrGetInstancesReq(epId string, objPath string, firstLevelOnly bool) error

func (*ApiServer) CntlrGetParamReq

func (as *ApiServer) CntlrGetParamReq(epId string, path string) error

func (*ApiServer) CntlrOperateReq

func (as *ApiServer) CntlrOperateReq(epId string, cmd string, cmdKey string, resp bool, inputs map[string]string) error

func (*ApiServer) CntlrSetParamReq

func (as *ApiServer) CntlrSetParamReq(epId string, path string, params map[string]string) error

func (*ApiServer) GetCntlrInfo

func (as *ApiServer) GetCntlrInfo() (*CntlrInfo, error)

func (*ApiServer) Init

func (as *ApiServer) Init() error

func (*ApiServer) IsConnectedToCntlr

func (as *ApiServer) IsConnectedToCntlr() bool

func (*ApiServer) IsConnectedToDb

func (as *ApiServer) IsConnectedToDb() bool

func (*ApiServer) Server

func (as *ApiServer) Server() error

type CntlrInfo

type CntlrInfo struct {
	Version string `json:"version"`
}

type DmObject

type DmObject struct {
	Path          string    `json:"path"`
	MultiInstance bool      `json:"multi_instance"`
	Access        string    `json:"access"`
	Params        []dmParam `json:"params"`
	Events        []dmEvent `json:"events"`
	Cmds          []dmCmd   `json:"cmds"`
}

type Instance

type Instance struct {
	Path       string            `json:"path"`
	UniqueKeys map[string]string `json:"unique_keys"`
}

type NotifyType

type NotifyType byte
const (
	NotifyEvent NotifyType = iota
	NotifyValueChange
	NotifyObjCreation
	NotifyObjDeletion
	NotifyOpComplete
	NotifyOnBoardReq
)

type ObjParam

type ObjParam struct {
	Path   string   `json:"path"`
	Params []*Param `json:"params"`
}

type Param

type Param struct {
	Name   string `json:"name"`
	Value  string `json:"value"`
	Access string `json:"access"`
}

Jump to

Keyboard shortcuts

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