Documentation ¶
Index ¶
- Constants
- func Close()
- func Debug(val bool)
- func DownloadFile(saveAs string) error
- func InitBrowsCap(path string, force bool, expiration time.Duration, cleanup time.Duration) error
- func InitializedVersion() string
- func LastVersion() (string, error)
- func Marshal(value interface{}) (bufCompress []byte, err error)
- func SetCache(key string, data interface{}) (err error)
- func Unmarshal(buf []byte) (value []byte, err error)
- 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 ¶
func InitializedVersion ¶
func InitializedVersion() string
func LastVersion ¶
Types ¶
type Browser ¶
type Browser struct { 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 ¶
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.