Versions in this module Expand all Collapse all v0 v0.1.0 Jun 3, 2021 Changes in this version + func Desktop() (ua string, err error) + func GoogleBot2() (string, error) + func LoadUAConfig(path string) (err error) + func Mobile() (string, error) + type Browser struct + ID string + UserAgentFormat string + VariantProbabilityLimit float64 + Variants []*BrowserVariant + func (bwr *Browser) Init() + func (bwr *Browser) RandomVariant() *BrowserVariant + func (bwr *Browser) SignError(msg string) error + type BrowserVariant struct + ID string + func (bwrv *BrowserVariant) AddVars(data map[string]string) (err error) + func (bwrv *BrowserVariant) SignError(msg string) error + type Device struct + Browsers map[string]*Browser + ID string + OSProbabilityLimit float64 + OSes []*OS + func (dv *Device) BrowsersInit() + func (dv *Device) BuildUserAgent() (ua string, err error) + func (dv *Device) Init() + func (dv *Device) OSesInit() + func (dv *Device) RandomBrowser(bwrIDs []string) *Browser + func (dv *Device) RandomOS() *OS + func (dv *Device) SignError(msg string) error + type OS struct + ID string + VariantProbabilityLimit float64 + Variants []*OSVariant + func (os *OS) Init() + func (os *OS) RandomVariant() *OSVariant + func (os *OS) SignError(msg string) error + type OSVariant struct + BrowserIDs []string + ID string + Signatures []string + func (osv *OSVariant) AddVars(data map[string]string) (err error) + func (osv *OSVariant) RandomSignature() (string, error) + func (osv *OSVariant) SignError(msg string) error + type UAConfig struct + Desktop Device + Mobile Device + Tablet Device + func LoadUAConfigFromBytes(bs []byte) (c *UAConfig, err error) + func LoadUAConfigFromFile(path string) (*UAConfig, error) + func LoadUAConfigFromJSON(raw string) (*UAConfig, error) + func (c *UAConfig) BuildDesktopUA() (string, error) + func (c *UAConfig) BuildMobileUA() (string, error) + func (c *UAConfig) BuildTabletUA() (string, error) + func (c *UAConfig) Init() + type Variant struct + Data map[string][]string + func (vrt *Variant) AddDataVars(prefix string, data map[string]string) error