Documentation
¶
Overview ¶
Package mobileapp implements the MobileApp client parser.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppHints ¶ added in v1.2.0
type AppHints struct {
// contains filtered or unexported fields
}
AppHints maps app IDs to mobile app names.
func NewAppHints ¶ added in v1.2.0
NewAppHints loads mobile app hints from the embedded YAML DB.
func NewDefaultAppHints ¶ added in v1.2.0
NewDefaultAppHints is an alias for NewAppHints kept for compatibility.
func (*AppHints) GetAppName ¶ added in v1.2.0
GetAppName returns the mobile app name for an app ID.
type Entry ¶
type Entry struct {
Regex string `yaml:"regex"`
Name string `yaml:"name"`
Version string `yaml:"version"`
// contains filtered or unexported fields
}
Entry represents a single mobile app definition from the YAML regex file.
type Match ¶
type Match struct {
Type string `json:"type"`
Name string `json:"name"`
Version string `json:"version"`
}
Match represents the result of a successful mobile app detection. This matches the PHP return structure (type/name/version).
type Option ¶
type Option func(*Parser)
Option is a functional option for configuring Parser behavior.
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser parses a single user agent for mobile app client information. Created via ParserFactory.NewParser() - do not instantiate directly.
type ParserFactory ¶
type ParserFactory struct {
// contains filtered or unexported fields
}
ParserFactory holds pre-compiled regexes and creates Parser instances. Thread-safe for concurrent use - create once, use from multiple goroutines.
func NewDefaultParserFactory ¶
func NewDefaultParserFactory() (*ParserFactory, error)
NewDefaultParserFactory is an alias for NewParserFactory kept for compatibility.
func NewParserFactory ¶
func NewParserFactory(opts ...common.FactoryOption) (*ParserFactory, error)
NewParserFactory creates a factory by loading and compiling regexes from the embedded YAML DB.