You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

34 lines
786 B

package events
import (
"fmt"
lucifer3 "git.aiterp.net/lucifer3/server"
"github.com/google/uuid"
)
type AssignmentCreated struct {
ID uuid.UUID
Match string
Effect lucifer3.Effect
}
func (e AssignmentCreated) EventDescription() string {
return fmt.Sprintf("AssignmentCreated(id=%s, match=%s, effect=%s)", e.ID, e.Match, e.Effect.EffectDescription())
}
type AssignmentRemoved struct {
ID uuid.UUID
}
func (e AssignmentRemoved) EventDescription() string {
return fmt.Sprintf("AssignmentRemoved(id=%s)", e.ID)
}
type DeviceAssigned struct {
DeviceID string `json:"deviceId"`
AssignmentID *uuid.UUID `json:"assignmentId"`
}
func (e DeviceAssigned) EventDescription() string {
return fmt.Sprintf("DeviceAssigned(device=%s, %s)", e.DeviceID, e.AssignmentID)
}