Documentation
¶
Index ¶
- Constants
- type Bool
- type CoreDataType
- type DirectionType
- type Edge
- type Element
- type ElementType
- type Extra
- type Float32
- type Float64
- type Int32
- type Int64
- type LinkedMap
- type List
- type ListStruct
- type Map
- type MapStruct
- type Path
- type PathStruct
- type Property
- type String
- type VIdTypeType
- type Vertex
Constants ¶
View Source
const ( IdTypeInt64Int32 = VIdTypeType(0) // <int64, int32> IdTypeStringString = VIdTypeType(3) // <string, string> )
View Source
const ( VtxIdKey = "id" VtxTypeKey = "type" // 下列常量只在返回给客户端列式协议时使用 ClientProtoEdgeTypeKey = "bg__to_client_edge_type" ClientProtoEdgeStartVIdKey = "bg__to_client_start_v_id" ClientProtoEdgeStartVTypeKey = "bg__to_client_start_v_type" ClientProtoVtxIdKey = "bg__to_client_vtx_id" // 边终点id或点id ClientProtoVtxTypeKey = "bg__to_client_vtx_type" // 边终点type或点type )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bool ¶
type Bool bool
func (Bool) EncodeTo ¶
func (b Bool) EncodeTo(w *protocol.BigEndianWriter)
func (Bool) Tp ¶
func (Bool) Tp() ElementType
type CoreDataType ¶
type CoreDataType byte
const ( TrueType CoreDataType = 1 FalseType CoreDataType = 2 Int32Type CoreDataType = 3 Int64Type CoreDataType = 4 FloatType CoreDataType = 5 DoubleType CoreDataType = 6 StringType CoreDataType = 7 VertexType CoreDataType = 8 PathType CoreDataType = 9 // the relative location of these three fields should be synced with DirectionType ForwardEdgeType CoreDataType = 10 ReverseEdgeType CoreDataType = 11 DoubleEdgeType CoreDataType = 12 ListType CoreDataType = 13 MapType CoreDataType = 14 PropertyType CoreDataType = 15 VertexWithPropertiesType CoreDataType = 16 ForwardEdgeWithPropertiesType CoreDataType = 17 ReverseEdgeWithPropertiesType CoreDataType = 18 DoubleEdgeWithPropertiesType CoreDataType = 19 SVertexType CoreDataType = 24 SVertexWithPropertiesType CoreDataType = 25 ForwardSEdgeType CoreDataType = 26 ReverseSEdgeType CoreDataType = 27 DoubleSEdgeType CoreDataType = 28 ForwardSEdgeWithPropertiesType CoreDataType = 29 ReverseSEdgeWithPropertiesType CoreDataType = 30 DoubleSEdgeWithPropertiesType CoreDataType = 31 LinkedMapType CoreDataType = 32 ColumnarBinType CoreDataType = 40 // ValueType 用于到客户端的列式协议中,客户端识别反序列化成Property还是具体的Int32、Double等类型 ValueType CoreDataType = 41 )
type DirectionType ¶
type DirectionType int32
const ( DirectionType_Forward DirectionType = 1 DirectionType_Reverse DirectionType = 2 DirectionType_Double DirectionType = 3 )
type Edge ¶
func (*Edge) EncodeTo ¶
func (e *Edge) EncodeTo(w *protocol.BigEndianWriter)
func (*Edge) Tp ¶
func (*Edge) Tp() ElementType
type Element ¶
type Element interface { Tp() ElementType // Eq and sortString methods are for internal usage, used in test case. Eq(Element, bool) bool String() string EncodeTo(w *protocol.BigEndianWriter) BindTo(dest interface{}) error // contains filtered or unexported methods }
type ElementType ¶
type ElementType int64
const ( VERTEX ElementType = iota EDGE PATH PROPERTY BOOL INT32 INT64 FLOAT32 FLOAT64 STRING BYTES LIST MAP // These three types are not in the data type protocol with server side, // start from 1024 should be enough for future new server types. PATH_STRUCT = 1024 LIST_STRUCT = 1025 MAP_STRUCT = 1026 LINKEDMAP = 1027 )
type Float32 ¶
type Float32 float32
func (Float32) EncodeTo ¶
func (f32 Float32) EncodeTo(w *protocol.BigEndianWriter)
func (Float32) Tp ¶
func (Float32) Tp() ElementType
type Float64 ¶
type Float64 float64
func (Float64) EncodeTo ¶
func (f64 Float64) EncodeTo(w *protocol.BigEndianWriter)
func (Float64) Tp ¶
func (Float64) Tp() ElementType
type Int32 ¶
type Int32 int32
func (Int32) EncodeTo ¶
func (i32 Int32) EncodeTo(w *protocol.BigEndianWriter)
func (Int32) Tp ¶
func (Int32) Tp() ElementType
type Int64 ¶
type Int64 int64
func (Int64) EncodeTo ¶
func (i64 Int64) EncodeTo(w *protocol.BigEndianWriter)
func (Int64) Tp ¶
func (Int64) Tp() ElementType
type LinkedMap ¶
func (LinkedMap) EncodeTo ¶
func (lm LinkedMap) EncodeTo(w *protocol.BigEndianWriter)
func (LinkedMap) Tp ¶
func (LinkedMap) Tp() ElementType
type List ¶
type List []Element
func (List) EncodeTo ¶
func (l List) EncodeTo(w *protocol.BigEndianWriter)
func (List) Tp ¶
func (List) Tp() ElementType
type ListStruct ¶
type ListStruct struct {
Elems []Element
}
func (ListStruct) BindTo ¶
func (ls ListStruct) BindTo(dest interface{}) error
func (ListStruct) EncodeTo ¶
func (ls ListStruct) EncodeTo(w *protocol.BigEndianWriter)
func (ListStruct) Tp ¶
func (ListStruct) Tp() ElementType
type Map ¶
func (Map) EncodeTo ¶
func (m Map) EncodeTo(w *protocol.BigEndianWriter)
func (Map) Tp ¶
func (Map) Tp() ElementType
type MapStruct ¶
func (MapStruct) EncodeTo ¶
func (ms MapStruct) EncodeTo(w *protocol.BigEndianWriter)
func (MapStruct) Tp ¶
func (MapStruct) Tp() ElementType
type Path ¶
type Path []Element
TODO(huyingqian): support Label
func (Path) EncodeTo ¶
func (p Path) EncodeTo(w *protocol.BigEndianWriter)
func (Path) Tp ¶
func (Path) Tp() ElementType
type PathStruct ¶
type PathStruct struct {
Elems []Element
}
func (PathStruct) BindTo ¶
func (ps PathStruct) BindTo(dest interface{}) error
func (PathStruct) EncodeTo ¶
func (ps PathStruct) EncodeTo(w *protocol.BigEndianWriter)
func (PathStruct) String ¶
func (ps PathStruct) String() string
func (PathStruct) Tp ¶
func (PathStruct) Tp() ElementType
type Property ¶
type Property struct { Key string Value interface{} }
func (*Property) EncodeTo ¶
func (p *Property) EncodeTo(w *protocol.BigEndianWriter)
func (*Property) Tp ¶
func (*Property) Tp() ElementType
type String ¶
type String string
func (String) EncodeTo ¶
func (s String) EncodeTo(w *protocol.BigEndianWriter)
func (String) Tp ¶
func (String) Tp() ElementType
type VIdTypeType ¶
type VIdTypeType int8
type Vertex ¶
type Vertex struct { Id int64 Type int32 VType VIdTypeType SId string SType string // vertex property will not be automatically retrieved with vertex Properties []*Property }
func (*Vertex) EncodeTo ¶
func (v *Vertex) EncodeTo(w *protocol.BigEndianWriter)
func (*Vertex) SimpleString ¶
SimpleString return vertex string as vertex(id,type), eg vertex(1,2)
func (*Vertex) Tp ¶
func (v *Vertex) Tp() ElementType
Click to show internal directories.
Click to hide internal directories.