Documentation
¶
Index ¶
- Constants
- func DownloadFile(saveAs string) error
- func InitBrowsCap(path string, force bool) errordeprecated
- func InitializedVersion() stringdeprecated
- func LastVersion() (string, error)
- type BrowsCap
- type Browser
- func (browser *Browser) IsAndroid() bool
- func (browser *Browser) IsConsole() bool
- func (browser *Browser) IsCrawler() bool
- func (browser *Browser) IsDesktop() bool
- func (browser *Browser) IsIPad() bool
- func (browser *Browser) IsIPhone() bool
- func (browser *Browser) IsMobile() bool
- func (browser *Browser) IsTablet() bool
- func (browser *Browser) IsTv() bool
- func (browser *Browser) IsWinPhone() bool
- type Expression
- type ExpressionTree
- type Token
- type Tokens
Constants ¶
View Source
const ( DownloadUrl = "http://browscap.org/stream?q=PHP_BrowsCapINI" CheckVersionUrl = "http://browscap.org/version-number" )
Variables ¶
This section is empty.
Functions ¶
func DownloadFile ¶
func InitBrowsCap
deprecated
func InitializedVersion
deprecated
func InitializedVersion() string
Deprecated: Use BrowsCap.InitializedVersion
func LastVersion ¶
Types ¶
type BrowsCap ¶
type BrowsCap struct {
// contains filtered or unexported fields
}
func NewBrowsCapFromFile ¶
func (*BrowsCap) GetBrowser ¶
func (*BrowsCap) InitializedVersion ¶
type Browser ¶
type Browser struct {
Section string
Browser string
BrowserVersion string
BrowserMajorVer string
BrowserMinorVer string
// Browser, Application, Bot/Crawler, Useragent Anonymizer, Offline Browser,
// Multimedia Player, Library, Feed Reader, Email Client or unknown
BrowserType string
Platform string
PlatformShort string
PlatformVersion string
// Mobile Phone, Mobile Device, Tablet, Desktop, TV Device, Console,
// FonePad, Ebook Reader, Car Entertainment System or unknown
DeviceType string
DeviceName string
DeviceBrand string
Crawler string
Cookies string
JavaScript string
RenderingEngineName string
RenderingEngineVersion string
// contains filtered or unexported fields
}
func GetBrowser
deprecated
func (*Browser) IsWinPhone ¶
type Expression ¶
type Expression []Token
func CompileExpression ¶
func CompileExpression(s []byte) Expression
type ExpressionTree ¶
type ExpressionTree struct {
// contains filtered or unexported fields
}
func NewExpressionTree ¶
func NewExpressionTree() *ExpressionTree
func (*ExpressionTree) Add ¶
func (r *ExpressionTree) Add(name string, lineNum int)
func (*ExpressionTree) Find ¶
func (r *ExpressionTree) Find(userAgent []byte) string
Click to show internal directories.
Click to hide internal directories.