package events import "fmt" type ExternalEvent struct { Kind string Values map[string]string } func (e ExternalEvent) EventDescription() string { return fmt.Sprintf("External(kind:%s, values:%v)", e.Kind, e.Values) } func (e ExternalEvent) TriggerKind() string { return fmt.Sprintf("External:%s", e.Kind) } func (e ExternalEvent) TriggerValue(key string) (string, bool) { v, ok := e.Values[key] return v, ok }