protocol

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package protocol defines the interface for different tracking protocol implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PathProtocolMapping

type PathProtocolMapping map[string]Protocol

PathProtocolMapping maps URL paths to their corresponding Protocol implementations.

type Protocol

type Protocol interface {
	ID() string
	Columns() schema.Columns
	Interfaces() any

	Hits(*Request) ([]*hits.Hit, error)
}

Protocol defines the interface for different tracking protocol implementations.

type Registry

type Registry interface {
	Get(propertyID string) (Protocol, error)
}

Registry allows to get a protocol for a given property ID.

func NewStaticRegistry

func NewStaticRegistry(protocols map[string]Protocol, defaultProtocol Protocol) Registry

NewStaticRegistry creates a new static protocol registry.

type Request

type Request struct {
	Method      []byte
	Host        []byte
	Path        []byte
	QueryParams url.Values
	Headers     http.Header
	Body        io.Reader
}

Request contains all information about an incoming tracking request.

Directories

Path Synopsis
Package ga4 provides GA4 protocol specific column definitions.
Package ga4 provides GA4 protocol specific column definitions.

Jump to

Keyboard shortcuts

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