events

Paddy 2015-12-14 Parent:ce1212549d47

5:df95f058a7b5 Go to Latest

events/event.go

Update to new nsqio repo. The go-nsq client is now located under a nsqio org on Github, so we need to update the import path.

History
1 package events
3 import (
4 "time"
5 )
7 const (
8 ActionCreated = "created"
9 ActionUpdated = "updated"
10 ActionDeleted = "deleted"
11 )
13 type Event struct {
14 System string `json:"system"`
15 Model string `json:"model"`
16 ID string `json:"id"`
17 Action string `json:"action"`
18 Timestamp time.Time `json:"timestamp"`
19 Data interface{} `json:"data,omitempty"`
20 }
22 type Publisher interface {
23 Publish(topic string, event Event) error
24 }