model

package
v1.11.3 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: Apache-2.0 Imports: 6 Imported by: 6

Documentation

Index

Constants

View Source
const (
	ResNode   = "node"
	ResMember = "membership"
	ResTwin   = "twin"
	ResAuth   = "auth_info"
	ResDevice = "device"
)

constants for resource types

View Source
const (
	OpGet        = "get"
	OpResult     = "get_result"
	OpList       = "list"
	OpDetail     = "detail"
	OpDelta      = "delta"
	OpDoc        = "document"
	OpUpdate     = "updated"
	OpInsert     = "insert"
	OpDelete     = "deleted"
	OpConnect    = "connected"
	OpDisConnect = "disconnected"
	OpKeepalive  = "keepalive"
)

constants for resource operations

View Source
const (
	SrcCloudHub         = "cloudhub"
	SrcEdgeController   = "edgecontroller"
	SrcDeviceController = "devicecontroller"
	SrcManager          = "edgemgr"
)

constants for message source

View Source
const (
	ProjectID = "project_id"
	NodeID    = "node_id"
)

constants for identifier information for edge hub

View Source
const (
	GpResource = "resource"
)

constants for message group

Variables

This section is empty.

Functions

func IsFromEdge added in v1.2.0

func IsFromEdge(msg *model.Message) bool

IsFromEdge judges if the event is sent from edge

func IsNodeStopped added in v1.2.0

func IsNodeStopped(msg *model.Message) bool

IsNodeStopped indicates if the node is stopped or running

func IsToEdge added in v1.2.0

func IsToEdge(msg *model.Message) bool

IsToEdge judges if the vent should be sent to edge

func NewResource

func NewResource(resType, resID string, info *HubInfo) string

NewResource constructs a resource field using resource type and ID

Types

type HubInfo

type HubInfo struct {
	ProjectID string
	NodeID    string
}

HubInfo saves identifier information for edge hub

Jump to

Keyboard shortcuts

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