entry

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadJSON = errors.New("api: invalid json ")

Functions

This section is empty.

Types

type Entry

type Entry struct {
	UID, SID               uint64
	UtmMedium              string
	Referrer               string
	Domain                 string
	ExitPage               string
	EntryPage              string
	Hostname               string
	Pathname               string
	UtmSource              string
	ReferrerSource         string
	Country                string
	Region                 string
	TransferredFrom        string
	UtmCampaign            string
	OperatingSystem        string
	Browser                string
	UtmTerm                string
	Name                   string
	ScreenSize             string
	BrowserVersion         string
	OperatingSystemVersion string
	UtmContent             string
	UserId                 uint64
	Timestamp              int64
	Duration               time.Duration
	Start                  int64
	City                   string
	PageViews              uint16
	Events                 uint16
	IsBounce               bool
}

func NewEntry

func NewEntry() *Entry

func (*Entry) Clone

func (e *Entry) Clone() *Entry

func (*Entry) Release

func (e *Entry) Release()

func (*Entry) Session

func (e *Entry) Session()

Session creates a new session from entry

func (*Entry) Update

func (s *Entry) Update(e *Entry)

type Request added in v0.0.8

type Request struct {
	EventName   string `json:"n"`
	URI         string `json:"url"`
	Referrer    string `json:"r"`
	Domain      string `json:"d"`
	ScreenWidth int    `json:"w"`
	HashMode    bool   `json:"h"`

	// Used in tests
	IP        string `json:"ip,omitempty"`
	UserAgent string `json:"ua,omitempty"`
	// contains filtered or unexported fields
}

Request is sent by the vince script embedded in client websites

func NewRequest added in v0.0.8

func NewRequest() *Request

func (*Request) Parse added in v0.0.8

func (r *Request) Parse(body io.Reader) error

Parse opportunistic parses request body to r object. This is crucial method any gains here translates to smooth events ingestion pipeline.

A hard size limitation of 32kb is imposed. This is arbitrary value, any change to it must be be supported with statistics.

func (*Request) Release added in v0.0.8

func (r *Request) Release()

Jump to

Keyboard shortcuts

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