entry

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2023 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadJSON = errors.New("api: invalid json ")
View Source
var Index = func() (m map[string]int) {
	m = make(map[string]int)
	for i := range all {
		m[all[i].Name] = i
	}
	return
}()
View Source
var IndexedColumns = func() (m map[int]string) {
	m = make(map[int]string)
	for _, n := range IndexedColumnsNames {
		m[Index[n]] = n
	}
	return
}()

Maps column index to column name of all indexed columns

View Source
var IndexedColumnsNames = []string{
	"browser",
	"browser_version",
	"city",
	"country",
	"entry_page",
	"exit_page",
	"host",
	"name",
	"os",
	"os_version",
	"path",
	"referrer",
	"referrer_source",
	"region",
	"screen",
	"utm_campaign",
	"utm_content",
	"utm_medium",
	"utm_source",
	"utm_term",
}
View Source
var ParquetSchema = parquetSchema()
View Source
var Schema = arrow.NewSchema(all, nil)

Functions

func Context added in v0.0.18

func Context(ctx ...context.Context) context.Context

func Fields added in v0.0.18

func Fields() []arrow.Field

Fields for constructing arrow schema on Entry.

func NewFileReader added in v0.0.19

func NewFileReader(r parquet.ReaderAtSeeker) *file.Reader

func NewFileWriter added in v0.0.19

func NewFileWriter(w io.Writer) *file.Writer

func Select added in v0.0.18

func Select(names ...string) *arrow.Schema

Types

type ByteArray added in v0.0.19

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

func NewByteArray added in v0.0.19

func NewByteArray() ByteArray

func (*ByteArray) Append added in v0.0.19

func (b *ByteArray) Append(s string)

func (*ByteArray) Reset added in v0.0.19

func (b *ByteArray) Reset()

func (*ByteArray) Write added in v0.0.19

type Entry

type Entry struct {
	Bounce         int64
	Session        int64
	Browser        string
	BrowserVersion string
	City           string
	Country        string
	Domain         string
	Duration       time.Duration
	EntryPage      string
	ExitPage       string
	Host           string
	ID             uint64
	Name           string
	Os             string
	OsVersion      string
	Path           string
	Referrer       string
	ReferrerSource string
	Region         string
	Screen         string
	Timestamp      int64
	UtmCampaign    string
	UtmContent     string
	UtmMedium      string
	UtmSource      string
	UtmTerm        string
}

func NewEntry

func NewEntry() *Entry

func (*Entry) Clone

func (e *Entry) Clone() *Entry

func (*Entry) Hit added in v0.0.18

func (e *Entry) Hit()

func (*Entry) Release

func (e *Entry) Release()

func (*Entry) Update

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

type Int64Array added in v0.0.19

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

func NewInt64Array added in v0.0.19

func NewInt64Array() Int64Array

func (*Int64Array) Append added in v0.0.19

func (b *Int64Array) Append(v int64)

func (*Int64Array) First added in v0.0.19

func (b *Int64Array) First() int64

func (*Int64Array) Last added in v0.0.19

func (b *Int64Array) Last() int64

func (*Int64Array) Reset added in v0.0.19

func (b *Int64Array) Reset()

func (*Int64Array) Write added in v0.0.19

func (b *Int64Array) Write(g file.ColumnChunkWriter)

type MultiEntry added in v0.0.18

type MultiEntry struct {
	Bounce         Int64Array
	Browser        ByteArray
	BrowserVersion ByteArray
	City           ByteArray
	Country        ByteArray
	Duration       Int64Array
	EntryPage      ByteArray
	ExitPage       ByteArray
	Host           ByteArray
	ID             Int64Array
	Name           ByteArray
	Os             ByteArray
	OsVersion      ByteArray
	Path           ByteArray
	Referrer       ByteArray
	ReferrerSource ByteArray
	Region         ByteArray
	Screen         ByteArray
	Session        Int64Array
	Timestamp      Int64Array
	UtmCampaign    ByteArray
	UtmContent     ByteArray
	UtmMedium      ByteArray
	UtmSource      ByteArray
	UtmTerm        ByteArray
	// contains filtered or unexported fields
}

func NewMulti added in v0.0.18

func NewMulti() *MultiEntry

func (*MultiEntry) Append added in v0.0.18

func (m *MultiEntry) Append(e *Entry)

func (*MultiEntry) Release added in v0.0.18

func (m *MultiEntry) Release()

func (*MultiEntry) Reset added in v0.0.18

func (m *MultiEntry) Reset()

func (*MultiEntry) Write added in v0.0.19

func (m *MultiEntry) Write(f *file.Writer, r *roaring64.Bitmap)

type Reader added in v0.0.19

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

func NewReader added in v0.0.19

func NewReader() *Reader

func (*Reader) Read added in v0.0.19

func (b *Reader) Read(r *file.Reader, groups []int)

func (*Reader) Record added in v0.0.19

func (b *Reader) Record() arrow.Record

func (*Reader) Release added in v0.0.19

func (b *Reader) Release()

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"`

	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