Initial QSfera import

This commit is contained in:
Курнат Андрей
2026-06-07 10:20:04 +03:00
commit 2315f25754
16485 changed files with 4826827 additions and 0 deletions
@@ -0,0 +1,29 @@
package content
import (
"context"
"io"
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
"google.golang.org/grpc/metadata"
)
// Retriever is the interface that wraps the basic Retrieve method. 🐕
// It requests and then returns a resource from the underlying storage.
type Retriever interface {
Retrieve(ctx context.Context, rID *provider.ResourceId) (io.ReadCloser, error)
}
func contextGet(ctx context.Context, k string) (string, bool) {
md, ok := metadata.FromOutgoingContext(ctx)
if !ok {
return "", false
}
token, ok := md[k]
if len(token) == 0 || !ok {
return "", false
}
return token[0], ok
}