Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectionCursor ¶
type CollectionCursor interface { Next() (*pb.Collection, error) Close() error }
type JSONCursor ¶
func JSONCursorFromIds ¶
func JSONCursorFromIds(ids StringCursor, reader JSONReader) JSONCursor
type JSONReader ¶
type JSONReaderFunc ¶
type JSONWriter ¶
type JSONWriterFunc ¶
func (JSONWriterFunc) Write ¶
func (f JSONWriterFunc) Write(data JSON) error
type Repository ¶
type Repository interface { SaveCollection(collectionId *pb.Collection) error GetCollection(collectionId string) (*pb.Collection, error) GetCollectionList() (CollectionCursor, error) DeleteCollection(collectionId string) error SaveObject(collectionId string, id string, object JSON) error PatchObject(collectionId string, objectId string, path string, data JSON) error GetObject(collectionId string, objectID string) (JSON, error) GetObjectList(collectionId string, offset uint32, count uint32) ([]JSON, error) DeleteObject(collectionId string, objectID string) error }
type Service ¶
type Service interface { CreateCollection(collection *pb.Collection) error GetCollection(collectionId string) (*pb.Collection, error) ListCollections() (CollectionCursor, error) DeleteCollection(collectionId string) error PutObject(collectionId string, data JSON) (string, error) PatchObject(collectionId string, objectId string, path string, data JSON) error MoveObject(collectionId string, objectID string, targetCollectionId string) error GetObject(collectionId string, objectId string) (JSON, error) GetObjects(collectionId string, objectsIds StringCursor) (JSONCursor, error) DeleteObject(collectionId string, objectId string) error }
func NewService ¶
func NewService(repository Repository) Service
type StringCursor ¶
Click to show internal directories.
Click to hide internal directories.