visitors

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FieldVisitors    = "visitors"
	FieldTotal       = "total"
	FieldPage        = "page"
	FieldPerPage     = "per_page"
	FieldTotalPages  = "total_pages"
	FieldConditions  = "conditions"
	FieldID          = "id"
	FieldIP          = "ip"
	FieldCountry     = "country"
	FieldCountryName = "country_name"
	FieldPath        = "path"
	FieldBrowser     = "browser"
	FieldOS          = "os"
	FieldDevice      = "device"
	FieldDeviceType  = "device_type"
	FieldCreatedAt   = "created_at"
	FieldUserAgent   = "user_agent"
	FieldIsBot       = "is_bot"
	FieldIsThreat    = "is_threat"

	// IP details response fields
	FieldDetails     = "details"
	FieldFirstSeen   = "first_seen"
	FieldLastSeen    = "last_seen"
	FieldVisitCount  = "visit_count"
	FieldBrowserVer  = "browser_version"
	FieldOSVer       = "os_version"
	FieldAcceptLang  = "accept_language"
	FieldAcceptEnc   = "accept_encoding"
	FieldReferrer    = "referrer"
	FieldFingerprint = "fingerprint"
	FieldPaths       = "paths"
	FieldUniquePaths = "unique_paths"

	// Condition fields (what can be filtered on)
	CondFieldIP         = "ip"
	CondFieldCountry    = "country"
	CondFieldDeviceType = "device_type"
	CondFieldPathCont   = "path_contains"
	CondFieldPathExact  = "path_exact"
	CondFieldBrowser    = "browser"
	CondFieldOS         = "os"
	CondFieldDateFrom   = "date_from"
	CondFieldDateTo     = "date_to"
	CondFieldIsBot      = "is_bot"
	CondFieldIsThreat   = "is_threat"

	// Condition operators
	CondOpEquals   = "equals"
	CondOpContains = "contains"

	// Is-bot filter values
	CondValueBotYes = "yes"
	CondValueBotNo  = "no"

	// JSON keys for condition objects
	CondKeyField    = "field"
	CondKeyOperator = "operator"
	CondKeyValue    = "value"
)

Variables

This section is empty.

Functions

func DeviceTypeOptions

func DeviceTypeOptions() []string

DeviceTypeOptions lists the selectable device types.

func NewVisitorsController

func NewVisitorsController(opts shared.ControllerOptions) *visitorsController

Types

type ConditionOption

type ConditionOption struct {
	Value       string
	Label       string
	Operators   []string
	InputType   string // "text", "date", "select"
	Placeholder string
}

ConditionOption defines a selectable filter field in the UI.

func ConditionOptions

func ConditionOptions() []ConditionOption

ConditionOptions returns the ordered list of filterable fields for the UI.

Jump to

Keyboard shortcuts

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