Documentation
¶
Index ¶
- Variables
- func GetUserId(token string) (userId string, err error)
- func IsAdmin(token string) bool
- type Claims
- type DeploymentCommand
- type DeviceGroupCommand
- type DoneNotification
- type Events
- func (this *Events) CheckEvent(token string, id string) (result int)
- func (this *Events) Deploy(owner string, deployment models.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)
- func (this *Events) UpdateDeviceGroup(groupId 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 DeploymentCommand ¶ added in v0.0.32
type DeviceGroupCommand ¶
type DeviceGroupCommand struct {
Command string `json:"command"`
Id string `json:"id"`
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 models.Deployment) (err error)
func (*Events) GetEventStates ¶
func (*Events) HandleCommand ¶
func (*Events) HandleDeviceGroupUpdate ¶
func (*Events) UpdateDeviceGroup ¶ added in v0.0.31
type EventsFactory ¶
type EventsFactory struct{}
func (*EventsFactory) New ¶
func (this *EventsFactory) New(ctx context.Context, config config.Config, 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 models.Deployment) error
UpdateDeviceGroup(groupId string) error
}
Click to show internal directories.
Click to hide internal directories.