entities

package
v0.0.0-...-d92d8b1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnrichEvents

func EnrichEvents(req *http.Request, events []*EventDTO)

EnrichEvents enriches each event struct with request params and current time.

Types

type EventDTO

type EventDTO struct {
	Event         string           `json:"event" db:"event"`
	DeviceID      uuid.UUID        `json:"device_id" db:"device_id"`
	DeviceOS      string           `json:"device_os" db:"device_os"`
	Session       string           `json:"session" db:"session"`
	Sequence      int64            `json:"sequence" db:"sequence"`
	ParamInt      int64            `json:"param_int" db:"param_int"`
	ParamStr      string           `json:"param_str" db:"param_str"`
	ClientTimeRaw utils.CustomTime `json:"client_time" db:"-"` // See description of CustomTime
	ClientTime    time.Time        `json:"-" db:"client_time"`
	ServerTime    time.Time        `json:"-" db:"server_time"`
	IP            string           `json:"-" db:"ip"`
}

func MapEventsListToDTO

func MapEventsListToDTO(payload *models.ProduceEventsPayload) ([]*EventDTO, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL