platforms

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdobeAir

type AdobeAir struct {
	// contains filtered or unexported fields
}

func NewAdobeAir

func NewAdobeAir(p Parser) *AdobeAir

func (*AdobeAir) Match

func (a *AdobeAir) Match() bool

func (*AdobeAir) Name

func (a *AdobeAir) Name() string

func (*AdobeAir) Version

func (a *AdobeAir) Version() string

type Android

type Android struct {
	// contains filtered or unexported fields
}

func NewAndroid

func NewAndroid(p Parser) *Android

func (*Android) Match

func (a *Android) Match() bool

func (*Android) Name

func (a *Android) Name() string

func (*Android) Version

func (a *Android) Version() string

type BlackBerry

type BlackBerry struct {
	// contains filtered or unexported fields
}

func NewBlackBerry

func NewBlackBerry(p Parser) *BlackBerry

func (*BlackBerry) Match

func (b *BlackBerry) Match() bool

func (*BlackBerry) Name

func (b *BlackBerry) Name() string

func (*BlackBerry) Version

func (b *BlackBerry) Version() string

type ChromeOS

type ChromeOS struct {
	// contains filtered or unexported fields
}

func NewChromeOS

func NewChromeOS(p Parser) *ChromeOS

func (*ChromeOS) Match

func (c *ChromeOS) Match() bool

func (*ChromeOS) Name

func (c *ChromeOS) Name() string

func (*ChromeOS) Version

func (c *ChromeOS) Version() string

type FirefoxOS

type FirefoxOS struct {
	// contains filtered or unexported fields
}

func NewFirefoxOS

func NewFirefoxOS(p Parser) *FirefoxOS

func (*FirefoxOS) Match

func (f *FirefoxOS) Match() bool

func (*FirefoxOS) Name

func (f *FirefoxOS) Name() string

func (*FirefoxOS) Version

func (f *FirefoxOS) Version() string

type IOS

type IOS struct {
	// contains filtered or unexported fields
}

func NewIOS

func NewIOS(p Parser) *IOS

func (*IOS) Match

func (i *IOS) Match() bool

func (*IOS) Name

func (i *IOS) Name() string

func (*IOS) Version

func (i *IOS) Version() string

type KaiOS

type KaiOS struct {
	// contains filtered or unexported fields
}

func NewKaiOS

func NewKaiOS(p Parser) *KaiOS

func (*KaiOS) Match

func (k *KaiOS) Match() bool

func (*KaiOS) Name

func (k *KaiOS) Name() string

func (*KaiOS) Version

func (k *KaiOS) Version() string

type Linux

type Linux struct {
	// contains filtered or unexported fields
}

func NewLinux

func NewLinux(p Parser) *Linux

func (*Linux) Match

func (l *Linux) Match() bool

func (*Linux) Name

func (l *Linux) Name() string

func (*Linux) Version

func (l *Linux) Version() string

type Mac

type Mac struct {
	// contains filtered or unexported fields
}

func NewMac

func NewMac(p Parser) *Mac

func (*Mac) Match

func (m *Mac) Match() bool

func (*Mac) Name

func (m *Mac) Name() string

func (*Mac) Version

func (m *Mac) Version() string

type Parser added in v1.1.0

type Parser interface {
	Version([]string, int, string) string
	Match([]string) bool
	String() string
}

type UAParser added in v1.1.0

type UAParser struct {
	// contains filtered or unexported fields
}

func NewUAParser added in v1.1.0

func NewUAParser(userAgent string) *UAParser

NewUAParser returns a new UAParser.

func (UAParser) Match added in v1.1.0

func (b UAParser) Match(patterns []string) bool

Match returns true if the user agent matches the pattern. The pattern is a list of regular expressions.

func (UAParser) String added in v1.1.0

func (b UAParser) String() string

func (UAParser) Version added in v1.1.0

func (b UAParser) Version(patterns []string, order int, defaultVersion string) string

Version returns the version of the platform. The pattern is a list of regular expressions. The version is extracted from the user agent string using the given patterns. The order parameter specifies which match to return.

type Unknown

type Unknown struct {
	// contains filtered or unexported fields
}

Unknown is the platform information when the user agent is not recognized. It is used as a fallback when the user agent is not recognized. Its last in the list of platform matchers.

func NewUnknown

func NewUnknown(p Parser) *Unknown

func (*Unknown) Match

func (u *Unknown) Match() bool

func (*Unknown) Name

func (u *Unknown) Name() string

func (*Unknown) Version

func (u *Unknown) Version() string

type WatchOS

type WatchOS struct {
	// contains filtered or unexported fields
}

func NewWatchOS

func NewWatchOS(p Parser) *WatchOS

func (*WatchOS) Match

func (w *WatchOS) Match() bool

func (*WatchOS) Name

func (w *WatchOS) Name() string

func (*WatchOS) Version

func (w *WatchOS) Version() string

type Windows

type Windows struct {
	// contains filtered or unexported fields
}

func NewWindows

func NewWindows(p Parser) *Windows

func (*Windows) Match

func (w *Windows) Match() bool

func (*Windows) Name

func (w *Windows) Name() string

func (*Windows) Version

func (w *Windows) Version() string

type WindowsMobile

type WindowsMobile struct {
	// contains filtered or unexported fields
}

func NewWindowsMobile

func NewWindowsMobile(p Parser) *WindowsMobile

func (*WindowsMobile) Match

func (w *WindowsMobile) Match() bool

func (*WindowsMobile) Name

func (w *WindowsMobile) Name() string

func (*WindowsMobile) Version

func (w *WindowsMobile) Version() string

type WindowsPhone

type WindowsPhone struct {
	// contains filtered or unexported fields
}

func NewWindowsPhone

func NewWindowsPhone(p Parser) *WindowsPhone

func (*WindowsPhone) Match

func (w *WindowsPhone) Match() bool

func (*WindowsPhone) Name

func (w *WindowsPhone) Name() string

func (*WindowsPhone) Version

func (w *WindowsPhone) Version() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL