Versions in this module Expand all Collapse all v0 v0.1.0 Aug 10, 2026 Changes in this version + const AcceptCH + const DefaultCacheSize + const DefaultMaxInputLength + const DefaultRecorderLimit + const HeaderCHUA + const HeaderCHUAArch + const HeaderCHUABitness + const HeaderCHUAFormFactors + const HeaderCHUAFullVersionList + const HeaderCHUAMobile + const HeaderCHUAModel + const HeaderCHUAPlatform + const HeaderCHUAPlatformVersion + const HeaderCHUAWoW64 + const Release + func DatabaseRules() int + func DatabaseVersion() string + func ParseTo(dst *Client, raw string) + func Redact(token string) string + type AI struct + Category BotCategory + Name string + Provider string + type AcceptProfile struct + Accept string + AcceptEncoding string + AcceptLanguage string + func ParseAcceptProfile(accept, acceptLanguage, acceptEncoding string) *AcceptProfile + func (a *AcceptProfile) IsMissingLanguage() bool + func (a *AcceptProfile) PreferredLanguage() string + type Action string + const ActionAllow + const ActionBlock + const ActionChallenge + const ActionRateLimit + type App struct + Category string + Confidence float32 + Name string + Version Version + type Automation struct + Category string + Confidence float32 + Name string + Version Version + type Bot struct + Category BotCategory + Confidence float32 + Name string + Provider string + Version Version + func (b *Bot) IsAICrawler() bool + func (b *Bot) IsSEO() bool + func (b *Bot) IsSearchEngine() bool + func (b *Bot) IsSocialCrawler() bool + type BotCategory string + const BotAIAgent + const BotAICrawler + const BotGeneric + const BotMonitoring + const BotSEO + const BotSearchEngine + const BotSecurity + const BotSocialCrawler + type BrandHint struct + Brand string + Version Version + type Browser struct + Confidence float32 + Family string + Mode string + Name string + Source Source + Version Version + type Cache struct + func NewCache(maxEntries int) *Cache + func (c *Cache) Get(key string) (*Client, bool) + func (c *Cache) Set(key string, value *Client) + type CacheConfig struct + Enabled bool + Size int + type CategorySummary struct + Category string + Rules int + func DatabaseSummary() []CategorySummary + type Client struct + AI *AI + AcceptProfile *AcceptProfile + App *App + Automation *Automation + Bot *Bot + Browser Browser + Device Device + Engine Engine + Fetch *FetchContext + HTTPClient *HTTPClient + Hints *Hints + Kind Kind + OS OS + Raw string + SpoofScore float32 + Truncated bool + Verdict *Verdict + func Parse(raw string) *Client + func ParseRequest(r *http.Request) *Client + func (c *Client) Attrs() []slog.Attr + func (c *Client) Coarse() *Client + func (c *Client) Consistency() Consistency + func (c *Client) IsAICrawler() bool + func (c *Client) IsAndroid() bool + func (c *Client) IsAutomated() bool + func (c *Client) IsBot() bool + func (c *Client) IsCLI() bool + func (c *Client) IsConsole() bool + func (c *Client) IsDesktop() bool + func (c *Client) IsHeadless() bool + func (c *Client) IsIOS() bool + func (c *Client) IsLinux() bool + func (c *Client) IsMacOS() bool + func (c *Client) IsMobile() bool + func (c *Client) IsSuspicious() bool + func (c *Client) IsTV() bool + func (c *Client) IsTablet() bool + func (c *Client) IsTool() bool + func (c *Client) IsWebView() bool + func (c *Client) IsWindows() bool + func (c *Client) LogValue() slog.Value + func (c *Client) Privacy() Privacy + func (c *Client) ToJSON() []byte + type Config struct + Cache CacheConfig + Device func(code, ua string) (name, brand, model, family, deviceType string, confidence float64, ok bool) + MaxInputLength int + Metrics MetricsReporter + Recorder *Recorder + Registry *Registry + SkipBot bool + SkipDevice bool + type Consistency struct + Findings []Finding + Score float32 + func CheckConsistency(c *Client) Consistency + func (c Consistency) Has(rule string) bool + func (c Consistency) OK() bool + type Device struct + Brand string + Confidence float32 + Family string + Model string + Name string + Reduced bool + Series string + Source Source + Type DeviceType + Year int + type DeviceType string + const DeviceBot + const DeviceCar + const DeviceConsole + const DeviceDesktop + const DeviceEInk + const DeviceEmbedded + const DeviceMobile + const DeviceTV + const DeviceTablet + const DeviceUnknown + const DeviceWatch + const DeviceXR + type Engine struct + Confidence float32 + Name string + Version Version + type FetchContext struct + Dest string + Mode string + Site string + User string + func ParseFetchContext(site, mode, dest, user string) *FetchContext + func (f *FetchContext) IsNavigation() bool + type Finding struct + Detail string + Left string + Right string + Rule string + Severity Severity + type HTTPClient struct + Category string + Confidence float32 + Name string + Version Version + type Hints struct + Arch string + Bitness string + Brands []BrandHint + FormFactors []string + FullVersionList []BrandHint + Mobile bool + Model string + Platform string + PlatformVersion string + WoW64 bool + func ParseClientHints(secChUA, secChUAMobile, secChUAPlatform string) *Hints + func ParseHints(h http.Header) *Hints + func (h *Hints) Brand() (BrandHint, bool) + type Kind string + const KindAIAgent + const KindAICrawler + const KindAutomation + const KindBot + const KindHuman + const KindTool + const KindUnknown + type MetricsReporter interface + IncBotDetected func() + IncCacheHit func() + IncParse func() + IncSpoofDetected func() + type NoopReporter struct + func (NoopReporter) IncBotDetected() + func (NoopReporter) IncCacheHit() + func (NoopReporter) IncParse() + func (NoopReporter) IncSpoofDetected() + type OS struct + Arch string + Bitness string + Confidence float32 + Family string + Name string + Reduced bool + Source Source + Version Version + type Parser struct + func Default() *Parser + func New(cfg Config) *Parser + func (p *Parser) Parse(raw string) *Client + func (p *Parser) ParseRequest(r *http.Request) *Client + func (p *Parser) ParseTo(dst *Client, raw string) + type Privacy struct + Identifiers []string + Risk PrivacyRisk + type PrivacyRisk string + const PrivacyHigh + const PrivacyLow + const PrivacyMedium + type Reason struct + Code string + Detail string + Weight float32 + type Recorder struct + func NewRecorder() *Recorder + func NewRecorderWithLimit(limit int) *Recorder + func (r *Recorder) Len() int + func (r *Recorder) Record(token string) + func (r *Recorder) Reset() + func (r *Recorder) Top(n int) []Unknown + type Registry struct + func NewRegistry() *Registry + func (r *Registry) RegisterApp(rules ...Rule) + func (r *Registry) RegisterAutomation(rules ...Rule) + func (r *Registry) RegisterBot(rules ...Rule) + func (r *Registry) RegisterBrowser(rules ...Rule) + func (r *Registry) RegisterEngine(rules ...Rule) + func (r *Registry) RegisterHTTPClient(rules ...Rule) + func (r *Registry) RegisterOS(rules ...Rule) + func (r *Registry) Reset() + type Rule struct + Brand string + Category string + Confidence float32 + Contains string + Engine string + Family string + ID string + Model string + Name string + Prefix string + Priority int + Provider string + Series string + Token string + Type string + VersionFrom string + Year int + type Severity string + const SeverityCritical + const SeverityHigh + const SeverityLow + const SeverityMedium + type Source string + const SourceBoth + const SourceHints + const SourceInferred + const SourceNone + const SourceUA + type Unknown struct + Count int + Shape string + type Verdict struct + Kind Kind + Reasons []Reason + Recommend Action + Risk float32 + Trust float32 + func ComputeVerdict(c *Client) *Verdict + func VerdictFrom(c *Client, cons Consistency) *Verdict + func (v *Verdict) Has(code string) bool + type Version struct + KnownVersion bool + Major int + Minor int + Patch int + Raw string + func ParseVersion(s string) Version + func (v Version) AtLeast(major int, rest ...int) bool + func (v Version) Compare(o Version) int + func (v Version) Known() bool + func (v Version) String() string