events

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

View Source
const (
	StatusUndefined   = 0
	StatusSuccess     = 1
	StatusFailed      = 2
	StatusCompromised = 3
	StatusCustom      = 4 // User code
)

Event status

View Source
const LZ4BlockMaxSize = 64 << 10

LZ4BlockMaxSize constant

Variables

View Source
var ErrEmptyData = errors.New(`data is empty`)

ErrEmptyData error

Functions

This section is empty.

Types

type Code

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

Code structure can contains and conver data for URL

func CodeObj

func CodeObj(data []byte, err error) Code

CodeObj by values

func ObjectCode

func ObjectCode(obj any, gen ...types.EncodeGenerator) Code

ObjectCode converts object to code object with defined encoder/decoder

func (Code) Compress

func (c Code) Compress() Code

Compress code.data

func (Code) Data

func (c Code) Data() []byte

Data value

func (Code) DecodeObject

func (c Code) DecodeObject(target any, gen ...types.DecodeGenerator) error

DecodeObject converts current object data to target

func (Code) Decompress

func (c Code) Decompress() Code

Decompress current code.data

func (Code) Error

func (c Code) Error() string

func (Code) ErrorObj

func (c Code) ErrorObj() error

ErrorObj response

func (*Code) ResetData

func (c *Code) ResetData()

ResetData object

func (Code) String

func (c Code) String() string

func (Code) URLDecode

func (c Code) URLDecode() Code

URLDecode value

func (Code) URLEncode

func (c Code) URLEncode() Code

URLEncode data for URL using

func (*Code) Write

func (c *Code) Write(p []byte) (n int, err error)

Write method is implementation of io.Writer any

type EventUnpacFunc

type EventUnpacFunc func(code Code) Code

EventUnpacFunc function

type Type

type Type string

Type of event

const (
	Undefined  Type = ""
	Request    Type = "request"
	Impression Type = "impression"
	View       Type = "view"
	Direct     Type = "direct"
	Click      Type = "click"
	Lead       Type = "lead"
	// Source types
	SourceNoBid Type = "src.nobid"
	SourceBid   Type = "src.bid"
	SourceWin   Type = "src.win"
	SourceFail  Type = "src.fail"
	SourceSkip  Type = "src.skip"
	// Access Point types
	AccessPointNoBid         Type = "ap.nobid"
	AccessPointBid           Type = "ap.bid"
	AccessPointWin           Type = "ap.win"
	AccessPointBillingNotice Type = "ap.bin"
	AccessPointFail          Type = "ap.fail"
	AccessPointSkip          Type = "ap.skip"
)

Event types

func (Type) String

func (t Type) String() string

Jump to

Keyboard shortcuts

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