Documentation
¶
Index ¶
- Constants
- func Handler(h PlatformHandler, p *PreCompiledHandler) http.Handler
- func HandlerMux(s *http.ServeMux, p *PreCompiledHandler) http.Handler
- func Platform(r *http.Request) platform.Device
- func UserAgentToKey(userAgent string) uint32
- type Compiled
- type DeviceDetect
- type PlatformHandler
- type PreCompiledHandler
Constants ¶
View Source
const ( UnknownOs = "UnknownOs" UnknownVersion = "UnknownVersion" )
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(h PlatformHandler, p *PreCompiledHandler) http.Handler
func HandlerMux ¶
func HandlerMux(s *http.ServeMux, p *PreCompiledHandler) http.Handler
func UserAgentToKey ¶
Types ¶
type DeviceDetect ¶
type DeviceDetect struct {
// contains filtered or unexported fields
}
func NewDeviceDetect ¶
func NewDeviceDetect(r *http.Request, p *PreCompiledHandler) *DeviceDetect
func (*DeviceDetect) FindByUserAgent ¶
func (d *DeviceDetect) FindByUserAgent(userAgent string) platform.Device
func (*DeviceDetect) PlatformType ¶
func (d *DeviceDetect) PlatformType() platform.Device
type PlatformHandler ¶
type PlatformHandler interface { Mobile(w http.ResponseWriter, r *http.Request, d *platform.DeviceMobile) Tablet(w http.ResponseWriter, r *http.Request, d *platform.DeviceTablet) Desktop(w http.ResponseWriter, r *http.Request, d *platform.DeviceDesktop) Tv(w http.ResponseWriter, r *http.Request, d *platform.DeviceTv) Watch(w http.ResponseWriter, r *http.Request, d *platform.DeviceWatch) Bot(w http.ResponseWriter, r *http.Request, d *platform.DeviceBot) Glass(w http.ResponseWriter, r *http.Request, d *platform.DeviceGlass) Unknown(w http.ResponseWriter, r *http.Request, d *platform.DeviceUnknown) }
type PreCompiledHandler ¶
type PreCompiledHandler struct{}
Click to show internal directories.
Click to hide internal directories.