Documentation ¶
Index ¶
- func Compress(src string, dest string) error
- func DeCompress(tarFile, dest string) error
- func PaginateIndex(page, size, length int) (int, int)
- func PrintFlags(flags *pflag.FlagSet)
- func PublishDeviceEvent(conn *amqp.Connection, exchange, exchangeType string, ...) error
- func RandAllStringRunes(n int) string
- func RandNumberRunes(n int) string
- func RandStringRunes(n int) string
- func ScpDir(client *sftp.Client, srcDir, dstDir string, forward bool) error
- func ScpFile(client *sftp.Client, srcPath, dstPath string, forward bool) error
- func SetupSigusr1Trap()
- func Str2Bool(s string) bool
- func UpdateLogLevel(w http.ResponseWriter, r *http.Request)
- func ValidatePage(page, size string) (int, int, error)
- type ComponentMode
- type RabbitMQBody
- type RabbitMQEvent
- type RabbitMQRoutingKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeCompress ¶
func PaginateIndex ¶
func PublishDeviceEvent ¶
func PublishDeviceEvent(conn *amqp.Connection, exchange, exchangeType string, routingKey RabbitMQRoutingKey, event RabbitMQEvent, body interface{}, reliable bool) error
PublishDeviceEvent publishes relevant topic events to RabbitMQ.
func RandAllStringRunes ¶
func RandNumberRunes ¶
func RandStringRunes ¶
func SetupSigusr1Trap ¶
func SetupSigusr1Trap()
func UpdateLogLevel ¶
func UpdateLogLevel(w http.ResponseWriter, r *http.Request)
Types ¶
type ComponentMode ¶
type ComponentMode string
const ( ComponentModeCloud ComponentMode = "cloud" ComponentModeEdge ComponentMode = "edge" )
type RabbitMQBody ¶
type RabbitMQBody struct { MsgId string `json:"msgId,omitempty"` MsgTopic RabbitMQRoutingKey `json:"msgTopic,omitempty"` MsgEvent RabbitMQEvent `json:"msgEvent,omitempty"` Timestamp string `json:"timestamp,omitempty"` Body []byte `json:"body,omitempty"` }
type RabbitMQEvent ¶
type RabbitMQEvent string
const ( RabbitMQEventAdd RabbitMQEvent = "add" RabbitMQEventUpdate RabbitMQEvent = "update" RabbitMQEventDelete RabbitMQEvent = "delete" RabbitMQEventImport RabbitMQEvent = "import" )
type RabbitMQRoutingKey ¶
type RabbitMQRoutingKey string
const ( RabbitMQRoutingKeyDeviceModel RabbitMQRoutingKey = "device-model" RabbitMQRoutingKeyDeviceModelFeature RabbitMQRoutingKey = "device-model-feature" RabbitMQRoutingKeyDevice RabbitMQRoutingKey = "device" RabbitMQRoutingKeyDeviceProperty RabbitMQRoutingKey = "device-property" RabbitMQRoutingKeyDeviceCommand RabbitMQRoutingKey = "device-command" RabbitMQRoutingKeyDeviceSubDevice RabbitMQRoutingKey = "device-subdevice" )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.