update reva to latest edge

This commit is contained in:
Michael Barz
2023-06-05 17:02:04 +02:00
parent 733e5efdda
commit 4b512fa884
16 changed files with 67 additions and 19 deletions
+10
View File
@@ -23,6 +23,7 @@ import (
user "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1"
)
// ContainerCreated is emitted when a directory has been created
@@ -31,6 +32,7 @@ type ContainerCreated struct {
Executant *user.UserId
Ref *provider.Reference
Owner *user.UserId
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
@@ -46,6 +48,7 @@ type FileUploaded struct {
Executant *user.UserId
Ref *provider.Reference
Owner *user.UserId
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
@@ -60,6 +63,7 @@ type FileTouched struct {
SpaceOwner *user.UserId
Executant *user.UserId
Ref *provider.Reference
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
@@ -74,6 +78,7 @@ type FileDownloaded struct {
Executant *user.UserId
Ref *provider.Reference
Owner *user.UserId
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
@@ -90,6 +95,7 @@ type ItemTrashed struct {
ID *provider.ResourceId
Ref *provider.Reference
Owner *user.UserId
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
@@ -106,6 +112,7 @@ type ItemMoved struct {
Ref *provider.Reference
Owner *user.UserId
OldReference *provider.Reference
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
@@ -121,6 +128,7 @@ type ItemPurged struct {
ID *provider.ResourceId
Ref *provider.Reference
Owner *user.UserId
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
@@ -139,6 +147,7 @@ type ItemRestored struct {
Owner *user.UserId
OldReference *provider.Reference
Key string
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
@@ -155,6 +164,7 @@ type FileVersionRestored struct {
Ref *provider.Reference
Owner *user.UserId
Key string
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
+9 -2
View File
@@ -22,12 +22,14 @@ import (
"encoding/json"
user "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1"
)
// GroupCreated is emitted when a group was created
type GroupCreated struct {
Executant *user.UserId
GroupID string
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
@@ -41,6 +43,7 @@ func (GroupCreated) Unmarshal(v []byte) (interface{}, error) {
type GroupDeleted struct {
Executant *user.UserId
GroupID string
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
@@ -55,6 +58,7 @@ type GroupMemberAdded struct {
Executant *user.UserId
GroupID string
UserID string
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
@@ -69,6 +73,7 @@ type GroupMemberRemoved struct {
Executant *user.UserId
GroupID string
UserID string
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
@@ -80,8 +85,9 @@ func (GroupMemberRemoved) Unmarshal(v []byte) (interface{}, error) {
// GroupFeature represents a group feature
type GroupFeature struct {
Name string
Value string
Name string
Value string
Timestamp *types.Timestamp
}
// GroupFeatureChanged is emitted when a group feature was changed
@@ -89,6 +95,7 @@ type GroupFeatureChanged struct {
Executant *user.UserId
GroupID string
Features []GroupFeature
Timestamp *types.Timestamp
}
// Unmarshal to fulfill unmarshaller interface
+7 -1
View File
@@ -24,6 +24,7 @@ import (
user "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1"
)
type (
@@ -59,6 +60,7 @@ type BytesReceived struct {
Filename string
Filesize uint64
URL string
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
@@ -80,6 +82,7 @@ type StartPostprocessingStep struct {
RevaToken string // for file retrieval in after upload case
StepToStart Postprocessingstep
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
@@ -99,6 +102,7 @@ type PostprocessingStepFinished struct {
Result interface{} // result information see VirusscanResult for example
Error error // possible error of the step
Outcome PostprocessingOutcome // some services may cause postprocessing to stop
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
@@ -128,6 +132,7 @@ type VirusscanResult struct {
Scandate time.Time
ResourceID *provider.ResourceId
ErrorMsg string // empty when no error
Timestamp *types.Timestamp
}
// PostprocessingFinished is emitted by *some* service which can decide that
@@ -138,6 +143,7 @@ type PostprocessingFinished struct {
ExecutingUser *user.User
Result map[Postprocessingstep]interface{} // it is a map[step]Event
Outcome PostprocessingOutcome
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
@@ -155,7 +161,7 @@ type UploadReady struct {
ExecutingUser *user.User
FileRef *provider.Reference
Failed bool
Timestamp time.Time
Timestamp *types.Timestamp
// add reference here? We could use it to inform client pp is finished
}
+2
View File
@@ -206,6 +206,7 @@ type LinkAccessFailed struct {
Token string
Status rpc.Code
Message string
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
@@ -221,6 +222,7 @@ type LinkRemoved struct {
// split protobuf Ref
ShareID *link.PublicShareId
ShareToken string
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
+4
View File
@@ -53,6 +53,7 @@ type SpaceRenamed struct {
ID *provider.StorageSpaceId
Owner *user.UserId
Name string
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
@@ -81,6 +82,7 @@ type SpaceEnabled struct {
Executant *user.UserId
ID *provider.StorageSpaceId
Owner *user.UserId
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
@@ -144,6 +146,7 @@ type SpaceUpdated struct {
Executant *user.UserId
ID *provider.StorageSpaceId
Space *provider.StorageSpace
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
@@ -162,6 +165,7 @@ type SpaceMembershipExpired struct {
// split the protobuf Grantee oneof so we can use stdlib encoding/json
GranteeUserID *user.UserId
GranteeGroupID *group.GroupId
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
+3
View File
@@ -23,6 +23,7 @@ import (
user "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1"
)
// TagsAdded is emitted when a Tag has been added
@@ -31,6 +32,7 @@ type TagsAdded struct {
Tags string
Ref *provider.Reference
Executant *user.UserId
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
@@ -46,6 +48,7 @@ type TagsRemoved struct {
Tags string
Ref *provider.Reference
Executant *user.UserId
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
+8 -4
View File
@@ -20,15 +20,16 @@ package events
import (
"encoding/json"
"time"
user "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1"
)
// UserCreated is emitted when a user was created
type UserCreated struct {
Executant *user.UserId
UserID string
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
@@ -42,6 +43,7 @@ func (UserCreated) Unmarshal(v []byte) (interface{}, error) {
type UserDeleted struct {
Executant *user.UserId
UserID string
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
@@ -53,8 +55,9 @@ func (UserDeleted) Unmarshal(v []byte) (interface{}, error) {
// UserFeature represents a user feature
type UserFeature struct {
Name string
Value string
Name string
Value string
Timestamp *types.Timestamp
}
// UserFeatureChanged is emitted when a user feature was changed
@@ -62,6 +65,7 @@ type UserFeatureChanged struct {
Executant *user.UserId
UserID string
Features []UserFeature
Timestamp *types.Timestamp
}
// Unmarshal to fulfill umarshaller interface
@@ -74,7 +78,7 @@ func (UserFeatureChanged) Unmarshal(v []byte) (interface{}, error) {
// PersonalDataExtracted is emitted when a user data extraction is finished
type PersonalDataExtracted struct {
Executant *user.UserId
Timestamp time.Time
Timestamp *types.Timestamp
ErrorMsg string
}
+2
View File
@@ -28,6 +28,7 @@ import (
"github.com/cs3org/reva/v2/pkg/events"
"github.com/cs3org/reva/v2/pkg/storage"
"github.com/cs3org/reva/v2/pkg/storage/cache"
"github.com/cs3org/reva/v2/pkg/utils"
)
// DataTX provides an abstraction around various data transfer protocols.
@@ -46,6 +47,7 @@ func EmitFileUploadedEvent(spaceOwnerOrManager, executant *userv1beta1.UserId, r
Owner: spaceOwnerOrManager,
Executant: executant,
Ref: ref,
Timestamp: utils.TSNow(),
}
return events.Publish(publisher, uploadedEv)
@@ -270,7 +270,7 @@ func (fs *Decomposedfs) Postprocessing(ch <-chan events.Event) {
},
Path: utils.MakeRelativePath(filepath.Join(up.Info.MetaData["dir"], up.Info.MetaData["filename"])),
},
Timestamp: now,
Timestamp: utils.TimeToTS(now),
SpaceOwner: n.SpaceOwnerOrManager(ctx),
},
); err != nil {