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.
21 lines
423 B
21 lines
423 B
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
|
|
}
|