Bump reva

This commit is contained in:
André Duffeck
2026-04-24 14:50:00 +02:00
parent e9e195789d
commit f322fa8b1d
99 changed files with 1976 additions and 1506 deletions
+5 -5
View File
@@ -14,7 +14,7 @@ require (
github.com/blevesearch/bleve/v2 v2.5.7
github.com/cenkalti/backoff v2.2.1+incompatible
github.com/coreos/go-oidc/v3 v3.18.0
github.com/cs3org/go-cs3apis v0.0.0-20260407125717-5d69ba49048b
github.com/cs3org/go-cs3apis v0.0.0-20260424072047-8d9ef7076ae9
github.com/davidbyttow/govips/v2 v2.18.0
github.com/dhowden/tag v0.0.0-20240417053706-3d75831295e8
github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e
@@ -65,7 +65,7 @@ require (
github.com/open-policy-agent/opa v1.15.2
github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260310090739-853d972b282d
github.com/opencloud-eu/reva/v2 v2.43.0
github.com/opencloud-eu/reva/v2 v2.43.1-0.20260424123852-c254710aa2af
github.com/opensearch-project/opensearch-go/v4 v4.6.0
github.com/orcaman/concurrent-map v1.0.0
github.com/pkg/errors v0.9.1
@@ -163,7 +163,7 @@ require (
github.com/bombsimon/logrusr/v3 v3.1.0 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/ceph/go-ceph v0.38.0 // indirect
github.com/ceph/go-ceph v0.39.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cevaris/ordered_map v0.0.0-20190319150403-3adeae072e73 // indirect
github.com/clipperhouse/displaywidth v0.10.0 // indirect
@@ -280,7 +280,7 @@ require (
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.19 // indirect
github.com/mattn/go-sqlite3 v1.14.37 // indirect
github.com/mattn/go-sqlite3 v1.14.42 // indirect
github.com/maxymania/go-system v0.0.0-20170110133659-647cc364bf0b // indirect
github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103 // indirect
github.com/miekg/dns v1.1.68 // indirect
@@ -389,7 +389,7 @@ require (
go.yaml.in/yaml/v2 v2.4.3 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/mod v0.33.0 // indirect
golang.org/x/sys v0.42.0 // indirect
golang.org/x/sys v0.43.0 // indirect
golang.org/x/time v0.15.0 // indirect
golang.org/x/tools v0.42.0 // indirect
google.golang.org/genproto v0.0.0-20260128011058-8636f8732409 // indirect
+10 -10
View File
@@ -208,8 +208,8 @@ github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1x
github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/ceph/go-ceph v0.38.0 h1:Ux0sIpl6VJNgY21hxuBZI9Z2Z8tQsBMJhjLjYBoa7s0=
github.com/ceph/go-ceph v0.38.0/go.mod h1:GQVPe5YWoCMOrGnpDDieQoQZRLkB0tJmIokbqxbwPBQ=
github.com/ceph/go-ceph v0.39.0 h1:fzINuBItJqhmTtnC4/iiTY+ONtsOqV7W+B/3xTS/DsY=
github.com/ceph/go-ceph v0.39.0/go.mod h1:UId58dqtDKTwnv3OY8rdpC+Ulz/AVpcvZqjXDICcd5c=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
@@ -264,8 +264,8 @@ github.com/crewjam/httperr v0.2.0 h1:b2BfXR8U3AlIHwNeFFvZ+BV1LFvKLlzMjzaTnZMybNo
github.com/crewjam/httperr v0.2.0/go.mod h1:Jlz+Sg/XqBQhyMjdDiC+GNNRzZTD7x39Gu3pglZ5oH4=
github.com/crewjam/saml v0.4.14 h1:g9FBNx62osKusnFzs3QTN5L9CVA/Egfgm+stJShzw/c=
github.com/crewjam/saml v0.4.14/go.mod h1:UVSZCf18jJkk6GpWNVqcyQJMD5HsRugBPf4I1nl2mME=
github.com/cs3org/go-cs3apis v0.0.0-20260407125717-5d69ba49048b h1:WNwuveokaUXIAGrwVLWqJSk0BdJv8k+9RXipBItGuyY=
github.com/cs3org/go-cs3apis v0.0.0-20260407125717-5d69ba49048b/go.mod h1:DedpcqXl193qF/08Y04IO0PpxyyMu8+GrkD6kWK2MEQ=
github.com/cs3org/go-cs3apis v0.0.0-20260424072047-8d9ef7076ae9 h1:8WtMb7TKKx1AJM3j+uR+H25y4v+b8o8GIQg/2ooCyRo=
github.com/cs3org/go-cs3apis v0.0.0-20260424072047-8d9ef7076ae9/go.mod h1:DedpcqXl193qF/08Y04IO0PpxyyMu8+GrkD6kWK2MEQ=
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
github.com/cyphar/filepath-securejoin v0.5.1 h1:eYgfMq5yryL4fbWfkLpFFy2ukSELzaJOTaUTuh+oF48=
github.com/cyphar/filepath-securejoin v0.5.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI=
@@ -820,8 +820,8 @@ github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-runewidth v0.0.19 h1:v++JhqYnZuu5jSKrk9RbgF5v4CGUjqRfBm05byFGLdw=
github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
github.com/mattn/go-sqlite3 v1.14.37 h1:3DOZp4cXis1cUIpCfXLtmlGolNLp2VEqhiB/PARNBIg=
github.com/mattn/go-sqlite3 v1.14.37/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
github.com/mattn/go-sqlite3 v1.14.42 h1:MigqEP4ZmHw3aIdIT7T+9TLa90Z6smwcthx+Azv4Cgo=
github.com/mattn/go-sqlite3 v1.14.42/go.mod h1:pjEuOr8IwzLJP2MfGeTb0A35jauH+C2kbHKBr7yXKVQ=
github.com/mattn/go-tty v0.0.0-20180219170247-931426f7535a/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE=
github.com/mattn/go-tty v0.0.3/go.mod h1:ihxohKRERHTVzN+aSVRwACLCeqIoZAWpoICkkvrWyR0=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
@@ -952,8 +952,8 @@ github.com/opencloud-eu/inotifywaitgo v0.0.0-20251111171128-a390bae3c5e9 h1:dIft
github.com/opencloud-eu/inotifywaitgo v0.0.0-20251111171128-a390bae3c5e9/go.mod h1:JWyDC6H+5oZRdUJUgKuaye+8Ph5hEs6HVzVoPKzWSGI=
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260310090739-853d972b282d h1:JcqGDiyrcaQwVyV861TUyQgO7uEmsjkhfm7aQd84dOw=
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260310090739-853d972b282d/go.mod h1:pzatilMEHZFT3qV7C/X3MqOa3NlRQuYhlRhZTL+hN6Q=
github.com/opencloud-eu/reva/v2 v2.43.0 h1:b7YazijK2K3O6MM7wsUxE2UmlRkrE8h3NUxIl5nxQmo=
github.com/opencloud-eu/reva/v2 v2.43.0/go.mod h1:iXbAo4xX1PFucJjFxMsFk7DlhnfAskAt5zV2eYUVJYE=
github.com/opencloud-eu/reva/v2 v2.43.1-0.20260424123852-c254710aa2af h1:o8zanHwKy+hmHj/4CUZNAH6o05lPR5lyDLIs4E5y9Ng=
github.com/opencloud-eu/reva/v2 v2.43.1-0.20260424123852-c254710aa2af/go.mod h1:msu4TkFw7Jxog0QRbGPxyQOJG9sago5nc+f//y+bbpI=
github.com/opencloud-eu/secure v0.0.0-20260312082735-b6f5cb2244e4 h1:l2oB/RctH+t8r7QBj5p8thfEHCM/jF35aAY3WQ3hADI=
github.com/opencloud-eu/secure v0.0.0-20260312082735-b6f5cb2244e4/go.mod h1:BmF5hyM6tXczk3MpQkFf1hpKSRqCyhqcbiQtiAF7+40=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
@@ -1556,8 +1556,8 @@ golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo=
golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI=
golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
-2
View File
@@ -1,5 +1,3 @@
//go:build ceph_preview
package cephfs
/*
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -142,6 +142,9 @@ type OpenInAppResponse struct {
// The url that user agents will render to clients.
// Usually the rendering happens by using HTML iframes or in separate browser tabs.
AppUrl *OpenInAppURL `protobuf:"bytes,3,opt,name=app_url,json=appUrl,proto3" json:"app_url,omitempty"`
// OPTIONAL.
// A reason in case the requested view_mode was overridden due to e.g. external locks.
ForcedViewModeReason string `protobuf:"bytes,4,opt,name=forced_view_mode_reason,json=forcedViewModeReason,proto3" json:"forced_view_mode_reason,omitempty"`
}
func (x *OpenInAppResponse) Reset() {
@@ -197,6 +200,13 @@ func (x *OpenInAppResponse) GetAppUrl() *OpenInAppURL {
return nil
}
func (x *OpenInAppResponse) GetForcedViewModeReason() string {
if x != nil {
return x.ForcedViewModeReason
}
return ""
}
var File_cs3_app_provider_v1beta1_provider_api_proto protoreflect.FileDescriptor
var file_cs3_app_provider_v1beta1_provider_api_proto_rawDesc = []byte{
@@ -229,7 +239,7 @@ var file_cs3_app_provider_v1beta1_provider_api_proto_rawDesc = []byte{
0x74, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x76, 0x69,
0x65, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73,
0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63,
0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xb8, 0x01, 0x0a, 0x11, 0x4f, 0x70,
0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xef, 0x01, 0x0a, 0x11, 0x4f, 0x70,
0x65, 0x6e, 0x49, 0x6e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x2f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x17, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
@@ -241,30 +251,34 @@ var file_cs3_app_provider_v1beta1_provider_api_proto_rawDesc = []byte{
0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70,
0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,
0x4f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x41, 0x70, 0x70, 0x55, 0x52, 0x4c, 0x52, 0x06, 0x61, 0x70,
0x70, 0x55, 0x72, 0x6c, 0x32, 0x73, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
0x41, 0x50, 0x49, 0x12, 0x64, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x41, 0x70, 0x70,
0x12, 0x2a, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69,
0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x6e,
0x49, 0x6e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x63,
0x73, 0x33, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e,
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x41, 0x70,
0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xfa, 0x01, 0x0a, 0x1c, 0x63, 0x6f,
0x6d, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64,
0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x10, 0x50, 0x72, 0x6f, 0x76,
0x69, 0x64, 0x65, 0x72, 0x41, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x73, 0x33, 0x6f, 0x72,
0x67, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x73, 0x33, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x73, 0x33,
0x2f, 0x61, 0x70, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x31,
0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x76, 0x31,
0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x50, 0xaa, 0x02, 0x18, 0x43, 0x73,
0x33, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x56,
0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x18, 0x43, 0x73, 0x33, 0x5c, 0x41, 0x70, 0x70,
0x5c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61,
0x31, 0xe2, 0x02, 0x24, 0x43, 0x73, 0x33, 0x5c, 0x41, 0x70, 0x70, 0x5c, 0x50, 0x72, 0x6f, 0x76,
0x69, 0x64, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42,
0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x43, 0x73, 0x33, 0x3a, 0x3a,
0x41, 0x70, 0x70, 0x3a, 0x3a, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x3a, 0x3a, 0x56,
0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x70, 0x55, 0x72, 0x6c, 0x12, 0x35, 0x0a, 0x17, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x5f, 0x76,
0x69, 0x65, 0x77, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18,
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x56, 0x69, 0x65,
0x77, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x32, 0x73, 0x0a, 0x0b, 0x50,
0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x41, 0x50, 0x49, 0x12, 0x64, 0x0a, 0x09, 0x4f, 0x70,
0x65, 0x6e, 0x49, 0x6e, 0x41, 0x70, 0x70, 0x12, 0x2a, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x61, 0x70,
0x70, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,
0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72,
0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f,
0x70, 0x65, 0x6e, 0x49, 0x6e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x42, 0xfa, 0x01, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x61, 0x70, 0x70,
0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
0x31, 0x42, 0x10, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x41, 0x70, 0x69, 0x50, 0x72,
0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
0x6d, 0x2f, 0x63, 0x73, 0x33, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x73, 0x33, 0x61,
0x70, 0x69, 0x73, 0x2f, 0x63, 0x73, 0x33, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x76,
0x69, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x70, 0x72, 0x6f,
0x76, 0x69, 0x64, 0x65, 0x72, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43,
0x41, 0x50, 0xaa, 0x02, 0x18, 0x43, 0x73, 0x33, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x50, 0x72, 0x6f,
0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x18,
0x43, 0x73, 0x33, 0x5c, 0x41, 0x70, 0x70, 0x5c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x24, 0x43, 0x73, 0x33, 0x5c, 0x41,
0x70, 0x70, 0x5c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x62, 0x65,
0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
0x02, 0x1b, 0x43, 0x73, 0x33, 0x3a, 0x3a, 0x41, 0x70, 0x70, 0x3a, 0x3a, 0x50, 0x72, 0x6f, 0x76,
0x69, 0x64, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
File diff suppressed because it is too large Load Diff
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -90,8 +90,8 @@ const (
GatewayAPI_ListStorageSpaces_FullMethodName = "/cs3.gateway.v1beta1.GatewayAPI/ListStorageSpaces"
GatewayAPI_UpdateStorageSpace_FullMethodName = "/cs3.gateway.v1beta1.GatewayAPI/UpdateStorageSpace"
GatewayAPI_DeleteStorageSpace_FullMethodName = "/cs3.gateway.v1beta1.GatewayAPI/DeleteStorageSpace"
GatewayAPI_AddFavorite_FullMethodName = "/cs3.gateway.v1beta1.GatewayAPI/AddFavorite"
GatewayAPI_RemoveFavorite_FullMethodName = "/cs3.gateway.v1beta1.GatewayAPI/RemoveFavorite"
GatewayAPI_AddLabel_FullMethodName = "/cs3.gateway.v1beta1.GatewayAPI/AddLabel"
GatewayAPI_RemoveLabel_FullMethodName = "/cs3.gateway.v1beta1.GatewayAPI/RemoveLabel"
GatewayAPI_OpenInApp_FullMethodName = "/cs3.gateway.v1beta1.GatewayAPI/OpenInApp"
GatewayAPI_CreateShare_FullMethodName = "/cs3.gateway.v1beta1.GatewayAPI/CreateShare"
GatewayAPI_RemoveShare_FullMethodName = "/cs3.gateway.v1beta1.GatewayAPI/RemoveShare"
@@ -294,10 +294,10 @@ type GatewayAPIClient interface {
UpdateStorageSpace(ctx context.Context, in *v1beta11.UpdateStorageSpaceRequest, opts ...grpc.CallOption) (*v1beta11.UpdateStorageSpaceResponse, error)
// Deletes a storage space.
DeleteStorageSpace(ctx context.Context, in *v1beta11.DeleteStorageSpaceRequest, opts ...grpc.CallOption) (*v1beta11.DeleteStorageSpaceResponse, error)
// Adds a resource as a favorite for a user.
AddFavorite(ctx context.Context, in *v1beta11.AddFavoriteRequest, opts ...grpc.CallOption) (*v1beta11.AddFavoriteResponse, error)
// Removes a resource from favorites for a user.
RemoveFavorite(ctx context.Context, in *v1beta11.RemoveFavoriteRequest, opts ...grpc.CallOption) (*v1beta11.RemoveFavoriteResponse, error)
// Attach a label to a resource for a user.
AddLabel(ctx context.Context, in *v1beta11.AddLabelRequest, opts ...grpc.CallOption) (*v1beta11.AddLabelResponse, error)
// Removes a label from a resource for a user.
RemoveLabel(ctx context.Context, in *v1beta11.RemoveLabelRequest, opts ...grpc.CallOption) (*v1beta11.RemoveLabelResponse, error)
// Returns the App URL and all necessary info to open a resource in an online editor.
// MUST return CODE_NOT_FOUND if the resource does not exist.
OpenInApp(ctx context.Context, in *OpenInAppRequest, opts ...grpc.CallOption) (*v1beta12.OpenInAppResponse, error)
@@ -858,18 +858,18 @@ func (c *gatewayAPIClient) DeleteStorageSpace(ctx context.Context, in *v1beta11.
return out, nil
}
func (c *gatewayAPIClient) AddFavorite(ctx context.Context, in *v1beta11.AddFavoriteRequest, opts ...grpc.CallOption) (*v1beta11.AddFavoriteResponse, error) {
out := new(v1beta11.AddFavoriteResponse)
err := c.cc.Invoke(ctx, GatewayAPI_AddFavorite_FullMethodName, in, out, opts...)
func (c *gatewayAPIClient) AddLabel(ctx context.Context, in *v1beta11.AddLabelRequest, opts ...grpc.CallOption) (*v1beta11.AddLabelResponse, error) {
out := new(v1beta11.AddLabelResponse)
err := c.cc.Invoke(ctx, GatewayAPI_AddLabel_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *gatewayAPIClient) RemoveFavorite(ctx context.Context, in *v1beta11.RemoveFavoriteRequest, opts ...grpc.CallOption) (*v1beta11.RemoveFavoriteResponse, error) {
out := new(v1beta11.RemoveFavoriteResponse)
err := c.cc.Invoke(ctx, GatewayAPI_RemoveFavorite_FullMethodName, in, out, opts...)
func (c *gatewayAPIClient) RemoveLabel(ctx context.Context, in *v1beta11.RemoveLabelRequest, opts ...grpc.CallOption) (*v1beta11.RemoveLabelResponse, error) {
out := new(v1beta11.RemoveLabelResponse)
err := c.cc.Invoke(ctx, GatewayAPI_RemoveLabel_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
@@ -1644,10 +1644,10 @@ type GatewayAPIServer interface {
UpdateStorageSpace(context.Context, *v1beta11.UpdateStorageSpaceRequest) (*v1beta11.UpdateStorageSpaceResponse, error)
// Deletes a storage space.
DeleteStorageSpace(context.Context, *v1beta11.DeleteStorageSpaceRequest) (*v1beta11.DeleteStorageSpaceResponse, error)
// Adds a resource as a favorite for a user.
AddFavorite(context.Context, *v1beta11.AddFavoriteRequest) (*v1beta11.AddFavoriteResponse, error)
// Removes a resource from favorites for a user.
RemoveFavorite(context.Context, *v1beta11.RemoveFavoriteRequest) (*v1beta11.RemoveFavoriteResponse, error)
// Attach a label to a resource for a user.
AddLabel(context.Context, *v1beta11.AddLabelRequest) (*v1beta11.AddLabelResponse, error)
// Removes a label from a resource for a user.
RemoveLabel(context.Context, *v1beta11.RemoveLabelRequest) (*v1beta11.RemoveLabelResponse, error)
// Returns the App URL and all necessary info to open a resource in an online editor.
// MUST return CODE_NOT_FOUND if the resource does not exist.
OpenInApp(context.Context, *OpenInAppRequest) (*v1beta12.OpenInAppResponse, error)
@@ -1948,11 +1948,11 @@ func (UnimplementedGatewayAPIServer) UpdateStorageSpace(context.Context, *v1beta
func (UnimplementedGatewayAPIServer) DeleteStorageSpace(context.Context, *v1beta11.DeleteStorageSpaceRequest) (*v1beta11.DeleteStorageSpaceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteStorageSpace not implemented")
}
func (UnimplementedGatewayAPIServer) AddFavorite(context.Context, *v1beta11.AddFavoriteRequest) (*v1beta11.AddFavoriteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddFavorite not implemented")
func (UnimplementedGatewayAPIServer) AddLabel(context.Context, *v1beta11.AddLabelRequest) (*v1beta11.AddLabelResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddLabel not implemented")
}
func (UnimplementedGatewayAPIServer) RemoveFavorite(context.Context, *v1beta11.RemoveFavoriteRequest) (*v1beta11.RemoveFavoriteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RemoveFavorite not implemented")
func (UnimplementedGatewayAPIServer) RemoveLabel(context.Context, *v1beta11.RemoveLabelRequest) (*v1beta11.RemoveLabelResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RemoveLabel not implemented")
}
func (UnimplementedGatewayAPIServer) OpenInApp(context.Context, *OpenInAppRequest) (*v1beta12.OpenInAppResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method OpenInApp not implemented")
@@ -2815,38 +2815,38 @@ func _GatewayAPI_DeleteStorageSpace_Handler(srv interface{}, ctx context.Context
return interceptor(ctx, in, info, handler)
}
func _GatewayAPI_AddFavorite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(v1beta11.AddFavoriteRequest)
func _GatewayAPI_AddLabel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(v1beta11.AddLabelRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GatewayAPIServer).AddFavorite(ctx, in)
return srv.(GatewayAPIServer).AddLabel(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: GatewayAPI_AddFavorite_FullMethodName,
FullMethod: GatewayAPI_AddLabel_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GatewayAPIServer).AddFavorite(ctx, req.(*v1beta11.AddFavoriteRequest))
return srv.(GatewayAPIServer).AddLabel(ctx, req.(*v1beta11.AddLabelRequest))
}
return interceptor(ctx, in, info, handler)
}
func _GatewayAPI_RemoveFavorite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(v1beta11.RemoveFavoriteRequest)
func _GatewayAPI_RemoveLabel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(v1beta11.RemoveLabelRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GatewayAPIServer).RemoveFavorite(ctx, in)
return srv.(GatewayAPIServer).RemoveLabel(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: GatewayAPI_RemoveFavorite_FullMethodName,
FullMethod: GatewayAPI_RemoveLabel_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GatewayAPIServer).RemoveFavorite(ctx, req.(*v1beta11.RemoveFavoriteRequest))
return srv.(GatewayAPIServer).RemoveLabel(ctx, req.(*v1beta11.RemoveLabelRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -4269,12 +4269,12 @@ var GatewayAPI_ServiceDesc = grpc.ServiceDesc{
Handler: _GatewayAPI_DeleteStorageSpace_Handler,
},
{
MethodName: "AddFavorite",
Handler: _GatewayAPI_AddFavorite_Handler,
MethodName: "AddLabel",
Handler: _GatewayAPI_AddLabel_Handler,
},
{
MethodName: "RemoveFavorite",
Handler: _GatewayAPI_RemoveFavorite_Handler,
MethodName: "RemoveLabel",
Handler: _GatewayAPI_RemoveLabel_Handler,
},
{
MethodName: "OpenInApp",
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
+125 -48
View File
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -116,6 +116,60 @@ func (UserType) EnumDescriptor() ([]byte, []int) {
return file_cs3_identity_user_v1beta1_resources_proto_rawDescGZIP(), []int{0}
}
// The status of a user.
type UserStatus int32
const (
// The user is active and allowed to log in.
UserStatus_USER_STATUS_ACTIVE UserStatus = 0
// The user can log in but its validity is about to expire.
// The actual grace period the user is granted depends on its tenant's policy.
UserStatus_USER_STATUS_EXPIRING UserStatus = 1
// The user is valid but it has been blocked from login in its tenant.
UserStatus_USER_STATUS_BLOCKED UserStatus = 2
)
// Enum value maps for UserStatus.
var (
UserStatus_name = map[int32]string{
0: "USER_STATUS_ACTIVE",
1: "USER_STATUS_EXPIRING",
2: "USER_STATUS_BLOCKED",
}
UserStatus_value = map[string]int32{
"USER_STATUS_ACTIVE": 0,
"USER_STATUS_EXPIRING": 1,
"USER_STATUS_BLOCKED": 2,
}
)
func (x UserStatus) Enum() *UserStatus {
p := new(UserStatus)
*p = x
return p
}
func (x UserStatus) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (UserStatus) Descriptor() protoreflect.EnumDescriptor {
return file_cs3_identity_user_v1beta1_resources_proto_enumTypes[1].Descriptor()
}
func (UserStatus) Type() protoreflect.EnumType {
return &file_cs3_identity_user_v1beta1_resources_proto_enumTypes[1]
}
func (x UserStatus) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use UserStatus.Descriptor instead.
func (UserStatus) EnumDescriptor() ([]byte, []int) {
return file_cs3_identity_user_v1beta1_resources_proto_rawDescGZIP(), []int{1}
}
// ExternalIdentity represents an external identifier of a user.
// This can be populated when multiple identities collapse onto
// the same user, for example when signing in with e-mail or with
@@ -306,6 +360,11 @@ type User struct {
// OPTIONAL.
// The group id of this user in the Unix world.
GidNumber int64 `protobuf:"varint,9,opt,name=gid_number,json=gidNumber,proto3" json:"gid_number,omitempty"`
// OPTIONAL.
// The status of this user in the tenant it belongs to.
// Useful for tenants implementing a users lifecycle,
// otherwise it defaults to ACTIVE.
Status UserStatus `protobuf:"varint,10,opt,name=status,proto3,enum=cs3.identity.user.v1beta1.UserStatus" json:"status,omitempty"`
}
func (x *User) Reset() {
@@ -403,6 +462,13 @@ func (x *User) GetGidNumber() int64 {
return 0
}
func (x *User) GetStatus() UserStatus {
if x != nil {
return x.Status
}
return UserStatus_USER_STATUS_ACTIVE
}
var File_cs3_identity_user_v1beta1_resources_proto protoreflect.FileDescriptor
var file_cs3_identity_user_v1beta1_resources_proto_rawDesc = []byte{
@@ -431,7 +497,7 @@ var file_cs3_identity_user_v1beta1_resources_proto_rawDesc = []byte{
0x74, 0x69, 0x74, 0x79, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
0x31, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69,
0x74, 0x79, 0x52, 0x12, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x65, 0x6e,
0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0xba, 0x02, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12,
0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0xf9, 0x02, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12,
0x31, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x73,
0x33, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e,
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x02,
@@ -451,38 +517,47 @@ var file_cs3_identity_user_v1beta1_resources_proto_rawDesc = []byte{
0x62, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x69, 0x64, 0x4e, 0x75,
0x6d, 0x62, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x64, 0x5f, 0x6e, 0x75, 0x6d, 0x62,
0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x67, 0x69, 0x64, 0x4e, 0x75, 0x6d,
0x62, 0x65, 0x72, 0x2a, 0xe7, 0x01, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65,
0x12, 0x15, 0x0a, 0x11, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e,
0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x55, 0x53, 0x45, 0x52, 0x5f,
0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x52, 0x49, 0x4d, 0x41, 0x52, 0x59, 0x10, 0x01, 0x12, 0x17,
0x0a, 0x13, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x43, 0x4f,
0x4e, 0x44, 0x41, 0x52, 0x59, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x55, 0x53, 0x45, 0x52, 0x5f,
0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x03, 0x12, 0x19,
0x0a, 0x15, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x50, 0x50, 0x4c,
0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x53, 0x45,
0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x55, 0x45, 0x53, 0x54, 0x10, 0x05, 0x12, 0x17,
0x0a, 0x13, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x45, 0x44, 0x45,
0x52, 0x41, 0x54, 0x45, 0x44, 0x10, 0x06, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x53, 0x45, 0x52, 0x5f,
0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x57, 0x45, 0x49, 0x47, 0x48, 0x54,
0x10, 0x07, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f,
0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x10, 0x08, 0x42, 0xfa, 0x01,
0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69,
0x74, 0x79, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42,
0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x73,
0x33, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x73, 0x33, 0x61, 0x70, 0x69, 0x73, 0x2f,
0x63, 0x73, 0x33, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x75, 0x73, 0x65,
0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x76, 0x31,
0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x49, 0x55, 0xaa, 0x02, 0x19, 0x43, 0x73,
0x33, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e,
0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x19, 0x43, 0x73, 0x33, 0x5c, 0x49, 0x64,
0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x62, 0x65,
0x74, 0x61, 0x31, 0xe2, 0x02, 0x25, 0x43, 0x73, 0x33, 0x5c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69,
0x74, 0x79, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c,
0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x43, 0x73,
0x33, 0x3a, 0x3a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x3a, 0x3a, 0x55, 0x73, 0x65,
0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
0x62, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0a, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69,
0x74, 0x79, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,
0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74,
0x75, 0x73, 0x2a, 0xe7, 0x01, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12,
0x15, 0x0a, 0x11, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x56,
0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54,
0x59, 0x50, 0x45, 0x5f, 0x50, 0x52, 0x49, 0x4d, 0x41, 0x52, 0x59, 0x10, 0x01, 0x12, 0x17, 0x0a,
0x13, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e,
0x44, 0x41, 0x52, 0x59, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54,
0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x03, 0x12, 0x19, 0x0a,
0x15, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x50, 0x50, 0x4c, 0x49,
0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x53, 0x45, 0x52,
0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x55, 0x45, 0x53, 0x54, 0x10, 0x05, 0x12, 0x17, 0x0a,
0x13, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x45, 0x44, 0x45, 0x52,
0x41, 0x54, 0x45, 0x44, 0x10, 0x06, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54,
0x59, 0x50, 0x45, 0x5f, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x57, 0x45, 0x49, 0x47, 0x48, 0x54, 0x10,
0x07, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53,
0x50, 0x41, 0x43, 0x45, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x10, 0x08, 0x2a, 0x57, 0x0a, 0x0a,
0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x55, 0x53,
0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45,
0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55,
0x53, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13,
0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x42, 0x4c, 0x4f, 0x43,
0x4b, 0x45, 0x44, 0x10, 0x02, 0x42, 0xfa, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x73,
0x33, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e,
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x73, 0x33, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x6f, 0x2d,
0x63, 0x73, 0x33, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x73, 0x33, 0x2f, 0x69, 0x64, 0x65, 0x6e,
0x74, 0x69, 0x74, 0x79, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
0x31, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03,
0x43, 0x49, 0x55, 0xaa, 0x02, 0x19, 0x43, 0x73, 0x33, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69,
0x74, 0x79, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca,
0x02, 0x19, 0x43, 0x73, 0x33, 0x5c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5c, 0x55,
0x73, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x25, 0x43, 0x73,
0x33, 0x5c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c,
0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x43, 0x73, 0x33, 0x3a, 0x3a, 0x49, 0x64, 0x65, 0x6e, 0x74,
0x69, 0x74, 0x79, 0x3a, 0x3a, 0x55, 0x73, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74,
0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -497,25 +572,27 @@ func file_cs3_identity_user_v1beta1_resources_proto_rawDescGZIP() []byte {
return file_cs3_identity_user_v1beta1_resources_proto_rawDescData
}
var file_cs3_identity_user_v1beta1_resources_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_cs3_identity_user_v1beta1_resources_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_cs3_identity_user_v1beta1_resources_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_cs3_identity_user_v1beta1_resources_proto_goTypes = []interface{}{
(UserType)(0), // 0: cs3.identity.user.v1beta1.UserType
(*ExternalIdentity)(nil), // 1: cs3.identity.user.v1beta1.ExternalIdentity
(*UserId)(nil), // 2: cs3.identity.user.v1beta1.UserId
(*User)(nil), // 3: cs3.identity.user.v1beta1.User
(*v1beta1.Opaque)(nil), // 4: cs3.types.v1beta1.Opaque
(UserStatus)(0), // 1: cs3.identity.user.v1beta1.UserStatus
(*ExternalIdentity)(nil), // 2: cs3.identity.user.v1beta1.ExternalIdentity
(*UserId)(nil), // 3: cs3.identity.user.v1beta1.UserId
(*User)(nil), // 4: cs3.identity.user.v1beta1.User
(*v1beta1.Opaque)(nil), // 5: cs3.types.v1beta1.Opaque
}
var file_cs3_identity_user_v1beta1_resources_proto_depIdxs = []int32{
0, // 0: cs3.identity.user.v1beta1.UserId.type:type_name -> cs3.identity.user.v1beta1.UserType
1, // 1: cs3.identity.user.v1beta1.UserId.external_identities:type_name -> cs3.identity.user.v1beta1.ExternalIdentity
2, // 2: cs3.identity.user.v1beta1.User.id:type_name -> cs3.identity.user.v1beta1.UserId
4, // 3: cs3.identity.user.v1beta1.User.opaque:type_name -> cs3.types.v1beta1.Opaque
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
2, // 1: cs3.identity.user.v1beta1.UserId.external_identities:type_name -> cs3.identity.user.v1beta1.ExternalIdentity
3, // 2: cs3.identity.user.v1beta1.User.id:type_name -> cs3.identity.user.v1beta1.UserId
5, // 3: cs3.identity.user.v1beta1.User.opaque:type_name -> cs3.types.v1beta1.Opaque
1, // 4: cs3.identity.user.v1beta1.User.status:type_name -> cs3.identity.user.v1beta1.UserStatus
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_cs3_identity_user_v1beta1_resources_proto_init() }
@@ -566,7 +643,7 @@ func file_cs3_identity_user_v1beta1_resources_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_cs3_identity_user_v1beta1_resources_proto_rawDesc,
NumEnums: 1,
NumEnums: 2,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -116,21 +116,26 @@ const (
Filter_TYPE_SPACE_ID Filter_Type = 7
Filter_TYPE_STATE Filter_Type = 8
Filter_TYPE_GRANTEE Filter_Type = 9
// Filter shares by whether the shared resource is a space root.
// When the term `space_root` is true, only shares on space roots are returned.
// When false, shares on space roots are excluded.
Filter_TYPE_SPACE_ROOT Filter_Type = 10
)
// Enum value maps for Filter_Type.
var (
Filter_Type_name = map[int32]string{
0: "TYPE_INVALID",
1: "TYPE_NO",
2: "TYPE_RESOURCE_ID",
3: "TYPE_OWNER",
4: "TYPE_CREATOR",
5: "TYPE_GRANTEE_TYPE",
6: "TYPE_EXCLUDE_DENIALS",
7: "TYPE_SPACE_ID",
8: "TYPE_STATE",
9: "TYPE_GRANTEE",
0: "TYPE_INVALID",
1: "TYPE_NO",
2: "TYPE_RESOURCE_ID",
3: "TYPE_OWNER",
4: "TYPE_CREATOR",
5: "TYPE_GRANTEE_TYPE",
6: "TYPE_EXCLUDE_DENIALS",
7: "TYPE_SPACE_ID",
8: "TYPE_STATE",
9: "TYPE_GRANTEE",
10: "TYPE_SPACE_ROOT",
}
Filter_Type_value = map[string]int32{
"TYPE_INVALID": 0,
@@ -143,6 +148,7 @@ var (
"TYPE_SPACE_ID": 7,
"TYPE_STATE": 8,
"TYPE_GRANTEE": 9,
"TYPE_SPACE_ROOT": 10,
}
)
@@ -773,6 +779,7 @@ type Filter struct {
// *Filter_SpaceId
// *Filter_State
// *Filter_Grantee
// *Filter_SpaceRoot
Term isFilter_Term `protobuf_oneof:"term"`
}
@@ -871,6 +878,13 @@ func (x *Filter) GetGrantee() *v1beta1.Grantee {
return nil
}
func (x *Filter) GetSpaceRoot() bool {
if x, ok := x.GetTerm().(*Filter_SpaceRoot); ok {
return x.SpaceRoot
}
return false
}
type isFilter_Term interface {
isFilter_Term()
}
@@ -903,6 +917,11 @@ type Filter_Grantee struct {
Grantee *v1beta1.Grantee `protobuf:"bytes,9,opt,name=grantee,proto3,oneof"`
}
type Filter_SpaceRoot struct {
// Used with TYPE_SPACE_ROOT.
SpaceRoot bool `protobuf:"varint,10,opt,name=space_root,json=spaceRoot,proto3,oneof"`
}
func (*Filter_ResourceId) isFilter_Term() {}
func (*Filter_Owner) isFilter_Term() {}
@@ -917,6 +936,8 @@ func (*Filter_State) isFilter_Term() {}
func (*Filter_Grantee) isFilter_Term() {}
func (*Filter_SpaceRoot) isFilter_Term() {}
var File_cs3_sharing_collaboration_v1beta1_resources_proto protoreflect.FileDescriptor
var file_cs3_sharing_collaboration_v1beta1_resources_proto_rawDesc = []byte{
@@ -1034,7 +1055,7 @@ var file_cs3_sharing_collaboration_v1beta1_resources_proto_rawDesc = []byte{
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63,
0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd8, 0x05, 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8e, 0x06, 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65,
0x72, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x2e, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f,
0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65,
@@ -1067,47 +1088,50 @@ var file_cs3_sharing_collaboration_v1beta1_resources_proto_rawDesc = []byte{
0x0b, 0x32, 0x25, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x48, 0x00, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e,
0x74, 0x65, 0x65, 0x22, 0xc3, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c,
0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0b,
0x0a, 0x07, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x4f, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x54,
0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x49, 0x44, 0x10,
0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x10,
0x03, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x4f,
0x52, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x52, 0x41, 0x4e,
0x54, 0x45, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x59,
0x50, 0x45, 0x5f, 0x45, 0x58, 0x43, 0x4c, 0x55, 0x44, 0x45, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x41,
0x4c, 0x53, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x50, 0x41,
0x43, 0x45, 0x5f, 0x49, 0x44, 0x10, 0x07, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f,
0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x08, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f,
0x47, 0x52, 0x41, 0x4e, 0x54, 0x45, 0x45, 0x10, 0x09, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x65, 0x72,
0x6d, 0x2a, 0x72, 0x0a, 0x0a, 0x53, 0x68, 0x61, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12,
0x17, 0x0a, 0x13, 0x53, 0x48, 0x41, 0x52, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x49,
0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x48, 0x41, 0x52,
0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10,
0x01, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x48, 0x41, 0x52, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45,
0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x53,
0x48, 0x41, 0x52, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43,
0x54, 0x45, 0x44, 0x10, 0x03, 0x42, 0xb3, 0x02, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x73,
0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62,
0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42,
0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x73,
0x33, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x73, 0x33, 0x61, 0x70, 0x69, 0x73, 0x2f,
0x63, 0x73, 0x33, 0x2f, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x63, 0x6f, 0x6c, 0x6c,
0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
0x31, 0x3b, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x76,
0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x43, 0xaa, 0x02, 0x21, 0x43,
0x73, 0x33, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x61,
0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
0xca, 0x02, 0x21, 0x43, 0x73, 0x33, 0x5c, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x43,
0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x62,
0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x2d, 0x43, 0x73, 0x33, 0x5c, 0x53, 0x68, 0x61, 0x72, 0x69,
0x6e, 0x67, 0x5c, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x24, 0x43, 0x73, 0x33, 0x3a, 0x3a, 0x53, 0x68, 0x61, 0x72,
0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
0x74, 0x65, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x72, 0x6f, 0x6f,
0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x73, 0x70, 0x61, 0x63, 0x65,
0x52, 0x6f, 0x6f, 0x74, 0x22, 0xd8, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a,
0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12,
0x0b, 0x0a, 0x07, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x4f, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10,
0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x49, 0x44,
0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52,
0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54,
0x4f, 0x52, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x52, 0x41,
0x4e, 0x54, 0x45, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x54,
0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x43, 0x4c, 0x55, 0x44, 0x45, 0x5f, 0x44, 0x45, 0x4e, 0x49,
0x41, 0x4c, 0x53, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x50,
0x41, 0x43, 0x45, 0x5f, 0x49, 0x44, 0x10, 0x07, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45,
0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x08, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45,
0x5f, 0x47, 0x52, 0x41, 0x4e, 0x54, 0x45, 0x45, 0x10, 0x09, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x59,
0x50, 0x45, 0x5f, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x52, 0x4f, 0x4f, 0x54, 0x10, 0x0a, 0x42,
0x06, 0x0a, 0x04, 0x74, 0x65, 0x72, 0x6d, 0x2a, 0x72, 0x0a, 0x0a, 0x53, 0x68, 0x61, 0x72, 0x65,
0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x48, 0x41, 0x52, 0x45, 0x5f, 0x53,
0x54, 0x41, 0x54, 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x17,
0x0a, 0x13, 0x53, 0x48, 0x41, 0x52, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x45,
0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x48, 0x41, 0x52, 0x45,
0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x10,
0x02, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x48, 0x41, 0x52, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45,
0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x03, 0x42, 0xb3, 0x02, 0x0a, 0x25,
0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e,
0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31,
0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x73, 0x33, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x73,
0x33, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x73, 0x33, 0x2f, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e,
0x67, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43,
0x53, 0x43, 0xaa, 0x02, 0x21, 0x43, 0x73, 0x33, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67,
0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56,
0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x21, 0x43, 0x73, 0x33, 0x5c, 0x53, 0x68, 0x61,
0x72, 0x69, 0x6e, 0x67, 0x5c, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x2d, 0x43, 0x73, 0x33,
0x5c, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47,
0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x24, 0x43, 0x73, 0x33,
0x3a, 0x3a, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x43, 0x6f, 0x6c, 0x6c, 0x61,
0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61,
0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -1294,6 +1318,7 @@ func file_cs3_sharing_collaboration_v1beta1_resources_proto_init() {
(*Filter_SpaceId)(nil),
(*Filter_State)(nil),
(*Filter_Grantee)(nil),
(*Filter_SpaceRoot)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -4700,7 +4700,7 @@ func (x *CreateHomeResponse) GetOpaque() *v1beta1.Opaque {
return nil
}
type AddFavoriteRequest struct {
type AddLabelRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@@ -4712,12 +4712,15 @@ type AddFavoriteRequest struct {
// The reference to which the action should be performed.
Ref *Reference `protobuf:"bytes,2,opt,name=ref,proto3" json:"ref,omitempty"`
// REQUIRED.
// The user marking the resource as favorite.
// The user attaching the label to the resource.
UserId *v1beta12.UserId `protobuf:"bytes,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
// REQUIRED.
// The label to be attached to the resource.
Label string `protobuf:"bytes,4,opt,name=label,proto3" json:"label,omitempty"`
}
func (x *AddFavoriteRequest) Reset() {
*x = AddFavoriteRequest{}
func (x *AddLabelRequest) Reset() {
*x = AddLabelRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_cs3_storage_provider_v1beta1_provider_api_proto_msgTypes[64]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -4725,13 +4728,13 @@ func (x *AddFavoriteRequest) Reset() {
}
}
func (x *AddFavoriteRequest) String() string {
func (x *AddLabelRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AddFavoriteRequest) ProtoMessage() {}
func (*AddLabelRequest) ProtoMessage() {}
func (x *AddFavoriteRequest) ProtoReflect() protoreflect.Message {
func (x *AddLabelRequest) ProtoReflect() protoreflect.Message {
mi := &file_cs3_storage_provider_v1beta1_provider_api_proto_msgTypes[64]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -4743,33 +4746,40 @@ func (x *AddFavoriteRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use AddFavoriteRequest.ProtoReflect.Descriptor instead.
func (*AddFavoriteRequest) Descriptor() ([]byte, []int) {
// Deprecated: Use AddLabelRequest.ProtoReflect.Descriptor instead.
func (*AddLabelRequest) Descriptor() ([]byte, []int) {
return file_cs3_storage_provider_v1beta1_provider_api_proto_rawDescGZIP(), []int{64}
}
func (x *AddFavoriteRequest) GetOpaque() *v1beta1.Opaque {
func (x *AddLabelRequest) GetOpaque() *v1beta1.Opaque {
if x != nil {
return x.Opaque
}
return nil
}
func (x *AddFavoriteRequest) GetRef() *Reference {
func (x *AddLabelRequest) GetRef() *Reference {
if x != nil {
return x.Ref
}
return nil
}
func (x *AddFavoriteRequest) GetUserId() *v1beta12.UserId {
func (x *AddLabelRequest) GetUserId() *v1beta12.UserId {
if x != nil {
return x.UserId
}
return nil
}
type AddFavoriteResponse struct {
func (x *AddLabelRequest) GetLabel() string {
if x != nil {
return x.Label
}
return ""
}
type AddLabelResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@@ -4782,8 +4792,8 @@ type AddFavoriteResponse struct {
Opaque *v1beta1.Opaque `protobuf:"bytes,2,opt,name=opaque,proto3" json:"opaque,omitempty"`
}
func (x *AddFavoriteResponse) Reset() {
*x = AddFavoriteResponse{}
func (x *AddLabelResponse) Reset() {
*x = AddLabelResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_cs3_storage_provider_v1beta1_provider_api_proto_msgTypes[65]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -4791,13 +4801,13 @@ func (x *AddFavoriteResponse) Reset() {
}
}
func (x *AddFavoriteResponse) String() string {
func (x *AddLabelResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AddFavoriteResponse) ProtoMessage() {}
func (*AddLabelResponse) ProtoMessage() {}
func (x *AddFavoriteResponse) ProtoReflect() protoreflect.Message {
func (x *AddLabelResponse) ProtoReflect() protoreflect.Message {
mi := &file_cs3_storage_provider_v1beta1_provider_api_proto_msgTypes[65]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -4809,26 +4819,26 @@ func (x *AddFavoriteResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use AddFavoriteResponse.ProtoReflect.Descriptor instead.
func (*AddFavoriteResponse) Descriptor() ([]byte, []int) {
// Deprecated: Use AddLabelResponse.ProtoReflect.Descriptor instead.
func (*AddLabelResponse) Descriptor() ([]byte, []int) {
return file_cs3_storage_provider_v1beta1_provider_api_proto_rawDescGZIP(), []int{65}
}
func (x *AddFavoriteResponse) GetStatus() *v1beta11.Status {
func (x *AddLabelResponse) GetStatus() *v1beta11.Status {
if x != nil {
return x.Status
}
return nil
}
func (x *AddFavoriteResponse) GetOpaque() *v1beta1.Opaque {
func (x *AddLabelResponse) GetOpaque() *v1beta1.Opaque {
if x != nil {
return x.Opaque
}
return nil
}
type RemoveFavoriteRequest struct {
type RemoveLabelRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@@ -4840,12 +4850,15 @@ type RemoveFavoriteRequest struct {
// The reference to which the action should be performed.
Ref *Reference `protobuf:"bytes,2,opt,name=ref,proto3" json:"ref,omitempty"`
// REQUIRED.
// The user un-marking the resource as favorite.
// The user removing the label from the resource.
UserId *v1beta12.UserId `protobuf:"bytes,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
// REQUIRED.
// The label to be removed from the resource.
Label string `protobuf:"bytes,4,opt,name=label,proto3" json:"label,omitempty"`
}
func (x *RemoveFavoriteRequest) Reset() {
*x = RemoveFavoriteRequest{}
func (x *RemoveLabelRequest) Reset() {
*x = RemoveLabelRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_cs3_storage_provider_v1beta1_provider_api_proto_msgTypes[66]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -4853,13 +4866,13 @@ func (x *RemoveFavoriteRequest) Reset() {
}
}
func (x *RemoveFavoriteRequest) String() string {
func (x *RemoveLabelRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RemoveFavoriteRequest) ProtoMessage() {}
func (*RemoveLabelRequest) ProtoMessage() {}
func (x *RemoveFavoriteRequest) ProtoReflect() protoreflect.Message {
func (x *RemoveLabelRequest) ProtoReflect() protoreflect.Message {
mi := &file_cs3_storage_provider_v1beta1_provider_api_proto_msgTypes[66]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -4871,33 +4884,40 @@ func (x *RemoveFavoriteRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use RemoveFavoriteRequest.ProtoReflect.Descriptor instead.
func (*RemoveFavoriteRequest) Descriptor() ([]byte, []int) {
// Deprecated: Use RemoveLabelRequest.ProtoReflect.Descriptor instead.
func (*RemoveLabelRequest) Descriptor() ([]byte, []int) {
return file_cs3_storage_provider_v1beta1_provider_api_proto_rawDescGZIP(), []int{66}
}
func (x *RemoveFavoriteRequest) GetOpaque() *v1beta1.Opaque {
func (x *RemoveLabelRequest) GetOpaque() *v1beta1.Opaque {
if x != nil {
return x.Opaque
}
return nil
}
func (x *RemoveFavoriteRequest) GetRef() *Reference {
func (x *RemoveLabelRequest) GetRef() *Reference {
if x != nil {
return x.Ref
}
return nil
}
func (x *RemoveFavoriteRequest) GetUserId() *v1beta12.UserId {
func (x *RemoveLabelRequest) GetUserId() *v1beta12.UserId {
if x != nil {
return x.UserId
}
return nil
}
type RemoveFavoriteResponse struct {
func (x *RemoveLabelRequest) GetLabel() string {
if x != nil {
return x.Label
}
return ""
}
type RemoveLabelResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@@ -4910,8 +4930,8 @@ type RemoveFavoriteResponse struct {
Opaque *v1beta1.Opaque `protobuf:"bytes,2,opt,name=opaque,proto3" json:"opaque,omitempty"`
}
func (x *RemoveFavoriteResponse) Reset() {
*x = RemoveFavoriteResponse{}
func (x *RemoveLabelResponse) Reset() {
*x = RemoveLabelResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_cs3_storage_provider_v1beta1_provider_api_proto_msgTypes[67]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -4919,13 +4939,13 @@ func (x *RemoveFavoriteResponse) Reset() {
}
}
func (x *RemoveFavoriteResponse) String() string {
func (x *RemoveLabelResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RemoveFavoriteResponse) ProtoMessage() {}
func (*RemoveLabelResponse) ProtoMessage() {}
func (x *RemoveFavoriteResponse) ProtoReflect() protoreflect.Message {
func (x *RemoveLabelResponse) ProtoReflect() protoreflect.Message {
mi := &file_cs3_storage_provider_v1beta1_provider_api_proto_msgTypes[67]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -4937,19 +4957,19 @@ func (x *RemoveFavoriteResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use RemoveFavoriteResponse.ProtoReflect.Descriptor instead.
func (*RemoveFavoriteResponse) Descriptor() ([]byte, []int) {
// Deprecated: Use RemoveLabelResponse.ProtoReflect.Descriptor instead.
func (*RemoveLabelResponse) Descriptor() ([]byte, []int) {
return file_cs3_storage_provider_v1beta1_provider_api_proto_rawDescGZIP(), []int{67}
}
func (x *RemoveFavoriteResponse) GetStatus() *v1beta11.Status {
func (x *RemoveLabelResponse) GetStatus() *v1beta11.Status {
if x != nil {
return x.Status
}
return nil
}
func (x *RemoveFavoriteResponse) GetOpaque() *v1beta1.Opaque {
func (x *RemoveLabelResponse) GetOpaque() *v1beta1.Opaque {
if x != nil {
return x.Opaque
}
@@ -5698,47 +5718,49 @@ var file_cs3_storage_provider_v1beta1_provider_api_proto_rawDesc = []byte{
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, 0x0a, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79,
0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x61, 0x71,
0x75, 0x65, 0x52, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x22, 0xbe, 0x01, 0x0a, 0x12, 0x41,
0x64, 0x64, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x31, 0x0a, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x19, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31,
0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x52, 0x06, 0x6f, 0x70,
0x61, 0x71, 0x75, 0x65, 0x12, 0x39, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x27, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x03, 0x72, 0x65, 0x66, 0x12,
0x3a, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x21, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e,
0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65,
0x72, 0x49, 0x64, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x79, 0x0a, 0x13, 0x41,
0x64, 0x64, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x75, 0x65, 0x52, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x22, 0xd1, 0x01, 0x0a, 0x0f, 0x41,
0x64, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31,
0x0a, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,
0x61, 0x31, 0x2e, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x52, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75,
0x65, 0x12, 0x39, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27,
0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65,
0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, 0x3a, 0x0a, 0x07,
0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e,
0x63, 0x73, 0x33, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x75, 0x73, 0x65,
0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64,
0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65,
0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x76,
0x0a, 0x10, 0x41, 0x64, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x62,
0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61,
0x74, 0x75, 0x73, 0x12, 0x31, 0x0a, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e,
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x52, 0x06,
0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x22, 0xc1, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x6d, 0x6f, 0x76,
0x65, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x31, 0x0a, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x19, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x62,
0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x52, 0x06, 0x6f, 0x70, 0x61,
0x71, 0x75, 0x65, 0x12, 0x39, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x27, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,
0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, 0x3a,
0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x21, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x75,
0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72,
0x49, 0x64, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x7c, 0x0a, 0x16, 0x52, 0x65,
0x6d, 0x6f, 0x76, 0x65, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x22, 0xd4, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x76,
0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a,
0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
0x63, 0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
0x31, 0x2e, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x52, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65,
0x12, 0x39, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e,
0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76,
0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x66,
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, 0x3a, 0x0a, 0x07, 0x75,
0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63,
0x73, 0x33, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x75, 0x73, 0x65, 0x72,
0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52,
0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c,
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x79, 0x0a,
0x13, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76,
0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73,
0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, 0x0a, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65,
0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65,
0x52, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x32, 0xe5, 0x1f, 0x0a, 0x0b, 0x50, 0x72, 0x6f,
0x52, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x32, 0xd3, 0x1f, 0x0a, 0x0b, 0x50, 0x72, 0x6f,
0x76, 0x69, 0x64, 0x65, 0x72, 0x41, 0x50, 0x49, 0x12, 0x69, 0x0a, 0x08, 0x41, 0x64, 0x64, 0x47,
0x72, 0x61, 0x6e, 0x74, 0x12, 0x2d, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61,
0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65,
@@ -5978,39 +6000,38 @@ var file_cs3_storage_provider_v1beta1_provider_api_proto_rawDesc = []byte{
0x1a, 0x2d, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,
0x47, 0x65, 0x74, 0x48, 0x6f, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x72, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x12, 0x30,
0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64,
0x64, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x31, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,
0x41, 0x64, 0x64, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x7b, 0x0a, 0x0e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x46, 0x61, 0x76,
0x6f, 0x72, 0x69, 0x74, 0x65, 0x12, 0x33, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72,
0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62,
0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x46, 0x61, 0x76, 0x6f, 0x72,
0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x73, 0x33,
0x69, 0x0a, 0x08, 0x41, 0x64, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x2d, 0x2e, 0x63, 0x73,
0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64,
0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4c, 0x61,
0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, 0x73, 0x33,
0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65,
0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x42, 0x92, 0x02, 0x0a, 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f,
0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31,
0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x10, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x41,
0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x73, 0x33, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x6f, 0x2d,
0x63, 0x73, 0x33, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x73, 0x33, 0x2f, 0x73, 0x74, 0x6f, 0x72,
0x61, 0x67, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62,
0x65, 0x74, 0x61, 0x31, 0x3b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x76, 0x31, 0x62,
0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x50, 0xaa, 0x02, 0x1c, 0x43, 0x73, 0x33,
0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
0x72, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x1c, 0x43, 0x73, 0x33, 0x5c,
0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x28, 0x43, 0x73, 0x33, 0x5c, 0x53,
0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5c,
0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0xea, 0x02, 0x1f, 0x43, 0x73, 0x33, 0x3a, 0x3a, 0x53, 0x74, 0x6f, 0x72, 0x61,
0x67, 0x65, 0x3a, 0x3a, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31,
0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4c, 0x61, 0x62,
0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x0b, 0x52, 0x65,
0x6d, 0x6f, 0x76, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x30, 0x2e, 0x63, 0x73, 0x33, 0x2e,
0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4c,
0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x73,
0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64,
0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76,
0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x92,
0x02, 0x0a, 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61,
0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65,
0x74, 0x61, 0x31, 0x42, 0x10, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x41, 0x70, 0x69,
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x73, 0x33, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x73,
0x33, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x73, 0x33, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
0x65, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74,
0x61, 0x31, 0x3b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x76, 0x31, 0x62, 0x65, 0x74,
0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x50, 0xaa, 0x02, 0x1c, 0x43, 0x73, 0x33, 0x2e, 0x53,
0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e,
0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x1c, 0x43, 0x73, 0x33, 0x5c, 0x53, 0x74,
0x6f, 0x72, 0x61, 0x67, 0x65, 0x5c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5c, 0x56,
0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x28, 0x43, 0x73, 0x33, 0x5c, 0x53, 0x74, 0x6f,
0x72, 0x61, 0x67, 0x65, 0x5c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5c, 0x56, 0x31,
0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
0x61, 0xea, 0x02, 0x1f, 0x43, 0x73, 0x33, 0x3a, 0x3a, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
0x3a, 0x3a, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65,
0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -6091,10 +6112,10 @@ var file_cs3_storage_provider_v1beta1_provider_api_proto_goTypes = []interface{}
(*UnlockResponse)(nil), // 61: cs3.storage.provider.v1beta1.UnlockResponse
(*CreateHomeRequest)(nil), // 62: cs3.storage.provider.v1beta1.CreateHomeRequest
(*CreateHomeResponse)(nil), // 63: cs3.storage.provider.v1beta1.CreateHomeResponse
(*AddFavoriteRequest)(nil), // 64: cs3.storage.provider.v1beta1.AddFavoriteRequest
(*AddFavoriteResponse)(nil), // 65: cs3.storage.provider.v1beta1.AddFavoriteResponse
(*RemoveFavoriteRequest)(nil), // 66: cs3.storage.provider.v1beta1.RemoveFavoriteRequest
(*RemoveFavoriteResponse)(nil), // 67: cs3.storage.provider.v1beta1.RemoveFavoriteResponse
(*AddLabelRequest)(nil), // 64: cs3.storage.provider.v1beta1.AddLabelRequest
(*AddLabelResponse)(nil), // 65: cs3.storage.provider.v1beta1.AddLabelResponse
(*RemoveLabelRequest)(nil), // 66: cs3.storage.provider.v1beta1.RemoveLabelRequest
(*RemoveLabelResponse)(nil), // 67: cs3.storage.provider.v1beta1.RemoveLabelResponse
(*v1beta1.Opaque)(nil), // 68: cs3.types.v1beta1.Opaque
(*v1beta11.Status)(nil), // 69: cs3.rpc.v1beta1.Status
(*Reference)(nil), // 70: cs3.storage.provider.v1beta1.Reference
@@ -6269,16 +6290,16 @@ var file_cs3_storage_provider_v1beta1_provider_api_proto_depIdxs = []int32{
83, // 152: cs3.storage.provider.v1beta1.CreateHomeRequest.quota:type_name -> cs3.storage.provider.v1beta1.Quota
69, // 153: cs3.storage.provider.v1beta1.CreateHomeResponse.status:type_name -> cs3.rpc.v1beta1.Status
68, // 154: cs3.storage.provider.v1beta1.CreateHomeResponse.opaque:type_name -> cs3.types.v1beta1.Opaque
68, // 155: cs3.storage.provider.v1beta1.AddFavoriteRequest.opaque:type_name -> cs3.types.v1beta1.Opaque
70, // 156: cs3.storage.provider.v1beta1.AddFavoriteRequest.ref:type_name -> cs3.storage.provider.v1beta1.Reference
84, // 157: cs3.storage.provider.v1beta1.AddFavoriteRequest.user_id:type_name -> cs3.identity.user.v1beta1.UserId
69, // 158: cs3.storage.provider.v1beta1.AddFavoriteResponse.status:type_name -> cs3.rpc.v1beta1.Status
68, // 159: cs3.storage.provider.v1beta1.AddFavoriteResponse.opaque:type_name -> cs3.types.v1beta1.Opaque
68, // 160: cs3.storage.provider.v1beta1.RemoveFavoriteRequest.opaque:type_name -> cs3.types.v1beta1.Opaque
70, // 161: cs3.storage.provider.v1beta1.RemoveFavoriteRequest.ref:type_name -> cs3.storage.provider.v1beta1.Reference
84, // 162: cs3.storage.provider.v1beta1.RemoveFavoriteRequest.user_id:type_name -> cs3.identity.user.v1beta1.UserId
69, // 163: cs3.storage.provider.v1beta1.RemoveFavoriteResponse.status:type_name -> cs3.rpc.v1beta1.Status
68, // 164: cs3.storage.provider.v1beta1.RemoveFavoriteResponse.opaque:type_name -> cs3.types.v1beta1.Opaque
68, // 155: cs3.storage.provider.v1beta1.AddLabelRequest.opaque:type_name -> cs3.types.v1beta1.Opaque
70, // 156: cs3.storage.provider.v1beta1.AddLabelRequest.ref:type_name -> cs3.storage.provider.v1beta1.Reference
84, // 157: cs3.storage.provider.v1beta1.AddLabelRequest.user_id:type_name -> cs3.identity.user.v1beta1.UserId
69, // 158: cs3.storage.provider.v1beta1.AddLabelResponse.status:type_name -> cs3.rpc.v1beta1.Status
68, // 159: cs3.storage.provider.v1beta1.AddLabelResponse.opaque:type_name -> cs3.types.v1beta1.Opaque
68, // 160: cs3.storage.provider.v1beta1.RemoveLabelRequest.opaque:type_name -> cs3.types.v1beta1.Opaque
70, // 161: cs3.storage.provider.v1beta1.RemoveLabelRequest.ref:type_name -> cs3.storage.provider.v1beta1.Reference
84, // 162: cs3.storage.provider.v1beta1.RemoveLabelRequest.user_id:type_name -> cs3.identity.user.v1beta1.UserId
69, // 163: cs3.storage.provider.v1beta1.RemoveLabelResponse.status:type_name -> cs3.rpc.v1beta1.Status
68, // 164: cs3.storage.provider.v1beta1.RemoveLabelResponse.opaque:type_name -> cs3.types.v1beta1.Opaque
2, // 165: cs3.storage.provider.v1beta1.ProviderAPI.AddGrant:input_type -> cs3.storage.provider.v1beta1.AddGrantRequest
6, // 166: cs3.storage.provider.v1beta1.ProviderAPI.CreateContainer:input_type -> cs3.storage.provider.v1beta1.CreateContainerRequest
8, // 167: cs3.storage.provider.v1beta1.ProviderAPI.TouchFile:input_type -> cs3.storage.provider.v1beta1.TouchFileRequest
@@ -6311,8 +6332,8 @@ var file_cs3_storage_provider_v1beta1_provider_api_proto_depIdxs = []int32{
60, // 194: cs3.storage.provider.v1beta1.ProviderAPI.Unlock:input_type -> cs3.storage.provider.v1beta1.UnlockRequest
62, // 195: cs3.storage.provider.v1beta1.ProviderAPI.CreateHome:input_type -> cs3.storage.provider.v1beta1.CreateHomeRequest
0, // 196: cs3.storage.provider.v1beta1.ProviderAPI.GetHome:input_type -> cs3.storage.provider.v1beta1.GetHomeRequest
64, // 197: cs3.storage.provider.v1beta1.ProviderAPI.AddFavorite:input_type -> cs3.storage.provider.v1beta1.AddFavoriteRequest
66, // 198: cs3.storage.provider.v1beta1.ProviderAPI.RemoveFavorite:input_type -> cs3.storage.provider.v1beta1.RemoveFavoriteRequest
64, // 197: cs3.storage.provider.v1beta1.ProviderAPI.AddLabel:input_type -> cs3.storage.provider.v1beta1.AddLabelRequest
66, // 198: cs3.storage.provider.v1beta1.ProviderAPI.RemoveLabel:input_type -> cs3.storage.provider.v1beta1.RemoveLabelRequest
3, // 199: cs3.storage.provider.v1beta1.ProviderAPI.AddGrant:output_type -> cs3.storage.provider.v1beta1.AddGrantResponse
7, // 200: cs3.storage.provider.v1beta1.ProviderAPI.CreateContainer:output_type -> cs3.storage.provider.v1beta1.CreateContainerResponse
9, // 201: cs3.storage.provider.v1beta1.ProviderAPI.TouchFile:output_type -> cs3.storage.provider.v1beta1.TouchFileResponse
@@ -6345,8 +6366,8 @@ var file_cs3_storage_provider_v1beta1_provider_api_proto_depIdxs = []int32{
61, // 228: cs3.storage.provider.v1beta1.ProviderAPI.Unlock:output_type -> cs3.storage.provider.v1beta1.UnlockResponse
63, // 229: cs3.storage.provider.v1beta1.ProviderAPI.CreateHome:output_type -> cs3.storage.provider.v1beta1.CreateHomeResponse
1, // 230: cs3.storage.provider.v1beta1.ProviderAPI.GetHome:output_type -> cs3.storage.provider.v1beta1.GetHomeResponse
65, // 231: cs3.storage.provider.v1beta1.ProviderAPI.AddFavorite:output_type -> cs3.storage.provider.v1beta1.AddFavoriteResponse
67, // 232: cs3.storage.provider.v1beta1.ProviderAPI.RemoveFavorite:output_type -> cs3.storage.provider.v1beta1.RemoveFavoriteResponse
65, // 231: cs3.storage.provider.v1beta1.ProviderAPI.AddLabel:output_type -> cs3.storage.provider.v1beta1.AddLabelResponse
67, // 232: cs3.storage.provider.v1beta1.ProviderAPI.RemoveLabel:output_type -> cs3.storage.provider.v1beta1.RemoveLabelResponse
199, // [199:233] is the sub-list for method output_type
165, // [165:199] is the sub-list for method input_type
165, // [165:165] is the sub-list for extension type_name
@@ -7130,7 +7151,7 @@ func file_cs3_storage_provider_v1beta1_provider_api_proto_init() {
}
}
file_cs3_storage_provider_v1beta1_provider_api_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AddFavoriteRequest); i {
switch v := v.(*AddLabelRequest); i {
case 0:
return &v.state
case 1:
@@ -7142,7 +7163,7 @@ func file_cs3_storage_provider_v1beta1_provider_api_proto_init() {
}
}
file_cs3_storage_provider_v1beta1_provider_api_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AddFavoriteResponse); i {
switch v := v.(*AddLabelResponse); i {
case 0:
return &v.state
case 1:
@@ -7154,7 +7175,7 @@ func file_cs3_storage_provider_v1beta1_provider_api_proto_init() {
}
}
file_cs3_storage_provider_v1beta1_provider_api_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RemoveFavoriteRequest); i {
switch v := v.(*RemoveLabelRequest); i {
case 0:
return &v.state
case 1:
@@ -7166,7 +7187,7 @@ func file_cs3_storage_provider_v1beta1_provider_api_proto_init() {
}
}
file_cs3_storage_provider_v1beta1_provider_api_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RemoveFavoriteResponse); i {
switch v := v.(*RemoveLabelResponse); i {
case 0:
return &v.state
case 1:
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -69,8 +69,8 @@ const (
ProviderAPI_Unlock_FullMethodName = "/cs3.storage.provider.v1beta1.ProviderAPI/Unlock"
ProviderAPI_CreateHome_FullMethodName = "/cs3.storage.provider.v1beta1.ProviderAPI/CreateHome"
ProviderAPI_GetHome_FullMethodName = "/cs3.storage.provider.v1beta1.ProviderAPI/GetHome"
ProviderAPI_AddFavorite_FullMethodName = "/cs3.storage.provider.v1beta1.ProviderAPI/AddFavorite"
ProviderAPI_RemoveFavorite_FullMethodName = "/cs3.storage.provider.v1beta1.ProviderAPI/RemoveFavorite"
ProviderAPI_AddLabel_FullMethodName = "/cs3.storage.provider.v1beta1.ProviderAPI/AddLabel"
ProviderAPI_RemoveLabel_FullMethodName = "/cs3.storage.provider.v1beta1.ProviderAPI/RemoveLabel"
)
// ProviderAPIClient is the client API for ProviderAPI service.
@@ -206,10 +206,10 @@ type ProviderAPIClient interface {
CreateHome(ctx context.Context, in *CreateHomeRequest, opts ...grpc.CallOption) (*CreateHomeResponse, error)
// Gets the home path for the user.
GetHome(ctx context.Context, in *GetHomeRequest, opts ...grpc.CallOption) (*GetHomeResponse, error)
// Marks a resource as favorite for a user.
AddFavorite(ctx context.Context, in *AddFavoriteRequest, opts ...grpc.CallOption) (*AddFavoriteResponse, error)
// Unmarks a resource as favorite for a user.
RemoveFavorite(ctx context.Context, in *RemoveFavoriteRequest, opts ...grpc.CallOption) (*RemoveFavoriteResponse, error)
// Attach a label to a resource for a user.
AddLabel(ctx context.Context, in *AddLabelRequest, opts ...grpc.CallOption) (*AddLabelResponse, error)
// Removes a label from a resource for a user.
RemoveLabel(ctx context.Context, in *RemoveLabelRequest, opts ...grpc.CallOption) (*RemoveLabelResponse, error)
}
type providerAPIClient struct {
@@ -554,18 +554,18 @@ func (c *providerAPIClient) GetHome(ctx context.Context, in *GetHomeRequest, opt
return out, nil
}
func (c *providerAPIClient) AddFavorite(ctx context.Context, in *AddFavoriteRequest, opts ...grpc.CallOption) (*AddFavoriteResponse, error) {
out := new(AddFavoriteResponse)
err := c.cc.Invoke(ctx, ProviderAPI_AddFavorite_FullMethodName, in, out, opts...)
func (c *providerAPIClient) AddLabel(ctx context.Context, in *AddLabelRequest, opts ...grpc.CallOption) (*AddLabelResponse, error) {
out := new(AddLabelResponse)
err := c.cc.Invoke(ctx, ProviderAPI_AddLabel_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *providerAPIClient) RemoveFavorite(ctx context.Context, in *RemoveFavoriteRequest, opts ...grpc.CallOption) (*RemoveFavoriteResponse, error) {
out := new(RemoveFavoriteResponse)
err := c.cc.Invoke(ctx, ProviderAPI_RemoveFavorite_FullMethodName, in, out, opts...)
func (c *providerAPIClient) RemoveLabel(ctx context.Context, in *RemoveLabelRequest, opts ...grpc.CallOption) (*RemoveLabelResponse, error) {
out := new(RemoveLabelResponse)
err := c.cc.Invoke(ctx, ProviderAPI_RemoveLabel_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
@@ -705,10 +705,10 @@ type ProviderAPIServer interface {
CreateHome(context.Context, *CreateHomeRequest) (*CreateHomeResponse, error)
// Gets the home path for the user.
GetHome(context.Context, *GetHomeRequest) (*GetHomeResponse, error)
// Marks a resource as favorite for a user.
AddFavorite(context.Context, *AddFavoriteRequest) (*AddFavoriteResponse, error)
// Unmarks a resource as favorite for a user.
RemoveFavorite(context.Context, *RemoveFavoriteRequest) (*RemoveFavoriteResponse, error)
// Attach a label to a resource for a user.
AddLabel(context.Context, *AddLabelRequest) (*AddLabelResponse, error)
// Removes a label from a resource for a user.
RemoveLabel(context.Context, *RemoveLabelRequest) (*RemoveLabelResponse, error)
}
// UnimplementedProviderAPIServer should be embedded to have forward compatible implementations.
@@ -811,11 +811,11 @@ func (UnimplementedProviderAPIServer) CreateHome(context.Context, *CreateHomeReq
func (UnimplementedProviderAPIServer) GetHome(context.Context, *GetHomeRequest) (*GetHomeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetHome not implemented")
}
func (UnimplementedProviderAPIServer) AddFavorite(context.Context, *AddFavoriteRequest) (*AddFavoriteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddFavorite not implemented")
func (UnimplementedProviderAPIServer) AddLabel(context.Context, *AddLabelRequest) (*AddLabelResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddLabel not implemented")
}
func (UnimplementedProviderAPIServer) RemoveFavorite(context.Context, *RemoveFavoriteRequest) (*RemoveFavoriteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RemoveFavorite not implemented")
func (UnimplementedProviderAPIServer) RemoveLabel(context.Context, *RemoveLabelRequest) (*RemoveLabelResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RemoveLabel not implemented")
}
// UnsafeProviderAPIServer may be embedded to opt out of forward compatibility for this service.
@@ -1411,38 +1411,38 @@ func _ProviderAPI_GetHome_Handler(srv interface{}, ctx context.Context, dec func
return interceptor(ctx, in, info, handler)
}
func _ProviderAPI_AddFavorite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddFavoriteRequest)
func _ProviderAPI_AddLabel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddLabelRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ProviderAPIServer).AddFavorite(ctx, in)
return srv.(ProviderAPIServer).AddLabel(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ProviderAPI_AddFavorite_FullMethodName,
FullMethod: ProviderAPI_AddLabel_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProviderAPIServer).AddFavorite(ctx, req.(*AddFavoriteRequest))
return srv.(ProviderAPIServer).AddLabel(ctx, req.(*AddLabelRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ProviderAPI_RemoveFavorite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RemoveFavoriteRequest)
func _ProviderAPI_RemoveLabel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RemoveLabelRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ProviderAPIServer).RemoveFavorite(ctx, in)
return srv.(ProviderAPIServer).RemoveLabel(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ProviderAPI_RemoveFavorite_FullMethodName,
FullMethod: ProviderAPI_RemoveLabel_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProviderAPIServer).RemoveFavorite(ctx, req.(*RemoveFavoriteRequest))
return srv.(ProviderAPIServer).RemoveLabel(ctx, req.(*RemoveLabelRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -1575,12 +1575,12 @@ var ProviderAPI_ServiceDesc = grpc.ServiceDesc{
Handler: _ProviderAPI_GetHome_Handler,
},
{
MethodName: "AddFavorite",
Handler: _ProviderAPI_AddFavorite_Handler,
MethodName: "AddLabel",
Handler: _ProviderAPI_AddLabel_Handler,
},
{
MethodName: "RemoveFavorite",
Handler: _ProviderAPI_RemoveFavorite_Handler,
MethodName: "RemoveLabel",
Handler: _ProviderAPI_RemoveLabel_Handler,
},
},
Streams: []grpc.StreamDesc{
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2018-2025 CERN
// Copyright 2018-2026 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
+433 -158
View File
@@ -78,6 +78,42 @@ _sqlite3_bind_blob(sqlite3_stmt *stmt, int n, void *p, int np) {
return sqlite3_bind_blob(stmt, n, p, np, SQLITE_TRANSIENT);
}
typedef struct {
int typ;
sqlite3_int64 i64;
double f64;
const void *ptr;
int n;
} sqlite3_go_col;
static void
_sqlite3_column_values(sqlite3_stmt *stmt, int ncol, sqlite3_go_col *cols) {
for (int i = 0; i < ncol; i++) {
sqlite3_go_col *col = &cols[i];
col->typ = sqlite3_column_type(stmt, i);
col->ptr = 0;
col->n = 0;
switch (col->typ) {
case SQLITE_INTEGER:
col->i64 = sqlite3_column_int64(stmt, i);
break;
case SQLITE_FLOAT:
col->f64 = sqlite3_column_double(stmt, i);
break;
case SQLITE_BLOB:
col->ptr = sqlite3_column_blob(stmt, i);
col->n = sqlite3_column_bytes(stmt, i);
break;
case SQLITE_TEXT:
col->ptr = sqlite3_column_text(stmt, i);
col->n = sqlite3_column_bytes(stmt, i);
break;
default:
break;
}
}
}
#include <stdio.h>
#include <stdint.h>
@@ -90,10 +126,57 @@ _sqlite3_exec(sqlite3* db, const char* pcmd, long long* rowid, long long* change
return rv;
}
// Combined reset + clear_bindings in a single C call to reduce CGO crossings.
static int
_sqlite3_reset_clear(sqlite3_stmt* stmt)
{
int rv = sqlite3_reset(stmt);
sqlite3_clear_bindings(stmt);
return rv;
}
#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY
extern int _sqlite3_step_blocking(sqlite3_stmt *stmt);
extern int _sqlite3_step_row_blocking(sqlite3_stmt* stmt, long long* rowid, long long* changes);
extern int _sqlite3_prepare_v2_blocking(sqlite3 *db, const char *zSql, int nBytes, sqlite3_stmt **ppStmt, const char **pzTail);
#endif
// Combined prepare+step+finalize for simple exec without parameters.
// Reduces CGO crossings from ~6 to 1 for the common no-args exec case.
static int
_sqlite3_exec_no_args(sqlite3* db, const char* zSql, int nBytes, long long* rowid, long long* changes, const char** pzTail)
{
sqlite3_stmt *stmt = 0;
const char *tail = 0;
#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY
int rv = _sqlite3_prepare_v2_blocking(db, zSql, nBytes, &stmt, &tail);
#else
int rv = sqlite3_prepare_v2(db, zSql, nBytes, &stmt, &tail);
#endif
if (rv != SQLITE_OK) {
*pzTail = 0;
return rv;
}
if (stmt == 0) {
// Empty statement
*rowid = 0;
*changes = 0;
*pzTail = tail;
return SQLITE_OK;
}
#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY
rv = _sqlite3_step_row_blocking(stmt, rowid, changes);
#else
rv = sqlite3_step(stmt);
*rowid = (long long) sqlite3_last_insert_rowid(db);
*changes = (long long) sqlite3_changes(db);
#endif
sqlite3_finalize(stmt);
*pzTail = tail;
return rv;
}
#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY
static int
_sqlite3_step_internal(sqlite3_stmt *stmt)
@@ -210,6 +293,7 @@ import (
"errors"
"fmt"
"io"
"math"
"net/url"
"reflect"
"runtime"
@@ -361,12 +445,15 @@ type SQLiteDriver struct {
// SQLiteConn implements driver.Conn.
type SQLiteConn struct {
mu sync.Mutex
db *C.sqlite3
loc *time.Location
txlock string
funcs []*functionInfo
aggregators []*aggInfo
mu sync.Mutex
db *C.sqlite3
loc *time.Location
txlock string
funcs []*functionInfo
aggregators []*aggInfo
stmtCache map[string][]*SQLiteStmt
stmtCacheSize int
stmtCacheCount int
}
// SQLiteTx implements driver.Tx.
@@ -376,12 +463,14 @@ type SQLiteTx struct {
// SQLiteStmt implements driver.Stmt.
type SQLiteStmt struct {
mu sync.Mutex
c *SQLiteConn
s *C.sqlite3_stmt
t string
closed bool
cls bool // True if the statement was created by SQLiteConn.Query
mu sync.Mutex
c *SQLiteConn
s *C.sqlite3_stmt
t string
closed bool
cls bool // True if the statement was created by SQLiteConn.Query
namedParams map[string][3]int
cacheKey string
}
// SQLiteResult implements sql.Result.
@@ -397,6 +486,7 @@ type SQLiteRows struct {
cls bool // True if we need to close the parent statement in Close
cols []string
decltype []string
colvals *C.sqlite3_go_col
ctx context.Context // no better alternative to pass context into Next() method
closemu sync.Mutex
}
@@ -847,45 +937,29 @@ func lastError(db *C.sqlite3) error {
// Exec implements Execer.
func (c *SQLiteConn) Exec(query string, args []driver.Value) (driver.Result, error) {
list := make([]driver.NamedValue, len(args))
for i, v := range args {
list[i] = driver.NamedValue{
Ordinal: i + 1,
Value: v,
}
}
return c.exec(context.Background(), query, list)
return c.exec(context.Background(), query, valueToNamedValue(args))
}
func (c *SQLiteConn) exec(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error) {
// Fast path: no args, no context cancellation → single CGO call per statement
if len(args) == 0 && ctx.Done() == nil {
return c.execNoArgs(query)
}
start := 0
for {
s, err := c.prepare(ctx, query)
s, err := c.prepareWithCache(ctx, query)
if err != nil {
return nil, err
}
var res driver.Result
if s.(*SQLiteStmt).s != nil {
stmtArgs := make([]driver.NamedValue, 0, len(args))
na := s.NumInput()
if len(args)-start < na {
s.Close()
return nil, fmt.Errorf("not enough args to execute query: want %d got %d", na, len(args))
}
// consume the number of arguments used in the current
// statement and append all named arguments not
// contained therein
if len(args[start:start+na]) > 0 {
stmtArgs = append(stmtArgs, args[start:start+na]...)
for i := range args {
if (i < start || i >= na) && args[i].Name != "" {
stmtArgs = append(stmtArgs, args[i])
}
}
for i := range stmtArgs {
stmtArgs[i].Ordinal = i + 1
}
}
stmtArgs := stmtArgs(args, start, na)
res, err = s.(*SQLiteStmt).exec(ctx, stmtArgs)
if err != nil && err != driver.ErrSkip {
s.Close()
@@ -906,23 +980,40 @@ func (c *SQLiteConn) exec(ctx context.Context, query string, args []driver.Named
}
}
// execNoArgs executes a query with no parameters in a single CGO call per statement.
func (c *SQLiteConn) execNoArgs(query string) (driver.Result, error) {
var res *SQLiteResult
for len(query) > 0 {
var rowid, changes C.longlong
var tail *C.char
pquery := C.CString(query)
rv := C._sqlite3_exec_no_args(c.db, pquery, C.int(len(query)), &rowid, &changes, &tail)
if tail != nil && *tail != '\000' {
query = strings.TrimSpace(C.GoString(tail))
} else {
query = ""
}
C.free(unsafe.Pointer(pquery))
if rv != C.SQLITE_ROW && rv != C.SQLITE_OK && rv != C.SQLITE_DONE {
return nil, c.lastError()
}
res = &SQLiteResult{id: int64(rowid), changes: int64(changes)}
}
if res == nil {
res = &SQLiteResult{0, 0}
}
return res, nil
}
// Query implements Queryer.
func (c *SQLiteConn) Query(query string, args []driver.Value) (driver.Rows, error) {
list := make([]driver.NamedValue, len(args))
for i, v := range args {
list[i] = driver.NamedValue{
Ordinal: i + 1,
Value: v,
}
}
return c.query(context.Background(), query, list)
return c.query(context.Background(), query, valueToNamedValue(args))
}
func (c *SQLiteConn) query(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) {
start := 0
for {
stmtArgs := make([]driver.NamedValue, 0, len(args))
s, err := c.prepare(ctx, query)
s, err := c.prepareWithCache(ctx, query)
if err != nil {
return nil, err
}
@@ -932,18 +1023,7 @@ func (c *SQLiteConn) query(ctx context.Context, query string, args []driver.Name
s.Close()
return nil, fmt.Errorf("not enough args to execute query: want %d got %d", na, len(args)-start)
}
// consume the number of arguments used in the current
// statement and append all named arguments not contained
// therein
stmtArgs = append(stmtArgs, args[start:start+na]...)
for i := range args {
if (i < start || i >= na) && args[i].Name != "" {
stmtArgs = append(stmtArgs, args[i])
}
}
for i := range stmtArgs {
stmtArgs[i].Ordinal = i + 1
}
stmtArgs := stmtArgs(args, start, na)
rows, err := s.(*SQLiteStmt).query(ctx, stmtArgs)
if err != nil && err != driver.ErrSkip {
s.Close()
@@ -1109,6 +1189,7 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) {
writableSchema := -1
vfsName := ""
var cacheSize *int64
stmtCacheSize := 0
pos := strings.IndexRune(dsn, '?')
if pos >= 1 {
@@ -1444,6 +1525,20 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) {
cacheSize = &iv
}
// _stmt_cache_size sets the maximum number of prepared statements
// cached per connection. Note that sql.DB is a connection pool, so
// each connection maintains its own independent cache.
if val := params.Get("_stmt_cache_size"); val != "" {
iv, err := strconv.Atoi(val)
if err != nil {
return nil, fmt.Errorf("Invalid _stmt_cache_size: %v: %v", val, err)
}
if iv < 0 {
return nil, fmt.Errorf("Invalid _stmt_cache_size: %v, expecting non-negative integer", val)
}
stmtCacheSize = iv
}
if val := params.Get("vfs"); val != "" {
vfsName = val
}
@@ -1516,7 +1611,10 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) {
//
// Create connection to SQLite
conn := &SQLiteConn{db: db, loc: loc, txlock: txlock}
conn := &SQLiteConn{db: db, loc: loc, txlock: txlock, stmtCacheSize: stmtCacheSize}
if stmtCacheSize > 0 {
conn.stmtCache = make(map[string][]*SQLiteStmt)
}
// Password Cipher has to be registered before authentication
if len(authCrypt) > 0 {
@@ -1789,6 +1887,7 @@ func (c *SQLiteConn) Close() error {
return nil
}
runtime.SetFinalizer(c, nil)
c.closeCachedStmtsLocked()
rv := C.sqlite3_close_v2(c.db)
if rv != C.SQLITE_OK {
return lastError(c.db)
@@ -1807,6 +1906,70 @@ func (c *SQLiteConn) dbConnOpen() bool {
return c.db != nil
}
func (c *SQLiteConn) takeCachedStmt(query string) *SQLiteStmt {
if c == nil || query == "" || c.stmtCacheSize <= 0 {
return nil
}
c.mu.Lock()
defer c.mu.Unlock()
if c.db == nil {
return nil
}
stmts := c.stmtCache[query]
if len(stmts) == 0 {
return nil
}
s := stmts[len(stmts)-1]
if len(stmts) == 1 {
delete(c.stmtCache, query)
} else {
c.stmtCache[query] = stmts[:len(stmts)-1]
}
c.stmtCacheCount--
s.closed = false
s.cls = false
s.t = ""
return s
}
func (c *SQLiteConn) putCachedStmt(s *SQLiteStmt) bool {
if c == nil || s == nil || s.s == nil || s.cacheKey == "" {
return false
}
c.mu.Lock()
defer c.mu.Unlock()
if c.db == nil || c.stmtCacheCount >= c.stmtCacheSize {
return false
}
rv := C._sqlite3_reset_clear(s.s)
if rv != C.SQLITE_ROW && rv != C.SQLITE_OK && rv != C.SQLITE_DONE {
return false
}
c.stmtCache[s.cacheKey] = append(c.stmtCache[s.cacheKey], s)
c.stmtCacheCount++
return true
}
func (c *SQLiteConn) closeCachedStmtsLocked() {
for key, stmts := range c.stmtCache {
for _, s := range stmts {
if s == nil || s.s == nil {
continue
}
runtime.SetFinalizer(s, nil)
C.sqlite3_finalize(s.s)
s.s = nil
s.c = nil
}
delete(c.stmtCache, key)
}
c.stmtCacheCount = 0
}
// Prepare the query string. Return a new statement.
func (c *SQLiteConn) Prepare(query string) (driver.Stmt, error) {
return c.prepare(context.Background(), query)
@@ -1817,7 +1980,7 @@ func (c *SQLiteConn) prepare(ctx context.Context, query string) (driver.Stmt, er
defer C.free(unsafe.Pointer(pquery))
var s *C.sqlite3_stmt
var tail *C.char
rv := C._sqlite3_prepare_v2_internal(c.db, pquery, C.int(-1), &s, &tail)
rv := C._sqlite3_prepare_v2_internal(c.db, pquery, C.int(len(query)), &s, &tail)
if rv != C.SQLITE_OK {
return nil, c.lastError()
}
@@ -1830,6 +1993,21 @@ func (c *SQLiteConn) prepare(ctx context.Context, query string) (driver.Stmt, er
return ss, nil
}
func (c *SQLiteConn) prepareWithCache(ctx context.Context, query string) (driver.Stmt, error) {
if stmt := c.takeCachedStmt(query); stmt != nil {
return stmt, nil
}
stmt, err := c.prepare(ctx, query)
if err != nil {
return nil, err
}
ss := stmt.(*SQLiteStmt)
if ss.t == "" {
ss.cacheKey = query
}
return ss, nil
}
// Run-Time Limit Categories.
// See: http://www.sqlite.org/c3ref/c_limit_attached.html
const (
@@ -1938,11 +2116,18 @@ func (s *SQLiteStmt) Close() error {
runtime.SetFinalizer(s, nil)
conn := s.c
stmt := s.s
s.s = nil
s.c = nil
if stmt == nil {
s.c = nil
return nil
}
if !conn.dbConnOpen() {
return errors.New("sqlite statement with already closed database connection")
}
if s.cacheKey != "" && conn.putCachedStmt(s) {
return nil
}
s.s = nil
s.c = nil
rv := C.sqlite3_finalize(stmt)
if rv != C.SQLITE_OK {
return conn.lastError()
@@ -1957,68 +2142,141 @@ func (s *SQLiteStmt) NumInput() int {
var placeHolder = []byte{0}
func bindText(s *C.sqlite3_stmt, n C.int, v string) C.int {
if len(v) == 0 {
return C._sqlite3_bind_text(s, n, (*C.char)(unsafe.Pointer(&placeHolder[0])), C.int(0))
}
return C._sqlite3_bind_text(s, n, (*C.char)(unsafe.Pointer(unsafe.StringData(v))), C.int(len(v)))
}
func bindValue(s *C.sqlite3_stmt, n C.int, value driver.Value) C.int {
switch v := value.(type) {
case nil:
return C.sqlite3_bind_null(s, n)
case string:
return bindText(s, n, v)
case int64:
return C.sqlite3_bind_int64(s, n, C.sqlite3_int64(v))
case bool:
if v {
return C.sqlite3_bind_int(s, n, 1)
}
return C.sqlite3_bind_int(s, n, 0)
case float64:
return C.sqlite3_bind_double(s, n, C.double(v))
case []byte:
if v == nil {
return C.sqlite3_bind_null(s, n)
}
ln := len(v)
if ln == 0 {
v = placeHolder
}
return C._sqlite3_bind_blob(s, n, unsafe.Pointer(&v[0]), C.int(ln))
case time.Time:
var buf [64]byte
b := v.AppendFormat(buf[:0], SQLiteTimestampFormats[0])
if len(b) == 0 {
return C._sqlite3_bind_text(s, n, (*C.char)(unsafe.Pointer(&placeHolder[0])), C.int(0))
}
return C._sqlite3_bind_text(s, n, (*C.char)(unsafe.Pointer(&b[0])), C.int(len(b)))
default:
return C.SQLITE_MISUSE
}
}
func (s *SQLiteStmt) bindNamedIndices(name string) [3]int {
if s.namedParams == nil {
s.namedParams = make(map[string][3]int)
} else if indices, ok := s.namedParams[name]; ok {
return indices
}
// Build ":name\0" once and rewrite prefix byte to avoid 3 C.CString allocs.
buf := make([]byte, 1+len(name)+1) // prefix + name + null terminator
copy(buf[1:], name)
buf[len(buf)-1] = 0
cname := (*C.char)(unsafe.Pointer(&buf[0]))
var indices [3]int
prefixes := [3]byte{':', '@', '$'}
for i, p := range prefixes {
buf[0] = p
indices[i] = int(C.sqlite3_bind_parameter_index(s.s, cname))
}
s.namedParams[name] = indices
return indices
}
func stmtArgs(args []driver.NamedValue, start, na int) []driver.NamedValue {
if na == 0 {
return nil
}
end := start + na
hasNamedOutside := false
for i := range args {
if args[i].Name != "" && (i < start || i >= end) {
hasNamedOutside = true
break
}
}
if start == 0 && !hasNamedOutside {
return args[start:end]
}
stmtArgs := make([]driver.NamedValue, 0, len(args))
stmtArgs = append(stmtArgs, args[start:end]...)
for i := range args {
if args[i].Name != "" && (i < start || i >= end) {
stmtArgs = append(stmtArgs, args[i])
}
}
for i := range stmtArgs {
stmtArgs[i].Ordinal = i + 1
}
return stmtArgs
}
func (s *SQLiteStmt) bind(args []driver.NamedValue) error {
rv := C.sqlite3_reset(s.s)
rv := C._sqlite3_reset_clear(s.s)
if rv != C.SQLITE_ROW && rv != C.SQLITE_OK && rv != C.SQLITE_DONE {
return s.c.lastError()
}
C.sqlite3_clear_bindings(s.s)
bindIndices := make([][3]int, len(args))
prefixes := []string{":", "@", "$"}
for i, v := range args {
bindIndices[i][0] = args[i].Ordinal
if v.Name != "" {
for j := range prefixes {
cname := C.CString(prefixes[j] + v.Name)
bindIndices[i][j] = int(C.sqlite3_bind_parameter_index(s.s, cname))
C.free(unsafe.Pointer(cname))
}
args[i].Ordinal = bindIndices[i][0]
hasNamed := false
for i := range args {
if args[i].Name != "" {
hasNamed = true
break
}
}
for i, arg := range args {
for j := range bindIndices[i] {
if bindIndices[i][j] == 0 {
if !hasNamed {
for _, arg := range args {
n := C.int(arg.Ordinal)
rv = bindValue(s.s, n, arg.Value)
if rv != C.SQLITE_OK {
return s.c.lastError()
}
}
return nil
}
for _, arg := range args {
if arg.Name == "" {
rv = bindValue(s.s, C.int(arg.Ordinal), arg.Value)
if rv != C.SQLITE_OK {
return s.c.lastError()
}
continue
}
indices := s.bindNamedIndices(arg.Name)
for _, idx := range indices {
if idx == 0 {
continue
}
n := C.int(bindIndices[i][j])
switch v := arg.Value.(type) {
case nil:
rv = C.sqlite3_bind_null(s.s, n)
case string:
if len(v) == 0 {
rv = C._sqlite3_bind_text(s.s, n, (*C.char)(unsafe.Pointer(&placeHolder[0])), C.int(0))
} else {
b := []byte(v)
rv = C._sqlite3_bind_text(s.s, n, (*C.char)(unsafe.Pointer(&b[0])), C.int(len(b)))
}
case int64:
rv = C.sqlite3_bind_int64(s.s, n, C.sqlite3_int64(v))
case bool:
if v {
rv = C.sqlite3_bind_int(s.s, n, 1)
} else {
rv = C.sqlite3_bind_int(s.s, n, 0)
}
case float64:
rv = C.sqlite3_bind_double(s.s, n, C.double(v))
case []byte:
if v == nil {
rv = C.sqlite3_bind_null(s.s, n)
} else {
ln := len(v)
if ln == 0 {
v = placeHolder
}
rv = C._sqlite3_bind_blob(s.s, n, unsafe.Pointer(&v[0]), C.int(ln))
}
case time.Time:
b := []byte(v.Format(SQLiteTimestampFormats[0]))
rv = C._sqlite3_bind_text(s.s, n, (*C.char)(unsafe.Pointer(&b[0])), C.int(len(b)))
}
rv = bindValue(s.s, C.int(idx), arg.Value)
if rv != C.SQLITE_OK {
return s.c.lastError()
}
@@ -2029,14 +2287,7 @@ func (s *SQLiteStmt) bind(args []driver.NamedValue) error {
// Query the statement with arguments. Return records.
func (s *SQLiteStmt) Query(args []driver.Value) (driver.Rows, error) {
list := make([]driver.NamedValue, len(args))
for i, v := range args {
list[i] = driver.NamedValue{
Ordinal: i + 1,
Value: v,
}
}
return s.query(context.Background(), list)
return s.query(context.Background(), valueToNamedValue(args))
}
func (s *SQLiteStmt) query(ctx context.Context, args []driver.NamedValue) (driver.Rows, error) {
@@ -2050,8 +2301,15 @@ func (s *SQLiteStmt) query(ctx context.Context, args []driver.NamedValue) (drive
cls: s.cls,
cols: nil,
decltype: nil,
colvals: nil,
ctx: ctx,
}
if rows.nc > 0 {
rows.colvals = (*C.sqlite3_go_col)(C.malloc(C.size_t(rows.nc) * C.size_t(unsafe.Sizeof(C.sqlite3_go_col{}))))
if rows.colvals == nil {
return nil, errors.New("sqlite3: failed to allocate row buffer")
}
}
return rows, nil
}
@@ -2068,6 +2326,10 @@ func (r *SQLiteResult) RowsAffected() (int64, error) {
// Exec execute the statement with arguments. Return result object.
func (s *SQLiteStmt) Exec(args []driver.Value) (driver.Result, error) {
return s.exec(context.Background(), valueToNamedValue(args))
}
func valueToNamedValue(args []driver.Value) []driver.NamedValue {
list := make([]driver.NamedValue, len(args))
for i, v := range args {
list[i] = driver.NamedValue{
@@ -2075,7 +2337,7 @@ func (s *SQLiteStmt) Exec(args []driver.Value) (driver.Result, error) {
Value: v,
}
}
return s.exec(context.Background(), list)
return list
}
func isInterruptErr(err error) bool {
@@ -2092,38 +2354,35 @@ func (s *SQLiteStmt) exec(ctx context.Context, args []driver.NamedValue) (driver
return s.execSync(args)
}
type result struct {
r driver.Result
err error
}
resultCh := make(chan result)
defer close(resultCh)
sema := make(chan struct{})
var r driver.Result
var err error
go func() {
r, err := s.execSync(args)
resultCh <- result{r, err}
r, err = s.execSync(args)
close(sema)
}()
var rv result
select {
case rv = <-resultCh:
case <-sema:
return r, err
case <-ctx.Done():
select {
case rv = <-resultCh: // no need to interrupt, operation completed in db
case <-sema: // no need to interrupt, operation completed in db
return r, err
default:
// this is still racy and can be no-op if executed between sqlite3_* calls in execSync.
C.sqlite3_interrupt(s.c.db)
rv = <-resultCh // wait for goroutine completed
if isInterruptErr(rv.err) {
<-sema // wait for goroutine completed
if isInterruptErr(err) {
return nil, ctx.Err()
}
return r, err
}
}
return rv.r, rv.err
}
func (s *SQLiteStmt) execSync(args []driver.NamedValue) (driver.Result, error) {
if err := s.bind(args); err != nil {
C.sqlite3_reset(s.s)
C.sqlite3_clear_bindings(s.s)
C._sqlite3_reset_clear(s.s)
return nil, err
}
@@ -2131,8 +2390,7 @@ func (s *SQLiteStmt) execSync(args []driver.NamedValue) (driver.Result, error) {
rv := C._sqlite3_step_row_internal(s.s, &rowid, &changes)
if rv != C.SQLITE_ROW && rv != C.SQLITE_OK && rv != C.SQLITE_DONE {
err := s.c.lastError()
C.sqlite3_reset(s.s)
C.sqlite3_clear_bindings(s.s)
C._sqlite3_reset_clear(s.s)
return nil, err
}
@@ -2152,9 +2410,17 @@ func (rc *SQLiteRows) Close() error {
defer rc.closemu.Unlock()
s := rc.s
if s == nil {
if rc.colvals != nil {
C.free(unsafe.Pointer(rc.colvals))
rc.colvals = nil
}
return nil
}
rc.s = nil // remove reference to SQLiteStmt
if rc.colvals != nil {
C.free(unsafe.Pointer(rc.colvals))
rc.colvals = nil
}
s.mu.Lock()
if s.closed {
s.mu.Unlock()
@@ -2179,7 +2445,7 @@ func (rc *SQLiteRows) Columns() []string {
defer rc.s.mu.Unlock()
if rc.s.s != nil && int(rc.nc) != len(rc.cols) {
rc.cols = make([]string, rc.nc)
for i := 0; i < int(rc.nc); i++ {
for i := range rc.cols {
rc.cols[i] = C.GoString(C.sqlite3_column_name(rc.s.s, C.int(i)))
}
}
@@ -2189,7 +2455,7 @@ func (rc *SQLiteRows) Columns() []string {
func (rc *SQLiteRows) declTypes() []string {
if rc.s.s != nil && rc.decltype == nil {
rc.decltype = make([]string, rc.nc)
for i := 0; i < int(rc.nc); i++ {
for i := range rc.decltype {
rc.decltype[i] = strings.ToLower(C.GoString(C.sqlite3_column_decltype(rc.s.s, C.int(i))))
}
}
@@ -2215,21 +2481,22 @@ func (rc *SQLiteRows) Next(dest []driver.Value) error {
if rc.ctx.Done() == nil {
return rc.nextSyncLocked(dest)
}
resultCh := make(chan error)
defer close(resultCh)
sema := make(chan struct{})
var err error
go func() {
resultCh <- rc.nextSyncLocked(dest)
err = rc.nextSyncLocked(dest)
close(sema)
}()
select {
case err := <-resultCh:
case <-sema:
return err
case <-rc.ctx.Done():
select {
case <-resultCh: // no need to interrupt
case <-sema: // no need to interrupt
default:
// this is still racy and can be no-op if executed between sqlite3_* calls in nextSyncLocked.
C.sqlite3_interrupt(rc.s.c.db)
<-resultCh // ensure goroutine completed
<-sema // ensure goroutine completed
}
return rc.ctx.Err()
}
@@ -2250,12 +2517,20 @@ func (rc *SQLiteRows) nextSyncLocked(dest []driver.Value) error {
}
rc.declTypes()
if len(dest) == 0 {
return nil
}
C._sqlite3_column_values(rc.s.s, C.int(len(dest)), rc.colvals)
colvals := (*[(math.MaxInt32 - 1) / unsafe.Sizeof(C.sqlite3_go_col{})]C.sqlite3_go_col)(unsafe.Pointer(rc.colvals))[:len(dest):len(dest)]
decltype := rc.decltype
_ = decltype[len(dest)-1]
for i := range dest {
switch C.sqlite3_column_type(rc.s.s, C.int(i)) {
col := &colvals[i]
switch col.typ {
case C.SQLITE_INTEGER:
val := int64(C.sqlite3_column_int64(rc.s.s, C.int(i)))
switch rc.decltype[i] {
val := int64(col.i64)
switch decltype[i] {
case columnTimestamp, columnDatetime, columnDate:
var t time.Time
// Assume a millisecond unix timestamp if it's 13 digits -- too
@@ -2277,14 +2552,14 @@ func (rc *SQLiteRows) nextSyncLocked(dest []driver.Value) error {
dest[i] = val
}
case C.SQLITE_FLOAT:
dest[i] = float64(C.sqlite3_column_double(rc.s.s, C.int(i)))
dest[i] = float64(col.f64)
case C.SQLITE_BLOB:
p := C.sqlite3_column_blob(rc.s.s, C.int(i))
p := col.ptr
if p == nil {
dest[i] = []byte{}
continue
}
n := C.sqlite3_column_bytes(rc.s.s, C.int(i))
n := col.n
dest[i] = C.GoBytes(p, n)
case C.SQLITE_NULL:
dest[i] = nil
@@ -2292,10 +2567,10 @@ func (rc *SQLiteRows) nextSyncLocked(dest []driver.Value) error {
var err error
var timeVal time.Time
n := int(C.sqlite3_column_bytes(rc.s.s, C.int(i)))
s := C.GoStringN((*C.char)(unsafe.Pointer(C.sqlite3_column_text(rc.s.s, C.int(i)))), C.int(n))
n := int(col.n)
s := C.GoStringN((*C.char)(unsafe.Pointer(col.ptr)), C.int(n))
switch rc.decltype[i] {
switch decltype[i] {
case columnTimestamp, columnDatetime, columnDate:
var t time.Time
s = strings.TrimSuffix(s, "Z")
+12 -4
View File
@@ -301,10 +301,18 @@ const (
OpLT = 16
OpGE = 32
OpMATCH = 64
OpLIKE = 65 /* 3.10.0 and later only */
OpGLOB = 66 /* 3.10.0 and later only */
OpREGEXP = 67 /* 3.10.0 and later only */
OpScanUnique = 1 /* Scan visits at most 1 row */
OpLIKE = 65 /* 3.10.0 and later only */
OpGLOB = 66 /* 3.10.0 and later only */
OpREGEXP = 67 /* 3.10.0 and later only */
OpNE = 68 /* 3.21.0 and later only */
OpISNOT = 69 /* 3.21.0 and later */
OpISNOTNULL = 70 /* 3.21.0 and later */
OpISNULL = 71 /* 3.21.0 and later */
OpIS = 72 /* 3.21.0 and later */
OpLIMIT = 73 /* 3.38.0 and later */
OpOFFSET = 74 /* 3.38.0 and later */
OpFUNCTION = 150 /* 3.25.0 and later */
OpScanUnique = 1 /* Scan visits at most 1 row */
)
// InfoConstraint give information of constraint.
@@ -3,15 +3,14 @@
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file.
//go:build cgo && go1.8
// +build cgo,go1.8
//go:build cgo
// +build cgo
package sqlite3
import (
"database/sql/driver"
"context"
"database/sql/driver"
)
// Ping implement Pinger.
@@ -648,40 +648,40 @@ func (s *svc) CreateContainer(ctx context.Context, req *provider.CreateContainer
return res, nil
}
func (s *svc) AddFavorite(ctx context.Context, req *provider.AddFavoriteRequest) (*provider.AddFavoriteResponse, error) {
func (s *svc) AddLabel(ctx context.Context, req *provider.AddLabelRequest) (*provider.AddLabelResponse, error) {
var c provider.ProviderAPIClient
var err error
c, _, req.Ref, err = s.findAndUnwrap(ctx, req.Ref)
if err != nil {
return &provider.AddFavoriteResponse{
return &provider.AddLabelResponse{
Status: status.NewStatusFromErrType(ctx, fmt.Sprintf("gateway could not find space for ref=%+v", req.Ref), err),
}, nil
}
res, err := c.AddFavorite(ctx, req)
res, err := c.AddLabel(ctx, req)
if err != nil {
return &provider.AddFavoriteResponse{
Status: status.NewStatusFromErrType(ctx, "gateway could not call AddFavorite", err),
return &provider.AddLabelResponse{
Status: status.NewStatusFromErrType(ctx, "gateway could not call AddLabel", err),
}, nil
}
return res, nil
}
func (s *svc) RemoveFavorite(ctx context.Context, req *provider.RemoveFavoriteRequest) (*provider.RemoveFavoriteResponse, error) {
func (s *svc) RemoveLabel(ctx context.Context, req *provider.RemoveLabelRequest) (*provider.RemoveLabelResponse, error) {
var c provider.ProviderAPIClient
var err error
c, _, req.Ref, err = s.findAndUnwrap(ctx, req.Ref)
if err != nil {
return &provider.RemoveFavoriteResponse{
return &provider.RemoveLabelResponse{
Status: status.NewStatusFromErrType(ctx, fmt.Sprintf("gateway could not find space for ref=%+v", req.Ref), err),
}, nil
}
res, err := c.RemoveFavorite(ctx, req)
res, err := c.RemoveLabel(ctx, req)
if err != nil {
return &provider.RemoveFavoriteResponse{
Status: status.NewStatusFromErrType(ctx, "gateway could not call RemoveFavorite", err),
return &provider.RemoveLabelResponse{
Status: status.NewStatusFromErrType(ctx, "gateway could not call RemoveLabel", err),
}, nil
}
@@ -264,9 +264,9 @@ func (c *cachedAPIClient) GetHome(ctx context.Context, in *provider.GetHomeReque
func (c *cachedAPIClient) TouchFile(ctx context.Context, in *provider.TouchFileRequest, opts ...grpc.CallOption) (*provider.TouchFileResponse, error) {
return c.c.TouchFile(ctx, in, opts...)
}
func (c *cachedAPIClient) AddFavorite(ctx context.Context, in *provider.AddFavoriteRequest, opts ...grpc.CallOption) (*provider.AddFavoriteResponse, error) {
return c.c.AddFavorite(ctx, in, opts...)
func (c *cachedAPIClient) AddLabel(ctx context.Context, in *provider.AddLabelRequest, opts ...grpc.CallOption) (*provider.AddLabelResponse, error) {
return c.c.AddLabel(ctx, in, opts...)
}
func (c *cachedAPIClient) RemoveFavorite(ctx context.Context, in *provider.RemoveFavoriteRequest, opts ...grpc.CallOption) (*provider.RemoveFavoriteResponse, error) {
return c.c.RemoveFavorite(ctx, in, opts...)
func (c *cachedAPIClient) RemoveLabel(ctx context.Context, in *provider.RemoveLabelRequest, opts ...grpc.CallOption) (*provider.RemoveLabelResponse, error) {
return c.c.RemoveLabel(ctx, in, opts...)
}
@@ -929,11 +929,11 @@ func (s *service) GetQuota(ctx context.Context, req *provider.GetQuotaRequest) (
return nil, gstatus.Errorf(codes.Unimplemented, "method not implemented")
}
func (s *service) AddFavorite(ctx context.Context, req *provider.AddFavoriteRequest) (*provider.AddFavoriteResponse, error) {
func (s *service) AddLabel(ctx context.Context, req *provider.AddLabelRequest) (*provider.AddLabelResponse, error) {
return nil, gstatus.Errorf(codes.Unimplemented, "method not implemented")
}
func (s *service) RemoveFavorite(ctx context.Context, req *provider.RemoveFavoriteRequest) (*provider.RemoveFavoriteResponse, error) {
func (s *service) RemoveLabel(ctx context.Context, req *provider.RemoveLabelRequest) (*provider.RemoveLabelResponse, error) {
return nil, gstatus.Errorf(codes.Unimplemented, "method not implemented")
}
@@ -1035,11 +1035,11 @@ func (s *service) GetQuota(ctx context.Context, req *provider.GetQuotaRequest) (
}, nil
}
func (s *service) AddFavorite(ctx context.Context, req *provider.AddFavoriteRequest) (*provider.AddFavoriteResponse, error) {
func (s *service) AddLabel(ctx context.Context, req *provider.AddLabelRequest) (*provider.AddLabelResponse, error) {
return nil, gstatus.Errorf(codes.Unimplemented, "method not implemented")
}
func (s *service) RemoveFavorite(ctx context.Context, req *provider.RemoveFavoriteRequest) (*provider.RemoveFavoriteResponse, error) {
func (s *service) RemoveLabel(ctx context.Context, req *provider.RemoveLabelRequest) (*provider.RemoveLabelResponse, error) {
return nil, gstatus.Errorf(codes.Unimplemented, "method not implemented")
}
@@ -706,32 +706,32 @@ func (s *Service) TouchFile(ctx context.Context, req *provider.TouchFileRequest)
}, nil
}
func (s *Service) AddFavorite(ctx context.Context, req *provider.AddFavoriteRequest) (*provider.AddFavoriteResponse, error) {
appctx.GetLogger(ctx).Debug().Msg("AddFavorite")
func (s *Service) AddLabel(ctx context.Context, req *provider.AddLabelRequest) (*provider.AddLabelResponse, error) {
appctx.GetLogger(ctx).Debug().Msg("AddLabel")
err := s.Storage.AddFavorite(ctx, req.Ref, req.UserId)
err := s.Storage.AddLabel(ctx, req.Ref, req.UserId, req.Label)
if err != nil {
return &provider.AddFavoriteResponse{
Status: status.NewStatusFromErrType(ctx, "add favorite", err),
return &provider.AddLabelResponse{
Status: status.NewStatusFromErrType(ctx, "add label", err),
}, nil
}
return &provider.AddFavoriteResponse{
return &provider.AddLabelResponse{
Status: status.NewOK(ctx),
}, nil
}
func (s *Service) RemoveFavorite(ctx context.Context, req *provider.RemoveFavoriteRequest) (*provider.RemoveFavoriteResponse, error) {
appctx.GetLogger(ctx).Debug().Msg("RemoveFavorite")
func (s *Service) RemoveLabel(ctx context.Context, req *provider.RemoveLabelRequest) (*provider.RemoveLabelResponse, error) {
appctx.GetLogger(ctx).Debug().Msg("RemoveLabel")
err := s.Storage.RemoveFavorite(ctx, req.Ref, req.UserId)
err := s.Storage.RemoveLabel(ctx, req.Ref, req.UserId, req.Label)
if err != nil {
return &provider.RemoveFavoriteResponse{
Status: status.NewStatusFromErrType(ctx, "remove favorite", err),
return &provider.RemoveLabelResponse{
Status: status.NewStatusFromErrType(ctx, "remove label", err),
}, nil
}
return &provider.RemoveFavoriteResponse{
return &provider.RemoveLabelResponse{
Status: status.NewOK(ctx),
}, nil
}
@@ -11,32 +11,34 @@ import (
types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1"
)
// FavoriteAdded is emitted when a user added a resource to their favorites
type FavoriteAdded struct {
// LabelAdded is emitted when a user adds a label to a resource
type LabelAdded struct {
Ref *provider.Reference
Label string
Executant *user.UserId
UserID *user.UserId
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
func (FavoriteAdded) Unmarshal(v []byte) (interface{}, error) {
e := FavoriteAdded{}
func (LabelAdded) Unmarshal(v []byte) (interface{}, error) {
e := LabelAdded{}
err := json.Unmarshal(v, &e)
return e, err
}
// FavoriteRemoved is emitted when a user removed a resource from their favorites
type FavoriteRemoved struct {
// LabelRemoved is emitted when a user removes a label from a resource
type LabelRemoved struct {
Ref *provider.Reference
Label string
Executant *user.UserId
UserID *user.UserId
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
func (FavoriteRemoved) Unmarshal(v []byte) (interface{}, error) {
e := FavoriteRemoved{}
func (LabelRemoved) Unmarshal(v []byte) (interface{}, error) {
e := LabelRemoved{}
err := json.Unmarshal(v, &e)
return e, err
}
+4 -4
View File
@@ -610,10 +610,10 @@ func (d *driver) DeleteStorageSpace(ctx context.Context, req *provider.DeleteSto
return errtypes.NotSupported("operation not supported")
}
func (d *driver) AddFavorite(ctx context.Context, ref *provider.Reference, userID *userpb.UserId) error {
return errtypes.NotSupported("AddFavorite not implemented")
func (d *driver) AddLabel(ctx context.Context, ref *provider.Reference, userID *userpb.UserId, label string) error {
return errtypes.NotSupported("AddLabel not implemented")
}
func (d *driver) RemoveFavorite(ctx context.Context, ref *provider.Reference, userID *userpb.UserId) error {
return errtypes.NotSupported("RemoveFavorite not implemented")
func (d *driver) RemoveLabel(ctx context.Context, ref *provider.Reference, userID *userpb.UserId, label string) error {
return errtypes.NotSupported("RemoveLabel not implemented")
}
+97
View File
@@ -0,0 +1,97 @@
// Copyright 2026 OpenCloud GmbH <mail@opencloud.eu>
// SPDX-License-Identifier: Apache-2.0
package cache
import (
"context"
"crypto/tls"
"crypto/x509"
"errors"
"os"
"strings"
"time"
"github.com/cenkalti/backoff"
"github.com/nats-io/nats.go"
"github.com/nats-io/nats.go/jetstream"
)
func NewNatsKeyValue(c Config) (jetstream.KeyValue, error) {
nodes := strings.Join(c.Nodes, ",")
if nodes == "" {
return nil, errors.New("at least one node is required")
}
opts := []nats.Option{}
if c.AuthUsername != "" || c.AuthPassword != "" {
opts = append(opts, nats.UserInfo(c.AuthUsername, c.AuthPassword))
}
if c.TLSEnabled {
tlsConfig := &tls.Config{
InsecureSkipVerify: c.TLSInsecure,
}
if c.TLSRootCACertificate != "" {
caCert, err := os.ReadFile(c.TLSRootCACertificate)
if err == nil {
caCertPool := x509.NewCertPool()
caCertPool.AppendCertsFromPEM(caCert)
tlsConfig.RootCAs = caCertPool
}
}
opts = append(opts, nats.Secure(tlsConfig))
}
var js jetstream.JetStream
o := func() error {
nc, err := nats.Connect(nodes, opts...)
if err != nil {
return err
}
js, err = jetstream.New(nc)
return err
}
err := backoff.Retry(o, backoff.NewExponentialBackOff())
if err != nil {
return nil, err
}
return NewNatsKeyValueFromJetStream(c, js)
}
func NewNatsKeyValueFromJetStream(c Config, js jetstream.JetStream) (jetstream.KeyValue, error) {
var err error
var kv jetstream.KeyValue
o := func() error {
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
kv, err = js.KeyValue(ctx, c.Database)
if err != nil {
kvConfig := jetstream.KeyValueConfig{
Bucket: c.Database,
TTL: 0, // we don't do TTLs for this store
}
if c.DisablePersistence {
kvConfig.Storage = jetstream.MemoryStorage
}
if c.Size > 0 {
kvConfig.MaxBytes = int64(c.Size)
}
kv, err = js.CreateKeyValue(ctx, kvConfig)
if err != nil {
panic(err)
}
}
return nil
}
err = backoff.Retry(o, backoff.NewExponentialBackOff())
if err != nil {
return nil, err
}
return kv, nil
}
+4 -4
View File
@@ -603,12 +603,12 @@ func (fs *cephfs) UnsetArbitraryMetadata(ctx context.Context, ref *provider.Refe
return getRevaError(err)
}
func (fs *cephfs) AddFavorite(ctx context.Context, ref *provider.Reference, userID *user.UserId) error {
return errtypes.NotSupported("AddFavorite not implemented")
func (fs *cephfs) AddLabel(ctx context.Context, ref *provider.Reference, userID *user.UserId, label string) error {
return errtypes.NotSupported("AddLabel not implemented")
}
func (fs *cephfs) RemoveFavorite(ctx context.Context, ref *provider.Reference, userID *user.UserId) error {
return errtypes.NotSupported("RemoveFavorite not implemented")
func (fs *cephfs) RemoveLabel(ctx context.Context, ref *provider.Reference, userID *user.UserId, label string) error {
return errtypes.NotSupported("RemoveLabel not implemented")
}
func (fs *cephfs) EmptyRecycle(ctx context.Context, ref *provider.Reference) error {
@@ -125,12 +125,12 @@ func (fs *hellofs) UnsetArbitraryMetadata(ctx context.Context, ref *provider.Ref
return errtypes.NotSupported("unimplemented")
}
func (fs *hellofs) AddFavorite(ctx context.Context, ref *provider.Reference, userID *user.UserId) error {
return errtypes.NotSupported("AddFavorite not implemented")
func (fs *hellofs) AddLabel(ctx context.Context, ref *provider.Reference, userID *user.UserId, label string) error {
return errtypes.NotSupported("AddLabel not implemented")
}
func (fs *hellofs) RemoveFavorite(ctx context.Context, ref *provider.Reference, userID *user.UserId) error {
return errtypes.NotSupported("RemoveFavorite not implemented")
func (fs *hellofs) RemoveLabel(ctx context.Context, ref *provider.Reference, userID *user.UserId, label string) error {
return errtypes.NotSupported("RemoveLabel not implemented")
}
// locks
@@ -862,14 +862,14 @@ func (nc *StorageDriver) Unlock(ctx context.Context, ref *provider.Reference, lo
return errtypes.NotSupported("unimplemented")
}
// AddFavorite adds a favourite to a resource
func (nc *StorageDriver) AddFavorite(ctx context.Context, ref *provider.Reference, userID *user.UserId) error {
return errtypes.NotSupported("AddFavorite not implemented")
// AddLabel adds a label to a resource
func (nc *StorageDriver) AddLabel(ctx context.Context, ref *provider.Reference, userID *user.UserId, label string) error {
return errtypes.NotSupported("AddLabel not implemented")
}
// RemoveFavorite removes a favourite from a resource
func (nc *StorageDriver) RemoveFavorite(ctx context.Context, ref *provider.Reference, userID *user.UserId) error {
return errtypes.NotSupported("RemoveFavorite not implemented")
// RemoveLabel removes a label from a resource
func (nc *StorageDriver) RemoveLabel(ctx context.Context, ref *provider.Reference, userID *user.UserId, label string) error {
return errtypes.NotSupported("RemoveLabel not implemented")
}
// ListStorageSpaces as defined in the storage.FS interface
@@ -1137,12 +1137,12 @@ func (fs *owncloudsqlfs) UnsetArbitraryMetadata(ctx context.Context, ref *provid
}
}
func (fs *owncloudsqlfs) AddFavorite(ctx context.Context, ref *provider.Reference, userID *userpb.UserId) error {
return errtypes.NotSupported("AddFavorite not implemented")
func (fs *owncloudsqlfs) AddLabel(ctx context.Context, ref *provider.Reference, userID *userpb.UserId, label string) error {
return errtypes.NotSupported("AddLabel not implemented")
}
func (fs *owncloudsqlfs) RemoveFavorite(ctx context.Context, ref *provider.Reference, userID *userpb.UserId) error {
return errtypes.NotSupported("RemoveFavorite not implemented")
func (fs *owncloudsqlfs) RemoveLabel(ctx context.Context, ref *provider.Reference, userID *userpb.UserId, label string) error {
return errtypes.NotSupported("RemoveLabel not implemented")
}
// GetLock returns an existing lock on the given reference
@@ -0,0 +1,166 @@
// Copyright 2018-2021 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// In applying this license, CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
package idcache
import (
"context"
"encoding/base32"
"path/filepath"
"strings"
"github.com/nats-io/nats.go"
"github.com/nats-io/nats.go/jetstream"
"github.com/opencloud-eu/reva/v2/pkg/appctx"
)
type IDCache struct {
kv jetstream.KeyValue
}
// NewStoreIDCache returns a new StoreIDCache
func NewStoreIDCache(kv jetstream.KeyValue) (*IDCache, error) {
return &IDCache{
kv: kv,
}, nil
}
// Delete removes an entry from the cache
func (c *IDCache) Delete(ctx context.Context, spaceID, nodeID string) error {
var rerr error
v, err := c.kv.Get(ctx, cacheKey(spaceID, nodeID))
if err == nil {
rerr = c.kv.Purge(ctx, reverseCacheKey(string(v.Value())))
}
err = c.kv.Purge(ctx, cacheKey(spaceID, nodeID))
if err != nil {
return err
}
return rerr
}
// DeleteByPath removes an entry from the cache
func (c *IDCache) DeleteByPath(ctx context.Context, path string) error {
baseKey := reverseCacheKey(path)
spaceID, nodeID, ok := c.GetByPath(ctx, path)
if !ok {
appctx.GetLogger(ctx).Error().Str("record", path).Msg("could not get spaceID and nodeID from cache")
} else {
err := c.kv.Purge(ctx, baseKey)
if err != nil && err != nats.ErrKeyNotFound {
appctx.GetLogger(ctx).Error().Err(err).Str("record", path).Str("spaceID", spaceID).Str("nodeID", nodeID).Msg("could not get spaceID and nodeID from cache")
}
err = c.kv.Purge(ctx, cacheKey(spaceID, nodeID))
if err != nil && err != nats.ErrKeyNotFound {
appctx.GetLogger(ctx).Error().Err(err).Str("record", path).Str("spaceID", spaceID).Str("nodeID", nodeID).Msg("could not get spaceID and nodeID from cache")
}
}
watcher, err := c.kv.Watch(ctx, baseKey+".*")
if err != nil {
return err
}
defer func() { _ = watcher.Stop() }()
for update := range watcher.Updates() {
if update == nil {
break
}
key := update.Key()
spaceID, nodeID, ok := c.getByReverseCacheKey(ctx, key)
if !ok {
appctx.GetLogger(ctx).Error().Str("record", key).Msg("could not get spaceID and nodeID from cache")
continue
}
err := c.kv.Purge(ctx, key)
if err != nil && err != nats.ErrKeyNotFound {
appctx.GetLogger(ctx).Error().Err(err).Str("record", key).Str("spaceID", spaceID).Str("nodeID", nodeID).Msg("could not get spaceID and nodeID from cache")
}
err = c.kv.Purge(ctx, cacheKey(spaceID, nodeID))
if err != nil && err != nats.ErrKeyNotFound {
appctx.GetLogger(ctx).Error().Err(err).Str("record", key).Str("spaceID", spaceID).Str("nodeID", nodeID).Msg("could not get spaceID and nodeID from cache")
}
}
return nil
}
// DeletePath removes only the path entry from the cache
func (c *IDCache) DeletePath(ctx context.Context, path string) error {
return c.kv.Purge(ctx, reverseCacheKey(path))
}
// Set adds a new entry to the cache
func (c *IDCache) Set(ctx context.Context, spaceID, nodeID, val string) error {
_, err := c.kv.Put(ctx, cacheKey(spaceID, nodeID), []byte(val))
if err != nil {
return err
}
_, err = c.kv.Put(ctx, reverseCacheKey(val), []byte(cacheKey(spaceID, nodeID)))
return err
}
// Get returns the value for a given key
func (c *IDCache) Get(ctx context.Context, spaceID, nodeID string) (string, bool) {
record, err := c.kv.Get(ctx, cacheKey(spaceID, nodeID))
if err != nil {
return "", false
}
return string(record.Value()), true
}
func (c *IDCache) getByReverseCacheKey(ctx context.Context, reverseKey string) (string, string, bool) {
record, err := c.kv.Get(ctx, reverseKey)
if err != nil {
return "", "", false
}
decoded, err := base32.StdEncoding.DecodeString(string(record.Value()))
if err != nil {
return "", "", false
}
parts := strings.SplitN(string(decoded), "!", 2)
if len(parts) != 2 {
return "", "", false
}
return parts[0], parts[1], true
}
// GetByPath returns the key for a given value
func (c *IDCache) GetByPath(ctx context.Context, path string) (string, string, bool) {
return c.getByReverseCacheKey(ctx, reverseCacheKey(path))
}
func cacheKey(spaceid, nodeID string) string {
return base32.StdEncoding.EncodeToString([]byte(spaceid + "!" + nodeID))
}
func reverseCacheKey(path string) string {
parts := strings.Split(strings.TrimPrefix(path, string(filepath.Separator)), string(filepath.Separator))
encoded := make([]string, len(parts))
for i, p := range parts {
encoded[i] = base32.StdEncoding.EncodeToString([]byte(p))
}
return strings.Join(encoded, ".")
}
@@ -25,7 +25,6 @@ import (
"os"
"path/filepath"
"strings"
"time"
user "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
@@ -33,6 +32,7 @@ import (
lru "github.com/hashicorp/golang-lru/v2"
"github.com/opencloud-eu/reva/v2/pkg/appctx"
"github.com/opencloud-eu/reva/v2/pkg/errtypes"
"github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/idcache"
"github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/options"
"github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/metadata"
"github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/metadata/prefixes"
@@ -82,24 +82,20 @@ type Lookup struct {
}
// New returns a new Lookup instance
func New(b metadata.Backend, um usermapper.Mapper, o *options.Options, tm node.TimeManager) *Lookup {
idHistoryConf := o.IDCache
idHistoryConf.Table = o.IDCache.Table + "_history"
idHistoryConf.TTL = 1 * time.Minute
func New(b metadata.Backend, um usermapper.Mapper, o *options.Options, tm node.TimeManager, cache, historyCache *idcache.IDCache) (*Lookup, error) {
spaceRootCache, _ := lru.New[string, string](1000)
lu := &Lookup{
Options: o,
metadataBackend: b,
IDCache: NewStoreIDCache(o.IDCache),
IDHistoryCache: NewStoreIDCache(idHistoryConf),
IDCache: cache,
IDHistoryCache: historyCache,
spaceRootCache: spaceRootCache,
userMapper: um,
tm: tm,
}
return lu
return lu, nil
}
// CacheID caches the path for the given space and node id
@@ -1,162 +0,0 @@
// Copyright 2018-2021 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// In applying this license, CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
package lookup
import (
"context"
"strings"
microstore "go-micro.dev/v4/store"
"github.com/opencloud-eu/reva/v2/pkg/appctx"
"github.com/opencloud-eu/reva/v2/pkg/storage/cache"
"github.com/opencloud-eu/reva/v2/pkg/store"
)
type StoreIDCache struct {
cache microstore.Store
}
// NewMemoryIDCache returns a new MemoryIDCache
func NewStoreIDCache(c cache.Config) *StoreIDCache {
return &StoreIDCache{
cache: store.Create(
store.Store(c.Store),
store.TTL(c.TTL),
store.Size(c.Size),
microstore.Nodes(c.Nodes...),
microstore.Database(c.Database),
microstore.Table(c.Table),
store.DisablePersistence(c.DisablePersistence),
store.Authentication(c.AuthUsername, c.AuthPassword),
store.TLSEnabled(c.TLSEnabled),
store.TLSInsecure(c.TLSInsecure),
store.TLSRootCA(c.TLSRootCACertificate),
),
}
}
// Delete removes an entry from the cache
func (c *StoreIDCache) Delete(_ context.Context, spaceID, nodeID string) error {
var rerr error
v, err := c.cache.Read(cacheKey(spaceID, nodeID))
if err == nil {
rerr = c.cache.Delete(reverseCacheKey(string(v[0].Value)))
}
err = c.cache.Delete(cacheKey(spaceID, nodeID))
if err != nil {
return err
}
return rerr
}
// DeleteByPath removes an entry from the cache
func (c *StoreIDCache) DeleteByPath(ctx context.Context, path string) error {
spaceID, nodeID, ok := c.GetByPath(ctx, path)
if !ok {
appctx.GetLogger(ctx).Error().Str("record", path).Msg("could not get spaceID and nodeID from cache")
} else {
err := c.cache.Delete(reverseCacheKey(path))
if err != nil {
appctx.GetLogger(ctx).Error().Err(err).Str("record", path).Str("spaceID", spaceID).Str("nodeID", nodeID).Msg("could not get spaceID and nodeID from cache")
}
err = c.cache.Delete(cacheKey(spaceID, nodeID))
if err != nil {
appctx.GetLogger(ctx).Error().Err(err).Str("record", path).Str("spaceID", spaceID).Str("nodeID", nodeID).Msg("could not get spaceID and nodeID from cache")
}
}
list, err := c.cache.List(
microstore.ListPrefix(reverseCacheKey(path) + "/"),
)
if err != nil {
return err
}
for _, record := range list {
spaceID, nodeID, ok := c.GetByPath(ctx, record)
if !ok {
appctx.GetLogger(ctx).Error().Str("record", record).Msg("could not get spaceID and nodeID from cache")
continue
}
err := c.cache.Delete(reverseCacheKey(record))
if err != nil {
appctx.GetLogger(ctx).Error().Err(err).Str("record", record).Str("spaceID", spaceID).Str("nodeID", nodeID).Msg("could not get spaceID and nodeID from cache")
}
err = c.cache.Delete(cacheKey(spaceID, nodeID))
if err != nil {
appctx.GetLogger(ctx).Error().Err(err).Str("record", record).Str("spaceID", spaceID).Str("nodeID", nodeID).Msg("could not get spaceID and nodeID from cache")
}
}
return nil
}
// DeletePath removes only the path entry from the cache
func (c *StoreIDCache) DeletePath(ctx context.Context, path string) error {
return c.cache.Delete(reverseCacheKey(path))
}
// Add adds a new entry to the cache
func (c *StoreIDCache) Set(_ context.Context, spaceID, nodeID, val string) error {
err := c.cache.Write(&microstore.Record{
Key: cacheKey(spaceID, nodeID),
Value: []byte(val),
})
if err != nil {
return err
}
return c.cache.Write(&microstore.Record{
Key: reverseCacheKey(val),
Value: []byte(cacheKey(spaceID, nodeID)),
})
}
// Get returns the value for a given key
func (c *StoreIDCache) Get(_ context.Context, spaceID, nodeID string) (string, bool) {
records, err := c.cache.Read(cacheKey(spaceID, nodeID))
if err != nil || len(records) == 0 {
return "", false
}
return string(records[0].Value), true
}
// GetByPath returns the key for a given value
func (c *StoreIDCache) GetByPath(_ context.Context, val string) (string, string, bool) {
records, err := c.cache.Read(reverseCacheKey(val))
if err != nil || len(records) == 0 {
return "", "", false
}
parts := strings.SplitN(string(records[0].Value), "!", 2)
if len(parts) != 2 {
return "", "", false
}
return parts[0], parts[1], true
}
func cacheKey(spaceid, nodeID string) string {
return spaceid + "!" + nodeID
}
func reverseCacheKey(val string) string {
return val
}
+43 -26
View File
@@ -27,12 +27,13 @@ import (
"github.com/rs/zerolog"
tusd "github.com/tus/tusd/v2/pkg/handler"
microstore "go-micro.dev/v4/store"
"github.com/opencloud-eu/reva/v2/pkg/events"
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"
"github.com/opencloud-eu/reva/v2/pkg/storage"
"github.com/opencloud-eu/reva/v2/pkg/storage/cache"
"github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/blobstore"
"github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/idcache"
"github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/lookup"
"github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/options"
"github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/timemanager"
@@ -47,12 +48,11 @@ import (
"github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/upload"
"github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/usermapper"
"github.com/opencloud-eu/reva/v2/pkg/storage/utils/middleware"
"github.com/opencloud-eu/reva/v2/pkg/store"
"github.com/pkg/errors"
)
func init() {
registry.Register("posix", New)
registry.Register("posix", NewDefault)
}
type posixFS struct {
@@ -63,12 +63,41 @@ type posixFS struct {
// New returns an implementation to of the storage.FS interface that talk to
// a local filesystem.
func New(m map[string]interface{}, stream events.Stream, log *zerolog.Logger) (storage.FS, error) {
func NewDefault(m map[string]interface{}, stream events.Stream, log *zerolog.Logger) (storage.FS, error) {
o, err := options.New(m)
if err != nil {
return nil, err
}
o.IDCache.Database += "_v2" // Use a versioned bucket name to avoid conflicts with previous implementations
kv, err := cache.NewNatsKeyValue(o.IDCache)
if err != nil {
return nil, errors.Wrap(err, "could not create nats key value store")
}
c, err := idcache.NewStoreIDCache(kv)
if err != nil {
return nil, err
}
o.IDCache.Database += "_history" // Use a versioned bucket name to avoid conflicts with previous implementations
historyKv, err := cache.NewNatsKeyValue(o.IDCache)
if err != nil {
return nil, errors.Wrap(err, "could not create nats key value store")
}
historyCache, err := idcache.NewStoreIDCache(historyKv)
if err != nil {
return nil, err
}
return New(o, stream, c, historyCache, log)
}
func New(o *options.Options, stream events.Stream, cache, historyCache *idcache.IDCache, log *zerolog.Logger) (storage.FS, error) {
if o.IDCache.Store != "nats-js-kv" {
return nil, fmt.Errorf("the posix driver requires a nats-js-kv cache")
}
var err error
if log == nil {
log = &zerolog.Logger{}
}
@@ -89,9 +118,12 @@ func New(m map[string]interface{}, stream events.Stream, log *zerolog.Logger) (s
var lu *lookup.Lookup
switch o.MetadataBackend {
case "xattrs":
lu = lookup.New(metadata.NewXattrsBackend(o.FileMetadataCache), um, o, &timemanager.Manager{})
lu, err = lookup.New(metadata.NewXattrsBackend(o.FileMetadataCache), um, o, &timemanager.Manager{}, cache, historyCache)
if err != nil {
return nil, err
}
case "hybrid":
lu = lookup.New(metadata.NewHybridBackend(1024, // start offloading grants after 1KB
lu, err = lookup.New(metadata.NewHybridBackend(1024, // start offloading grants after 1KB
func(n metadata.MetadataNode) string {
spaceRoot, _ := lu.IDCache.Get(context.Background(), n.GetSpaceID(), n.GetSpaceID())
if len(spaceRoot) == 0 {
@@ -100,7 +132,10 @@ func New(m map[string]interface{}, stream events.Stream, log *zerolog.Logger) (s
return filepath.Join(spaceRoot, lookup.MetadataDir)
},
o.FileMetadataCache), um, o, &timemanager.Manager{})
o.FileMetadataCache), um, o, &timemanager.Manager{}, cache, historyCache)
if err != nil {
return nil, err
}
default:
return nil, fmt.Errorf("unknown metadata backend %s, only 'xattrs' or 'hybrid' (default) supported", o.MetadataBackend)
}
@@ -125,25 +160,7 @@ func New(m map[string]interface{}, stream events.Stream, log *zerolog.Logger) (s
return nil, err
}
switch o.IDCache.Store {
case "", "memory", "noop":
return nil, fmt.Errorf("the posix driver requires a shared id cache, e.g. nats-js-kv or redis")
}
tp, err := tree.New(lu, bs, um, trashbin, p, o, stream, store.Create(
// TODO use a NewStoreIDCache here?
store.Store(o.IDCache.Store),
store.TTL(o.IDCache.TTL),
store.Size(o.IDCache.Size),
microstore.Nodes(o.IDCache.Nodes...),
microstore.Database(o.IDCache.Database),
microstore.Table(o.IDCache.Table),
store.DisablePersistence(o.IDCache.DisablePersistence),
store.Authentication(o.IDCache.AuthUsername, o.IDCache.AuthPassword),
store.TLSEnabled(o.IDCache.TLSEnabled),
store.TLSInsecure(o.IDCache.TLSInsecure),
store.TLSRootCA(o.IDCache.TLSRootCACertificate),
), log)
tp, err := tree.New(lu, bs, um, trashbin, p, o, stream, cache, log)
if err != nil {
return nil, err
}
+8 -8
View File
@@ -33,7 +33,6 @@ import (
"github.com/pkg/errors"
"github.com/pkg/xattr"
"github.com/rs/zerolog"
"go-micro.dev/v4/store"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
"golang.org/x/sync/errgroup"
@@ -45,6 +44,7 @@ import (
"github.com/opencloud-eu/reva/v2/pkg/errtypes"
"github.com/opencloud-eu/reva/v2/pkg/events"
"github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/blobstore"
"github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/idcache"
"github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/lookup"
"github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/options"
"github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/trashbin"
@@ -93,7 +93,7 @@ type Tree struct {
projectSpacesRoot string
userMapper usermapper.Mapper
idCache store.Store
idCache *idcache.IDCache
watcher Watcher
scanQueue chan scanItem
scanDebouncer *ScanDebouncer
@@ -106,7 +106,7 @@ type Tree struct {
type PermissionCheckFunc func(rp *provider.ResourcePermissions) bool
// New returns a new instance of Tree
func New(lu node.PathLookup, bs node.Blobstore, um usermapper.Mapper, trashbin *trashbin.Trashbin, permissions permissions.Permissions, o *options.Options, es events.Stream, cache store.Store, log *zerolog.Logger) (*Tree, error) {
func New(lu node.PathLookup, bs node.Blobstore, um usermapper.Mapper, trashbin *trashbin.Trashbin, permissions permissions.Permissions, o *options.Options, es events.Stream, cache *idcache.IDCache, log *zerolog.Logger) (*Tree, error) {
scanQueue := make(chan scanItem)
t := &Tree{
@@ -585,7 +585,7 @@ func (t *Tree) Delete(ctx context.Context, n *node.Node) error {
// remove entry from cache immediately to avoid inconsistencies
defer func() {
if err := t.idCache.Delete(path); err != nil {
if err := t.idCache.DeleteByPath(ctx, path); err != nil {
t.log.Error().Err(err).Str("path", path).Msg("could not delete id from cache")
}
}()
@@ -820,10 +820,10 @@ func isTrash(path string) bool {
return strings.HasSuffix(path, ".trashinfo") || strings.HasSuffix(path, ".trashitem") || strings.Contains(path, ".Trash")
}
func (t *Tree) AddFavorite(ctx context.Context, ref *provider.Reference, userID *user.UserId) error {
return errtypes.NotSupported("AddFavorite not implemented")
func (t *Tree) AddLabel(ctx context.Context, ref *provider.Reference, userID *user.UserId, label string) error {
return errtypes.NotSupported("AddLabel not implemented")
}
func (t *Tree) RemoveFavorite(ctx context.Context, ref *provider.Reference, userID *user.UserId) error {
return errtypes.NotSupported("RemoveFavorite not implemented")
func (t *Tree) RemoveLabel(ctx context.Context, ref *provider.Reference, userID *user.UserId, label string) error {
return errtypes.NotSupported("RemoveLabel not implemented")
}
@@ -1035,9 +1035,13 @@ func (fs *Decomposedfs) ListFolder(ctx context.Context, ref *provider.Reference,
return finfos, nil
}
// AddFavorite adds a favorite
func (fs *Decomposedfs) AddFavorite(ctx context.Context, ref *provider.Reference, uid *user.UserId) error {
ctx, span := tracer.Start(ctx, "AddFavorite")
// AddLabel adds a favorite
func (fs *Decomposedfs) AddLabel(ctx context.Context, ref *provider.Reference, uid *user.UserId, label string) error {
if label != "favorite" {
return errtypes.BadRequest("unsupported label: " + label)
}
ctx, span := tracer.Start(ctx, "AddLabel")
defer span.End()
n, err := fs.lu.NodeFromResource(ctx, ref)
if err != nil {
@@ -1058,9 +1062,13 @@ func (fs *Decomposedfs) AddFavorite(ctx context.Context, ref *provider.Reference
return n.SetFavorite(ctx, uid)
}
// RemoveFavorite removes a favorite
func (fs *Decomposedfs) RemoveFavorite(ctx context.Context, ref *provider.Reference, uid *user.UserId) error {
ctx, span := tracer.Start(ctx, "RemoveFavorite")
// RemoveLabel removes a favorite
func (fs *Decomposedfs) RemoveLabel(ctx context.Context, ref *provider.Reference, uid *user.UserId, label string) error {
if label != "favorite" {
return errtypes.BadRequest("unsupported label: " + label)
}
ctx, span := tracer.Start(ctx, "RemoveLabel")
defer span.End()
n, err := fs.lu.NodeFromResource(ctx, ref)
if err != nil {
+4 -4
View File
@@ -117,10 +117,10 @@ type FS interface {
// UnsetArbitraryMetadata removes arbitraty metadata from a resource
UnsetArbitraryMetadata(ctx context.Context, ref *provider.Reference, keys []string) error
// AddFavorite adds a favorite to a resource
AddFavorite(ctx context.Context, ref *provider.Reference, userID *user.UserId) error
// RemoveFavorite removes a favorite from a resource
RemoveFavorite(ctx context.Context, ref *provider.Reference, userID *user.UserId) error
// AddLabel adds a label to a resource
AddLabel(ctx context.Context, ref *provider.Reference, userID *user.UserId, label string) error
// RemoveLabel removes a label from a resource
RemoveLabel(ctx context.Context, ref *provider.Reference, userID *user.UserId, label string) error
// Locks
@@ -1233,12 +1233,12 @@ func (fs *Decomposedfs) Unlock(ctx context.Context, ref *provider.Reference, loc
return node.Unlock(ctx, lock)
}
func (fs *Decomposedfs) AddFavorite(ctx context.Context, ref *provider.Reference, userID *user.UserId) error {
return errtypes.NotSupported("AddFavorite not implemented")
func (fs *Decomposedfs) AddLabel(ctx context.Context, ref *provider.Reference, userID *user.UserId, label string) error {
return errtypes.NotSupported("AddLabel not implemented")
}
func (fs *Decomposedfs) RemoveFavorite(ctx context.Context, ref *provider.Reference, userID *user.UserId) error {
return errtypes.NotSupported("RemoveFavorite not implemented")
func (fs *Decomposedfs) RemoveLabel(ctx context.Context, ref *provider.Reference, userID *user.UserId, label string) error {
return errtypes.NotSupported("RemoveLabel not implemented")
}
func (fs *Decomposedfs) ListRecycle(ctx context.Context, ref *provider.Reference, key, relativePath string) ([]*provider.RecycleItem, error) {
+4 -4
View File
@@ -281,12 +281,12 @@ func (fs *eosfs) Shutdown(ctx context.Context) error {
return nil
}
func (fs *eosfs) AddFavorite(ctx context.Context, ref *provider.Reference, userID *userpb.UserId) error {
return errtypes.NotSupported("AddFavorite not implemented")
func (fs *eosfs) AddLabel(ctx context.Context, ref *provider.Reference, userID *userpb.UserId, label string) error {
return errtypes.NotSupported("AddLabel not implemented")
}
func (fs *eosfs) RemoveFavorite(ctx context.Context, ref *provider.Reference, userID *userpb.UserId) error {
return errtypes.NotSupported("RemoveFavorite not implemented")
func (fs *eosfs) RemoveLabel(ctx context.Context, ref *provider.Reference, userID *userpb.UserId, label string) error {
return errtypes.NotSupported("RemoveLabel not implemented")
}
func getUser(ctx context.Context) (*userpb.User, error) {
@@ -722,12 +722,12 @@ func (fs *localfs) GetLock(ctx context.Context, ref *provider.Reference) (*provi
return nil, errtypes.NotSupported("unimplemented")
}
func (fs *localfs) AddFavorite(ctx context.Context, ref *provider.Reference, userID *userpb.UserId) error {
return errtypes.NotSupported("AddFavorite not implemented")
func (fs *localfs) AddLabel(ctx context.Context, ref *provider.Reference, userID *userpb.UserId, label string) error {
return errtypes.NotSupported("AddLabel not implemented")
}
func (fs *localfs) RemoveFavorite(ctx context.Context, ref *provider.Reference, userID *userpb.UserId) error {
return errtypes.NotSupported("RemoveFavorite not implemented")
func (fs *localfs) RemoveLabel(ctx context.Context, ref *provider.Reference, userID *userpb.UserId, label string) error {
return errtypes.NotSupported("RemoveLabel not implemented")
}
// SetLock puts a lock on the given reference
@@ -1090,14 +1090,14 @@ func (f *FS) DeleteStorageSpace(ctx context.Context, req *provider.DeleteStorage
return res0
}
func (f *FS) AddFavorite(ctx context.Context, ref *provider.Reference, userID *userpb.UserId) error {
func (f *FS) AddLabel(ctx context.Context, ref *provider.Reference, userID *userpb.UserId, label string) error {
var (
err error
unhook UnHook
unhooks []UnHook
)
for _, hook := range f.hooks {
ctx, unhook, err = hook("AddFavorite", ctx, ref.GetResourceId().GetSpaceId())
ctx, unhook, err = hook("AddLabel", ctx, ref.GetResourceId().GetSpaceId())
if err != nil {
return err
}
@@ -1106,7 +1106,7 @@ func (f *FS) AddFavorite(ctx context.Context, ref *provider.Reference, userID *u
}
}
res0 := f.next.AddFavorite(ctx, ref, userID)
res0 := f.next.AddLabel(ctx, ref, userID, label)
for _, unhook := range unhooks {
if err := unhook(); err != nil {
@@ -1117,14 +1117,14 @@ func (f *FS) AddFavorite(ctx context.Context, ref *provider.Reference, userID *u
return res0
}
func (f *FS) RemoveFavorite(ctx context.Context, ref *provider.Reference, userID *userpb.UserId) error {
func (f *FS) RemoveLabel(ctx context.Context, ref *provider.Reference, userID *userpb.UserId, label string) error {
var (
err error
unhook UnHook
unhooks []UnHook
)
for _, hook := range f.hooks {
ctx, unhook, err = hook("RemoveFavorite", ctx, ref.GetResourceId().GetSpaceId())
ctx, unhook, err = hook("RemoveLabel", ctx, ref.GetResourceId().GetSpaceId())
if err != nil {
return err
}
@@ -1133,7 +1133,7 @@ func (f *FS) RemoveFavorite(ctx context.Context, ref *provider.Reference, userID
}
}
res0 := f.next.RemoveFavorite(ctx, ref, userID)
res0 := f.next.RemoveLabel(ctx, ref, userID, label)
for _, unhook := range unhooks {
if err := unhook(); err != nil {
@@ -224,8 +224,8 @@ func (_c *GatewayAPIClient_AddAppProvider_Call) RunAndReturn(run func(context.Co
return _c
}
// AddFavorite provides a mock function with given fields: ctx, in, opts
func (_m *GatewayAPIClient) AddFavorite(ctx context.Context, in *providerv1beta1.AddFavoriteRequest, opts ...grpc.CallOption) (*providerv1beta1.AddFavoriteResponse, error) {
// AddLabel provides a mock function with given fields: ctx, in, opts
func (_m *GatewayAPIClient) AddLabel(ctx context.Context, in *providerv1beta1.AddLabelRequest, opts ...grpc.CallOption) (*providerv1beta1.AddLabelResponse, error) {
var tmpRet mock.Arguments
if len(opts) > 0 {
tmpRet = _m.Called(ctx, in, opts)
@@ -235,23 +235,23 @@ func (_m *GatewayAPIClient) AddFavorite(ctx context.Context, in *providerv1beta1
ret := tmpRet
if len(ret) == 0 {
panic("no return value specified for AddFavorite")
panic("no return value specified for AddLabel")
}
var r0 *providerv1beta1.AddFavoriteResponse
var r0 *providerv1beta1.AddLabelResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.AddFavoriteRequest, ...grpc.CallOption) (*providerv1beta1.AddFavoriteResponse, error)); ok {
if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.AddLabelRequest, ...grpc.CallOption) (*providerv1beta1.AddLabelResponse, error)); ok {
return rf(ctx, in, opts...)
}
if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.AddFavoriteRequest, ...grpc.CallOption) *providerv1beta1.AddFavoriteResponse); ok {
if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.AddLabelRequest, ...grpc.CallOption) *providerv1beta1.AddLabelResponse); ok {
r0 = rf(ctx, in, opts...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*providerv1beta1.AddFavoriteResponse)
r0 = ret.Get(0).(*providerv1beta1.AddLabelResponse)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *providerv1beta1.AddFavoriteRequest, ...grpc.CallOption) error); ok {
if rf, ok := ret.Get(1).(func(context.Context, *providerv1beta1.AddLabelRequest, ...grpc.CallOption) error); ok {
r1 = rf(ctx, in, opts...)
} else {
r1 = ret.Error(1)
@@ -260,21 +260,21 @@ func (_m *GatewayAPIClient) AddFavorite(ctx context.Context, in *providerv1beta1
return r0, r1
}
// GatewayAPIClient_AddFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddFavorite'
type GatewayAPIClient_AddFavorite_Call struct {
// GatewayAPIClient_AddLabel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddLabel'
type GatewayAPIClient_AddLabel_Call struct {
*mock.Call
}
// AddFavorite is a helper method to define mock.On call
// AddLabel is a helper method to define mock.On call
// - ctx context.Context
// - in *providerv1beta1.AddFavoriteRequest
// - in *providerv1beta1.AddLabelRequest
// - opts ...grpc.CallOption
func (_e *GatewayAPIClient_Expecter) AddFavorite(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_AddFavorite_Call {
return &GatewayAPIClient_AddFavorite_Call{Call: _e.mock.On("AddFavorite",
func (_e *GatewayAPIClient_Expecter) AddLabel(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_AddLabel_Call {
return &GatewayAPIClient_AddLabel_Call{Call: _e.mock.On("AddLabel",
append([]interface{}{ctx, in}, opts...)...)}
}
func (_c *GatewayAPIClient_AddFavorite_Call) Run(run func(ctx context.Context, in *providerv1beta1.AddFavoriteRequest, opts ...grpc.CallOption)) *GatewayAPIClient_AddFavorite_Call {
func (_c *GatewayAPIClient_AddLabel_Call) Run(run func(ctx context.Context, in *providerv1beta1.AddLabelRequest, opts ...grpc.CallOption)) *GatewayAPIClient_AddLabel_Call {
_c.Call.Run(func(args mock.Arguments) {
variadicArgs := make([]grpc.CallOption, len(args)-2)
for i, a := range args[2:] {
@@ -282,17 +282,17 @@ func (_c *GatewayAPIClient_AddFavorite_Call) Run(run func(ctx context.Context, i
variadicArgs[i] = a.(grpc.CallOption)
}
}
run(args[0].(context.Context), args[1].(*providerv1beta1.AddFavoriteRequest), variadicArgs...)
run(args[0].(context.Context), args[1].(*providerv1beta1.AddLabelRequest), variadicArgs...)
})
return _c
}
func (_c *GatewayAPIClient_AddFavorite_Call) Return(_a0 *providerv1beta1.AddFavoriteResponse, _a1 error) *GatewayAPIClient_AddFavorite_Call {
func (_c *GatewayAPIClient_AddLabel_Call) Return(_a0 *providerv1beta1.AddLabelResponse, _a1 error) *GatewayAPIClient_AddLabel_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *GatewayAPIClient_AddFavorite_Call) RunAndReturn(run func(context.Context, *providerv1beta1.AddFavoriteRequest, ...grpc.CallOption) (*providerv1beta1.AddFavoriteResponse, error)) *GatewayAPIClient_AddFavorite_Call {
func (_c *GatewayAPIClient_AddLabel_Call) RunAndReturn(run func(context.Context, *providerv1beta1.AddLabelRequest, ...grpc.CallOption) (*providerv1beta1.AddLabelResponse, error)) *GatewayAPIClient_AddLabel_Call {
_c.Call.Return(run)
return _c
}
@@ -6210,8 +6210,8 @@ func (_c *GatewayAPIClient_RefreshLock_Call) RunAndReturn(run func(context.Conte
return _c
}
// RemoveFavorite provides a mock function with given fields: ctx, in, opts
func (_m *GatewayAPIClient) RemoveFavorite(ctx context.Context, in *providerv1beta1.RemoveFavoriteRequest, opts ...grpc.CallOption) (*providerv1beta1.RemoveFavoriteResponse, error) {
// RemoveLabel provides a mock function with given fields: ctx, in, opts
func (_m *GatewayAPIClient) RemoveLabel(ctx context.Context, in *providerv1beta1.RemoveLabelRequest, opts ...grpc.CallOption) (*providerv1beta1.RemoveLabelResponse, error) {
var tmpRet mock.Arguments
if len(opts) > 0 {
tmpRet = _m.Called(ctx, in, opts)
@@ -6221,23 +6221,23 @@ func (_m *GatewayAPIClient) RemoveFavorite(ctx context.Context, in *providerv1be
ret := tmpRet
if len(ret) == 0 {
panic("no return value specified for RemoveFavorite")
panic("no return value specified for RemoveLabel")
}
var r0 *providerv1beta1.RemoveFavoriteResponse
var r0 *providerv1beta1.RemoveLabelResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.RemoveFavoriteRequest, ...grpc.CallOption) (*providerv1beta1.RemoveFavoriteResponse, error)); ok {
if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.RemoveLabelRequest, ...grpc.CallOption) (*providerv1beta1.RemoveLabelResponse, error)); ok {
return rf(ctx, in, opts...)
}
if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.RemoveFavoriteRequest, ...grpc.CallOption) *providerv1beta1.RemoveFavoriteResponse); ok {
if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.RemoveLabelRequest, ...grpc.CallOption) *providerv1beta1.RemoveLabelResponse); ok {
r0 = rf(ctx, in, opts...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*providerv1beta1.RemoveFavoriteResponse)
r0 = ret.Get(0).(*providerv1beta1.RemoveLabelResponse)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *providerv1beta1.RemoveFavoriteRequest, ...grpc.CallOption) error); ok {
if rf, ok := ret.Get(1).(func(context.Context, *providerv1beta1.RemoveLabelRequest, ...grpc.CallOption) error); ok {
r1 = rf(ctx, in, opts...)
} else {
r1 = ret.Error(1)
@@ -6246,21 +6246,21 @@ func (_m *GatewayAPIClient) RemoveFavorite(ctx context.Context, in *providerv1be
return r0, r1
}
// GatewayAPIClient_RemoveFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveFavorite'
type GatewayAPIClient_RemoveFavorite_Call struct {
// GatewayAPIClient_RemoveLabel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveLabel'
type GatewayAPIClient_RemoveLabel_Call struct {
*mock.Call
}
// RemoveFavorite is a helper method to define mock.On call
// RemoveLabel is a helper method to define mock.On call
// - ctx context.Context
// - in *providerv1beta1.RemoveFavoriteRequest
// - in *providerv1beta1.RemoveLabelRequest
// - opts ...grpc.CallOption
func (_e *GatewayAPIClient_Expecter) RemoveFavorite(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_RemoveFavorite_Call {
return &GatewayAPIClient_RemoveFavorite_Call{Call: _e.mock.On("RemoveFavorite",
func (_e *GatewayAPIClient_Expecter) RemoveLabel(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_RemoveLabel_Call {
return &GatewayAPIClient_RemoveLabel_Call{Call: _e.mock.On("RemoveLabel",
append([]interface{}{ctx, in}, opts...)...)}
}
func (_c *GatewayAPIClient_RemoveFavorite_Call) Run(run func(ctx context.Context, in *providerv1beta1.RemoveFavoriteRequest, opts ...grpc.CallOption)) *GatewayAPIClient_RemoveFavorite_Call {
func (_c *GatewayAPIClient_RemoveLabel_Call) Run(run func(ctx context.Context, in *providerv1beta1.RemoveLabelRequest, opts ...grpc.CallOption)) *GatewayAPIClient_RemoveLabel_Call {
_c.Call.Run(func(args mock.Arguments) {
variadicArgs := make([]grpc.CallOption, len(args)-2)
for i, a := range args[2:] {
@@ -6268,17 +6268,17 @@ func (_c *GatewayAPIClient_RemoveFavorite_Call) Run(run func(ctx context.Context
variadicArgs[i] = a.(grpc.CallOption)
}
}
run(args[0].(context.Context), args[1].(*providerv1beta1.RemoveFavoriteRequest), variadicArgs...)
run(args[0].(context.Context), args[1].(*providerv1beta1.RemoveLabelRequest), variadicArgs...)
})
return _c
}
func (_c *GatewayAPIClient_RemoveFavorite_Call) Return(_a0 *providerv1beta1.RemoveFavoriteResponse, _a1 error) *GatewayAPIClient_RemoveFavorite_Call {
func (_c *GatewayAPIClient_RemoveLabel_Call) Return(_a0 *providerv1beta1.RemoveLabelResponse, _a1 error) *GatewayAPIClient_RemoveLabel_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *GatewayAPIClient_RemoveFavorite_Call) RunAndReturn(run func(context.Context, *providerv1beta1.RemoveFavoriteRequest, ...grpc.CallOption) (*providerv1beta1.RemoveFavoriteResponse, error)) *GatewayAPIClient_RemoveFavorite_Call {
func (_c *GatewayAPIClient_RemoveLabel_Call) RunAndReturn(run func(context.Context, *providerv1beta1.RemoveLabelRequest, ...grpc.CallOption) (*providerv1beta1.RemoveLabelResponse, error)) *GatewayAPIClient_RemoveLabel_Call {
_c.Call.Return(run)
return _c
}
+2
View File
@@ -6,6 +6,8 @@
package cpu
import "runtime"
func doinit() {
setMinimalFeatures()
+1 -1
View File
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build !darwin && !linux && !netbsd && !openbsd && !windows && arm64
//go:build !darwin && !linux && !netbsd && !openbsd && arm64
package cpu
-42
View File
@@ -1,42 +0,0 @@
// Copyright 2026 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package cpu
import (
"golang.org/x/sys/windows"
)
func doinit() {
// set HasASIMD and HasFP to true as per
// https://learn.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-170#base-requirements
//
// The ARM64 version of Windows always presupposes that it's running on an ARMv8 or later architecture.
// Both floating-point and NEON support are presumed to be present in hardware.
//
ARM64.HasASIMD = true
ARM64.HasFP = true
if windows.IsProcessorFeaturePresent(windows.PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE) {
ARM64.HasAES = true
ARM64.HasPMULL = true
ARM64.HasSHA1 = true
ARM64.HasSHA2 = true
}
ARM64.HasSHA3 = windows.IsProcessorFeaturePresent(windows.PF_ARM_SHA3_INSTRUCTIONS_AVAILABLE)
ARM64.HasCRC32 = windows.IsProcessorFeaturePresent(windows.PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE)
ARM64.HasSHA512 = windows.IsProcessorFeaturePresent(windows.PF_ARM_SHA512_INSTRUCTIONS_AVAILABLE)
ARM64.HasATOMICS = windows.IsProcessorFeaturePresent(windows.PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE)
if windows.IsProcessorFeaturePresent(windows.PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE) {
ARM64.HasASIMDDP = true
ARM64.HasASIMDRDM = true
}
if windows.IsProcessorFeaturePresent(windows.PF_ARM_V83_LRCPC_INSTRUCTIONS_AVAILABLE) {
ARM64.HasLRCPC = true
ARM64.HasSM3 = true
}
ARM64.HasSVE = windows.IsProcessorFeaturePresent(windows.PF_ARM_SVE_INSTRUCTIONS_AVAILABLE)
ARM64.HasSVE2 = windows.IsProcessorFeaturePresent(windows.PF_ARM_SVE2_INSTRUCTIONS_AVAILABLE)
ARM64.HasJSCVT = windows.IsProcessorFeaturePresent(windows.PF_ARM_V83_JSCVT_INSTRUCTIONS_AVAILABLE)
}
+1 -36
View File
@@ -163,42 +163,7 @@ func (p *Proc) Addr() uintptr {
// (according to the semantics of the specific function being called) before consulting
// the error. The error will be guaranteed to contain windows.Errno.
func (p *Proc) Call(a ...uintptr) (r1, r2 uintptr, lastErr error) {
switch len(a) {
case 0:
return syscall.Syscall(p.Addr(), uintptr(len(a)), 0, 0, 0)
case 1:
return syscall.Syscall(p.Addr(), uintptr(len(a)), a[0], 0, 0)
case 2:
return syscall.Syscall(p.Addr(), uintptr(len(a)), a[0], a[1], 0)
case 3:
return syscall.Syscall(p.Addr(), uintptr(len(a)), a[0], a[1], a[2])
case 4:
return syscall.Syscall6(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], 0, 0)
case 5:
return syscall.Syscall6(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], 0)
case 6:
return syscall.Syscall6(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5])
case 7:
return syscall.Syscall9(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], 0, 0)
case 8:
return syscall.Syscall9(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], 0)
case 9:
return syscall.Syscall9(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8])
case 10:
return syscall.Syscall12(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], 0, 0)
case 11:
return syscall.Syscall12(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], 0)
case 12:
return syscall.Syscall12(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11])
case 13:
return syscall.Syscall15(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], 0, 0)
case 14:
return syscall.Syscall15(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], 0)
case 15:
return syscall.Syscall15(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14])
default:
panic("Call " + p.Name + " with too many arguments " + itoa(len(a)) + ".")
}
return syscall.SyscallN(p.Addr(), a...)
}
// A LazyDLL implements access to a single DLL.
+5 -1
View File
@@ -1438,13 +1438,17 @@ func GetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformati
}
// GetNamedSecurityInfo queries the security information for a given named object and returns the self-relative security
// descriptor result on the Go heap.
// descriptor result on the Go heap. The security descriptor might be nil, even when err is nil, if the object exists
// but has no security descriptor.
func GetNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION) (sd *SECURITY_DESCRIPTOR, err error) {
var winHeapSD *SECURITY_DESCRIPTOR
err = getNamedSecurityInfo(objectName, objectType, securityInformation, nil, nil, nil, nil, &winHeapSD)
if err != nil {
return
}
if winHeapSD == nil {
return nil, nil
}
defer LocalFree(Handle(unsafe.Pointer(winHeapSD)))
return winHeapSD.copySelfRelativeSecurityDescriptor(), nil
}
+8 -7
View File
@@ -236,8 +236,8 @@ github.com/cenkalti/backoff/v4
# github.com/cenkalti/backoff/v5 v5.0.3
## explicit; go 1.23
github.com/cenkalti/backoff/v5
# github.com/ceph/go-ceph v0.38.0
## explicit; go 1.24.0
# github.com/ceph/go-ceph v0.39.0
## explicit; go 1.25.0
github.com/ceph/go-ceph/cephfs
github.com/ceph/go-ceph/cephfs/admin
github.com/ceph/go-ceph/common/admin/manager
@@ -316,7 +316,7 @@ github.com/crewjam/saml
github.com/crewjam/saml/logger
github.com/crewjam/saml/samlsp
github.com/crewjam/saml/xmlenc
# github.com/cs3org/go-cs3apis v0.0.0-20260407125717-5d69ba49048b
# github.com/cs3org/go-cs3apis v0.0.0-20260424072047-8d9ef7076ae9
## explicit; go 1.21
github.com/cs3org/go-cs3apis/cs3/app/provider/v1beta1
github.com/cs3org/go-cs3apis/cs3/app/registry/v1beta1
@@ -1031,8 +1031,8 @@ github.com/mattn/go-isatty
# github.com/mattn/go-runewidth v0.0.19
## explicit; go 1.20
github.com/mattn/go-runewidth
# github.com/mattn/go-sqlite3 v1.14.37
## explicit; go 1.19
# github.com/mattn/go-sqlite3 v1.14.42
## explicit; go 1.21
github.com/mattn/go-sqlite3
# github.com/maxymania/go-system v0.0.0-20170110133659-647cc364bf0b
## explicit
@@ -1371,7 +1371,7 @@ github.com/opencloud-eu/icap-client
# github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260310090739-853d972b282d
## explicit; go 1.18
github.com/opencloud-eu/libre-graph-api-go
# github.com/opencloud-eu/reva/v2 v2.43.0
# github.com/opencloud-eu/reva/v2 v2.43.1-0.20260424123852-c254710aa2af
## explicit; go 1.25.0
github.com/opencloud-eu/reva/v2/cmd/revad/internal/grace
github.com/opencloud-eu/reva/v2/cmd/revad/runtime
@@ -1657,6 +1657,7 @@ github.com/opencloud-eu/reva/v2/pkg/storage/fs/owncloudsql
github.com/opencloud-eu/reva/v2/pkg/storage/fs/owncloudsql/filecache
github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix
github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/blobstore
github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/idcache
github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/lookup
github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/options
github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/timemanager
@@ -2503,7 +2504,7 @@ golang.org/x/oauth2/internal
golang.org/x/sync/errgroup
golang.org/x/sync/semaphore
golang.org/x/sync/singleflight
# golang.org/x/sys v0.42.0
# golang.org/x/sys v0.43.0
## explicit; go 1.25.0
golang.org/x/sys/cpu
golang.org/x/sys/execabs