Documentation ¶
Index ¶
- func ContextWithRouterProvider(ctx context.Context, p RouterProvider) context.Context
- func ContextWithStore(parent context.Context, db DB) context.Context
- func CreateCollection(ctx context.Context, collection *pb.Collection, opts CreateCollectionOptions) error
- func DeleteCollection(ctx context.Context, id string, opts DeleteCollectionOptions) error
- func DeleteObject(ctx context.Context, collection string, id string, opts DeleteObjectOptions) error
- func GetCollection(ctx context.Context, id string, opts GetCollectionOptions) (*pb.Collection, error)
- func GetObject(ctx context.Context, collection string, id string, opts GetObjectOptions) (*pb.Object, error)
- func GetObjectHeader(ctx context.Context, collection string, id string, opts GetHeaderOptions) (*pb.Header, error)
- func HTTPHandleCreateCollection(w http.ResponseWriter, r *http.Request)
- func HTTPHandleDeleteCollection(w http.ResponseWriter, r *http.Request)
- func HTTPHandleDeleteObject(w http.ResponseWriter, r *http.Request)
- func HTTPHandleGetCollection(w http.ResponseWriter, r *http.Request)
- func HTTPHandleGetObject(w http.ResponseWriter, r *http.Request)
- func HTTPHandleListCollections(w http.ResponseWriter, r *http.Request)
- func HTTPHandleListObjects(w http.ResponseWriter, r *http.Request)
- func HTTPHandleMoveObject(w http.ResponseWriter, r *http.Request)
- func HTTPHandlePatchObject(w http.ResponseWriter, r *http.Request)
- func HTTPHandlePutObject(w http.ResponseWriter, r *http.Request)
- func HTTPHandleSearchObjects(w http.ResponseWriter, r *http.Request)
- func ListCollections(ctx context.Context, opts ListCollectionOptions) ([]*pb.Collection, error)
- func Middleware(opt ...MiddlewareOption) mux.MiddlewareFunc
- func MoveObject(ctx context.Context, collection string, objectID string, ...) error
- func MuxRouter(middleware ...mux.MiddlewareFunc) http.Handler
- func NewGRPCHandler() pb.ObjectsServer
- func NewSQLCollection(collection *pb.Collection, db *sql.DB, dialect string, tablePrefix string) (*sqlCollection, error)
- func PatchObject(ctx context.Context, collection string, patch *pb.Patch, opts PatchOptions) error
- func PutObject(ctx context.Context, collection string, object *pb.Object, ...) (string, error)
- type ACLHandler
- func (p *ACLHandler) CreateCollection(ctx context.Context, collection *pb.Collection, opts CreateCollectionOptions) error
- func (p *ACLHandler) DeleteCollection(ctx context.Context, id string, opts DeleteCollectionOptions) error
- func (p *ACLHandler) DeleteObject(ctx context.Context, collection string, id string, opts DeleteObjectOptions) error
- func (p *ACLHandler) GetCollection(ctx context.Context, id string, opts GetCollectionOptions) (*pb.Collection, error)
- func (p *ACLHandler) GetObject(ctx context.Context, collection string, id string, opts GetObjectOptions) (*pb.Object, error)
- func (p *ACLHandler) GetObjectHeader(ctx context.Context, collection string, id string, opts GetHeaderOptions) (*pb.Header, error)
- func (p *ACLHandler) ListCollections(ctx context.Context, opts ListCollectionOptions) ([]*pb.Collection, error)
- func (p *ACLHandler) ListObjects(ctx context.Context, collection string, opts ListOptions) (*Cursor, error)
- func (p *ACLHandler) MoveObject(ctx context.Context, collection string, objectID string, ...) error
- func (p *ACLHandler) PatchObject(ctx context.Context, collection string, patch *pb.Patch, opts PatchOptions) error
- func (p *ACLHandler) PutObject(ctx context.Context, collection string, object *pb.Object, ...) (string, error)
- func (p *ACLHandler) SearchObjects(ctx context.Context, collection string, query *pb.SearchQuery, ...) (*Cursor, error)
- type BaseHandler
- func (b *BaseHandler) CreateCollection(ctx context.Context, collection *pb.Collection, opts CreateCollectionOptions) error
- func (b *BaseHandler) DeleteCollection(ctx context.Context, id string, opts DeleteCollectionOptions) error
- func (b *BaseHandler) DeleteObject(ctx context.Context, collection string, id string, opts DeleteObjectOptions) error
- func (b *BaseHandler) GetCollection(ctx context.Context, id string, opts GetCollectionOptions) (*pb.Collection, error)
- func (b *BaseHandler) GetObject(ctx context.Context, collection string, id string, opts GetObjectOptions) (*pb.Object, error)
- func (b *BaseHandler) GetObjectHeader(ctx context.Context, collection string, id string, opts GetHeaderOptions) (*pb.Header, error)
- func (b *BaseHandler) ListCollections(ctx context.Context, opts ListCollectionOptions) ([]*pb.Collection, error)
- func (b *BaseHandler) ListObjects(ctx context.Context, collection string, opts ListOptions) (*Cursor, error)
- func (b *BaseHandler) MoveObject(ctx context.Context, collection string, objectID string, ...) error
- func (b *BaseHandler) PatchObject(ctx context.Context, collection string, patch *pb.Patch, opts PatchOptions) error
- func (b *BaseHandler) PutObject(ctx context.Context, collection string, object *pb.Object, ...) (string, error)
- func (b *BaseHandler) SearchObjects(ctx context.Context, collection string, query *pb.SearchQuery, ...) (*Cursor, error)
- type BrowseFunc
- type Browser
- type ClientProvider
- type CloseFunc
- type Closer
- type CollectionDB
- type CollectionOptions
- type CreateCollectionOptions
- type Cursor
- type CustomRouter
- type DB
- type DeleteCollectionOptions
- type DeleteObjectOptions
- type ExecHandler
- func (e *ExecHandler) CreateCollection(ctx context.Context, collection *pb.Collection, _ CreateCollectionOptions) error
- func (e *ExecHandler) DeleteCollection(ctx context.Context, id string, _ DeleteCollectionOptions) error
- func (e *ExecHandler) DeleteObject(ctx context.Context, collection string, id string, _ DeleteObjectOptions) error
- func (e *ExecHandler) GetCollection(ctx context.Context, id string, _ GetCollectionOptions) (*pb.Collection, error)
- func (e *ExecHandler) GetObject(ctx context.Context, collection string, id string, opts GetObjectOptions) (*pb.Object, error)
- func (e *ExecHandler) GetObjectHeader(ctx context.Context, collection string, id string, _ GetHeaderOptions) (*pb.Header, error)
- func (e *ExecHandler) ListCollections(ctx context.Context, _ ListCollectionOptions) ([]*pb.Collection, error)
- func (e *ExecHandler) ListObjects(ctx context.Context, collection string, opts ListOptions) (*Cursor, error)
- func (e *ExecHandler) MoveObject(ctx context.Context, collection string, objectID string, ...) error
- func (e *ExecHandler) PatchObject(ctx context.Context, collection string, patch *pb.Patch, _ PatchOptions) error
- func (e *ExecHandler) PutObject(ctx context.Context, collection string, object *pb.Object, ...) (string, error)
- func (e *ExecHandler) SearchObjects(ctx context.Context, collection string, query *pb.SearchQuery, ...) (*Cursor, error)
- type GetCollectionOptions
- type GetHeaderOptions
- type GetObjectOptions
- type Handler
- type HandlerOption
- type JsonObject
- func (s *JsonObject) BoolAt(name string) (bool, error)
- func (s *JsonObject) Get(name string) (*JsonObject, error)
- func (s *JsonObject) GetObject() interface{}
- func (s *JsonObject) Int(name string) (int, error)
- func (s *JsonObject) Int32(name string) (int32, error)
- func (s *JsonObject) Int64(name string) (int64, error)
- func (s *JsonObject) Marshal() ([]byte, error)
- func (s *JsonObject) String() string
- func (s *JsonObject) StringAt(name string) (string, error)
- func (s *JsonObject) ToInt() (int, error)
- func (s *JsonObject) ToInt32() (int32, error)
- func (s *JsonObject) ToInt64() (int64, error)
- func (s *JsonObject) ToString() (string, error)
- type ListCollectionOptions
- type ListOptions
- type LoadBalancer
- type MiddlewareOption
- type MoveOptions
- type ParamsHandler
- func (p *ParamsHandler) CreateCollection(ctx context.Context, collection *pb.Collection, opts CreateCollectionOptions) error
- func (p *ParamsHandler) DeleteCollection(ctx context.Context, id string, opts DeleteCollectionOptions) error
- func (p *ParamsHandler) DeleteObject(ctx context.Context, collection string, id string, opts DeleteObjectOptions) error
- func (p *ParamsHandler) GetCollection(ctx context.Context, id string, opts GetCollectionOptions) (*pb.Collection, error)
- func (p *ParamsHandler) GetObject(ctx context.Context, collection string, id string, opts GetObjectOptions) (*pb.Object, error)
- func (p *ParamsHandler) GetObjectHeader(ctx context.Context, collection string, id string, opts GetHeaderOptions) (*pb.Header, error)
- func (p *ParamsHandler) ListObjects(ctx context.Context, collection string, opts ListOptions) (*Cursor, error)
- func (p *ParamsHandler) MoveObject(ctx context.Context, collection string, objectID string, ...) error
- func (p *ParamsHandler) PatchObject(ctx context.Context, collection string, patch *pb.Patch, opts PatchOptions) error
- func (p *ParamsHandler) PutObject(ctx context.Context, collection string, object *pb.Object, ...) (string, error)
- func (p *ParamsHandler) SearchObjects(ctx context.Context, collection string, query *pb.SearchQuery, ...) (*Cursor, error)
- type PatchOptions
- type PutOptions
- type RouteOption
- type RouteProviderFunc
- type Router
- type RouterProvideFunc
- type RouterProvider
- type SearchObjectsOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithRouterProvider ¶
func ContextWithRouterProvider(ctx context.Context, p RouterProvider) context.Context
ContextWithRouterProvider updates context by adding a RouterProvider object in its values
func CreateCollection ¶
func CreateCollection(ctx context.Context, collection *pb.Collection, opts CreateCollectionOptions) error
func DeleteCollection ¶
func DeleteCollection(ctx context.Context, id string, opts DeleteCollectionOptions) error
func DeleteObject ¶
func GetCollection ¶
func GetCollection(ctx context.Context, id string, opts GetCollectionOptions) (*pb.Collection, error)
func GetObjectHeader ¶
func HTTPHandleCreateCollection ¶
func HTTPHandleCreateCollection(w http.ResponseWriter, r *http.Request)
func HTTPHandleDeleteCollection ¶
func HTTPHandleDeleteCollection(w http.ResponseWriter, r *http.Request)
func HTTPHandleDeleteObject ¶
func HTTPHandleDeleteObject(w http.ResponseWriter, r *http.Request)
func HTTPHandleGetCollection ¶
func HTTPHandleGetCollection(w http.ResponseWriter, r *http.Request)
func HTTPHandleGetObject ¶
func HTTPHandleGetObject(w http.ResponseWriter, r *http.Request)
func HTTPHandleListCollections ¶
func HTTPHandleListCollections(w http.ResponseWriter, r *http.Request)
func HTTPHandleListObjects ¶
func HTTPHandleListObjects(w http.ResponseWriter, r *http.Request)
func HTTPHandleMoveObject ¶
func HTTPHandleMoveObject(w http.ResponseWriter, r *http.Request)
func HTTPHandlePatchObject ¶
func HTTPHandlePatchObject(w http.ResponseWriter, r *http.Request)
func HTTPHandlePutObject ¶
func HTTPHandlePutObject(w http.ResponseWriter, r *http.Request)
func HTTPHandleSearchObjects ¶
func HTTPHandleSearchObjects(w http.ResponseWriter, r *http.Request)
func ListCollections ¶
func ListCollections(ctx context.Context, opts ListCollectionOptions) ([]*pb.Collection, error)
func Middleware ¶
func Middleware(opt ...MiddlewareOption) mux.MiddlewareFunc
func MoveObject ¶
func MoveObject(ctx context.Context, collection string, objectID string, targetCollection string, accessSecurityRules *pb.PathAccessRules, opts MoveOptions) error
func NewGRPCHandler ¶
func NewGRPCHandler() pb.ObjectsServer
func NewSQLCollection ¶
func PatchObject ¶
Types ¶
type ACLHandler ¶
type ACLHandler struct {
BaseHandler
}
func (*ACLHandler) CreateCollection ¶
func (p *ACLHandler) CreateCollection(ctx context.Context, collection *pb.Collection, opts CreateCollectionOptions) error
func (*ACLHandler) DeleteCollection ¶
func (p *ACLHandler) DeleteCollection(ctx context.Context, id string, opts DeleteCollectionOptions) error
func (*ACLHandler) DeleteObject ¶
func (p *ACLHandler) DeleteObject(ctx context.Context, collection string, id string, opts DeleteObjectOptions) error
func (*ACLHandler) GetCollection ¶
func (p *ACLHandler) GetCollection(ctx context.Context, id string, opts GetCollectionOptions) (*pb.Collection, error)
func (*ACLHandler) GetObject ¶
func (p *ACLHandler) GetObject(ctx context.Context, collection string, id string, opts GetObjectOptions) (*pb.Object, error)
func (*ACLHandler) GetObjectHeader ¶
func (p *ACLHandler) GetObjectHeader(ctx context.Context, collection string, id string, opts GetHeaderOptions) (*pb.Header, error)
func (*ACLHandler) ListCollections ¶
func (p *ACLHandler) ListCollections(ctx context.Context, opts ListCollectionOptions) ([]*pb.Collection, error)
func (*ACLHandler) ListObjects ¶
func (p *ACLHandler) ListObjects(ctx context.Context, collection string, opts ListOptions) (*Cursor, error)
func (*ACLHandler) MoveObject ¶
func (p *ACLHandler) MoveObject(ctx context.Context, collection string, objectID string, targetCollection string, authorizedUsers *pb.PathAccessRules, opts MoveOptions) error
func (*ACLHandler) PatchObject ¶
func (p *ACLHandler) PatchObject(ctx context.Context, collection string, patch *pb.Patch, opts PatchOptions) error
func (*ACLHandler) PutObject ¶
func (p *ACLHandler) PutObject(ctx context.Context, collection string, object *pb.Object, authorizedUsers *pb.PathAccessRules, indexes []*pb.TextIndex, opts PutOptions) (string, error)
func (*ACLHandler) SearchObjects ¶
func (p *ACLHandler) SearchObjects(ctx context.Context, collection string, query *pb.SearchQuery, opts SearchObjectsOptions) (*Cursor, error)
type BaseHandler ¶
type BaseHandler struct {
// contains filtered or unexported fields
}
func (*BaseHandler) CreateCollection ¶
func (b *BaseHandler) CreateCollection(ctx context.Context, collection *pb.Collection, opts CreateCollectionOptions) error
func (*BaseHandler) DeleteCollection ¶
func (b *BaseHandler) DeleteCollection(ctx context.Context, id string, opts DeleteCollectionOptions) error
func (*BaseHandler) DeleteObject ¶
func (b *BaseHandler) DeleteObject(ctx context.Context, collection string, id string, opts DeleteObjectOptions) error
func (*BaseHandler) GetCollection ¶
func (b *BaseHandler) GetCollection(ctx context.Context, id string, opts GetCollectionOptions) (*pb.Collection, error)
func (*BaseHandler) GetObject ¶
func (b *BaseHandler) GetObject(ctx context.Context, collection string, id string, opts GetObjectOptions) (*pb.Object, error)
func (*BaseHandler) GetObjectHeader ¶
func (b *BaseHandler) GetObjectHeader(ctx context.Context, collection string, id string, opts GetHeaderOptions) (*pb.Header, error)
func (*BaseHandler) ListCollections ¶
func (b *BaseHandler) ListCollections(ctx context.Context, opts ListCollectionOptions) ([]*pb.Collection, error)
func (*BaseHandler) ListObjects ¶
func (b *BaseHandler) ListObjects(ctx context.Context, collection string, opts ListOptions) (*Cursor, error)
func (*BaseHandler) MoveObject ¶
func (b *BaseHandler) MoveObject(ctx context.Context, collection string, objectID string, targetCollection string, accessSecurityRules *pb.PathAccessRules, opts MoveOptions) error
func (*BaseHandler) PatchObject ¶
func (b *BaseHandler) PatchObject(ctx context.Context, collection string, patch *pb.Patch, opts PatchOptions) error
func (*BaseHandler) PutObject ¶
func (b *BaseHandler) PutObject(ctx context.Context, collection string, object *pb.Object, accessSecurityRules *pb.PathAccessRules, indexes []*pb.TextIndex, opts PutOptions) (string, error)
func (*BaseHandler) SearchObjects ¶
func (b *BaseHandler) SearchObjects(ctx context.Context, collection string, query *pb.SearchQuery, opts SearchObjectsOptions) (*Cursor, error)
type BrowseFunc ¶
type ClientProvider ¶
type ClientProvider interface {
GetClient(ctx context.Context, serviceType uint32) (pb.ObjectsClient, error)
}
func RouterGrpcClientProvider ¶
func RouterGrpcClientProvider(ctx context.Context) ClientProvider
type CollectionDB ¶
type CollectionDB interface { // Save saves object content as JSON in database Save(ctx context.Context, object *pb.Object, index ...*pb.TextIndex) error // Patch applies patch to object with id equals patch.ID() Patch(ctx context.Context, patch *pb.Patch) error // Delete removes all content associated with objectID Delete(ctx context.Context, objectID string) error // List returns a list of at most 'opts.Count' objects List(ctx context.Context, opts ListOptions) (*Cursor, error) // Get gets the object associated with objectID Get(ctx context.Context, objectID string, opts GetObjectOptions) (*pb.Object, error) // Info gets header of the object associated with objectID Info(ctx context.Context, objectID string) (*pb.Header, error) Search(ctx context.Context, query *pb.SearchQuery) (*Cursor, error) // Clear removes all objects store Clear() error }
type CollectionOptions ¶
type CreateCollectionOptions ¶
type CreateCollectionOptions struct{}
type Cursor ¶
type Cursor struct {
// contains filtered or unexported fields
}
func ListObjects ¶
func SearchObjects ¶
func SearchObjects(ctx context.Context, collection string, query *pb.SearchQuery, opts SearchObjectsOptions) (*Cursor, error)
func (*Cursor) GetBrowser ¶
func (*Cursor) SetBrowser ¶
type CustomRouter ¶
type CustomRouter struct {
// contains filtered or unexported fields
}
func NewCustomRouter ¶
func NewCustomRouter(exec Handler, opts ...HandlerOption) *CustomRouter
func (*CustomRouter) GetHandler ¶
func (r *CustomRouter) GetHandler(opts ...RouteOption) Handler
type DB ¶
type DB interface { CreateCollection(ctx context.Context, collection *pb.Collection) error GetCollection(ctx context.Context, id string) (*pb.Collection, error) ListCollections(ctx context.Context) ([]*pb.Collection, error) DeleteCollection(ctx context.Context, id string) error // Save saves object content as JSON in database Save(ctx context.Context, collection string, object *pb.Object, index ...*pb.TextIndex) error Patch(ctx context.Context, collection string, patch *pb.Patch) error // Delete removes all content associated with objectID Delete(ctx context.Context, collection string, objectID string) error // Get gets the object associated with objectID Get(ctx context.Context, collection string, objectID string, opts GetObjectOptions) (*pb.Object, error) // Info gets header of the object associated with objectID Info(ctx context.Context, collection string, objectID string) (*pb.Header, error) // List returns a list of at most 'opts.Count' objects List(ctx context.Context, collection string, opts ListOptions) (*Cursor, error) Search(ctx context.Context, collection string, query *pb.SearchQuery) (*Cursor, error) }
type DeleteCollectionOptions ¶
type DeleteCollectionOptions struct{}
type DeleteObjectOptions ¶
type DeleteObjectOptions struct{}
type ExecHandler ¶
type ExecHandler struct {
BaseHandler
}
func (*ExecHandler) CreateCollection ¶
func (e *ExecHandler) CreateCollection(ctx context.Context, collection *pb.Collection, _ CreateCollectionOptions) error
func (*ExecHandler) DeleteCollection ¶
func (e *ExecHandler) DeleteCollection(ctx context.Context, id string, _ DeleteCollectionOptions) error
func (*ExecHandler) DeleteObject ¶
func (e *ExecHandler) DeleteObject(ctx context.Context, collection string, id string, _ DeleteObjectOptions) error
func (*ExecHandler) GetCollection ¶
func (e *ExecHandler) GetCollection(ctx context.Context, id string, _ GetCollectionOptions) (*pb.Collection, error)
func (*ExecHandler) GetObject ¶
func (e *ExecHandler) GetObject(ctx context.Context, collection string, id string, opts GetObjectOptions) (*pb.Object, error)
func (*ExecHandler) GetObjectHeader ¶
func (e *ExecHandler) GetObjectHeader(ctx context.Context, collection string, id string, _ GetHeaderOptions) (*pb.Header, error)
func (*ExecHandler) ListCollections ¶
func (e *ExecHandler) ListCollections(ctx context.Context, _ ListCollectionOptions) ([]*pb.Collection, error)
func (*ExecHandler) ListObjects ¶
func (e *ExecHandler) ListObjects(ctx context.Context, collection string, opts ListOptions) (*Cursor, error)
func (*ExecHandler) MoveObject ¶
func (e *ExecHandler) MoveObject(ctx context.Context, collection string, objectID string, targetCollection string, _ *pb.PathAccessRules, _ MoveOptions) error
func (*ExecHandler) PatchObject ¶
func (e *ExecHandler) PatchObject(ctx context.Context, collection string, patch *pb.Patch, _ PatchOptions) error
func (*ExecHandler) PutObject ¶
func (e *ExecHandler) PutObject(ctx context.Context, collection string, object *pb.Object, _ *pb.PathAccessRules, indexes []*pb.TextIndex, _ PutOptions) (string, error)
func (*ExecHandler) SearchObjects ¶
func (e *ExecHandler) SearchObjects(ctx context.Context, collection string, query *pb.SearchQuery, _ SearchObjectsOptions) (*Cursor, error)
type GetCollectionOptions ¶
type GetCollectionOptions struct{}
type GetHeaderOptions ¶
type GetHeaderOptions struct{}
type GetObjectOptions ¶
type Handler ¶
type Handler interface { CreateCollection(ctx context.Context, collection *pb.Collection, opts CreateCollectionOptions) error GetCollection(ctx context.Context, id string, opts GetCollectionOptions) (*pb.Collection, error) ListCollections(ctx context.Context, opts ListCollectionOptions) ([]*pb.Collection, error) DeleteCollection(ctx context.Context, id string, opts DeleteCollectionOptions) error PutObject(ctx context.Context, collection string, object *pb.Object, accessSecurityRules *pb.PathAccessRules, indexes []*pb.TextIndex, opts PutOptions) (string, error) PatchObject(ctx context.Context, collection string, patch *pb.Patch, opts PatchOptions) error MoveObject(ctx context.Context, collection string, objectID string, targetCollection string, accessSecurityRules *pb.PathAccessRules, opts MoveOptions) error GetObject(ctx context.Context, collection string, id string, opts GetObjectOptions) (*pb.Object, error) GetObjectHeader(ctx context.Context, collection string, id string, opts GetHeaderOptions) (*pb.Header, error) DeleteObject(ctx context.Context, collection string, id string, opts DeleteObjectOptions) error ListObjects(ctx context.Context, collection string, opts ListOptions) (*Cursor, error) SearchObjects(ctx context.Context, collection string, query *pb.SearchQuery, opts SearchObjectsOptions) (*Cursor, error) }
func GetRouterHandler ¶
func GetRouterHandler(ctx context.Context, opt ...RouteOption) Handler
func NewGRPCObjectsClientHandler ¶
NewGRPCObjectsClientHandler creates a router ObjectsHandler that embed that calls a gRPC service to perform final actions
type HandlerOption ¶
type HandlerOption func(*objectsHandlersOptions)
func WithDefaultParamsHandler ¶
func WithDefaultParamsHandler() HandlerOption
func WithDefaultPolicyHandler ¶
func WithDefaultPolicyHandler() HandlerOption
type JsonObject ¶
type JsonObject struct {
// contains filtered or unexported fields
}
func (*JsonObject) Get ¶
func (s *JsonObject) Get(name string) (*JsonObject, error)
func (*JsonObject) GetObject ¶
func (s *JsonObject) GetObject() interface{}
func (*JsonObject) Marshal ¶
func (s *JsonObject) Marshal() ([]byte, error)
func (*JsonObject) String ¶
func (s *JsonObject) String() string
func (*JsonObject) ToInt ¶
func (s *JsonObject) ToInt() (int, error)
func (*JsonObject) ToInt32 ¶
func (s *JsonObject) ToInt32() (int32, error)
func (*JsonObject) ToInt64 ¶
func (s *JsonObject) ToInt64() (int64, error)
func (*JsonObject) ToString ¶
func (s *JsonObject) ToString() (string, error)
type ListCollectionOptions ¶
type ListCollectionOptions struct{}
type ListOptions ¶
type LoadBalancer ¶
func (*LoadBalancer) GetClient ¶
func (b *LoadBalancer) GetClient(ctx context.Context, serviceType uint32) (pb.ObjectsClient, error)
type MiddlewareOption ¶
type MiddlewareOption func(*middlewareOptions)
func MiddlewareWithDB ¶
func MiddlewareWithDB(db DB) MiddlewareOption
func MiddlewareWithRouterProvider ¶
func MiddlewareWithRouterProvider(provider RouterProvider) MiddlewareOption
type MoveOptions ¶
type MoveOptions struct {
NewSecurity *pb.PathAccessRules
}
type ParamsHandler ¶
type ParamsHandler struct {
BaseHandler
}
func (*ParamsHandler) CreateCollection ¶
func (p *ParamsHandler) CreateCollection(ctx context.Context, collection *pb.Collection, opts CreateCollectionOptions) error
func (*ParamsHandler) DeleteCollection ¶
func (p *ParamsHandler) DeleteCollection(ctx context.Context, id string, opts DeleteCollectionOptions) error
func (*ParamsHandler) DeleteObject ¶
func (p *ParamsHandler) DeleteObject(ctx context.Context, collection string, id string, opts DeleteObjectOptions) error
func (*ParamsHandler) GetCollection ¶
func (p *ParamsHandler) GetCollection(ctx context.Context, id string, opts GetCollectionOptions) (*pb.Collection, error)
func (*ParamsHandler) GetObject ¶
func (p *ParamsHandler) GetObject(ctx context.Context, collection string, id string, opts GetObjectOptions) (*pb.Object, error)
func (*ParamsHandler) GetObjectHeader ¶
func (p *ParamsHandler) GetObjectHeader(ctx context.Context, collection string, id string, opts GetHeaderOptions) (*pb.Header, error)
func (*ParamsHandler) ListObjects ¶
func (p *ParamsHandler) ListObjects(ctx context.Context, collection string, opts ListOptions) (*Cursor, error)
func (*ParamsHandler) MoveObject ¶
func (p *ParamsHandler) MoveObject(ctx context.Context, collection string, objectID string, targetCollection string, accessSecurityRules *pb.PathAccessRules, opts MoveOptions) error
func (*ParamsHandler) PatchObject ¶
func (p *ParamsHandler) PatchObject(ctx context.Context, collection string, patch *pb.Patch, opts PatchOptions) error
func (*ParamsHandler) PutObject ¶
func (p *ParamsHandler) PutObject(ctx context.Context, collection string, object *pb.Object, accessSecurityRules *pb.PathAccessRules, indexes []*pb.TextIndex, opts PutOptions) (string, error)
func (*ParamsHandler) SearchObjects ¶
func (p *ParamsHandler) SearchObjects(ctx context.Context, collection string, query *pb.SearchQuery, opts SearchObjectsOptions) (*Cursor, error)
type PatchOptions ¶
type PatchOptions struct{}
type PutOptions ¶
type PutOptions struct{}
type RouteOption ¶
type RouteOption func(*routesOptions)
type RouteProviderFunc ¶
type RouteProviderFunc func(opts ...RouteOption) Handler
func (RouteProviderFunc) GetHandler ¶
func (f RouteProviderFunc) GetHandler(opts ...RouteOption) Handler
type Router ¶
type Router interface { // GetHandler returns a sequence of handler GetHandler(opts ...RouteOption) Handler }
func DefaultRouter ¶
func DefaultRouter() Router
type RouterProvideFunc ¶
type RouterProvider ¶
type SearchObjectsOptions ¶
type SearchObjectsOptions struct{}
Source Files ¶
- clients.go
- collection-db-sql.go
- collection.go
- consts.go
- context.go
- cursor.go
- db-sql.go
- db.go
- handler-acl.go
- handler-base.go
- handler-exec.go
- handler-grpc-client.go
- handler-grpc-server.go
- handler-params.go
- handler.go
- http-middleware.go
- http.go
- json.go
- load-balancer.go
- options.go
- router-custom.go
- router-options.go
- router.go
Click to show internal directories.
Click to hide internal directories.