common

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Network_name = map[int32]string{
		0: "NETWORK_UNSPECIFIED",
		1: "NETWORK_ETHERNET",
		2: "NETWORK_WIFI",
		3: "NETWORK_CELLULAR",
	}
	Network_value = map[string]int32{
		"NETWORK_UNSPECIFIED": 0,
		"NETWORK_ETHERNET":    1,
		"NETWORK_WIFI":        2,
		"NETWORK_CELLULAR":    3,
	}
)

Enum value maps for Network.

View Source
var (
	Platform_name = map[int32]string{
		0:    "PLATFORM_UNSPECIFIED",
		1:    "PLATFORM_H5",
		2:    "PLATFORM_BROWSER",
		4:    "PLATFORM_CHROME",
		7:    "PLATFORM_WEB",
		16:   "PLATFORM_LINUX",
		32:   "PLATFORM_WINDOWS",
		64:   "PLATFORM_DARWIN",
		112:  "PLATFORM_PC",
		256:  "PLATFORM_ANDROID",
		512:  "PLATFORM_IOS",
		768:  "PLATFORM_MOBILE",
		4096: "PLATFORM_SERVER",
	}
	Platform_value = map[string]int32{
		"PLATFORM_UNSPECIFIED": 0,
		"PLATFORM_H5":          1,
		"PLATFORM_BROWSER":     2,
		"PLATFORM_CHROME":      4,
		"PLATFORM_WEB":         7,
		"PLATFORM_LINUX":       16,
		"PLATFORM_WINDOWS":     32,
		"PLATFORM_DARWIN":      64,
		"PLATFORM_PC":          112,
		"PLATFORM_ANDROID":     256,
		"PLATFORM_IOS":         512,
		"PLATFORM_MOBILE":      768,
		"PLATFORM_SERVER":      4096,
	}
)

Enum value maps for Platform.

View Source
var File_metadata_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Metadata

type Metadata struct {
	Token      string   `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`                                     // Account token, empty for guest account
	Platform   Platform `protobuf:"varint,2,opt,name=platform,proto3,enum=appootb.common.Platform" json:"platform,omitempty"` // Device platform, ios or android
	Network    Network  `protobuf:"varint,3,opt,name=network,proto3,enum=appootb.common.Network" json:"network,omitempty"`    // Device network type, wifi or 4g
	Package    string   `protobuf:"bytes,4,opt,name=package,proto3" json:"package,omitempty"`                                 // Application package name
	Version    string   `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`                                 // Application version
	OsVersion  string   `protobuf:"bytes,6,opt,name=os_version,json=osVersion,proto3" json:"os_version,omitempty"`            // Platform os version
	Brand      string   `protobuf:"bytes,7,opt,name=brand,proto3" json:"brand,omitempty"`                                     // Device brand or manufacturer
	Model      string   `protobuf:"bytes,8,opt,name=model,proto3" json:"model,omitempty"`                                     // Device model
	DeviceId   string   `protobuf:"bytes,9,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`               // Device ID
	Timestamp  int64    `protobuf:"varint,10,opt,name=timestamp,proto3" json:"timestamp,omitempty"`                           // Local device timestamp (in millisecond)
	IsEmulator bool     `protobuf:"varint,11,opt,name=is_emulator,json=isEmulator,proto3" json:"is_emulator,omitempty"`       // If running in an emulator
	IsDebug    bool     `protobuf:"varint,12,opt,name=is_debug,json=isDebug,proto3" json:"is_debug,omitempty"`                // If running in debug mode
	Latitude   string   `protobuf:"bytes,13,opt,name=latitude,proto3" json:"latitude,omitempty"`                              // Device location latitude
	Longitude  string   `protobuf:"bytes,14,opt,name=longitude,proto3" json:"longitude,omitempty"`                            // Device location longitude
	Locale     string   `protobuf:"bytes,15,opt,name=locale,proto3" json:"locale,omitempty"`                                  // Device locale
	ClientIp   string   `protobuf:"bytes,16,opt,name=client_ip,json=clientIp,proto3" json:"client_ip,omitempty"`              // Client IP
	Channel    string   `protobuf:"bytes,17,opt,name=channel,proto3" json:"channel,omitempty"`                                // Distribution channel
	Product    string   `protobuf:"bytes,18,opt,name=product,proto3" json:"product,omitempty"`                                // Product name
	TraceId    string   `protobuf:"bytes,19,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`                 // Trace ID
	RiskId     string   `protobuf:"bytes,20,opt,name=risk_id,json=riskId,proto3" json:"risk_id,omitempty"`                    // Risk ID
	Uuid       string   `protobuf:"bytes,21,opt,name=uuid,proto3" json:"uuid,omitempty"`                                      // Device UUID
	Udid       string   `protobuf:"bytes,22,opt,name=udid,proto3" json:"udid,omitempty"`                                      // Device UDID
	UserAgent  string   `protobuf:"bytes,23,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`           // User-agent
	DeviceMac  string   `protobuf:"bytes,24,opt,name=device_mac,json=deviceMac,proto3" json:"device_mac,omitempty"`           // Device MAC
	AndroidId  string   `protobuf:"bytes,25,opt,name=android_id,json=androidId,proto3" json:"android_id,omitempty"`           // Android ID
	// contains filtered or unexported fields
}

Request metadata.

func (*Metadata) Descriptor deprecated

func (*Metadata) Descriptor() ([]byte, []int)

Deprecated: Use Metadata.ProtoReflect.Descriptor instead.

func (*Metadata) GetAndroidId

func (x *Metadata) GetAndroidId() string

func (*Metadata) GetBrand

func (x *Metadata) GetBrand() string

func (*Metadata) GetChannel

func (x *Metadata) GetChannel() string

func (*Metadata) GetClientIp

func (x *Metadata) GetClientIp() string

func (*Metadata) GetDeviceId

func (x *Metadata) GetDeviceId() string

func (*Metadata) GetDeviceMac

func (x *Metadata) GetDeviceMac() string

func (*Metadata) GetIsDebug

func (x *Metadata) GetIsDebug() bool

func (*Metadata) GetIsEmulator

func (x *Metadata) GetIsEmulator() bool

func (*Metadata) GetLatitude

func (x *Metadata) GetLatitude() string

func (*Metadata) GetLocale

func (x *Metadata) GetLocale() string

func (*Metadata) GetLongitude

func (x *Metadata) GetLongitude() string

func (*Metadata) GetModel

func (x *Metadata) GetModel() string

func (*Metadata) GetNetwork

func (x *Metadata) GetNetwork() Network

func (*Metadata) GetOsVersion

func (x *Metadata) GetOsVersion() string

func (*Metadata) GetPackage

func (x *Metadata) GetPackage() string

func (*Metadata) GetPlatform

func (x *Metadata) GetPlatform() Platform

func (*Metadata) GetProduct

func (x *Metadata) GetProduct() string

func (*Metadata) GetRiskId

func (x *Metadata) GetRiskId() string

func (*Metadata) GetTimestamp

func (x *Metadata) GetTimestamp() int64

func (*Metadata) GetToken

func (x *Metadata) GetToken() string

func (*Metadata) GetTraceId

func (x *Metadata) GetTraceId() string

func (*Metadata) GetUdid

func (x *Metadata) GetUdid() string

func (*Metadata) GetUserAgent

func (x *Metadata) GetUserAgent() string

func (*Metadata) GetUuid

func (x *Metadata) GetUuid() string

func (*Metadata) GetVersion

func (x *Metadata) GetVersion() string

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) ProtoReflect added in v1.0.2

func (x *Metadata) ProtoReflect() protoreflect.Message

func (*Metadata) Reset

func (x *Metadata) Reset()

func (*Metadata) String

func (x *Metadata) String() string

type Network

type Network int32

Network enums.

const (
	Network_NETWORK_UNSPECIFIED Network = 0 // Unspecified
	Network_NETWORK_ETHERNET    Network = 1 // Ethernet
	Network_NETWORK_WIFI        Network = 2 // Wifi
	Network_NETWORK_CELLULAR    Network = 3 // Cellular
)

func (Network) Descriptor added in v1.0.2

func (Network) Descriptor() protoreflect.EnumDescriptor

func (Network) Enum added in v1.0.2

func (x Network) Enum() *Network

func (Network) EnumDescriptor deprecated

func (Network) EnumDescriptor() ([]byte, []int)

Deprecated: Use Network.Descriptor instead.

func (Network) Number added in v1.0.2

func (x Network) Number() protoreflect.EnumNumber

func (Network) String

func (x Network) String() string

func (Network) Type added in v1.0.2

func (Network) Type() protoreflect.EnumType

type Platform

type Platform int32

Platform enums.

const (
	Platform_PLATFORM_UNSPECIFIED Platform = 0    // Unspecified
	Platform_PLATFORM_H5          Platform = 1    // H5
	Platform_PLATFORM_BROWSER     Platform = 2    // Browser
	Platform_PLATFORM_CHROME      Platform = 4    // ChromeOS
	Platform_PLATFORM_WEB         Platform = 7    // WEB, H5 | Browser | ChromeOS
	Platform_PLATFORM_LINUX       Platform = 16   // Linux
	Platform_PLATFORM_WINDOWS     Platform = 32   // Windows
	Platform_PLATFORM_DARWIN      Platform = 64   // MacOS
	Platform_PLATFORM_PC          Platform = 112  // PC, Linux | Windows | MacOS
	Platform_PLATFORM_ANDROID     Platform = 256  // Android
	Platform_PLATFORM_IOS         Platform = 512  // iOS
	Platform_PLATFORM_MOBILE      Platform = 768  // Mobile, Android | iOS
	Platform_PLATFORM_SERVER      Platform = 4096 // Internal server
)

func (Platform) Descriptor added in v1.0.2

func (Platform) Descriptor() protoreflect.EnumDescriptor

func (Platform) Enum added in v1.0.2

func (x Platform) Enum() *Platform

func (Platform) EnumDescriptor deprecated

func (Platform) EnumDescriptor() ([]byte, []int)

Deprecated: Use Platform.Descriptor instead.

func (Platform) Number added in v1.0.2

func (x Platform) Number() protoreflect.EnumNumber

func (Platform) String

func (x Platform) String() string

func (Platform) Type added in v1.0.2

Jump to

Keyboard shortcuts

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