common

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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