useragent

package
v0.1.23 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	Raw        string
	Browser    string
	OS         string
	Device     string
	DeviceKind DeviceKind
	Mobile     bool
}

func Parse

func Parse(raw string) Agent

func (Agent) BrowserSummary

func (a Agent) BrowserSummary() string

func (Agent) Label

func (a Agent) Label() string

type DeviceKind

type DeviceKind string
const (
	DeviceDesktop DeviceKind = "desktop"
	DevicePhone   DeviceKind = "phone"
	DeviceTablet  DeviceKind = "tablet"
	DeviceUnknown DeviceKind = "unknown"
)

type PlatformSignals

type PlatformSignals struct {
	// contains filtered or unexported fields
}

func NewPlatformSignals

func NewPlatformSignals(platformHint, rawUserAgent string) PlatformSignals

func (PlatformSignals) IsAndroid

func (s PlatformSignals) IsAndroid() bool

func (PlatformSignals) IsChromeOS

func (s PlatformSignals) IsChromeOS() bool

func (PlatformSignals) IsIOS

func (s PlatformSignals) IsIOS() bool

func (PlatformSignals) IsIPad

func (s PlatformSignals) IsIPad() bool

func (PlatformSignals) IsIPhone

func (s PlatformSignals) IsIPhone() bool

func (PlatformSignals) IsLinux

func (s PlatformSignals) IsLinux() bool

func (PlatformSignals) IsMacOS

func (s PlatformSignals) IsMacOS() bool

func (PlatformSignals) IsWindows

func (s PlatformSignals) IsWindows() bool

Jump to

Keyboard shortcuts

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