Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHandler ¶
RegisterHandler sets up the routing of the HTTP handlers.
Types ¶
type CreateEventRequest ¶
type CreateEventRequest struct { UserID string `json:"user_id" binding:"required,uuid4"` Type EventType `json:"type" binding:"required"` }
CreateEventRequest represents an incoming event
func (*CreateEventRequest) Validate ¶
func (m *CreateEventRequest) Validate() error
Validate validates the CreateEventRequest fields.
type Event ¶
type Event struct { UserID string `json:"user_id"` Type EventType `json:"type"` CreatedAt time.Time `json:"created_at"` }
Event represents an action performed by user
type EventType ¶
type EventType string
EventType represents type of event performed
const (
ClickEvent EventType = "CLICK"
)
Valid event types
type Repository ¶
Repository encapsulates data access logic from and to ES.
func NewRepository ¶
func NewRepository(es *elastic.Client) Repository
NewRepository creates a new event repository
Click to show internal directories.
Click to hide internal directories.