Versions in this module Expand all Collapse all v1 v1.2.0 Jul 28, 2026 Changes in this version type OS + Build string v1.1.0 Jul 28, 2026 Changes in this version + const EnginePresto v1.0.0 Mar 9, 2026 Changes in this version + const DeviceDesktop + const DeviceMobile + const DeviceTablet + const EngineBlink + const EngineGecko + const EngineTrident + const EngineWebKit + const OSAndroid + const OSChromeOS + const OSDarwin + const OSLinux + const OSWindows + const OSiOS + const OSmacOS + const ProductCFNetwork + const ProductDarwin + const ProductMozilla + func Init(opts ...Option) error + type BotCategory string + const BotCategoryAI + const BotCategoryMonitor + const BotCategoryScraper + const BotCategorySearch + const BotCategorySocial + type BotInfo struct + Category BotCategory + Confidence float64 + Name string + Owner string + func (b BotInfo) IsEmpty() bool + type Browser struct + Engine string + Name string + Version string + func (b Browser) IsEmpty() bool + type ClientHints struct + Architecture string + FullVersionList string + Mobile bool + Model string + Platform string + PlatformVersion string + UA string + func (ch ClientHints) IsEmpty() bool + type ClientType uint8 + const ClientTypeBot + const ClientTypeBrowser + const ClientTypeHttpClient + const ClientTypeIAB + const ClientTypeNativeApp + const ClientTypeUnknown + func DetectType(ua string) ClientType + type Device struct + Model string + ModelRaw string + Type string + func (d Device) IsEmpty() bool + type IABInfo struct + App string + AppVersion string + Locale string + NetType string + Region string + Resolution string + ScreenScale float64 + func (i IABInfo) IsEmpty() bool + type NativeApp struct + Name string + Runtime string + Version string + func (n NativeApp) IsEmpty() bool + type OS struct + Name string + Version string + func (o OS) IsEmpty() bool + type Option func(*parserConfig) + func WithDataDir(dir string) Option + func WithOverrides(dir string) Option + type Parser struct + func NewParser(opts ...Option) (*Parser, error) + func (p *Parser) Database() *db.Database + func (p *Parser) DetectType(ua string) ClientType + func (p *Parser) LookupAndroidModel(modelID string) (db.AndroidDevice, bool) + func (p *Parser) LookupAppleModel(modelID string) (string, bool) + func (p *Parser) Parse(ua string) *Result + func (p *Parser) ParseWithHints(ua string, hints ClientHints) *Result + type Result struct + Bot BotInfo + Browser Browser + ClientType ClientType + Device Device + IAB IABInfo + Native NativeApp + OS OS + Raw string + func Parse(ua string) *Result + func ParseWithHints(ua string, hints ClientHints) *Result