Documentation ¶
Index ¶
- func Compress(msg *bytes.Buffer) (*bytes.Buffer, error)
- func ConvertBatchCSV(events []*Event) (*bytes.Buffer, error)
- func ConvertBatchJSON(events []*Event) (*bytes.Buffer, error)
- func ConvertCSV(event *Event) (*bytes.Buffer, error)
- func ConvertIsoformat(at uint64) string
- func ConvertJSON(event *Event) (*bytes.Buffer, error)
- func ConvertToJson(paramters []*payload.Parameter) string
- func GetRandomPath(basePath string, extension string, compress bool) string
- func RandStringBytes(n int) string
- func ResolvePath(basePath string) string
- type BatchConverter
- type Converter
- type Dialect
- type Event
- type StorageClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertBatchCSV ¶
Converts to CSV string for list of events
func ConvertBatchJSON ¶
Converts multiple events into JSON string
func ConvertCSV ¶
Dumps the Event into a CSV string
func ConvertIsoformat ¶
Converts EPOCH timestamp to isoformat string
func ConvertJSON ¶
Dumps the Event into a JSON string
func ConvertToJson ¶
func GetRandomPath ¶
Get a random name for the blob
Types ¶
type BatchConverter ¶
func GetBatchConverterFunction ¶
func GetBatchConverterFunction(fileFormat string) (BatchConverter, error)
Returns a batch event converter function based on file extension.
type Converter ¶
Define converter functions based on the file extension type.
func GetConverterFunction ¶
Returns a single event converter function based on file extension.
type Dialect ¶
type Dialect interface { IsValid() bool NewClient() (StorageClient, error) }
Dialect interface for create StorageQueue from Configuration
type Event ¶
type Event struct { DeviceID string `json:"device_id"` ClientID string `json:"client_id"` Session string `json:"session"` Nr uint32 `json:"nr"` Env string `json:"env"` SystemVersion string `json:"system_version"` ProductVersion string `json:"product_version"` At string `json:"at"` Timezone string `json:"timezone"` Event string `json:"event"` DeviceMake string `json:"device_make,omitempty"` DeviceModel string `json:"device_model,omitempty"` System string `json:"system,omitempty"` SystemLanguage string `json:"system_language,omitempty"` Browser string `json:"browser,omitempty"` BrowserVersion string `json:"browser_version,omitempty"` ProductGitHash string `json:"product_git_hash,omitempty"` ProductLanguage string `json:"product_language,omitempty"` UserID string `json:"user_id,omitempty"` TenantID string `json:"tenant_id,omitempty"` IP string `json:"ip,omitempty"` Country string `json:"country,omitempty"` Parameters string `json:"parameters,omitempty"` }
Single event
func NewEvent ¶
func NewEvent(meta *payload.Collection, payload *payload.Payload) *Event
Creates a new event based on the collection and a single payload
func (*Event) TruncateIPv4LastOctet ¶
func (event *Event) TruncateIPv4LastOctet()
Truncates the IP address
type StorageClient ¶
type StorageClient interface { IsBufferedStorage() bool GetConverter() Converter GetBatchConverter() BatchConverter Save(*bytes.Buffer) error }
Interface for processing events
Click to show internal directories.
Click to hide internal directories.