Skip to content

Commit

Permalink
make lint-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
michielbdejong committed May 10, 2023
1 parent f485dc8 commit b5198ff
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
22 changes: 11 additions & 11 deletions pkg/ocm/share/repository/nextcloud/nextcloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ type GranteeAltMap struct {

// ShareAltMap is an alternative map to JSON-unmarshal a Share.
type ShareAltMap struct {
ID *ocm.ShareId `json:"id"`
RemoteShareId string `json:"remote_share_id"`
Permissions *ocm.SharePermissions `json:"permissions"`
Grantee *GranteeAltMap `json:"grantee"`
Owner *userpb.UserId `json:"owner"`
Creator *userpb.UserId `json:"creator"`
Ctime *typespb.Timestamp `json:"ctime"`
Mtime *typespb.Timestamp `json:"mtime"`
ID *ocm.ShareId `json:"id"`
RemoteShareId string `json:"remote_share_id"`
Permissions *ocm.SharePermissions `json:"permissions"`
Grantee *GranteeAltMap `json:"grantee"`
Owner *userpb.UserId `json:"owner"`
Creator *userpb.UserId `json:"creator"`
Ctime *typespb.Timestamp `json:"ctime"`
Mtime *typespb.Timestamp `json:"mtime"`
}

// ReceivedShareAltMap is an alternative map to JSON-unmarshal a ReceivedShare.
Expand Down Expand Up @@ -179,7 +179,7 @@ func (sm *Manager) GetShare(ctx context.Context, user *userpb.User, ref *ocm.Sha
return nil, err
}
return &ocm.Share{
Id: altResult.ID,
Id: altResult.ID,
Grantee: &provider.Grantee{
Id: altResult.Grantee.ID,
},
Expand Down Expand Up @@ -226,7 +226,7 @@ func (sm *Manager) UpdateShare(ctx context.Context, user *userpb.User, ref *ocm.
return nil, err
}
return &ocm.Share{
Id: altResult.ID,
Id: altResult.ID,
Grantee: &provider.Grantee{
Id: altResult.Grantee.ID,
},
Expand Down Expand Up @@ -258,7 +258,7 @@ func (sm *Manager) ListShares(ctx context.Context, user *userpb.User, filters []
var lst = make([]*ocm.Share, 0, len(respArr))
for _, altResult := range respArr {
lst = append(lst, &ocm.Share{
Id: altResult.ID,
Id: altResult.ID,
Grantee: &provider.Grantee{
Id: altResult.Grantee.ID,
},
Expand Down
6 changes: 3 additions & 3 deletions pkg/ocm/share/repository/nextcloud/nextcloud_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ var _ = Describe("Nextcloud", func() {
})
Expect(err).ToNot(HaveOccurred())
Expect(*share).To(Equal(ocm.Share{
Id: &ocm.ShareId{},
Id: &ocm.ShareId{},
Grantee: &provider.Grantee{
Id: &provider.Grantee_UserId{
UserId: &userpb.UserId{
Expand Down Expand Up @@ -352,7 +352,7 @@ var _ = Describe("Nextcloud", func() {
})
Expect(err).ToNot(HaveOccurred())
Expect(*share).To(Equal(ocm.Share{
Id: &ocm.ShareId{},
Id: &ocm.ShareId{},
Grantee: &provider.Grantee{
Id: &provider.Grantee_UserId{
UserId: &userpb.UserId{
Expand Down Expand Up @@ -412,7 +412,7 @@ var _ = Describe("Nextcloud", func() {
Expect(err).ToNot(HaveOccurred())
Expect(len(shares)).To(Equal(1))
Expect(*shares[0]).To(Equal(ocm.Share{
Id: &ocm.ShareId{},
Id: &ocm.ShareId{},
Grantee: &provider.Grantee{
Id: &provider.Grantee_UserId{
UserId: &userpb.UserId{
Expand Down

0 comments on commit b5198ff

Please sign in to comment.