Documentation
¶
Index ¶
Constants ¶
View Source
const ChannelEmail = "email"
View Source
const ChannelFcm = "push"
View Source
const ChannelMqtt = "mqtt"
View Source
const ChannelWebsocket = "websoket"
View Source
const TopicAnalytics = "analytics"
View Source
const TopicConnector = "connector"
View Source
const TopicDeveloper = "developer"
View Source
const TopicDeviceOffline = "device_offline"
View Source
const TopicIncident = "incident"
View Source
const TopicMGW = "mgw"
View Source
const TopicProcesses = "processes"
View Source
const TopicSmartService = "smart_service"
View Source
const TopicUnknown = "unknown"
View Source
const WsAuthOkType = "authentication confirmed"
View Source
const WsAuthRequestType = "please reauthenticate"
View Source
const WsAuthType = "authentication"
View Source
const WsListType = "notification list"
View Source
const WsRefreshType = "refresh"
View Source
const WsUpdateDeleteManyType = "delete notifications"
View Source
const WsUpdateDeleteType = "delete notification"
View Source
const WsUpdateSetType = "put notification"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broker ¶
type Broker struct {
Id string `json:"id"`
Address string `json:"address"`
User string `json:"user"`
Password string `json:"password"`
Topic string `json:"topic"`
Qos uint8 `json:"qos"`
Enabled bool `json:"enabled"`
CreatedAt time.Time `json:"created_at" bson:"created_at"`
UpdatedAt time.Time `json:"updated_at" bson:"updated_at"`
UserId string `json:"-" bson:"user_id"`
}
type BrokerList ¶
type BrokerList struct {
Total int64 `json:"total"`
Limit int `json:"limit"`
Offset int `json:"offset"`
Brokers []Broker `json:"brokers"`
}
func (*BrokerList) Equal ¶
func (l *BrokerList) Equal(other interface{}) bool
type Channel ¶ added in v0.0.4
type Channel = string
func AllChannels ¶ added in v0.0.4
func AllChannels() []Channel
type EventMessage ¶
type EventMessage struct {
Type string `json:"type"`
Payload interface{} `json:"payload,omitempty"`
}
type Notification ¶
type Notification struct {
Id string `json:"_id" bson:"_id"`
UserId string `json:"userId" bson:"userId"`
Title string `json:"title" bson:"title"`
Message string `json:"message" bson:"message"`
IsRead bool `json:"isRead" bson:"isRead"`
CreatedAt time.Time `json:"created_at" bson:"created_at"`
Topic `json:"topic" bson:"topic"`
// contains filtered or unexported fields
}
func (*Notification) Equal ¶
func (n *Notification) Equal(other interface{}) bool
func (*Notification) Hash ¶
func (n *Notification) Hash() [32]byte
func (*Notification) ToDB ¶
func (n *Notification) ToDB() (db NotificationDB, err error)
type NotificationDB ¶
type NotificationList ¶
type NotificationList struct {
Total int64 `json:"total"`
Limit int `json:"limit"`
Offset int `json:"offset"`
Notifications []Notification `json:"notifications"`
}
func (*NotificationList) Equal ¶
func (n *NotificationList) Equal(other interface{}) bool
type PlatformBroker ¶
Click to show internal directories.
Click to hide internal directories.