pmodel

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package pmodel

@author: xwc1125

Package pmodel

@author: xwc1125

Package pmodel

@author: xwc1125

Package pmodel

@author: xwc1125

Package pmodel

@author: xwc1125

Package pmodel

@author: xwc1125

Package pmodel

@author: xwc1125

Package pmodel

@author: xwc1125

Package pmodel

@author: xwc1125

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApkInfo

type ApkInfo struct {
	PkName       string `json:"pkName"`       // App的包名
	Label        string `json:"label"`        // App名称
	VersionName  string `json:"versionName"`  // App版本
	VersionCode  int    `json:"versionCode"`  // App版本号
	ApkFile      int    `json:"apkFile"`      // App的位置
	Installed    int    `json:"installed"`    // 0:未安装,1:已安装
	InstallState int    `json:"installState"` // -1:未知,0:失败,1:成功,2:升级失败,3:升级成功
}

func (ApkInfo) ToString

func (a ApkInfo) ToString() string

type AppInfo

type AppInfo struct {
	L        string `json:"l"`        // app名称
	C        int    `json:"c"`        // app版本号
	V        string `json:"v"`        // app版本名称
	Pk       string `json:"pk"`       // app包名
	Apk      string `json:"apk"`      // app密钥
	Cpk      string `json:"cpk"`      // company密钥;
	Platform string `json:"platform"` // 平台
	Sign     string `json:"sign"`     // 包签名内容
	R        int64  `json:"r"`        // 随机码;
}

func (AppInfo) String

func (a AppInfo) String() string

type ClientInfo

type ClientInfo struct {
	ClientID     string `json:"clientId"`
	ClientSecret string `json:"clientSecret"`
	AesKey       string `json:"aesKey"`
	R            int64  `json:"r"`
}

func (ClientInfo) ToString

func (a ClientInfo) ToString() string

type ClientOsType

type ClientOsType int
const (
	UNKNOWN ClientOsType = -1
	ANDROID ClientOsType = 0
	IOS     ClientOsType = 1
	WEB     ClientOsType = 2
	WINDOWS ClientOsType = 3
	MACBOOK ClientOsType = 4
	LINUX   ClientOsType = 5
)

func ParseOsTypeByName

func ParseOsTypeByName(n string) ClientOsType

func ParseOsTypeByType

func ParseOsTypeByType(t int) ClientOsType

func (ClientOsType) String

func (p ClientOsType) String() string

type CoreDataInfo

type CoreDataInfo map[string]string

func (*CoreDataInfo) String

func (c *CoreDataInfo) String() string

type DataInfo

type DataInfo map[string]interface{}

func NewDataInfo

func NewDataInfo() *DataInfo

func (DataInfo) ContainsKey

func (i DataInfo) ContainsKey(k string) (bool, string)

判断是否包括key,如果包含key返回value的类型

func (*DataInfo) DecodeFromBytes

func (i *DataInfo) DecodeFromBytes(data []KVBytes, val interface{}) error

func (*DataInfo) EncodeToBytes

func (i *DataInfo) EncodeToBytes() ([]KVBytes, error)

func (DataInfo) Exist

func (i DataInfo) Exist(k string) bool

func (DataInfo) ForEach

func (i DataInfo) ForEach() map[string]interface{}

复制map用于外部遍历

func (DataInfo) Get

func (i DataInfo) Get(k string) (obj interface{}, objType string, isExist bool)

func (DataInfo) GetObj

func (i DataInfo) GetObj(k string) (obj interface{})

func (DataInfo) GetValue

func (i DataInfo) GetValue(k string) reflect.Value

func (DataInfo) GetValues

func (i DataInfo) GetValues(k string) []reflect.Value

func (DataInfo) Put

func (i DataInfo) Put(k string, v interface{})

增加或者修改一个元素

func (DataInfo) Remove

func (i DataInfo) Remove(k string) (interface{}, bool)

移除一个元素

func (DataInfo) Size

func (i DataInfo) Size() int

放回现在的个数

func (DataInfo) Sort

func (i DataInfo) Sort() []KV

排序

func (DataInfo) String

func (i DataInfo) String() string

func (DataInfo) StringKV

func (i DataInfo) StringKV() string

type Decoder

type Decoder interface {
	DecodeFromBytes([]byte) error
}

type DeviceInfo

type DeviceInfo struct {
	UID string `json:"uid"` // 唯一码
	Dn  string `json:"dn"`  // 设备名称deviceName
	Dsn string `json:"dsn"` // 设备系统名称deviceSystemName
	Dsv string `json:"dsv"` // 设备系统版本名称DeviceSystemVersion
	Dm  string `json:"dm"`  // 设备model
	Dlm string `json:"dlm"` // 设备localizeModel
	R   int64  `json:"r"`   // 随机码
}

func (DeviceInfo) String

func (a DeviceInfo) String() string

type Encoder

type Encoder interface {
	EncodeToBytes() ([]byte, error)
}

type KV

type KV struct {
	Key   string
	Value interface{}
}

type KVBytes

type KVBytes struct {
	Key   string
	Value []byte
}

type PhoneInfo

type PhoneInfo struct {
	Ma     string    `json:"ma"`     // mac地址
	Ies    []string  `json:"ies"`    // imei
	Smis   []SimInfo `json:"smis"`   // sim信息
	IsList int       `json:"isList"` // 是否使用的List:0:false,1:true
	R      int64     `json:"r"`      // 随机码
}

func (PhoneInfo) String

func (a PhoneInfo) String() string

type SdkInfo

type SdkInfo struct {
	C  int    `json:"c"`  // sdk版本号
	N  string `json:"n"`  // sdk名称
	V  string `json:"v"`  // sdk版本名称
	Cm string `json:"cm"` // sdk 定制方
	R  int64  `json:"r"`  // 随机码;
}

func (SdkInfo) String

func (a SdkInfo) String() string

type SimInfo

type SimInfo struct {
	Is   string `json:"is"`   // imsi
	Ic   string `json:"ic"`   // iccid
	M    string `json:"m"`    // mobile
	Cn   string `json:"cn"`   // CarrierName -中国联通 4G
	Sid  int    `json:"sid"`  // 从0开始,最大为卡槽数。 0 即表示卡1的数据
	T    int    `json:"t"`    // 类别 0:高通、联发科反射数据 1:兼容的4.0,5.0的反射数据 2:5.0以上的反射数据
	Idfd bool   `json:"idfd"` // 移动网络是否首选该卡
	Idfs bool   `json:"idfs"` // 短信是否首选该卡
	R    int64  `json:"r"`    // 随机码;
}

func (SimInfo) String

func (a SimInfo) String() string

Jump to

Keyboard shortcuts

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