model

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BrowserDeviceId     = "E31203124E11465A93E8156147D7F9F1"
	BrowserDeviceName   = "浏览器" //TODO 中文翻译
	BrowserWechat       = "微信"
	BrowserLiebao       = "猎豹"
	BrowserTheWorld     = "世界之窗"
	BrowserBaidu        = "百度"
	BrowserMaxthon      = "傲游"
	BrowserSogou        = "搜狗"
	BrowserMiui         = "小米"
	BrowserTaobao       = "淘宝"
	BrowserDeviceClient = "WEB_BROWSER_QING"
	PCClient            = "PC客户端"
)
View Source
const (
	DeviceTypeBrowser      = "web"
	DeviceTypePC           = "pc"
	DeviceTypeAndroid      = "android"
	DeviceTypeIOS          = "ios"
	DeviceTypeWindowsPhone = "windowsphone"
	DeviceTypeUnkown       = "unknown"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	Id         string `json:"deviceid"`
	Name       string `json:"name"`
	Platform   string `json:"platform"`
	AppVersion string `json:"client_ver"`
	Type       string `json:"dev_type"`
	LastTime   int64  `json:"last_time"`
	IP         string `json:"ip"`
}

type DeviceSorter

type DeviceSorter struct {
	Devices []*Device
	SortBy  func(d1, d2 *Device) bool
}

func (*DeviceSorter) Len

func (s *DeviceSorter) Len() int

func (*DeviceSorter) Less

func (s *DeviceSorter) Less(i, j int) bool

func (*DeviceSorter) Swap

func (s *DeviceSorter) Swap(i, j int)

Jump to

Keyboard shortcuts

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