gomig

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: EUPL-1.2, ISC, MIT, + 1 more Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Migrations = map[string]func(context.Context) error{
	"2021-12-08-1-set-chart-text":    KeepAsText,
	"2022-11-15-1-correct-hit-stats": CorrectHitStats,
}

Functions

func CorrectHitStats added in v2.4.1

func CorrectHitStats(ctx context.Context) error

func KeepAsText added in v2.2.0

func KeepAsText(ctx context.Context) error

Types

type Hit added in v2.5.0

type Hit struct {
	ID          int64        `db:"hit_id" json:"-"`
	Site        int64        `db:"site_id" json:"-"`
	PathID      int64        `db:"path_id" json:"-"`
	UserAgentID *int64       `db:"user_agent_id" json:"-"`
	CampaignID  *int64       `db:"campaign" json:"-"`
	Session     zint.Uint128 `db:"session" json:"-"`

	Path  string             `db:"-" json:"p,omitempty"`
	Title string             `db:"-" json:"t,omitempty"`
	Ref   string             `db:"ref" json:"r,omitempty"`
	Event zbool.Bool         `db:"-" json:"e,omitempty"`
	Size  goatcounter.Floats `db:"size" json:"s,omitempty"`
	Query string             `db:"-" json:"q,omitempty"`
	Bot   int                `db:"bot" json:"b,omitempty"`

	RefScheme       *string    `db:"ref_scheme" json:"-"`
	UserAgentHeader string     `db:"-" json:"-"`
	Location        string     `db:"location" json:"-"`
	Language        *string    `db:"language" json:"-"`
	FirstVisit      zbool.Bool `db:"first_visit" json:"-"`
	CreatedAt       time.Time  `db:"created_at" json:"-"`

	RefURL *url.URL `db:"-" json:"-"`   // Parsed Ref
	Random string   `db:"-" json:"rnd"` // Browser cache buster, as they don't always listen to Cache-Control

	// Some values we need to pass from the HTTP handler to memstore
	RemoteAddr    string `db:"-" json:"-"`
	UserSessionID string `db:"-" json:"-"`
	BrowserID     int64  `db:"-" json:"-"`
	SystemID      int64  `db:"-" json:"-"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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