protocol

package
v0.0.0-...-1dc5a0e Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 21 Imported by: 3

Documentation

Overview

Package protocol is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	Detector_Detect_FullMethodName = "/udetect.Detector/Detect"
)

Variables

View Source
var (
	ConnType_name = map[int32]string{
		0: "Unknown",
		1: "Ethernet",
		2: "WIFI",
		3: "Cell",
		4: "Cell2G",
		5: "Cell3G",
		6: "Cell4G",
		7: "Cell5G",
	}
	ConnType_value = map[string]int32{
		"Unknown":  0,
		"Ethernet": 1,
		"WIFI":     2,
		"Cell":     3,
		"Cell2G":   4,
		"Cell3G":   5,
		"Cell4G":   6,
		"Cell5G":   7,
	}
)

Enum value maps for ConnType.

View Source
var (
	DeviceType_name = map[int32]string{
		0: "Undefined",
		1: "Mobile",
		2: "PC",
		3: "TV",
		4: "Phone",
		5: "Tablet",
		6: "Connected",
		7: "SetTopBox",
		8: "Watch",
		9: "Glasses",
	}
	DeviceType_value = map[string]int32{
		"Undefined": 0,
		"Mobile":    1,
		"PC":        2,
		"TV":        3,
		"Phone":     4,
		"Tablet":    5,
		"Connected": 6,
		"SetTopBox": 7,
		"Watch":     8,
		"Glasses":   9,
	}
)

Enum value maps for DeviceType.

View Source
var Detector_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "udetect.Detector",
	HandlerType: (*DetectorServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Detect",
			Handler:    _Detector_Detect_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "protocol/protocol.proto",
}

Detector_ServiceDesc is the grpc.ServiceDesc for Detector service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_protocol_protocol_proto protoreflect.FileDescriptor
View Source
var SwaggerDefenition string

Functions

func RegisterDetectorHandler

func RegisterDetectorHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterDetectorHandler registers the http handlers for service Detector to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterDetectorHandlerClient

func RegisterDetectorHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DetectorClient) error

RegisterDetectorHandlerClient registers the http handlers for service Detector to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DetectorClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DetectorClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "DetectorClient" to call the correct interceptors. This client ignores the HTTP middlewares.

func RegisterDetectorHandlerFromEndpoint

func RegisterDetectorHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterDetectorHandlerFromEndpoint is same as RegisterDetectorHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterDetectorHandlerServer

func RegisterDetectorHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DetectorServer) error

RegisterDetectorHandlerServer registers the http handlers for service Detector to "mux". UnaryRPC :call DetectorServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDetectorHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.

func RegisterDetectorServer

func RegisterDetectorServer(s grpc.ServiceRegistrar, srv DetectorServer)

Types

type Browser

type Browser struct {
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// Name of the browser; like Safari, Chrome, Firefox, etc.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// Indicates the version or subversion of the browser.
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// Is browser UA was detected as robot
	IsRobot int32 `protobuf:"varint,4,opt,name=is_robot,json=isRobot,proto3" json:"is_robot,omitempty"`
	// contains filtered or unexported fields
}

func (*Browser) Descriptor deprecated

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

Deprecated: Use Browser.ProtoReflect.Descriptor instead.

func (*Browser) GetId

func (x *Browser) GetId() uint64

func (*Browser) GetIsRobot

func (x *Browser) GetIsRobot() int32

func (*Browser) GetName

func (x *Browser) GetName() string

func (*Browser) GetVersion

func (x *Browser) GetVersion() string

func (*Browser) ProtoMessage

func (*Browser) ProtoMessage()

func (*Browser) ProtoReflect

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

func (*Browser) Reset

func (x *Browser) Reset()

func (*Browser) String

func (x *Browser) String() string

type Carrier

type Carrier struct {
	Id   uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

func (*Carrier) Descriptor deprecated

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

Deprecated: Use Carrier.ProtoReflect.Descriptor instead.

func (*Carrier) GetCode

func (x *Carrier) GetCode() string

func (*Carrier) GetId

func (x *Carrier) GetId() uint64

func (*Carrier) GetName

func (x *Carrier) GetName() string

func (*Carrier) ProtoMessage

func (*Carrier) ProtoMessage()

func (*Carrier) ProtoReflect

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

func (*Carrier) Reset

func (x *Carrier) Reset()

func (*Carrier) String

func (x *Carrier) String() string

type ConnType

type ConnType int32
const (
	ConnType_Unknown  ConnType = 0
	ConnType_Ethernet ConnType = 1
	ConnType_WIFI     ConnType = 2
	ConnType_Cell     ConnType = 3
	ConnType_Cell2G   ConnType = 4
	ConnType_Cell3G   ConnType = 5
	ConnType_Cell4G   ConnType = 6
	ConnType_Cell5G   ConnType = 7
)

func (ConnType) Descriptor

func (ConnType) Descriptor() protoreflect.EnumDescriptor

func (ConnType) Enum

func (x ConnType) Enum() *ConnType

func (ConnType) EnumDescriptor deprecated

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

Deprecated: Use ConnType.Descriptor instead.

func (ConnType) Number

func (x ConnType) Number() protoreflect.EnumNumber

func (ConnType) String

func (x ConnType) String() string

func (ConnType) Type

type DetectorClient

type DetectorClient interface {
	Detect(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}

DetectorClient is the client API for Detector service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewDetectorClient

func NewDetectorClient(cc grpc.ClientConnInterface) DetectorClient

type DetectorServer

type DetectorServer interface {
	Detect(context.Context, *Request) (*Response, error)
	// contains filtered or unexported methods
}

DetectorServer is the server API for Detector service. All implementations must embed UnimplementedDetectorServer for forward compatibility.

type Device

type Device struct {
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// Indicates the name of the company that manufactures the device
	// or primarily sells it, e.g. Samsung.
	Make string `protobuf:"bytes,2,opt,name=make,proto3" json:"make,omitempty"`
	// Indicates the model name or number used primarily by the hardware
	// vendor to identify the device, e.g.SM-T805S. When a model identifier
	// is not available the HardwareName will be used.
	Model string `protobuf:"bytes,3,opt,name=model,proto3" json:"model,omitempty"`
	// Indicates the name and version of the operating system the device is using.
	Os *OS `protobuf:"bytes,4,opt,name=os,proto3" json:"os,omitempty"`
	// Browser information model
	Browser *Browser `protobuf:"bytes,5,opt,name=browser,proto3" json:"browser,omitempty"`
	// Connection type of the device
	Connectiontype ConnType `protobuf:"varint,6,opt,name=connectiontype,proto3,enum=udetect.ConnType" json:"connectiontype,omitempty"`
	// Indicates the type of the device based on values set in other properties,
	// such as IsMobile, IsTablet, IsSmartphone, IsSmallScreen etc.
	Devicetype DeviceType `protobuf:"varint,7,opt,name=devicetype,proto3,enum=udetect.DeviceType" json:"devicetype,omitempty"`
	// Physical height of the screen in pixels.
	// Indicates the height of the device's screen in pixels.
	// This property is not applicable for a device that does not have a screen.
	// For devices such as tablets or TV which are predominantly used in landscape mode,
	// the pixel height will be the smaller value compared to the pixel width.
	Height int32 `protobuf:"varint,8,opt,name=height,proto3" json:"height,omitempty"`
	// Physical width of the screen in pixels
	// Indicates the width of the device's screen in pixels.
	// This property is not applicable for a device that does not have a screen.
	// For devices such as tablets or TV which are predominantly used in landscape mode,
	// the pixel width will be the larger value compared to the pixel height.
	Width int32 `protobuf:"varint,9,opt,name=width,proto3" json:"width,omitempty"`
	// Screen size as pixels per linear inch.
	// ((ScreenPixelsWidth / ScreenInchesWidth) + (ScreenPixelsHeight / ScreenInchesHeight)) / 2
	Ppi int32 `protobuf:"varint,10,opt,name=ppi,proto3" json:"ppi,omitempty"`
	// The ratio of physical pixels to device independent pixels.
	PxRatio float32 `protobuf:"fixed32,11,opt,name=px_ratio,json=pxRatio,proto3" json:"px_ratio,omitempty"`
	// Hardware version of the device (e.g., "5S" for iPhone 5S).
	Hwver string `protobuf:"bytes,12,opt,name=hwver,proto3" json:"hwver,omitempty"`
	// contains filtered or unexported fields
}

func (*Device) Descriptor deprecated

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

Deprecated: Use Device.ProtoReflect.Descriptor instead.

func (*Device) GetBrowser

func (x *Device) GetBrowser() *Browser

func (*Device) GetConnectiontype

func (x *Device) GetConnectiontype() ConnType

func (*Device) GetDevicetype

func (x *Device) GetDevicetype() DeviceType

func (*Device) GetHeight

func (x *Device) GetHeight() int32

func (*Device) GetHwver

func (x *Device) GetHwver() string

func (*Device) GetId

func (x *Device) GetId() uint64

func (*Device) GetMake

func (x *Device) GetMake() string

func (*Device) GetModel

func (x *Device) GetModel() string

func (*Device) GetOs

func (x *Device) GetOs() *OS

func (*Device) GetPpi

func (x *Device) GetPpi() int32

func (*Device) GetPxRatio

func (x *Device) GetPxRatio() float32

func (*Device) GetWidth

func (x *Device) GetWidth() int32

func (*Device) ProtoMessage

func (*Device) ProtoMessage()

func (*Device) ProtoReflect

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

func (*Device) Reset

func (x *Device) Reset()

func (*Device) String

func (x *Device) String() string

type DeviceType

type DeviceType int32
const (
	DeviceType_Undefined DeviceType = 0
	DeviceType_Mobile    DeviceType = 1 // Mobile/Tablet
	DeviceType_PC        DeviceType = 2 // Personal Computer
	DeviceType_TV        DeviceType = 3 // Connected TV
	DeviceType_Phone     DeviceType = 4 // SmartPhone, SmallScreen
	DeviceType_Tablet    DeviceType = 5
	DeviceType_Connected DeviceType = 6 // Console, EReader, SmartWatch
	DeviceType_SetTopBox DeviceType = 7 // MediaHub
	DeviceType_Watch     DeviceType = 8 // SmartWatch
	DeviceType_Glasses   DeviceType = 9 // SmartGlasses
)

func (DeviceType) Descriptor

func (DeviceType) Descriptor() protoreflect.EnumDescriptor

func (DeviceType) Enum

func (x DeviceType) Enum() *DeviceType

func (DeviceType) EnumDescriptor deprecated

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

Deprecated: Use DeviceType.Descriptor instead.

func (DeviceType) Number

func (x DeviceType) Number() protoreflect.EnumNumber

func (DeviceType) String

func (x DeviceType) String() string

func (DeviceType) Type

type GeoLocation

type GeoLocation struct {

	// Internal ID
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// IPv4/6
	Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"`
	// Carrier or ISP derived from the IP address
	Carrier *Carrier `protobuf:"bytes,3,opt,name=carrier,proto3" json:"carrier,omitempty"`
	// Latitude from -90 to 90
	Lat float32 `protobuf:"fixed32,4,opt,name=lat,proto3" json:"lat,omitempty"`
	// Longitude from -180 to 180
	Lon float32 `protobuf:"fixed32,5,opt,name=lon,proto3" json:"lon,omitempty"`
	// Country using ISO 3166-1 Alpha 2
	Country string `protobuf:"bytes,6,opt,name=country,proto3" json:"country,omitempty"`
	// Region using ISO 3166-2
	Region string `protobuf:"bytes,7,opt,name=region,proto3" json:"region,omitempty"`
	// Region of a country using FIPS 10-4
	RegionFIPS104 string `protobuf:"bytes,8,opt,name=regionFIPS104,proto3" json:"regionFIPS104,omitempty"`
	Metro         string `protobuf:"bytes,9,opt,name=metro,proto3" json:"metro,omitempty"`
	City          string `protobuf:"bytes,10,opt,name=city,proto3" json:"city,omitempty"`
	Zip           string `protobuf:"bytes,11,opt,name=zip,proto3" json:"zip,omitempty"`
	// Local time as the number +/- of minutes from UTC
	UtcOffset int32 `protobuf:"varint,12,opt,name=utc_offset,json=utcOffset,proto3" json:"utc_offset,omitempty"`
	// contains filtered or unexported fields
}

func (*GeoLocation) Descriptor deprecated

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

Deprecated: Use GeoLocation.ProtoReflect.Descriptor instead.

func (*GeoLocation) GetCarrier

func (x *GeoLocation) GetCarrier() *Carrier

func (*GeoLocation) GetCity

func (x *GeoLocation) GetCity() string

func (*GeoLocation) GetCountry

func (x *GeoLocation) GetCountry() string

func (*GeoLocation) GetId

func (x *GeoLocation) GetId() uint64

func (*GeoLocation) GetIp

func (x *GeoLocation) GetIp() string

func (*GeoLocation) GetLat

func (x *GeoLocation) GetLat() float32

func (*GeoLocation) GetLon

func (x *GeoLocation) GetLon() float32

func (*GeoLocation) GetMetro

func (x *GeoLocation) GetMetro() string

func (*GeoLocation) GetRegion

func (x *GeoLocation) GetRegion() string

func (*GeoLocation) GetRegionFIPS104

func (x *GeoLocation) GetRegionFIPS104() string

func (*GeoLocation) GetUtcOffset

func (x *GeoLocation) GetUtcOffset() int32

func (*GeoLocation) GetZip

func (x *GeoLocation) GetZip() string

func (*GeoLocation) ProtoMessage

func (*GeoLocation) ProtoMessage()

func (*GeoLocation) ProtoReflect

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

func (*GeoLocation) Reset

func (x *GeoLocation) Reset()

func (*GeoLocation) String

func (x *GeoLocation) String() string

type OS

type OS struct {
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// Name of the OS; like MacOS, Linux, Unix, etc.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// Indicates the version or subversion of the software platform.
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*OS) Descriptor deprecated

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

Deprecated: Use OS.ProtoReflect.Descriptor instead.

func (*OS) GetId

func (x *OS) GetId() uint64

func (*OS) GetName

func (x *OS) GetName() string

func (*OS) GetVersion

func (x *OS) GetVersion() string

func (*OS) ProtoMessage

func (*OS) ProtoMessage()

func (*OS) ProtoReflect

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

func (*OS) Reset

func (x *OS) Reset()

func (*OS) String

func (x *OS) String() string

type Request

type Request struct {

	// Advertiser Device ID (IDFA, AAID), Identifier for Advertising (IFA)
	Udid            string   `protobuf:"bytes,1,opt,name=udid,proto3" json:"udid,omitempty"`
	Uid             *UUID    `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
	Sessid          *UUID    `protobuf:"bytes,3,opt,name=sessid,proto3" json:"sessid,omitempty"`
	Ip              string   `protobuf:"bytes,4,opt,name=ip,proto3" json:"ip,omitempty"`
	Ua              string   `protobuf:"bytes,5,opt,name=ua,proto3" json:"ua,omitempty"`
	Url             string   `protobuf:"bytes,6,opt,name=url,proto3" json:"url,omitempty"`
	Ref             string   `protobuf:"bytes,7,opt,name=ref,proto3" json:"ref,omitempty"`
	DNT             bool     `protobuf:"varint,8,opt,name=DNT,proto3" json:"DNT,omitempty"`
	LMT             bool     `protobuf:"varint,9,opt,name=LMT,proto3" json:"LMT,omitempty"`
	Adblock         bool     `protobuf:"varint,10,opt,name=adblock,proto3" json:"adblock,omitempty"`
	PrivateBrowsing bool     `protobuf:"varint,11,opt,name=private_browsing,json=privateBrowsing,proto3" json:"private_browsing,omitempty"`
	Js              bool     `protobuf:"varint,12,opt,name=js,proto3" json:"js,omitempty"`
	Languages       []string `protobuf:"bytes,13,rep,name=languages,proto3" json:"languages,omitempty"`
	PrimaryLanguage string   `protobuf:"bytes,14,opt,name=primary_language,json=primaryLanguage,proto3" json:"primary_language,omitempty"`
	FlashVer        string   `protobuf:"bytes,15,opt,name=flash_ver,json=flashVer,proto3" json:"flash_ver,omitempty"`
	Width           int32    `protobuf:"varint,16,opt,name=width,proto3" json:"width,omitempty"`
	Height          int32    `protobuf:"varint,17,opt,name=height,proto3" json:"height,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetAdblock

func (x *Request) GetAdblock() bool

func (*Request) GetDNT

func (x *Request) GetDNT() bool

func (*Request) GetFlashVer

func (x *Request) GetFlashVer() string

func (*Request) GetHeight

func (x *Request) GetHeight() int32

func (*Request) GetIp

func (x *Request) GetIp() string

func (*Request) GetJs

func (x *Request) GetJs() bool

func (*Request) GetLMT

func (x *Request) GetLMT() bool

func (*Request) GetLanguages

func (x *Request) GetLanguages() []string

func (*Request) GetPrimaryLanguage

func (x *Request) GetPrimaryLanguage() string

func (*Request) GetPrivateBrowsing

func (x *Request) GetPrivateBrowsing() bool

func (*Request) GetRef

func (x *Request) GetRef() string

func (*Request) GetSessid

func (x *Request) GetSessid() *UUID

func (*Request) GetUa

func (x *Request) GetUa() string

func (*Request) GetUdid

func (x *Request) GetUdid() string

func (*Request) GetUid

func (x *Request) GetUid() *UUID

func (*Request) GetUrl

func (x *Request) GetUrl() string

func (*Request) GetWidth

func (x *Request) GetWidth() int32

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {

	// User person information which might be detected
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// Device information including browser and OS
	Device *Device `protobuf:"bytes,2,opt,name=device,proto3" json:"device,omitempty"`
	// Location of the device assumed to be the user’s current location defined by a Geo object
	Geo *GeoLocation `protobuf:"bytes,3,opt,name=geo,proto3" json:"geo,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetDevice

func (x *Response) GetDevice() *Device

func (*Response) GetGeo

func (x *Response) GetGeo() *GeoLocation

func (*Response) GetUser

func (x *Response) GetUser() *User

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type UUID

type UUID struct {
	Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func UUIDFrom

func UUIDFrom(uuid uuid.UUID) (*UUID, error)

UUIDFrom from type UUID

func UUIDFromString

func UUIDFromString(suuid string) (*UUID, error)

UUIDFromString converts string representation of UUID to the binary

func (*UUID) Descriptor deprecated

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

Deprecated: Use UUID.ProtoReflect.Descriptor instead.

func (*UUID) GetValue

func (x *UUID) GetValue() []byte

func (*UUID) MarshalBinary

func (ud *UUID) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*UUID) MarshalJSON

func (ud *UUID) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler interface

func (*UUID) MarshalText

func (ud *UUID) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*UUID) ProtoMessage

func (*UUID) ProtoMessage()

func (*UUID) ProtoReflect

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

func (*UUID) Reset

func (x *UUID) Reset()

func (*UUID) String

func (x *UUID) String() string

func (*UUID) UUIDObject

func (ud *UUID) UUIDObject() (uuid.UUID, error)

UUIDObject returns object of UUID

func (*UUID) UnmarshalBinary

func (ud *UUID) UnmarshalBinary(data []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (*UUID) UnmarshalJSON

func (ud *UUID) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler interface

func (*UUID) UnmarshalText

func (ud *UUID) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

type UnimplementedDetectorServer

type UnimplementedDetectorServer struct{}

UnimplementedDetectorServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedDetectorServer) Detect

type UnsafeDetectorServer

type UnsafeDetectorServer interface {
	// contains filtered or unexported methods
}

UnsafeDetectorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DetectorServer will result in compilation errors.

type User

type User struct {

	// Unical User Identificator inside the traking system and provided to the user device
	Uuid *UUID `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	// Session Identificator inside the traking system and provided to the user device
	Sessid *UUID `protobuf:"bytes,2,opt,name=sessid,proto3" json:"sessid,omitempty"`
	// Fingerprint of the
	Fingerprint string `protobuf:"bytes,3,opt,name=Fingerprint,proto3" json:"Fingerprint,omitempty"`
	// Minimal possible age of the user
	AgeStart int32 `protobuf:"varint,4,opt,name=age_start,json=ageStart,proto3" json:"age_start,omitempty"`
	// Maximal possible age of the user
	AgeEnd int32 `protobuf:"varint,5,opt,name=age_end,json=ageEnd,proto3" json:"age_end,omitempty"`
	// main keywords interested by user
	Keywords []string `protobuf:"bytes,6,rep,name=keywords,proto3" json:"keywords,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetAgeEnd

func (x *User) GetAgeEnd() int32

func (*User) GetAgeStart

func (x *User) GetAgeStart() int32

func (*User) GetFingerprint

func (x *User) GetFingerprint() string

func (*User) GetKeywords

func (x *User) GetKeywords() []string

func (*User) GetSessid

func (x *User) GetSessid() *UUID

func (*User) GetUuid

func (x *User) GetUuid() *UUID

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

Jump to

Keyboard shortcuts

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