common

package
v0.186.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidEventName = errors.New("centralized-metric: invalid-event-name")
	ErrInvalidPlatform  = errors.New("centralized-metric: invalid-platform")
	ErrInvalidVersion   = errors.New("centralized-metric: invalid-version")
)

Functions

This section is empty.

Types

type Metric

type Metric struct {
	ID         string         `json:"id"`
	UserID     string         `json:"userId"`
	EventName  string         `json:"eventName"`
	EventValue map[string]any `json:"eventValue"`
	Timestamp  int64          `json:"timestamp"`
	Platform   string         `json:"platform"`
	AppVersion string         `json:"appVersion"`
}

func (*Metric) EnsureID

func (m *Metric) EnsureID()

func (*Metric) Validate

func (m *Metric) Validate() error

type MetricProcessor

type MetricProcessor interface {
	Process(metrics []Metric) error
}

Jump to

Keyboard shortcuts

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