forked from pydio/cells
-
Notifications
You must be signed in to change notification settings - Fork 0
/
share.go
50 lines (39 loc) · 909 Bytes
/
share.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package models
import (
"context"
"github.com/pydio/cells/common/proto/idm"
"github.com/pydio/cells/common/proto/rest"
)
type SyncShare struct {
OwnerUser *idm.User
OwnerContext context.Context
Cell *rest.Cell
Link *rest.ShareLink
LinkPassword string
PasswordHashed bool
InternalData interface{}
}
func (s *SyncShare) Equals(o Differ) bool {
return false
}
func (s *SyncShare) IsDeletable(m map[string]string) bool {
return false
}
func (s *SyncShare) IsMergeable(o Differ) bool {
return false
}
func (s *SyncShare) GetUniqueId() string {
if s.Link != nil {
return "LINK:" + s.Link.LinkHash
} else if s.Cell != nil {
return "CELL:" + s.Cell.Label
} else {
return "EMPTY"
}
}
func (s *SyncShare) Merge(o Differ, options map[string]string) (Differ, error) {
return s, nil
}
func (s *SyncShare) GetInternalData() interface{} {
return s.InternalData
}