events
2015-05-15
Child:e86251b04826
events/event.go
Implement events package. This is the package we'll use to keep all the cross-binary "ping" notification code in sync. We'll use it to define shared types and helper functions. For now, just define the Event type. We'll use this to broadcast "something happened!"
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/event.go Fri May 15 22:51:31 2015 -0400 1.3 @@ -0,0 +1,14 @@ 1.4 +package events 1.5 + 1.6 +import ( 1.7 + "time" 1.8 +) 1.9 + 1.10 +type Event struct { 1.11 + System string `json:"system"` 1.12 + Model string `json:"model"` 1.13 + ID string `json:"id"` 1.14 + Action string `json:"action"` 1.15 + Timestamp time.Time `json:"timestamp"` 1.16 + Data interface{} `json:"data"` 1.17 +}