add user soft delete
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
This commit is contained in:
+17
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user