event

package
v0.9.0-beta0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DomainName

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

DomainName define a valid domain name according to RFC 5891. DomainName are stored using their ASCII form.

func ParseDomainName

func ParseDomainName(value string) (DomainName, error)

ParseDomainName parses the given value as a domain name and returns it. If the value is considered invalid, an error is returned.

func (DomainName) SourceString

func (dn DomainName) SourceString() string

SourceString implements sourceregistry.Source.

func (DomainName) String

func (dn DomainName) String() string

String implements fmt.Stringer.

func (*DomainName) UnmarshalJSON

func (dn *DomainName) UnmarshalJSON(rawJSON []byte) error

UnmarshalJSON implements json.Unmarshaler.

type OperatingSystem

type OperatingSystem string

OperatingSystem define client operating system.

type PageView

type PageView struct {
	Timestamp      time.Time
	DomainName     DomainName
	PathName       string
	Client         uaparser.Client
	ReferrerDomain ReferrerDomain
	CountryCode    ipgeolocator.CountryCode
}

PageView define a page view event.

func NewPageView

func NewPageView(pvUrl *url.URL,
	cli uaparser.Client,
	pageReferrer string,
	countryCode ipgeolocator.CountryCode) (PageView, error)

NewPageView creates a new PageView event.

type ReferrerDomain

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

ReferrerDomain define an HTTP referral. A referral is either direct (empty string) or a valid absolute URL from which domain is extracted.

func ParseReferrerDomain

func ParseReferrerDomain(value string) (ReferrerDomain, error)

ParseReferrerDomain parses the given value as a referrer and returns it. An error is returned if the value is not a valid referrer.

func (ReferrerDomain) String

func (s ReferrerDomain) String() string

String implements fmt.Stringer.

Jump to

Keyboard shortcuts

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