Documentation ¶
Index ¶
- Variables
- func GetUserId(token string) (userId string, err error)
- func IsAdmin(token string) bool
- type Claims
- type DeviceGroupCommand
- type DoneNotification
- type Events
- func (this *Events) CheckEvent(token string, id string) (result int)
- func (this *Events) Deploy(owner string, deployment deploymentmodel.Deployment) (err error)
- func (this *Events) GetEventStates(token string, ids []string) (states map[string]bool, err error, code int)
- func (this *Events) HandleCommand(msg []byte) error
- func (this *Events) HandleDeviceGroupUpdate(msg []byte) error
- func (this *Events) Remove(owner string, deploymentId string) (err error)
- type EventsFactory
- type Handler
- type VersionWrapper
Constants ¶
This section is empty.
Variables ¶
View Source
var Factory = &EventsFactory{}
Functions ¶
Types ¶
type Claims ¶
type DeviceGroupCommand ¶
type DeviceGroupCommand struct { Command string `json:"command"` Id string `json:"id"` Owner string `json:"owner"` DeviceGroup model.DeviceGroup `json:"device_group"` }
type DoneNotification ¶
type Events ¶
type Events struct {
// contains filtered or unexported fields
}
func (*Events) Deploy ¶
func (this *Events) Deploy(owner string, deployment deploymentmodel.Deployment) (err error)
func (*Events) GetEventStates ¶
func (*Events) HandleCommand ¶
func (*Events) HandleDeviceGroupUpdate ¶
type EventsFactory ¶
type EventsFactory struct{}
func (*EventsFactory) New ¶
func (this *EventsFactory) New(ctx context.Context, config config.Config, analytics interfaces.Analytics, devices interfaces.Devices, imports interfaces.Imports, doneProducer interfaces.Producer, m *metrics.Metrics) (result interfaces.Events, err error)
type Handler ¶
type Handler interface { GetEventStates(token string, ids []string) (states map[string]bool, err error, code int) CheckEvent(token string, id string) int Remove(owner string, deploymentId string) error Deploy(owner string, deployment deploymentmodel.Deployment) error UpdateDeviceGroup(owner string, group model.DeviceGroup) error }
Click to show internal directories.
Click to hide internal directories.