Documentation
¶
Overview ¶
Package camera provides digital camera detection based on Device Detector regexes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Match ¶
type Match struct {
// Type is the Device Detector device type name, e.g. "camera".
Type string `json:"type"`
// Brand is the full brand name, e.g. "Samsung".
Brand string `json:"brand"`
// Model is the detected model string.
Model string `json:"model"`
}
Match represents the parsed camera device match.
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 Camera device information. Created via ParserFactory.NewParser() - do not instantiate directly.
type ParserFactory ¶
type ParserFactory struct {
// contains filtered or unexported fields
}
ParserFactory holds pre-compiled camera matchers 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 camera regexes from the embedded YAML DB.