lib

package
v0.0.0-...-dc8aac5 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbstractProcess

type AbstractProcess struct {
	AbstractTasks []AbstractTask `json:"abstract_tasks"`
	ReceiveTasks  []MsgEvent     `json:"receive_tasks"`
	MsgEvents     []MsgEvent     `json:"msg_events"`
}

type AbstractTask

type AbstractTask struct {
	Selected DeviceInstance `json:"selected"`
	State    string         `json:"state" bson:"-"`
	Tasks    []Task         `json:"tasks"`
}

type Config

type Config struct {
	ServerPort string
	LogLevel   string

	IotUrl           string
	ConnectionLogUrl string
	PermissionsUrl   string

	CamundaWrapperUrl    string
	ProcessDeploymentUrl string

	ForceUser string
	ForceAuth string
}

func LoadConfig

func LoadConfig(location string) (config Config, err error)

type DeviceInstance

type DeviceInstance struct {
	Id   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type HistoryResult

type HistoryResult struct {
	Series []HistorySeries `json:"Series"`
}

type HistorySeries

type HistorySeries struct {
	Name    string            `json:"name"`
	Tags    map[string]string `json:"tags"`
	Columns []string          `json:"columns"`
	Values  [][]interface{}   `json:"values"`
}

type Interface

type Interface interface {
	Config() Config
	ListDevicesByUserTag(jwt jwt_http_router.Jwt, value string) (result []map[string]interface{}, err error)
	FilterDevicesByState(jwt jwt_http_router.Jwt, devices []map[string]interface{}, state string) (result []map[string]interface{}, err error)
	SortByName(input []map[string]interface{}, sortAsc bool) (output []map[string]interface{})
	ListDevicesByTag(jwt jwt_http_router.Jwt, value string) (result []map[string]interface{}, err error)
	GetConnectionFilteredDevicesOrder(jwt jwt_http_router.Jwt, value string, sortAsc bool) (result []map[string]interface{}, err error)
	GetConnectionFilteredDevices(jwt jwt_http_router.Jwt, value string) (result []map[string]interface{}, err error)
	ListAllDevices(jwt jwt_http_router.Jwt) (result []map[string]interface{}, err error)
	ListDevices(jwt jwt_http_router.Jwt, limit string, offset string) (result []map[string]interface{}, err error)
	SearchDevices(jwt jwt_http_router.Jwt, query string, limit string, offset string) (result []map[string]interface{}, err error)
	ListDevicesOrdered(jwt jwt_http_router.Jwt, limit string, offset string, orderfeature string, direction string) (result []map[string]interface{}, err error)
	SearchDevicesOrdered(jwt jwt_http_router.Jwt, query string, limit string, offset string, orderfeature string, direction string) (result []map[string]interface{}, err error)
	ListOrderdDevicesByTag(jwt jwt_http_router.Jwt, value string, limit string, offset string, orderfeature string, direction string) (result []map[string]interface{}, err error)
	ListOrderedDevicesByUserTag(jwt jwt_http_router.Jwt, value string, limit string, offset string, orderfeature string, direction string) (result []map[string]interface{}, err error)
	CompleteDevices(jwt jwt_http_router.Jwt, ids []string) (result []map[string]interface{}, err error)
	CompleteDevicesOrdered(jwt jwt_http_router.Jwt, ids []string, limit string, offset string, orderfeature string, direction string) (result []map[string]interface{}, err error)
	GetDevicesHistory(jwt jwt_http_router.Jwt, duration string) (result []map[string]interface{}, err error)
	GetGatewaysHistory(jwt jwt_http_router.Jwt, duration string) (result []map[string]interface{}, err error)
	ListGateways(jwt jwt_http_router.Jwt, limit string, offset string) (result []map[string]interface{}, err error)
	SearchGateways(jwt jwt_http_router.Jwt, query string, limit string, offset string) (result []map[string]interface{}, err error)
	ListGatewaysOrdered(jwt jwt_http_router.Jwt, limit string, offset string, orderfeature string, direction string) (result []map[string]interface{}, err error)
	SearchGatewaysOrdered(jwt jwt_http_router.Jwt, query string, limit string, offset string, orderfeature string, direction string) (result []map[string]interface{}, err error)
	GetExtendedProcessList(jwt jwt_http_router.Jwt, query url.Values) (result []map[string]interface{}, err error)
	CompleteDeviceHistory(jwt jwt_http_router.Jwt, duration string, devices []map[string]interface{}) (result []map[string]interface{}, err error)
	CompleteGatewayHistory(jwt jwt_http_router.Jwt, duration string, devices []map[string]interface{}) (result []map[string]interface{}, err error)
	ListAllGateways(jwt jwt_http_router.Jwt) (result []map[string]interface{}, err error)
	GetGatewayDevices(jwt jwt_http_router.Jwt, id string) (ids []string, err error)
}

type Lib

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

func New

func New(config Config) *Lib

func (*Lib) CompleteDeviceHistory

func (this *Lib) CompleteDeviceHistory(jwt jwt_http_router.Jwt, duration string, devices []map[string]interface{}) (result []map[string]interface{}, err error)

func (*Lib) CompleteDevices

func (this *Lib) CompleteDevices(jwt jwt_http_router.Jwt, ids []string) (result []map[string]interface{}, err error)

func (*Lib) CompleteDevicesOrdered

func (this *Lib) CompleteDevicesOrdered(jwt jwt_http_router.Jwt, ids []string, limit string, offset string, orderfeature string, direction string) (result []map[string]interface{}, err error)

func (*Lib) CompleteGatewayHistory

func (this *Lib) CompleteGatewayHistory(jwt jwt_http_router.Jwt, duration string, gateways []map[string]interface{}) (result []map[string]interface{}, err error)

func (*Lib) Config

func (this *Lib) Config() Config

func (*Lib) FilterDevicesByState

func (this *Lib) FilterDevicesByState(jwt jwt_http_router.Jwt, devices []map[string]interface{}, state string) (result []map[string]interface{}, err error)

func (*Lib) GetConnectionFilteredDevices

func (this *Lib) GetConnectionFilteredDevices(jwt jwt_http_router.Jwt, value string) (result []map[string]interface{}, err error)

func (*Lib) GetConnectionFilteredDevicesOrder

func (this *Lib) GetConnectionFilteredDevicesOrder(jwt jwt_http_router.Jwt, value string, sortAsc bool) (result []map[string]interface{}, err error)

func (*Lib) GetDeviceLogHistory

func (this *Lib) GetDeviceLogHistory(jwt jwt_http_router.Jwt, deviceIds []string, duration string) (result map[string]HistorySeries, err error)

func (*Lib) GetDeviceLogStates

func (this *Lib) GetDeviceLogStates(jwt jwt_http_router.Jwt, deviceIds []string) (result map[string]bool, err error)

func (*Lib) GetDevicesHistory

func (this *Lib) GetDevicesHistory(jwt jwt_http_router.Jwt, duration string) (result []map[string]interface{}, err error)

func (*Lib) GetExtendedProcessList

func (this *Lib) GetExtendedProcessList(jwt jwt_http_router.Jwt, query url.Values) (result []map[string]interface{}, err error)

func (*Lib) GetGatewayDevices

func (this *Lib) GetGatewayDevices(jwt jwt_http_router.Jwt, id string) (ids []string, err error)

func (*Lib) GetGatewayLogHistory

func (this *Lib) GetGatewayLogHistory(jwt jwt_http_router.Jwt, ids []string, duration string) (result map[string]HistorySeries, err error)

func (*Lib) GetGatewayLogStates

func (this *Lib) GetGatewayLogStates(jwt jwt_http_router.Jwt, deviceIds []string) (result map[string]bool, err error)

func (*Lib) GetGatewaysHistory

func (this *Lib) GetGatewaysHistory(jwt jwt_http_router.Jwt, duration string) (result []map[string]interface{}, err error)

func (*Lib) GetLogHistory

func (this *Lib) GetLogHistory(jwt jwt_http_router.Jwt, kind string, ids []string, duration string) (result map[string]HistorySeries, err error)

func (*Lib) GetLogedges

func (this *Lib) GetLogedges(jwt jwt_http_router.Jwt, kind string, ids []string, duration string) (result map[string]interface{}, err error)

func (*Lib) GetLogstarts

func (this *Lib) GetLogstarts(jwt jwt_http_router.Jwt, kind string, ids []string) (result map[string]interface{}, err error)

func (*Lib) GetProcessDependencyList

func (this *Lib) GetProcessDependencyList(jwt jwt_http_router.Jwt, processIds []string) (result []Metadata, err error)

func (*Lib) GetProcessDeploymentList

func (this *Lib) GetProcessDeploymentList(jwt jwt_http_router.Jwt, query url.Values) (result []map[string]interface{}, err error)

func (*Lib) ListAllDevices

func (this *Lib) ListAllDevices(jwt jwt_http_router.Jwt) (result []map[string]interface{}, err error)

func (*Lib) ListAllGateways

func (this *Lib) ListAllGateways(jwt jwt_http_router.Jwt) (result []map[string]interface{}, err error)

func (*Lib) ListDevices

func (this *Lib) ListDevices(jwt jwt_http_router.Jwt, limit string, offset string) (result []map[string]interface{}, err error)

func (*Lib) ListDevicesByTag

func (this *Lib) ListDevicesByTag(jwt jwt_http_router.Jwt, value string) (result []map[string]interface{}, err error)

func (*Lib) ListDevicesByUserTag

func (this *Lib) ListDevicesByUserTag(jwt jwt_http_router.Jwt, value string) (result []map[string]interface{}, err error)

func (*Lib) ListDevicesOrdered

func (this *Lib) ListDevicesOrdered(jwt jwt_http_router.Jwt, limit string, offset string, orderfeature string, direction string) (result []map[string]interface{}, err error)

func (*Lib) ListGateways

func (this *Lib) ListGateways(jwt jwt_http_router.Jwt, limit string, offset string) (result []map[string]interface{}, err error)

func (*Lib) ListGatewaysOrdered

func (this *Lib) ListGatewaysOrdered(jwt jwt_http_router.Jwt, limit string, offset string, orderfeature string, direction string) (result []map[string]interface{}, err error)

func (*Lib) ListOrderdDevicesByTag

func (this *Lib) ListOrderdDevicesByTag(jwt jwt_http_router.Jwt, value string, limit string, offset string, orderfeature string, direction string) (result []map[string]interface{}, err error)

func (*Lib) ListOrderedDevicesByUserTag

func (this *Lib) ListOrderedDevicesByUserTag(jwt jwt_http_router.Jwt, value string, limit string, offset string, orderfeature string, direction string) (result []map[string]interface{}, err error)

func (*Lib) PermCheck

func (this *Lib) PermCheck(jwt jwt_http_router.Jwt, kind string, ids []string, right string) (result map[string]bool, err error)

func (*Lib) PermCheckDeviceAdmin

func (this *Lib) PermCheckDeviceAdmin(jwt jwt_http_router.Jwt, ids []string) (result map[string]bool, err error)

func (*Lib) PermCheckDeviceRead

func (this *Lib) PermCheckDeviceRead(jwt jwt_http_router.Jwt, ids []string) (result map[string]bool, err error)

func (*Lib) PermDeviceIdList

func (this *Lib) PermDeviceIdList(jwt jwt_http_router.Jwt, ids []string, right string) (result []map[string]interface{}, err error)

func (*Lib) PermDeviceIdListOrdered

func (this *Lib) PermDeviceIdListOrdered(jwt jwt_http_router.Jwt, ids []string, right string, limit string, offset string, orderfeature string, direction string) (result []map[string]interface{}, err error)

func (*Lib) PermIdList

func (this *Lib) PermIdList(jwt jwt_http_router.Jwt, kind string, ids []string, right string) (result []map[string]interface{}, err error)

func (*Lib) PermIdListOrdered

func (this *Lib) PermIdListOrdered(jwt jwt_http_router.Jwt, kind string, ids []string, right string, limit string, offset string, orderfeature string, direction string) (result []map[string]interface{}, err error)

func (*Lib) PermList

func (this *Lib) PermList(jwt jwt_http_router.Jwt, kind string, right string, limit string, offset string) (result []map[string]interface{}, err error)

func (*Lib) PermListAll

func (this *Lib) PermListAll(jwt jwt_http_router.Jwt, kind string, right string) (result []map[string]interface{}, err error)

func (*Lib) PermListAllDevices

func (this *Lib) PermListAllDevices(jwt jwt_http_router.Jwt, right string) (result []map[string]interface{}, err error)

func (*Lib) PermListAllGateways

func (this *Lib) PermListAllGateways(jwt jwt_http_router.Jwt, right string) (result []map[string]interface{}, err error)

func (*Lib) PermListDevices

func (this *Lib) PermListDevices(jwt jwt_http_router.Jwt, right string, limit string, offset string) (result []map[string]interface{}, err error)

func (*Lib) PermListDevicesOrdered

func (this *Lib) PermListDevicesOrdered(jwt jwt_http_router.Jwt, right string, limit string, offset string, orderfeature string, direction string) (result []map[string]interface{}, err error)

func (*Lib) PermListGateways

func (this *Lib) PermListGateways(jwt jwt_http_router.Jwt, right string, limit string, offset string) (result []map[string]interface{}, err error)

func (*Lib) PermListGatewaysOrdered

func (this *Lib) PermListGatewaysOrdered(jwt jwt_http_router.Jwt, right string, limit string, offset string, orderfeature string, direction string) (result []map[string]interface{}, err error)

func (*Lib) PermListOrdered

func (this *Lib) PermListOrdered(jwt jwt_http_router.Jwt, kind string, right string, limit string, offset string, orderfeature string, direction string) (result []map[string]interface{}, err error)

func (*Lib) PermSearch

func (this *Lib) PermSearch(jwt jwt_http_router.Jwt, kind string, query string, right string, limit string, offset string) (result []map[string]interface{}, err error)

func (*Lib) PermSearchDevices

func (this *Lib) PermSearchDevices(jwt jwt_http_router.Jwt, query string, right string, limit string, offset string) (result []map[string]interface{}, err error)

func (*Lib) PermSearchDevicesOrdered

func (this *Lib) PermSearchDevicesOrdered(jwt jwt_http_router.Jwt, query string, right string, limit string, offset string, orderfeature string, direction string) (result []map[string]interface{}, err error)

func (*Lib) PermSearchGateways

func (this *Lib) PermSearchGateways(jwt jwt_http_router.Jwt, query string, right string, limit string, offset string) (result []map[string]interface{}, err error)

func (*Lib) PermSearchGatewaysOrdered

func (this *Lib) PermSearchGatewaysOrdered(jwt jwt_http_router.Jwt, query string, right string, limit string, offset string, orderfeature string, direction string) (result []map[string]interface{}, err error)

func (*Lib) PermSearchOrdered

func (this *Lib) PermSearchOrdered(jwt jwt_http_router.Jwt, kind string, query string, right string, limit string, offset string, orderfeature string, direction string) (result []map[string]interface{}, err error)

func (*Lib) PermSelect

func (this *Lib) PermSelect(jwt jwt_http_router.Jwt, kind string, field string, value string, right string) (result []map[string]interface{}, err error)

func (*Lib) PermSelectOrdered

func (this *Lib) PermSelectOrdered(jwt jwt_http_router.Jwt, kind string, field string, value string, right string, limit string, offset string, orderfeature string, direction string) (result []map[string]interface{}, err error)

func (*Lib) PermSelectTagDevices

func (this *Lib) PermSelectTagDevices(jwt jwt_http_router.Jwt, value string, right string) (result []map[string]interface{}, err error)

func (*Lib) PermSelectTagDevicesOrdered

func (this *Lib) PermSelectTagDevicesOrdered(jwt jwt_http_router.Jwt, value string, right string, limit string, offset string, orderfeature string, direction string) (result []map[string]interface{}, err error)

func (*Lib) PermSelectUserTagDevices

func (this *Lib) PermSelectUserTagDevices(jwt jwt_http_router.Jwt, value string, right string) (result []map[string]interface{}, err error)

func (*Lib) PermSelectUserTagDevicesOrdered

func (this *Lib) PermSelectUserTagDevicesOrdered(jwt jwt_http_router.Jwt, value string, right string, limit string, offset string, orderfeature string, direction string) (result []map[string]interface{}, err error)

func (*Lib) SearchDevices

func (this *Lib) SearchDevices(jwt jwt_http_router.Jwt, query string, limit string, offset string) (result []map[string]interface{}, err error)

func (*Lib) SearchDevicesOrdered

func (this *Lib) SearchDevicesOrdered(jwt jwt_http_router.Jwt, query string, limit string, offset string, orderfeature string, direction string) (result []map[string]interface{}, err error)

func (*Lib) SearchGateways

func (this *Lib) SearchGateways(jwt jwt_http_router.Jwt, query string, limit string, offset string) (result []map[string]interface{}, err error)

func (*Lib) SearchGatewaysOrdered

func (this *Lib) SearchGatewaysOrdered(jwt jwt_http_router.Jwt, query string, limit string, offset string, orderfeature string, direction string) (result []map[string]interface{}, err error)

func (*Lib) SortByName

func (this *Lib) SortByName(input []map[string]interface{}, sortAsc bool) (output []map[string]interface{})

type Metadata

type Metadata struct {
	Process  string          `json:"process"`
	Abstract AbstractProcess `json:"abstract"`
	Online   bool            `json:"online"`
	Owner    string          `json:"owner"`
}

type MsgEvent

type MsgEvent struct {
	FilterId string `json:"filter_id,omitempty"`
	ShapeId  string `json:"shape_id"`
	State    string `json:"state,omitempty" bson:"-"`
}

type OfflineReason

type OfflineReason struct {
	Type           string      `json:"type"`
	Id             string      `json:"id"`
	AdditionalInfo interface{} `json:"additional_info,omitempty"`
	Description    string      `json:"description"`
}

type Task

type Task struct {
	Id    string `json:"id"`
	Label string `json:"label"`
}

Jump to

Keyboard shortcuts

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