This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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