Documentation ¶
Index ¶
- Variables
- func BytesToObject(snapshot []byte) (*json.Object, error)
- func FromChangePack(pbPack *api.ChangePack) (*change.Pack, error)
- func FromDocumentKeys(pbKeys []*api.DocumentKey) []*key.Key
- func FromEventType(pbEventType api.EventType) (types.EventType, error)
- func FromOperations(pbOps []*api.Operation) ([]operation.Operation, error)
- func ObjectToBytes(obj *json.Object) ([]byte, error)
- func ToChangePack(pack *change.Pack) (*api.ChangePack, error)
- func ToClientsMap(clientsMap map[string][]string) map[string]*api.Clients
- func ToDocumentKeys(keys ...*key.Key) []*api.DocumentKey
- func ToEventType(eventType types.EventType) (api.EventType, error)
- func ToOperations(operations []operation.Operation) ([]*api.Operation, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrPackRequired is returned when an empty pack is passed. ErrPackRequired = errors.New("pack required") // ErrCheckpointRequired is returned when a pack with an empty checkpoint is // passed. ErrCheckpointRequired = errors.New("checkpoint required") // ErrUnsupportedOperation is returned when the given operation is not // supported yet. ErrUnsupportedOperation = errors.New("unsupported operation") // ErrUnsupportedElement is returned when the given element is not // supported yet. ErrUnsupportedElement = errors.New("unsupported element") // ErrUnsupportedEventType is returned when the given event type is not // supported yet. ErrUnsupportedEventType = errors.New("unsupported event type") // ErrUnsupportedValueType is returned when the given value type is not // supported yet. ErrUnsupportedValueType = errors.New("unsupported value type") // ErrUnsupportedCounterType is returned when the given counter type is not // supported yet. ErrUnsupportedCounterType = errors.New("unsupported counter type") )
Functions ¶
func BytesToObject ¶
BytesToObject creates an Object from the given byte array.
func FromChangePack ¶
func FromChangePack(pbPack *api.ChangePack) (*change.Pack, error)
FromChangePack converts the given Protobuf format to model format.
func FromDocumentKeys ¶
func FromDocumentKeys(pbKeys []*api.DocumentKey) []*key.Key
FromDocumentKeys converts the given Protobuf format to model format.
func FromEventType ¶
FromEventType converts the given Protobuf format to model format.
func FromOperations ¶
FromOperations converts the given Protobuf format to model format.
func ObjectToBytes ¶
ObjectToBytes converts the given object to byte array.
func ToChangePack ¶
func ToChangePack(pack *change.Pack) (*api.ChangePack, error)
ToChangePack converts the given model format to Protobuf format.
func ToClientsMap ¶
ToClientsMap converts the given model to Protobuf format.
func ToDocumentKeys ¶
func ToDocumentKeys(keys ...*key.Key) []*api.DocumentKey
ToDocumentKeys converts the given model format to Protobuf format.
func ToEventType ¶
ToEventType converts the given model format to Protobuf format.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.