common

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MIT Imports: 4 Imported by: 2

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 {
	Product     string   `protobuf:"bytes,1,opt,name=product,proto3" json:"product,omitempty"`                                  // App product name
	Package     string   `protobuf:"bytes,2,opt,name=package,proto3" json:"package,omitempty"`                                  // Application package name
	Version     string   `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`                                  // Application version
	OsVersion   string   `protobuf:"bytes,4,opt,name=os_version,json=osVersion,proto3" json:"os_version,omitempty"`             // Platform os version
	Brand       string   `protobuf:"bytes,5,opt,name=brand,proto3" json:"brand,omitempty"`                                      // Device brand or manufacturer
	Model       string   `protobuf:"bytes,6,opt,name=model,proto3" json:"model,omitempty"`                                      // Device model
	DeviceId    string   `protobuf:"bytes,7,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`                // Device unique ID
	Fingerprint string   `protobuf:"bytes,8,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"`                          // Device fingerprint
	Locale      string   `protobuf:"bytes,11,opt,name=locale,proto3" json:"locale,omitempty"`                                   // Device locale
	Latitude    string   `protobuf:"bytes,12,opt,name=latitude,proto3" json:"latitude,omitempty"`                               // Device coordinate latitude
	Longitude   string   `protobuf:"bytes,13,opt,name=longitude,proto3" json:"longitude,omitempty"`                             // Device coordinate longitude
	Platform    Platform `protobuf:"varint,15,opt,name=platform,proto3,enum=appootb.common.Platform" json:"platform,omitempty"` // Device platform, ios or android
	Network     Network  `protobuf:"varint,16,opt,name=network,proto3,enum=appootb.common.Network" json:"network,omitempty"`    // Device network type, wifi or 4g
	Timestamp   int64    `protobuf:"varint,18,opt,name=timestamp,proto3" json:"timestamp,omitempty"`                            // Local device timestamp (in millisecond)
	TraceId     string   `protobuf:"bytes,19,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`                  // Request unique trace ID
	IsEmulator  bool     `protobuf:"varint,21,opt,name=is_emulator,json=isEmulator,proto3" json:"is_emulator,omitempty"`        // If running in an emulator
	IsDevelop   bool     `protobuf:"varint,22,opt,name=is_develop,json=isDevelop,proto3" json:"is_develop,omitempty"`           // If running in develop env
	IsTesting   bool     `protobuf:"varint,23,opt,name=is_testing,json=isTesting,proto3" json:"is_testing,omitempty"`           // If running in testing env
	Channel     string   `protobuf:"bytes,31,opt,name=channel,proto3" json:"channel,omitempty"`                                 // Distribution channel
	Uuid        string   `protobuf:"bytes,32,opt,name=uuid,proto3" json:"uuid,omitempty"`                                       // Device UUID/OAID
	Imei        string   `protobuf:"bytes,33,opt,name=imei,proto3" json:"imei,omitempty"`                                       // Device IMEI
	DeviceMac   string   `protobuf:"bytes,35,opt,name=device_mac,json=deviceMac,proto3" json:"device_mac,omitempty"`            // Device MAC Addr
	ClientIp    string   `protobuf:"bytes,34,opt,name=client_ip,json=clientIp,proto3" json:"client_ip,omitempty"`               // Client IP
	UserAgent   string   `protobuf:"bytes,36,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`            // User-agent
	Token       string   `protobuf:"bytes,49,opt,name=token,proto3" json:"token,omitempty"`                                     // Account token
	// contains filtered or unexported fields
}

Request metadata.

func (*Metadata) Descriptor deprecated

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

Deprecated: Use Metadata.ProtoReflect.Descriptor instead.

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) GetFingerprint

func (x *Metadata) GetFingerprint() string

func (*Metadata) GetImei

func (x *Metadata) GetImei() string

func (*Metadata) GetIsDevelop

func (x *Metadata) GetIsDevelop() bool

func (*Metadata) GetIsEmulator

func (x *Metadata) GetIsEmulator() bool

func (*Metadata) GetIsTesting

func (x *Metadata) GetIsTesting() 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) GetTimestamp

func (x *Metadata) GetTimestamp() int64

func (*Metadata) GetToken

func (x *Metadata) GetToken() string

func (*Metadata) GetTraceId

func (x *Metadata) GetTraceId() 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

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

func (Network) Descriptor() protoreflect.EnumDescriptor

func (Network) Enum

func (x Network) Enum() *Network

func (Network) EnumDescriptor deprecated

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

Deprecated: Use Network.Descriptor instead.

func (Network) Number

func (x Network) Number() protoreflect.EnumNumber

func (Network) String

func (x Network) String() string

func (Network) Type

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

func (Platform) Descriptor() protoreflect.EnumDescriptor

func (Platform) Enum

func (x Platform) Enum() *Platform

func (Platform) EnumDescriptor deprecated

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

Deprecated: Use Platform.Descriptor instead.

func (Platform) Number

func (x Platform) Number() protoreflect.EnumNumber

func (Platform) String

func (x Platform) String() string

func (Platform) Type

Jump to

Keyboard shortcuts

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