add user soft delete

Signed-off-by: Christian Richter <c.richter@opencloud.eu>
This commit is contained in:
Christian Richter
2025-08-27 10:36:12 +02:00
parent 2a76fc22be
commit 19141c2b71
31 changed files with 516 additions and 180 deletions
+17
View File
@@ -20,6 +20,7 @@ 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"
@@ -53,6 +54,22 @@ func (UserDeleted) Unmarshal(v []byte) (interface{}, error) {
return e, err
}
// UserSoftDeleted is emitted when a user was soft-deleted
type UserSoftDeleted struct {
Executant *user.UserId
UserID string
Timestamp *types.Timestamp
RetentionTime time.Duration
Reason string
}
// Unmarshal to fulfill umarshaller interface
func (UserSoftDeleted) Unmarshal(v []byte) (interface{}, error) {
e := UserSoftDeleted{}
err := json.Unmarshal(v, &e)
return e, err
}
// UserFeature represents a user feature
type UserFeature struct {
Name string