Documentation ¶
Overview ¶
Package model is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterOrdaServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterOrdaServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OrdaServiceClient) error
- func RegisterOrdaServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterOrdaServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server OrdaServiceServer) error
- func RegisterOrdaServiceServer(s *grpc.Server, srv OrdaServiceServer)
- type CheckPoint
- func (its *CheckPoint) Clone() *CheckPoint
- func (its *CheckPoint) Compare(other *CheckPoint) bool
- func (*CheckPoint) Descriptor() ([]byte, []int)deprecated
- func (x *CheckPoint) GetCseq() uint64
- func (x *CheckPoint) GetSseq() uint64
- func (*CheckPoint) ProtoMessage()
- func (x *CheckPoint) ProtoReflect() protoreflect.Message
- func (x *CheckPoint) Reset()
- func (its *CheckPoint) Set(sseq, cseq uint64) *CheckPoint
- func (x *CheckPoint) String() string
- func (its *CheckPoint) SyncCseq(cseq uint64) *CheckPoint
- func (its *CheckPoint) ToString() string
- type Client
- func (*Client) Descriptor() ([]byte, []int)deprecated
- func (x *Client) GetAlias() string
- func (x *Client) GetCUID() string
- func (x *Client) GetCollection() string
- func (its *Client) GetSummary() string
- func (x *Client) GetSyncType() SyncType
- func (x *Client) GetType() ClientType
- func (*Client) ProtoMessage()
- func (x *Client) ProtoReflect() protoreflect.Message
- func (x *Client) Reset()
- func (x *Client) String() string
- func (its *Client) ToString() string
- type ClientMessage
- func (*ClientMessage) Descriptor() ([]byte, []int)deprecated
- func (its *ClientMessage) GetClient() *Client
- func (x *ClientMessage) GetClientAlias() string
- func (its *ClientMessage) GetClientSummary() string
- func (x *ClientMessage) GetClientType() ClientType
- func (x *ClientMessage) GetCollection() string
- func (x *ClientMessage) GetCuid() string
- func (x *ClientMessage) GetHeader() *Header
- func (x *ClientMessage) GetSyncType() SyncType
- func (*ClientMessage) ProtoMessage()
- func (x *ClientMessage) ProtoReflect() protoreflect.Message
- func (x *ClientMessage) Reset()
- func (x *ClientMessage) String() string
- func (its *ClientMessage) ToString() string
- type ClientType
- type CollectionMessage
- func (*CollectionMessage) Descriptor() ([]byte, []int)deprecated
- func (x *CollectionMessage) GetCollection() string
- func (*CollectionMessage) ProtoMessage()
- func (x *CollectionMessage) ProtoReflect() protoreflect.Message
- func (x *CollectionMessage) Reset()
- func (x *CollectionMessage) String() string
- type DatatypeMeta
- func (*DatatypeMeta) Descriptor() ([]byte, []int)deprecated
- func (x *DatatypeMeta) GetDUID() string
- func (x *DatatypeMeta) GetKey() string
- func (x *DatatypeMeta) GetOpID() *OperationID
- func (x *DatatypeMeta) GetTypeOf() TypeOfDatatype
- func (*DatatypeMeta) ProtoMessage()
- func (x *DatatypeMeta) ProtoReflect() protoreflect.Message
- func (x *DatatypeMeta) Reset()
- func (x *DatatypeMeta) String() string
- type EncodingMessage
- func (*EncodingMessage) Descriptor() ([]byte, []int)deprecated
- func (x *EncodingMessage) GetOp() *Operation
- func (x *EncodingMessage) GetType() TypeOfDatatype
- func (*EncodingMessage) ProtoMessage()
- func (x *EncodingMessage) ProtoReflect() protoreflect.Message
- func (x *EncodingMessage) Reset()
- func (x *EncodingMessage) String() string
- type Header
- func (*Header) Descriptor() ([]byte, []int)deprecated
- func (x *Header) GetAgent() string
- func (x *Header) GetType() RequestType
- func (x *Header) GetVersion() string
- func (*Header) ProtoMessage()
- func (x *Header) ProtoReflect() protoreflect.Message
- func (x *Header) Reset()
- func (x *Header) String() string
- func (its *Header) ToString() string
- type Notification
- func (*Notification) Descriptor() ([]byte, []int)deprecated
- func (x *Notification) GetCUID() string
- func (x *Notification) GetDUID() string
- func (x *Notification) GetSseq() uint64
- func (*Notification) ProtoMessage()
- func (x *Notification) ProtoReflect() protoreflect.Message
- func (x *Notification) Reset()
- func (x *Notification) String() string
- type OpList
- type Operation
- func (*Operation) Descriptor() ([]byte, []int)deprecated
- func (x *Operation) GetBody() []byte
- func (x *Operation) GetID() *OperationID
- func (x *Operation) GetOpType() TypeOfOperation
- func (*Operation) ProtoMessage()
- func (x *Operation) ProtoReflect() protoreflect.Message
- func (x *Operation) Reset()
- func (x *Operation) String() string
- func (its *Operation) ToShortString() string
- func (its *Operation) ToString() string
- type OperationID
- func (its *OperationID) Clone() *OperationID
- func (its *OperationID) Compare(other *OperationID) int
- func (*OperationID) Descriptor() ([]byte, []int)deprecated
- func (x *OperationID) GetCUID() string
- func (x *OperationID) GetEra() uint32
- func (x *OperationID) GetLamport() uint64
- func (x *OperationID) GetSeq() uint64
- func (its *OperationID) GetTimestamp() *Timestamp
- func (its *OperationID) Next() *OperationID
- func (*OperationID) ProtoMessage()
- func (x *OperationID) ProtoReflect() protoreflect.Message
- func (x *OperationID) Reset()
- func (its *OperationID) RollBack()
- func (its *OperationID) SetOperationID(other *OperationID)
- func (x *OperationID) String() string
- func (its *OperationID) SyncLamport(other uint64) uint64
- func (its *OperationID) ToJSON() interface{}
- func (its *OperationID) ToString() string
- type OrdaServiceClient
- type OrdaServiceServer
- type PatchMessage
- func (*PatchMessage) Descriptor() ([]byte, []int)deprecated
- func (x *PatchMessage) GetCollection() string
- func (x *PatchMessage) GetJson() string
- func (x *PatchMessage) GetKey() string
- func (*PatchMessage) ProtoMessage()
- func (x *PatchMessage) ProtoReflect() protoreflect.Message
- func (x *PatchMessage) Reset()
- func (x *PatchMessage) String() string
- type PushPullMessage
- func (*PushPullMessage) Descriptor() ([]byte, []int)deprecated
- func (its *PushPullMessage) GetClient() *Client
- func (x *PushPullMessage) GetCollection() string
- func (x *PushPullMessage) GetCuid() string
- func (x *PushPullMessage) GetHeader() *Header
- func (x *PushPullMessage) GetPushPullPacks() []*PushPullPack
- func (*PushPullMessage) ProtoMessage()
- func (x *PushPullMessage) ProtoReflect() protoreflect.Message
- func (x *PushPullMessage) Reset()
- func (x *PushPullMessage) String() string
- func (its *PushPullMessage) ToString(isFull bool) string
- type PushPullPack
- func (*PushPullPack) Descriptor() ([]byte, []int)deprecated
- func (x *PushPullPack) GetCheckPoint() *CheckPoint
- func (x *PushPullPack) GetDUID() string
- func (its *PushPullPack) GetDatatypeTag() string
- func (x *PushPullPack) GetEra() uint32
- func (x *PushPullPack) GetKey() string
- func (x *PushPullPack) GetOperations() []*Operation
- func (x *PushPullPack) GetOption() uint32
- func (its *PushPullPack) GetPushPullPackOption() *PushPullPackOption
- func (its *PushPullPack) GetResponsePushPullPack() *PushPullPack
- func (x *PushPullPack) GetType() TypeOfDatatype
- func (*PushPullPack) ProtoMessage()
- func (x *PushPullPack) ProtoReflect() protoreflect.Message
- func (x *PushPullPack) Reset()
- func (x *PushPullPack) String() string
- func (its *PushPullPack) ToString(isFull bool) string
- type PushPullPackOption
- func (its *PushPullPackOption) HasCreateBit() bool
- func (its *PushPullPackOption) HasDeleteBit() bool
- func (its *PushPullPackOption) HasErrorBit() bool
- func (its *PushPullPackOption) HasReadOnly() bool
- func (its *PushPullPackOption) HasSnapshotBit() bool
- func (its *PushPullPackOption) HasSubscribeBit() bool
- func (its *PushPullPackOption) HasUnsubscribeBit() bool
- func (its *PushPullPackOption) SetCreateBit() *PushPullPackOption
- func (its *PushPullPackOption) SetDeleteBit() *PushPullPackOption
- func (its *PushPullPackOption) SetErrorBit() *PushPullPackOption
- func (its *PushPullPackOption) SetReadOnlyBit() *PushPullPackOption
- func (its *PushPullPackOption) SetSnapshotBit() *PushPullPackOption
- func (its *PushPullPackOption) SetSubscribeBit() *PushPullPackOption
- func (its *PushPullPackOption) SetUnsubscribeBit() *PushPullPackOption
- func (its *PushPullPackOption) String() string
- type RequestType
- func (RequestType) Descriptor() protoreflect.EnumDescriptor
- func (x RequestType) Enum() *RequestType
- func (RequestType) EnumDescriptor() ([]byte, []int)deprecated
- func (x RequestType) Number() protoreflect.EnumNumber
- func (x RequestType) String() string
- func (RequestType) Type() protoreflect.EnumType
- type StateOfDatatype
- func (StateOfDatatype) Descriptor() protoreflect.EnumDescriptor
- func (x StateOfDatatype) Enum() *StateOfDatatype
- func (StateOfDatatype) EnumDescriptor() ([]byte, []int)deprecated
- func (x StateOfDatatype) Number() protoreflect.EnumNumber
- func (x StateOfDatatype) String() string
- func (StateOfDatatype) Type() protoreflect.EnumType
- type StateOfResponse
- func (StateOfResponse) Descriptor() protoreflect.EnumDescriptor
- func (x StateOfResponse) Enum() *StateOfResponse
- func (StateOfResponse) EnumDescriptor() ([]byte, []int)deprecated
- func (x StateOfResponse) Number() protoreflect.EnumNumber
- func (x StateOfResponse) String() string
- func (StateOfResponse) Type() protoreflect.EnumType
- type SyncType
- type Timestamp
- func (its *Timestamp) Clone() *Timestamp
- func (its *Timestamp) Compare(o *Timestamp) int
- func (*Timestamp) Descriptor() ([]byte, []int)deprecated
- func (its *Timestamp) GetAndNextDelimiter() *Timestamp
- func (x *Timestamp) GetCUID() string
- func (x *Timestamp) GetDelimiter() uint32
- func (x *Timestamp) GetEra() uint32
- func (x *Timestamp) GetLamport() uint64
- func (its *Timestamp) Hash() string
- func (its *Timestamp) Next() *Timestamp
- func (*Timestamp) ProtoMessage()
- func (x *Timestamp) ProtoReflect() protoreflect.Message
- func (x *Timestamp) Reset()
- func (x *Timestamp) String() string
- func (its *Timestamp) ToString() string
- type TypeOfDatatype
- func (TypeOfDatatype) Descriptor() protoreflect.EnumDescriptor
- func (x TypeOfDatatype) Enum() *TypeOfDatatype
- func (TypeOfDatatype) EnumDescriptor() ([]byte, []int)deprecated
- func (x TypeOfDatatype) Number() protoreflect.EnumNumber
- func (x TypeOfDatatype) String() string
- func (TypeOfDatatype) Type() protoreflect.EnumType
- type TypeOfOperation
- func (TypeOfOperation) Descriptor() protoreflect.EnumDescriptor
- func (x TypeOfOperation) Enum() *TypeOfOperation
- func (TypeOfOperation) EnumDescriptor() ([]byte, []int)deprecated
- func (x TypeOfOperation) Number() protoreflect.EnumNumber
- func (x TypeOfOperation) String() string
- func (TypeOfOperation) Type() protoreflect.EnumType
- type UnimplementedOrdaServiceServer
- func (*UnimplementedOrdaServiceServer) CreateCollection(context.Context, *CollectionMessage) (*CollectionMessage, error)
- func (*UnimplementedOrdaServiceServer) PatchDocument(context.Context, *PatchMessage) (*PatchMessage, error)
- func (*UnimplementedOrdaServiceServer) ProcessClient(context.Context, *ClientMessage) (*ClientMessage, error)
- func (*UnimplementedOrdaServiceServer) ProcessPushPull(context.Context, *PushPullMessage) (*PushPullMessage, error)
- func (*UnimplementedOrdaServiceServer) ResetCollection(context.Context, *CollectionMessage) (*CollectionMessage, error)
- func (*UnimplementedOrdaServiceServer) TestEncodingOperation(context.Context, *EncodingMessage) (*EncodingMessage, error)
Constants ¶
const Agent = "orda-go"
Agent is the sdk name
const ProtocolVersion = "v1"
ProtocolVersion is the version of the protocol.
Variables ¶
var ( SyncType_name = map[int32]string{ 0: "LOCAL_ONLY", 1: "MANUALLY", 2: "REALTIME", } SyncType_value = map[string]int32{ "LOCAL_ONLY": 0, "MANUALLY": 1, "REALTIME": 2, } )
Enum value maps for SyncType.
var ( ClientType_name = map[int32]string{ 0: "PERSISTENT", 1: "EPHEMERAL", 2: "VOLATILE", } ClientType_value = map[string]int32{ "PERSISTENT": 0, "EPHEMERAL": 1, "VOLATILE": 2, } )
Enum value maps for ClientType.
var ( TypeOfOperation_name = map[int32]string{ 0: "NO_OP", 1: "ERROR", 2: "TRANSACTION", 10: "COUNTER_SNAPSHOT", 11: "COUNTER_INCREASE", 20: "MAP_SNAPSHOT", 21: "MAP_PUT", 22: "MAP_REMOVE", 30: "LIST_SNAPSHOT", 31: "LIST_INSERT", 32: "LIST_DELETE", 33: "LIST_UPDATE", 40: "DOC_SNAPSHOT", 41: "DOC_OBJ_PUT", 42: "DOC_OBJ_RMV", 43: "DOC_ARR_INS", 44: "DOC_ARR_DEL", 45: "DOC_ARR_UPD", } TypeOfOperation_value = map[string]int32{ "NO_OP": 0, "ERROR": 1, "TRANSACTION": 2, "COUNTER_SNAPSHOT": 10, "COUNTER_INCREASE": 11, "MAP_SNAPSHOT": 20, "MAP_PUT": 21, "MAP_REMOVE": 22, "LIST_SNAPSHOT": 30, "LIST_INSERT": 31, "LIST_DELETE": 32, "LIST_UPDATE": 33, "DOC_SNAPSHOT": 40, "DOC_OBJ_PUT": 41, "DOC_OBJ_RMV": 42, "DOC_ARR_INS": 43, "DOC_ARR_DEL": 44, "DOC_ARR_UPD": 45, } )
Enum value maps for TypeOfOperation.
var ( StateOfDatatype_name = map[int32]string{ 0: "DUE_TO_CREATE", 1: "DUE_TO_SUBSCRIBE", 2: "DUE_TO_SUBSCRIBE_CREATE", 3: "SUBSCRIBED", 4: "DUE_TO_UNSUBSCRIBE", 5: "CLOSED", 6: "DELETED", } StateOfDatatype_value = map[string]int32{ "DUE_TO_CREATE": 0, "DUE_TO_SUBSCRIBE": 1, "DUE_TO_SUBSCRIBE_CREATE": 2, "SUBSCRIBED": 3, "DUE_TO_UNSUBSCRIBE": 4, "CLOSED": 5, "DELETED": 6, } )
Enum value maps for StateOfDatatype.
var ( StateOfResponse_name = map[int32]string{ 0: "OK", 101: "ERR_CLIENT_INVALID_COLLECTION", 102: "ERR_CLIENT_INVALID_SYNC_TYPE", } StateOfResponse_value = map[string]int32{ "OK": 0, "ERR_CLIENT_INVALID_COLLECTION": 101, "ERR_CLIENT_INVALID_SYNC_TYPE": 102, } )
Enum value maps for StateOfResponse.
var ( RequestType_name = map[int32]string{ 0: "CLIENTS", 1: "PUSHPULLS", } RequestType_value = map[string]int32{ "CLIENTS": 0, "PUSHPULLS": 1, } )
Enum value maps for RequestType.
var ( TypeOfDatatype_name = map[int32]string{ 0: "COUNTER", 1: "MAP", 2: "LIST", 3: "DOCUMENT", } TypeOfDatatype_value = map[string]int32{ "COUNTER": 0, "MAP": 1, "LIST": 2, "DOCUMENT": 3, } )
Enum value maps for TypeOfDatatype.
var File_orda_enum_proto protoreflect.FileDescriptor
var File_orda_grpc_proto protoreflect.FileDescriptor
var File_orda_proto protoreflect.FileDescriptor
Functions ¶
func RegisterOrdaServiceHandler ¶
func RegisterOrdaServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterOrdaServiceHandler registers the http handlers for service OrdaService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterOrdaServiceHandlerClient ¶
func RegisterOrdaServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OrdaServiceClient) error
RegisterOrdaServiceHandlerClient registers the http handlers for service OrdaService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "OrdaServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "OrdaServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "OrdaServiceClient" to call the correct interceptors.
func RegisterOrdaServiceHandlerFromEndpoint ¶
func RegisterOrdaServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterOrdaServiceHandlerFromEndpoint is same as RegisterOrdaServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterOrdaServiceHandlerServer ¶
func RegisterOrdaServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server OrdaServiceServer) error
RegisterOrdaServiceHandlerServer registers the http handlers for service OrdaService to "mux". UnaryRPC :call OrdaServiceServer 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 RegisterOrdaServiceHandlerFromEndpoint instead.
func RegisterOrdaServiceServer ¶
func RegisterOrdaServiceServer(s *grpc.Server, srv OrdaServiceServer)
Types ¶
type CheckPoint ¶
type CheckPoint struct { // @inject_tag: bson:"s",json:"s" Sseq uint64 `protobuf:"varint,1,opt,name=sseq,proto3" json:"s" bson:"s"` // @inject_tag: bson:"c",json:"c" Cseq uint64 `protobuf:"varint,2,opt,name=cseq,proto3" json:"c" bson:"c"` // contains filtered or unexported fields }
func NewSetCheckPoint ¶
func NewSetCheckPoint(sseq, cseq uint64) *CheckPoint
NewSetCheckPoint creates a new checkpoint with set values
func (*CheckPoint) Clone ¶
func (its *CheckPoint) Clone() *CheckPoint
Clone makes a carbon copy of this one.
func (*CheckPoint) Compare ¶
func (its *CheckPoint) Compare(other *CheckPoint) bool
Compare returns true if this CheckPoint is equal to other; otherwise, false.
func (*CheckPoint) Descriptor
deprecated
func (*CheckPoint) Descriptor() ([]byte, []int)
Deprecated: Use CheckPoint.ProtoReflect.Descriptor instead.
func (*CheckPoint) GetCseq ¶
func (x *CheckPoint) GetCseq() uint64
func (*CheckPoint) GetSseq ¶
func (x *CheckPoint) GetSseq() uint64
func (*CheckPoint) ProtoMessage ¶
func (*CheckPoint) ProtoMessage()
func (*CheckPoint) ProtoReflect ¶
func (x *CheckPoint) ProtoReflect() protoreflect.Message
func (*CheckPoint) Reset ¶
func (x *CheckPoint) Reset()
func (*CheckPoint) Set ¶
func (its *CheckPoint) Set(sseq, cseq uint64) *CheckPoint
Set sets the values of checkpoint
func (*CheckPoint) String ¶
func (x *CheckPoint) String() string
func (*CheckPoint) SyncCseq ¶
func (its *CheckPoint) SyncCseq(cseq uint64) *CheckPoint
SyncCseq syncs Cseq
func (*CheckPoint) ToString ¶
func (its *CheckPoint) ToString() string
ToString returns a short string of CheckPoint
type Client ¶
type Client struct { CUID string `protobuf:"bytes,1,opt,name=CUID,proto3" json:"CUID,omitempty"` Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` Collection string `protobuf:"bytes,3,opt,name=collection,proto3" json:"collection,omitempty"` Type ClientType `protobuf:"varint,4,opt,name=type,proto3,enum=orda.ClientType" json:"type,omitempty"` SyncType SyncType `protobuf:"varint,5,opt,name=syncType,proto3,enum=orda.SyncType" json:"syncType,omitempty"` // contains filtered or unexported fields }
func (*Client) Descriptor
deprecated
func (*Client) GetCollection ¶
func (*Client) GetSummary ¶
GetSummary returns the summary of client
func (*Client) GetSyncType ¶
func (*Client) GetType ¶
func (x *Client) GetType() ClientType
func (*Client) ProtoMessage ¶
func (*Client) ProtoMessage()
func (*Client) ProtoReflect ¶
func (x *Client) ProtoReflect() protoreflect.Message
type ClientMessage ¶
type ClientMessage struct { Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"` Cuid string `protobuf:"bytes,3,opt,name=cuid,proto3" json:"cuid,omitempty"` ClientAlias string `protobuf:"bytes,4,opt,name=clientAlias,proto3" json:"clientAlias,omitempty"` ClientType ClientType `protobuf:"varint,5,opt,name=clientType,proto3,enum=orda.ClientType" json:"clientType,omitempty"` SyncType SyncType `protobuf:"varint,6,opt,name=syncType,proto3,enum=orda.SyncType" json:"syncType,omitempty"` // contains filtered or unexported fields }
func NewClientMessage ¶
func NewClientMessage(client *Client) *ClientMessage
NewClientMessage creates a new ClientRequest
func (*ClientMessage) Descriptor
deprecated
func (*ClientMessage) Descriptor() ([]byte, []int)
Deprecated: Use ClientMessage.ProtoReflect.Descriptor instead.
func (*ClientMessage) GetClient ¶
func (its *ClientMessage) GetClient() *Client
GetClient returns the model of client
func (*ClientMessage) GetClientAlias ¶
func (x *ClientMessage) GetClientAlias() string
func (*ClientMessage) GetClientSummary ¶
func (its *ClientMessage) GetClientSummary() string
GetClientSummary returns the summary of client
func (*ClientMessage) GetClientType ¶
func (x *ClientMessage) GetClientType() ClientType
func (*ClientMessage) GetCollection ¶
func (x *ClientMessage) GetCollection() string
func (*ClientMessage) GetCuid ¶
func (x *ClientMessage) GetCuid() string
func (*ClientMessage) GetHeader ¶
func (x *ClientMessage) GetHeader() *Header
func (*ClientMessage) GetSyncType ¶
func (x *ClientMessage) GetSyncType() SyncType
func (*ClientMessage) ProtoMessage ¶
func (*ClientMessage) ProtoMessage()
func (*ClientMessage) ProtoReflect ¶
func (x *ClientMessage) ProtoReflect() protoreflect.Message
func (*ClientMessage) Reset ¶
func (x *ClientMessage) Reset()
func (*ClientMessage) String ¶
func (x *ClientMessage) String() string
func (*ClientMessage) ToString ¶
func (its *ClientMessage) ToString() string
ToString returns customized string
type ClientType ¶
type ClientType int32
const ( ClientType_PERSISTENT ClientType = 0 // persistent clients can generate operations; even if they do not sync, their checkpoints remains for offline support ClientType_EPHEMERAL ClientType = 1 // ephemeral clients can generate operations; if they do not sync for predetermined time, their information is removed ClientType_VOLATILE ClientType = 2 // volatile clients can generate operations on the latest datatype, but no operations are pulled )
func (ClientType) Descriptor ¶
func (ClientType) Descriptor() protoreflect.EnumDescriptor
func (ClientType) Enum ¶
func (x ClientType) Enum() *ClientType
func (ClientType) EnumDescriptor
deprecated
func (ClientType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ClientType.Descriptor instead.
func (ClientType) Number ¶
func (x ClientType) Number() protoreflect.EnumNumber
func (ClientType) String ¶
func (x ClientType) String() string
func (ClientType) Type ¶
func (ClientType) Type() protoreflect.EnumType
type CollectionMessage ¶
type CollectionMessage struct { Collection string `protobuf:"bytes,1,opt,name=collection,proto3" json:"collection,omitempty"` // contains filtered or unexported fields }
func (*CollectionMessage) Descriptor
deprecated
func (*CollectionMessage) Descriptor() ([]byte, []int)
Deprecated: Use CollectionMessage.ProtoReflect.Descriptor instead.
func (*CollectionMessage) GetCollection ¶
func (x *CollectionMessage) GetCollection() string
func (*CollectionMessage) ProtoMessage ¶
func (*CollectionMessage) ProtoMessage()
func (*CollectionMessage) ProtoReflect ¶
func (x *CollectionMessage) ProtoReflect() protoreflect.Message
func (*CollectionMessage) Reset ¶
func (x *CollectionMessage) Reset()
func (*CollectionMessage) String ¶
func (x *CollectionMessage) String() string
type DatatypeMeta ¶
type DatatypeMeta struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` DUID string `protobuf:"bytes,2,opt,name=DUID,proto3" json:"DUID,omitempty"` OpID *OperationID `protobuf:"bytes,3,opt,name=opID,proto3" json:"opID,omitempty"` TypeOf TypeOfDatatype `protobuf:"varint,4,opt,name=typeOf,proto3,enum=orda.TypeOfDatatype" json:"typeOf,omitempty"` // contains filtered or unexported fields }
func (*DatatypeMeta) Descriptor
deprecated
func (*DatatypeMeta) Descriptor() ([]byte, []int)
Deprecated: Use DatatypeMeta.ProtoReflect.Descriptor instead.
func (*DatatypeMeta) GetDUID ¶
func (x *DatatypeMeta) GetDUID() string
func (*DatatypeMeta) GetKey ¶
func (x *DatatypeMeta) GetKey() string
func (*DatatypeMeta) GetOpID ¶
func (x *DatatypeMeta) GetOpID() *OperationID
func (*DatatypeMeta) GetTypeOf ¶
func (x *DatatypeMeta) GetTypeOf() TypeOfDatatype
func (*DatatypeMeta) ProtoMessage ¶
func (*DatatypeMeta) ProtoMessage()
func (*DatatypeMeta) ProtoReflect ¶
func (x *DatatypeMeta) ProtoReflect() protoreflect.Message
func (*DatatypeMeta) Reset ¶
func (x *DatatypeMeta) Reset()
func (*DatatypeMeta) String ¶
func (x *DatatypeMeta) String() string
type EncodingMessage ¶
type EncodingMessage struct { Type TypeOfDatatype `protobuf:"varint,1,opt,name=type,proto3,enum=orda.TypeOfDatatype" json:"type,omitempty"` Op *Operation `protobuf:"bytes,2,opt,name=op,proto3" json:"op,omitempty"` // contains filtered or unexported fields }
func (*EncodingMessage) Descriptor
deprecated
func (*EncodingMessage) Descriptor() ([]byte, []int)
Deprecated: Use EncodingMessage.ProtoReflect.Descriptor instead.
func (*EncodingMessage) GetOp ¶
func (x *EncodingMessage) GetOp() *Operation
func (*EncodingMessage) GetType ¶
func (x *EncodingMessage) GetType() TypeOfDatatype
func (*EncodingMessage) ProtoMessage ¶
func (*EncodingMessage) ProtoMessage()
func (*EncodingMessage) ProtoReflect ¶
func (x *EncodingMessage) ProtoReflect() protoreflect.Message
func (*EncodingMessage) Reset ¶
func (x *EncodingMessage) Reset()
func (*EncodingMessage) String ¶
func (x *EncodingMessage) String() string
type Header ¶
type Header struct { Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` Agent string `protobuf:"bytes,2,opt,name=agent,proto3" json:"agent,omitempty"` Type RequestType `protobuf:"varint,3,opt,name=type,proto3,enum=orda.RequestType" json:"type,omitempty"` // contains filtered or unexported fields }
func NewMessageHeader ¶
func NewMessageHeader(typeOf RequestType) *Header
NewMessageHeader generates a message header.
func (*Header) Descriptor
deprecated
func (*Header) GetType ¶
func (x *Header) GetType() RequestType
func (*Header) GetVersion ¶
func (*Header) ProtoMessage ¶
func (*Header) ProtoMessage()
func (*Header) ProtoReflect ¶
func (x *Header) ProtoReflect() protoreflect.Message
type Notification ¶
type Notification struct { CUID string `protobuf:"bytes,1,opt,name=CUID,proto3" json:"CUID,omitempty"` DUID string `protobuf:"bytes,2,opt,name=DUID,proto3" json:"DUID,omitempty"` Sseq uint64 `protobuf:"varint,3,opt,name=sseq,proto3" json:"sseq,omitempty"` // contains filtered or unexported fields }
func (*Notification) Descriptor
deprecated
func (*Notification) Descriptor() ([]byte, []int)
Deprecated: Use Notification.ProtoReflect.Descriptor instead.
func (*Notification) GetCUID ¶
func (x *Notification) GetCUID() string
func (*Notification) GetDUID ¶
func (x *Notification) GetDUID() string
func (*Notification) GetSseq ¶
func (x *Notification) GetSseq() uint64
func (*Notification) ProtoMessage ¶
func (*Notification) ProtoMessage()
func (*Notification) ProtoReflect ¶
func (x *Notification) ProtoReflect() protoreflect.Message
func (*Notification) Reset ¶
func (x *Notification) Reset()
func (*Notification) String ¶
func (x *Notification) String() string
type Operation ¶
type Operation struct { ID *OperationID `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` OpType TypeOfOperation `protobuf:"varint,2,opt,name=opType,proto3,enum=orda.TypeOfOperation" json:"opType,omitempty"` Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
func (*Operation) Descriptor
deprecated
func (*Operation) GetID ¶
func (x *Operation) GetID() *OperationID
func (*Operation) GetOpType ¶
func (x *Operation) GetOpType() TypeOfOperation
func (*Operation) ProtoMessage ¶
func (*Operation) ProtoMessage()
func (*Operation) ProtoReflect ¶
func (x *Operation) ProtoReflect() protoreflect.Message
func (*Operation) ToShortString ¶
ToShortString returns a string of the operation without its body
type OperationID ¶
type OperationID struct { // @inject_tag: json:"e,omitempty" Era uint32 `protobuf:"varint,1,opt,name=era,proto3" json:"e,omitempty"` // @inject_tag: json:"l,omitempty" Lamport uint64 `protobuf:"varint,2,opt,name=lamport,proto3" json:"l,omitempty"` // @inject_tag: json:"c,omitempty" CUID string `protobuf:"bytes,3,opt,name=CUID,proto3" json:"c,omitempty"` // @inject_tag: json:"s,omitempty" Seq uint64 `protobuf:"varint,4,opt,name=seq,proto3" json:"s,omitempty"` // contains filtered or unexported fields }
func NewOperationIDWithCUID ¶
func NewOperationIDWithCUID(cuid string) *OperationID
NewOperationIDWithCUID creates a new OperationID with CUID.
func (*OperationID) Compare ¶
func (its *OperationID) Compare(other *OperationID) int
Compare compares two operationIDs.
func (*OperationID) Descriptor
deprecated
func (*OperationID) Descriptor() ([]byte, []int)
Deprecated: Use OperationID.ProtoReflect.Descriptor instead.
func (*OperationID) GetCUID ¶
func (x *OperationID) GetCUID() string
func (*OperationID) GetEra ¶
func (x *OperationID) GetEra() uint32
func (*OperationID) GetLamport ¶
func (x *OperationID) GetLamport() uint64
func (*OperationID) GetSeq ¶
func (x *OperationID) GetSeq() uint64
func (*OperationID) GetTimestamp ¶
func (its *OperationID) GetTimestamp() *Timestamp
GetTimestamp returns Timestamp from OperationID
func (*OperationID) Next ¶
func (its *OperationID) Next() *OperationID
Next increments an OperationID
func (*OperationID) ProtoMessage ¶
func (*OperationID) ProtoMessage()
func (*OperationID) ProtoReflect ¶
func (x *OperationID) ProtoReflect() protoreflect.Message
func (*OperationID) Reset ¶
func (x *OperationID) Reset()
func (*OperationID) RollBack ¶
func (its *OperationID) RollBack()
RollBack rollbacks the OperationID
func (*OperationID) SetOperationID ¶
func (its *OperationID) SetOperationID(other *OperationID)
SetOperationID sets the values of OperationID.
func (*OperationID) String ¶
func (x *OperationID) String() string
func (*OperationID) SyncLamport ¶
func (its *OperationID) SyncLamport(other uint64) uint64
SyncLamport synchronizes the value of Lamport.
func (*OperationID) ToJSON ¶
func (its *OperationID) ToJSON() interface{}
ToJSON returns an OperationID as JSON
func (*OperationID) ToString ¶
func (its *OperationID) ToString() string
ToString returns customized string
type OrdaServiceClient ¶
type OrdaServiceClient interface { ProcessPushPull(ctx context.Context, in *PushPullMessage, opts ...grpc.CallOption) (*PushPullMessage, error) ProcessClient(ctx context.Context, in *ClientMessage, opts ...grpc.CallOption) (*ClientMessage, error) PatchDocument(ctx context.Context, in *PatchMessage, opts ...grpc.CallOption) (*PatchMessage, error) CreateCollection(ctx context.Context, in *CollectionMessage, opts ...grpc.CallOption) (*CollectionMessage, error) ResetCollection(ctx context.Context, in *CollectionMessage, opts ...grpc.CallOption) (*CollectionMessage, error) TestEncodingOperation(ctx context.Context, in *EncodingMessage, opts ...grpc.CallOption) (*EncodingMessage, error) }
OrdaServiceClient is the client API for OrdaService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewOrdaServiceClient ¶
func NewOrdaServiceClient(cc grpc.ClientConnInterface) OrdaServiceClient
type OrdaServiceServer ¶
type OrdaServiceServer interface { ProcessPushPull(context.Context, *PushPullMessage) (*PushPullMessage, error) ProcessClient(context.Context, *ClientMessage) (*ClientMessage, error) PatchDocument(context.Context, *PatchMessage) (*PatchMessage, error) CreateCollection(context.Context, *CollectionMessage) (*CollectionMessage, error) ResetCollection(context.Context, *CollectionMessage) (*CollectionMessage, error) TestEncodingOperation(context.Context, *EncodingMessage) (*EncodingMessage, error) }
OrdaServiceServer is the server API for OrdaService service.
type PatchMessage ¶
type PatchMessage struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"` Json string `protobuf:"bytes,3,opt,name=json,proto3" json:"json,omitempty"` // contains filtered or unexported fields }
func (*PatchMessage) Descriptor
deprecated
func (*PatchMessage) Descriptor() ([]byte, []int)
Deprecated: Use PatchMessage.ProtoReflect.Descriptor instead.
func (*PatchMessage) GetCollection ¶
func (x *PatchMessage) GetCollection() string
func (*PatchMessage) GetJson ¶
func (x *PatchMessage) GetJson() string
func (*PatchMessage) GetKey ¶
func (x *PatchMessage) GetKey() string
func (*PatchMessage) ProtoMessage ¶
func (*PatchMessage) ProtoMessage()
func (*PatchMessage) ProtoReflect ¶
func (x *PatchMessage) ProtoReflect() protoreflect.Message
func (*PatchMessage) Reset ¶
func (x *PatchMessage) Reset()
func (*PatchMessage) String ¶
func (x *PatchMessage) String() string
type PushPullMessage ¶
type PushPullMessage struct { Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"` Cuid string `protobuf:"bytes,3,opt,name=cuid,proto3" json:"cuid,omitempty"` PushPullPacks []*PushPullPack `protobuf:"bytes,4,rep,name=PushPullPacks,proto3" json:"PushPullPacks,omitempty"` // contains filtered or unexported fields }
func NewPushPullMessage ¶
func NewPushPullMessage(seq uint32, client *Client, pushPullPackList ...*PushPullPack) *PushPullMessage
NewPushPullMessage creates a new PushPullRequest
func (*PushPullMessage) Descriptor
deprecated
func (*PushPullMessage) Descriptor() ([]byte, []int)
Deprecated: Use PushPullMessage.ProtoReflect.Descriptor instead.
func (*PushPullMessage) GetClient ¶
func (its *PushPullMessage) GetClient() *Client
GetClient returns the model of the client
func (*PushPullMessage) GetCollection ¶
func (x *PushPullMessage) GetCollection() string
func (*PushPullMessage) GetCuid ¶
func (x *PushPullMessage) GetCuid() string
func (*PushPullMessage) GetHeader ¶
func (x *PushPullMessage) GetHeader() *Header
func (*PushPullMessage) GetPushPullPacks ¶
func (x *PushPullMessage) GetPushPullPacks() []*PushPullPack
func (*PushPullMessage) ProtoMessage ¶
func (*PushPullMessage) ProtoMessage()
func (*PushPullMessage) ProtoReflect ¶
func (x *PushPullMessage) ProtoReflect() protoreflect.Message
func (*PushPullMessage) Reset ¶
func (x *PushPullMessage) Reset()
func (*PushPullMessage) String ¶
func (x *PushPullMessage) String() string
func (*PushPullMessage) ToString ¶
func (its *PushPullMessage) ToString(isFull bool) string
ToString returns customized string
type PushPullPack ¶
type PushPullPack struct { DUID string `protobuf:"bytes,1,opt,name=DUID,proto3" json:"DUID,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` Option uint32 `protobuf:"fixed32,3,opt,name=option,proto3" json:"option,omitempty"` CheckPoint *CheckPoint `protobuf:"bytes,4,opt,name=checkPoint,proto3" json:"checkPoint,omitempty"` Era uint32 `protobuf:"varint,5,opt,name=era,proto3" json:"era,omitempty"` Type TypeOfDatatype `protobuf:"varint,6,opt,name=type,proto3,enum=orda.TypeOfDatatype" json:"type,omitempty"` Operations []*Operation `protobuf:"bytes,7,rep,name=operations,proto3" json:"operations,omitempty"` // contains filtered or unexported fields }
func (*PushPullPack) Descriptor
deprecated
func (*PushPullPack) Descriptor() ([]byte, []int)
Deprecated: Use PushPullPack.ProtoReflect.Descriptor instead.
func (*PushPullPack) GetCheckPoint ¶
func (x *PushPullPack) GetCheckPoint() *CheckPoint
func (*PushPullPack) GetDUID ¶
func (x *PushPullPack) GetDUID() string
func (*PushPullPack) GetDatatypeTag ¶
func (its *PushPullPack) GetDatatypeTag() string
GetDatatypeTag returns datatype tag
func (*PushPullPack) GetEra ¶
func (x *PushPullPack) GetEra() uint32
func (*PushPullPack) GetKey ¶
func (x *PushPullPack) GetKey() string
func (*PushPullPack) GetOperations ¶
func (x *PushPullPack) GetOperations() []*Operation
func (*PushPullPack) GetOption ¶
func (x *PushPullPack) GetOption() uint32
func (*PushPullPack) GetPushPullPackOption ¶
func (its *PushPullPack) GetPushPullPackOption() *PushPullPackOption
GetPushPullPackOption returns PushPullOption.
func (*PushPullPack) GetResponsePushPullPack ¶
func (its *PushPullPack) GetResponsePushPullPack() *PushPullPack
GetResponsePushPullPack returns the PushPullPack that can be used for response.
func (*PushPullPack) GetType ¶
func (x *PushPullPack) GetType() TypeOfDatatype
func (*PushPullPack) ProtoMessage ¶
func (*PushPullPack) ProtoMessage()
func (*PushPullPack) ProtoReflect ¶
func (x *PushPullPack) ProtoReflect() protoreflect.Message
func (*PushPullPack) Reset ¶
func (x *PushPullPack) Reset()
func (*PushPullPack) String ¶
func (x *PushPullPack) String() string
func (*PushPullPack) ToString ¶
func (its *PushPullPack) ToString(isFull bool) string
ToString returns customized string.
type PushPullPackOption ¶
type PushPullPackOption uint32
PushPullPackOption denotes an option implied in a PushPullPack.
const ( PushPullBitNormal PushPullPackOption = 0x00 PushPullBitCreate PushPullPackOption = 0x01 PushPullBitSubscribe PushPullPackOption = 0x02 PushPullBitUnsubscribe PushPullPackOption = 0x04 PushPullBitDelete PushPullPackOption = 0x08 PushPullBitSnapshot PushPullPackOption = 0x10 PushPullBitError PushPullPackOption = 0x20 PushPullBitReadOnly PushPullPackOption = 0x40 )
PushPullBitXXX denotes a bit for the option for PushPull
func (*PushPullPackOption) HasCreateBit ¶
func (its *PushPullPackOption) HasCreateBit() bool
HasCreateBit examines CreateBit.
func (*PushPullPackOption) HasDeleteBit ¶
func (its *PushPullPackOption) HasDeleteBit() bool
HasDeleteBit examines DeleteBit.
func (*PushPullPackOption) HasErrorBit ¶
func (its *PushPullPackOption) HasErrorBit() bool
HasErrorBit examines ErrorBit.
func (*PushPullPackOption) HasReadOnly ¶
func (its *PushPullPackOption) HasReadOnly() bool
HasReadOnly examines ReadOnlyBit.
func (*PushPullPackOption) HasSnapshotBit ¶
func (its *PushPullPackOption) HasSnapshotBit() bool
HasSnapshotBit examines SnapshotBit.
func (*PushPullPackOption) HasSubscribeBit ¶
func (its *PushPullPackOption) HasSubscribeBit() bool
HasSubscribeBit examines SubscribeBit.
func (*PushPullPackOption) HasUnsubscribeBit ¶
func (its *PushPullPackOption) HasUnsubscribeBit() bool
HasUnsubscribeBit examines UnsubscribeBit.
func (*PushPullPackOption) SetCreateBit ¶
func (its *PushPullPackOption) SetCreateBit() *PushPullPackOption
SetCreateBit sets CreateBit.
func (*PushPullPackOption) SetDeleteBit ¶
func (its *PushPullPackOption) SetDeleteBit() *PushPullPackOption
SetDeleteBit sets DeleteBit.
func (*PushPullPackOption) SetErrorBit ¶
func (its *PushPullPackOption) SetErrorBit() *PushPullPackOption
SetErrorBit sets ErrorBit.
func (*PushPullPackOption) SetReadOnlyBit ¶
func (its *PushPullPackOption) SetReadOnlyBit() *PushPullPackOption
SetReadOnlyBit sets ReadOnlyBit
func (*PushPullPackOption) SetSnapshotBit ¶
func (its *PushPullPackOption) SetSnapshotBit() *PushPullPackOption
SetSnapshotBit sets SnapshotBit.
func (*PushPullPackOption) SetSubscribeBit ¶
func (its *PushPullPackOption) SetSubscribeBit() *PushPullPackOption
SetSubscribeBit sets SubscribeBit.
func (*PushPullPackOption) SetUnsubscribeBit ¶
func (its *PushPullPackOption) SetUnsubscribeBit() *PushPullPackOption
SetUnsubscribeBit sets UnsubscribeBit.
func (*PushPullPackOption) String ¶
func (its *PushPullPackOption) String() string
type RequestType ¶
type RequestType int32
const ( RequestType_CLIENTS RequestType = 0 RequestType_PUSHPULLS RequestType = 1 )
func (RequestType) Descriptor ¶
func (RequestType) Descriptor() protoreflect.EnumDescriptor
func (RequestType) Enum ¶
func (x RequestType) Enum() *RequestType
func (RequestType) EnumDescriptor
deprecated
func (RequestType) EnumDescriptor() ([]byte, []int)
Deprecated: Use RequestType.Descriptor instead.
func (RequestType) Number ¶
func (x RequestType) Number() protoreflect.EnumNumber
func (RequestType) String ¶
func (x RequestType) String() string
func (RequestType) Type ¶
func (RequestType) Type() protoreflect.EnumType
type StateOfDatatype ¶
type StateOfDatatype int32
const ( StateOfDatatype_DUE_TO_CREATE StateOfDatatype = 0 StateOfDatatype_DUE_TO_SUBSCRIBE StateOfDatatype = 1 StateOfDatatype_DUE_TO_SUBSCRIBE_CREATE StateOfDatatype = 2 StateOfDatatype_SUBSCRIBED StateOfDatatype = 3 StateOfDatatype_DUE_TO_UNSUBSCRIBE StateOfDatatype = 4 StateOfDatatype_CLOSED StateOfDatatype = 5 StateOfDatatype_DELETED StateOfDatatype = 6 )
func (StateOfDatatype) Descriptor ¶
func (StateOfDatatype) Descriptor() protoreflect.EnumDescriptor
func (StateOfDatatype) Enum ¶
func (x StateOfDatatype) Enum() *StateOfDatatype
func (StateOfDatatype) EnumDescriptor
deprecated
func (StateOfDatatype) EnumDescriptor() ([]byte, []int)
Deprecated: Use StateOfDatatype.Descriptor instead.
func (StateOfDatatype) Number ¶
func (x StateOfDatatype) Number() protoreflect.EnumNumber
func (StateOfDatatype) String ¶
func (x StateOfDatatype) String() string
func (StateOfDatatype) Type ¶
func (StateOfDatatype) Type() protoreflect.EnumType
type StateOfResponse ¶
type StateOfResponse int32
const ( StateOfResponse_OK StateOfResponse = 0 StateOfResponse_ERR_CLIENT_INVALID_COLLECTION StateOfResponse = 101 StateOfResponse_ERR_CLIENT_INVALID_SYNC_TYPE StateOfResponse = 102 )
func (StateOfResponse) Descriptor ¶
func (StateOfResponse) Descriptor() protoreflect.EnumDescriptor
func (StateOfResponse) Enum ¶
func (x StateOfResponse) Enum() *StateOfResponse
func (StateOfResponse) EnumDescriptor
deprecated
func (StateOfResponse) EnumDescriptor() ([]byte, []int)
Deprecated: Use StateOfResponse.Descriptor instead.
func (StateOfResponse) Number ¶
func (x StateOfResponse) Number() protoreflect.EnumNumber
func (StateOfResponse) String ¶
func (x StateOfResponse) String() string
func (StateOfResponse) Type ¶
func (StateOfResponse) Type() protoreflect.EnumType
type SyncType ¶
type SyncType int32
func (SyncType) Descriptor ¶
func (SyncType) Descriptor() protoreflect.EnumDescriptor
func (SyncType) EnumDescriptor
deprecated
func (SyncType) Number ¶
func (x SyncType) Number() protoreflect.EnumNumber
func (SyncType) Type ¶
func (SyncType) Type() protoreflect.EnumType
type Timestamp ¶
type Timestamp struct { // @inject_tag: json:"e,omitempty" Era uint32 `protobuf:"varint,1,opt,name=era,proto3" json:"e,omitempty"` // @inject_tag: json:"l,omitempty" Lamport uint64 `protobuf:"varint,2,opt,name=lamport,proto3" json:"l,omitempty"` // @inject_tag: json:"c,omitempty" CUID string `protobuf:"bytes,3,opt,name=CUID,proto3" json:"c,omitempty"` // @inject_tag: json:"d,omitempty" Delimiter uint32 `protobuf:"varint,4,opt,name=delimiter,proto3" json:"d,omitempty"` // contains filtered or unexported fields }
func NewTimestamp ¶
NewTimestamp creates a new timestamp
func OldestTimestamp ¶
func OldestTimestamp() *Timestamp
OldestTimestamp returns the oldest timestamp.
func (*Timestamp) Descriptor
deprecated
func (*Timestamp) GetAndNextDelimiter ¶
GetAndNextDelimiter returns a next Timestamp having increased deliminator.
func (*Timestamp) GetDelimiter ¶
func (*Timestamp) GetLamport ¶
func (*Timestamp) Hash ¶
Hash returns the string hash of timestamp. DON'T change this because protocol can be broken : TODO: this can be improved.
func (*Timestamp) ProtoMessage ¶
func (*Timestamp) ProtoMessage()
func (*Timestamp) ProtoReflect ¶
func (x *Timestamp) ProtoReflect() protoreflect.Message
type TypeOfDatatype ¶
type TypeOfDatatype int32
const ( TypeOfDatatype_COUNTER TypeOfDatatype = 0 TypeOfDatatype_MAP TypeOfDatatype = 1 TypeOfDatatype_LIST TypeOfDatatype = 2 TypeOfDatatype_DOCUMENT TypeOfDatatype = 3 )
func (TypeOfDatatype) Descriptor ¶
func (TypeOfDatatype) Descriptor() protoreflect.EnumDescriptor
func (TypeOfDatatype) Enum ¶
func (x TypeOfDatatype) Enum() *TypeOfDatatype
func (TypeOfDatatype) EnumDescriptor
deprecated
func (TypeOfDatatype) EnumDescriptor() ([]byte, []int)
Deprecated: Use TypeOfDatatype.Descriptor instead.
func (TypeOfDatatype) Number ¶
func (x TypeOfDatatype) Number() protoreflect.EnumNumber
func (TypeOfDatatype) String ¶
func (x TypeOfDatatype) String() string
func (TypeOfDatatype) Type ¶
func (TypeOfDatatype) Type() protoreflect.EnumType
type TypeOfOperation ¶
type TypeOfOperation int32
const ( TypeOfOperation_NO_OP TypeOfOperation = 0 TypeOfOperation_ERROR TypeOfOperation = 1 TypeOfOperation_TRANSACTION TypeOfOperation = 2 TypeOfOperation_COUNTER_SNAPSHOT TypeOfOperation = 10 TypeOfOperation_COUNTER_INCREASE TypeOfOperation = 11 TypeOfOperation_MAP_SNAPSHOT TypeOfOperation = 20 TypeOfOperation_MAP_PUT TypeOfOperation = 21 TypeOfOperation_MAP_REMOVE TypeOfOperation = 22 TypeOfOperation_LIST_SNAPSHOT TypeOfOperation = 30 TypeOfOperation_LIST_INSERT TypeOfOperation = 31 TypeOfOperation_LIST_DELETE TypeOfOperation = 32 TypeOfOperation_LIST_UPDATE TypeOfOperation = 33 TypeOfOperation_DOC_SNAPSHOT TypeOfOperation = 40 TypeOfOperation_DOC_OBJ_PUT TypeOfOperation = 41 TypeOfOperation_DOC_OBJ_RMV TypeOfOperation = 42 TypeOfOperation_DOC_ARR_INS TypeOfOperation = 43 TypeOfOperation_DOC_ARR_DEL TypeOfOperation = 44 TypeOfOperation_DOC_ARR_UPD TypeOfOperation = 45 )
func (TypeOfOperation) Descriptor ¶
func (TypeOfOperation) Descriptor() protoreflect.EnumDescriptor
func (TypeOfOperation) Enum ¶
func (x TypeOfOperation) Enum() *TypeOfOperation
func (TypeOfOperation) EnumDescriptor
deprecated
func (TypeOfOperation) EnumDescriptor() ([]byte, []int)
Deprecated: Use TypeOfOperation.Descriptor instead.
func (TypeOfOperation) Number ¶
func (x TypeOfOperation) Number() protoreflect.EnumNumber
func (TypeOfOperation) String ¶
func (x TypeOfOperation) String() string
func (TypeOfOperation) Type ¶
func (TypeOfOperation) Type() protoreflect.EnumType
type UnimplementedOrdaServiceServer ¶
type UnimplementedOrdaServiceServer struct { }
UnimplementedOrdaServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedOrdaServiceServer) CreateCollection ¶
func (*UnimplementedOrdaServiceServer) CreateCollection(context.Context, *CollectionMessage) (*CollectionMessage, error)
func (*UnimplementedOrdaServiceServer) PatchDocument ¶
func (*UnimplementedOrdaServiceServer) PatchDocument(context.Context, *PatchMessage) (*PatchMessage, error)
func (*UnimplementedOrdaServiceServer) ProcessClient ¶
func (*UnimplementedOrdaServiceServer) ProcessClient(context.Context, *ClientMessage) (*ClientMessage, error)
func (*UnimplementedOrdaServiceServer) ProcessPushPull ¶
func (*UnimplementedOrdaServiceServer) ProcessPushPull(context.Context, *PushPullMessage) (*PushPullMessage, error)
func (*UnimplementedOrdaServiceServer) ResetCollection ¶
func (*UnimplementedOrdaServiceServer) ResetCollection(context.Context, *CollectionMessage) (*CollectionMessage, error)
func (*UnimplementedOrdaServiceServer) TestEncodingOperation ¶
func (*UnimplementedOrdaServiceServer) TestEncodingOperation(context.Context, *EncodingMessage) (*EncodingMessage, error)