Revert "UniStore: Add folder to the SQL backend" (#95966)

Revert "UniStore: Add folder to the SQL backend (#95671)"

This reverts commit f075662696.
This commit is contained in:
Leonor Oliveira
2024-11-06 17:04:57 +02:00
committed by GitHub
parent 26b0e8f105
commit aaa4f4a23e
43 changed files with 72 additions and 235 deletions
+2 -23
View File
@@ -49,27 +49,10 @@ type ListIterator interface {
// Used for fast(er) authz filtering
Name() string
// Folder of the current item
// Used for fast(er) authz filtering
Folder() string
// Value for the current item
Value() []byte
}
type BackendReadResponse struct {
// Metadata
Key *ResourceKey
Folder string
// The new resource version
ResourceVersion int64
// The properties
Value []byte
// Error details
Error *ErrorResult
}
// The StorageBackend is an internal abstraction that supports interacting with
// the underlying raw storage medium. This interface is never exposed directly,
// it is provided by concrete instances that actually write values.
@@ -80,7 +63,7 @@ type StorageBackend interface {
WriteEvent(context.Context, WriteEvent) (int64, error)
// Read a resource from storage optionally at an explicit version
ReadResource(context.Context, *ReadRequest) *BackendReadResponse
ReadResource(context.Context, *ReadRequest) *ReadResponse
// When the ResourceServer executes a List request, this iterator will
// query the backend for potential results. All results will be
@@ -555,11 +538,7 @@ func (s *server) Read(ctx context.Context, req *ReadRequest) (*ReadResponse, err
rsp := s.backend.ReadResource(ctx, req)
// TODO, check folder permissions etc
return &ReadResponse{
ResourceVersion: rsp.ResourceVersion,
Value: rsp.Value,
Error: rsp.Error,
}, nil
return rsp, nil
}
func (s *server) List(ctx context.Context, req *ListRequest) (*ListResponse, error) {