common

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const V1 = "v1"

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentV1

type AgentV1 struct {
	DeviceType     string `json:"deviceType"`
	BrowserName    string `json:"browserName"`
	BrowserVersion string `json:"browserVersion"`
	OSPlatform     string `json:"osPlatform"`
	OSName         string `json:"osName"`
	OSVersion      string `json:"osVersion"`
}

type Input

type Input interface {
	Start(wg *sync.WaitGroup, outputs *Outputs)
}

type Inputs

type Inputs struct {
	// contains filtered or unexported fields
}

func NewInputs

func NewInputs() *Inputs

func (*Inputs) Add

func (is *Inputs) Add(i *Input)

func (*Inputs) Start

func (is *Inputs) Start(wg *sync.WaitGroup, ots *Outputs)

type Message

type Message struct {
	Version string      `json:"version"`
	TimeMs  uint64      `json:"timeMs"`
	Method  string      `json:"method"`
	Object  interface{} `json:"object,omitempty"`
}

type ObjectV1

type ObjectV1 struct {
	Origin      string        `json:"origin,omitempty"`
	IPv4        string        `json:"ipv4,omitempty"`
	AgentString string        `json:"agent,omitempty"`
	Session     string        `json:"session,omitempty"`
	Cookie      string        `json:"cookie,omitempty"`
	Referrer    string        `json:"referrer,omitempty"`
	Country     string        `json:"country,omitempty"`
	Lang        string        `json:"lang,omitempty"`
	Fingerprint string        `json:"fingerprint,omitempty"`
	Provider    string        `json:"provider,omitempty"`
	Property    string        `json:"property,omitempty"`
	Events      []interface{} `json:"events,omitempty"`
	Attributes  []interface{} `json:"attributes,omitempty"`
	AgentObject *AgentV1
}

type Output

type Output interface {
	Send(m *Message, variables map[string]string)
}

type Outputs

type Outputs struct {
	// contains filtered or unexported fields
}

func NewOutputs

func NewOutputs() *Outputs

func (*Outputs) Add

func (ots *Outputs) Add(o *Output)

func (*Outputs) Send

func (ots *Outputs) Send(m *Message, variables map[string]string) error

Jump to

Keyboard shortcuts

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