Skip to content

Latest commit

 

History

History
965 lines (424 loc) · 21.2 KB

DOCS.md

File metadata and controls

965 lines (424 loc) · 21.2 KB

Protocol Documentation

Table of Contents

Top

segment.proto

DeleteSegmentRequest

Field Type Label Description
index string
key SegmentField Lookup on index primary key

DeleteSegmentResponse

Empty

GetSegmentRequest

Field Type Label Description
index string
key SegmentField Lookup on index primary key

GetSegmentResponse

Field Type Label Description
segment Segment

PutSegmentRequest

Field Type Label Description
index string
segment Segment

PutSegmentResponse

Empty

Segment

Field Type Label Description
fields SegmentField repeated

SegmentField

Field Type Label Description
name string
string_value SegmentFieldString
repeated_string_value SegmentFieldRepeatedString
int_value SegmentFieldInt
repeated_int_value SegmentFieldRepeatedInt
uint_value SegmentFieldUInt
repeated_uint_value SegmentFieldRepeatedUInt
float_value SegmentFieldFloat
repeated_float_value SegmentFieldRepeatedFloat
bool_value SegmentFieldBool
repeated_bool_value SegmentFieldRepeatedBool
blob_value SegmentFieldBlob
repeated_blob_value SegmentFieldRepeatedBlob
range_int_value SegmentFieldRangeInt
repeated_range_int_value SegmentFieldRepeatedRangeInt
range_float_value SegmentFieldRangeFloat
repeated_range_float_value SegmentFieldRepeatedRangeFloat
geo_point_value SegmentFieldGeoPoint
repeated_geo_point_value SegmentFieldRepeatedGeoPoint
geo_rect_value SegmentFieldGeoRect
repeated_geo_rect_value SegmentFieldRepeatedGeoRect

SegmentFieldBlob

Field Type Label Description
value string

SegmentFieldBool

Field Type Label Description
value bool

SegmentFieldFloat

Field Type Label Description
value double

SegmentFieldGeoPoint

Field Type Label Description
x double
y double

SegmentFieldGeoRect

Field Type Label Description
top_left SegmentFieldGeoPoint
bottom_right SegmentFieldGeoPoint

SegmentFieldInt

Field Type Label Description
value int64

SegmentFieldRangeFloat

Field Type Label Description
min double
max double

SegmentFieldRangeInt

Field Type Label Description
min int64
max int64

SegmentFieldRepeatedBlob

Field Type Label Description
value string repeated

SegmentFieldRepeatedBool

Field Type Label Description
value bool repeated

SegmentFieldRepeatedFloat

Field Type Label Description
value double repeated

SegmentFieldRepeatedGeoPoint

Field Type Label Description
value SegmentFieldGeoPoint repeated

SegmentFieldRepeatedGeoRect

Field Type Label Description
value SegmentFieldGeoRect repeated

SegmentFieldRepeatedInt

Field Type Label Description
value int64 repeated

SegmentFieldRepeatedRangeFloat

Field Type Label Description
value SegmentFieldRangeFloat repeated

SegmentFieldRepeatedRangeInt

Field Type Label Description
value SegmentFieldRangeInt repeated

SegmentFieldRepeatedString

Field Type Label Description
value string repeated

SegmentFieldRepeatedUInt

Field Type Label Description
value uint64 repeated

SegmentFieldString

Field Type Label Description
value string

SegmentFieldUInt

Field Type Label Description
value uint64

Top

api.proto

IndexService

Method Name Request Type Response Type Description
AddIndex AddIndexRequest AddIndexResponse
DescribeIndex DescribeIndexRequest DescribeIndexResponse
DeleteIndex DeleteIndexRequest DeleteIndexResponse rpc AlterIndex(AlterIndexRequest) returns (AlterIndexResponse);
ListIndexes ListIndexesRequest ListIndexesResponse

SegmentService

Method Name Request Type Response Type Description
PutSegment PutSegmentRequest PutSegmentResponse
GetSegment GetSegmentRequest GetSegmentResponse
DeleteSegment DeleteSegmentRequest DeleteSegmentResponse
LookupSegment LookupSegmentRequest LookupSegmentResponse
LookupSegmentKey LookupSegmentKeyRequest LookupSegmentKeyResponse

Top

field.proto

FieldDefinition

Field Type Label Description
name string
scalar ScalarType
geo GeoType
is_primary bool
repeated bool Allow arrays
fields FieldDefinition repeated Allow nested structure

GeoType

Name Number Description
DATA_TYPE_RANGE 0 RANGEs
DATA_TYPE_RANGE_INT 1
DATA_TYPE_RANGE_FLOAT 2
DATA_TYPE_GEO 10 GEOs
DATA_TYPE_GEO_RECT 11
DATA_TYPE_GEO_POINT 12

ScalarType

Name Number Description
DATA_TYPE_UNDEFINED 0
DATA_TYPE_STRING 10 STRINGs
DATA_TYPE_INT 20 INTs
DATA_TYPE_INT8 21
DATA_TYPE_INT16 22
DATA_TYPE_INT32 23
DATA_TYPE_INT64 24
DATA_TYPE_UINT 30 UINTs
DATA_TYPE_UINT8 31
DATA_TYPE_UINT16 32
DATA_TYPE_UINT32 33
DATA_TYPE_UINT64 34
DATA_TYPE_FLOAT 40 FLOATs
DATA_TYPE_FLOAT32 41
DATA_TYPE_FLOAT64 42
DATA_TYPE_BOOL 50 BOOL
DATA_TYPE_BLOB 60 BLOB

Top

index.proto

AddIndexRequest

Field Type Label Description
index IndexDefinition

AddIndexResponse

Field Type Label Description
ok bool

DeleteIndexRequest

Field Type Label Description
name string

DeleteIndexResponse

Field Type Label Description
index IndexDefinition

DescribeIndexRequest

Field Type Label Description
name string

DescribeIndexResponse

Field Type Label Description
index IndexDefinition

IndexDefinition

Field Type Label Description
name string
status Status
fields FieldDefinition repeated
created google.protobuf.Timestamp
updated google.protobuf.Timestamp

ListIndexesRequest

Field Type Label Description
pattern string
created_after google.protobuf.Timestamp
created_before google.protobuf.Timestamp
updated_after google.protobuf.Timestamp
updated_before google.protobuf.Timestamp

ListIndexesResponse

Field Type Label Description
results DescribeIndexResponse repeated

Status

Name Number Description
INDEX_STATUS_UNKNOWN 0
INDEX_STATUS_CREATING 5
INDEX_STATUS_ACTIVE 10
INDEX_STATUS_UPDATING 15
INDEX_STATUS_DELETING 20

Top

lookup.proto

Lookup

Field Type Label Description
fields LookupField repeated

LookupField

Field Type Label Description
name string
string_value SegmentFieldString
repeated_string_value SegmentFieldRepeatedString
int_value SegmentFieldInt
repeated_int_value SegmentFieldRepeatedInt
uint_value SegmentFieldUInt
repeated_uint_value SegmentFieldRepeatedUInt
float_value SegmentFieldFloat
repeated_float_value SegmentFieldRepeatedFloat
bool_value SegmentFieldBool
repeated_bool_value SegmentFieldRepeatedBool
range_int_value SegmentFieldRangeInt
repeated_range_int_value SegmentFieldRepeatedRangeInt
range_float_value SegmentFieldRangeFloat
repeated_range_float_value SegmentFieldRepeatedRangeFloat
geo_point_value SegmentFieldGeoPoint
repeated_geo_point_value SegmentFieldRepeatedGeoPoint
geo_rect_value SegmentFieldGeoRect
repeated_geo_rect_value SegmentFieldRepeatedGeoRect

LookupSegmentKeyRequest

Field Type Label Description
index string
lookup Lookup

LookupSegmentKeyResponse

Field Type Label Description
results SegmentField repeated

LookupSegmentRequest

Field Type Label Description
index string
lookup Lookup

LookupSegmentResponse

Field Type Label Description
results Segment repeated

Scalar Value Types

.proto Type Notes C++ Java Python Go C# PHP Ruby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)