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) UnmarshalJSON ¶
func (dn *DomainName) UnmarshalJSON(rawJSON []byte) error
UnmarshalJSON implements json.Unmarshaler.
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.