Documentation
¶
Overview ¶
Package mediaplayer implements the MediaPlayer client parser.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 media player 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 media player 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 media player 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.