Skip to content

Instantly share code, notes, and snippets.

Created March 25, 2018 08:34
What would you like to do?
// Payload is the event's actual data inserted into data stores.
type Payload map[string]interface{}
// Type is an Event's metadata.
type Type struct {
EventVersionField string `json:"event_version" valid:"notempty,required"`
EventNameField string `json:"event_name" valid:"notempty,required"`
type Event struct {
TypeField Type `json:"type"`
PayloadField Payload `json:"payload" valid:"-"`
type TrackRequest struct {
SenderID string `json:"sender_id" valid:"notempty,required"`
Events []Event `json:"events"`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment