Skip to content

Commit

Permalink
hound
Browse files Browse the repository at this point in the history
  • Loading branch information
michielbdejong committed Sep 21, 2021
1 parent da3487e commit 03d1868
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/share/manager/nextcloud/nextcloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,14 @@ type Action struct {
argS string
}

// GranteeAltMap is an alternative map to JSON-unmarshal a Grantee
// Grantees are hard to unmarshal, so unmarshalling into a map[string]interface{} first,
// see also https://github.com/pondersource/sciencemesh-nextcloud/issues/27
type GranteeAltMap struct {
ID *provider.Grantee_UserId `json:"id"`
}

// ShareAltMap is an alternative map to JSON-unmarshal a Share
type ShareAltMap struct {
ID *collaboration.ShareId `json:"id"`
ResourceID *provider.ResourceId `json:"resource_id"`
Expand All @@ -78,6 +80,7 @@ type ShareAltMap struct {
Mtime *types.Timestamp `json:"mtime"`
}

// ReceivedShareAltMap is an alternative map to JSON-unmarshal a ReceivedShare
type ReceivedShareAltMap struct {
Share *ShareAltMap `json:"share"`
State collaboration.ShareState `json:"state"`
Expand Down

0 comments on commit 03d1868

Please sign in to comment.