From 032f5afd584591c3da789efba913a1a0701abda5 Mon Sep 17 00:00:00 2001 From: Sabin Panta <64484313+S-Panta@users.noreply.github.com> Date: Fri, 19 Apr 2024 15:36:18 +0545 Subject: [PATCH 01/19] changed php version (#8900) --- .drone.star | 2 +- composer.json | 2 +- tests/acceptance/docker/src/acceptance.yml | 2 +- vendor-bin/behat/composer.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.drone.star b/.drone.star index 1e034e65e..87908424e 100644 --- a/.drone.star +++ b/.drone.star @@ -33,7 +33,7 @@ REDIS = "redis:6-alpine" SELENIUM_STANDALONE_CHROME = "selenium/standalone-chrome:104.0-20220812" SONARSOURCE_SONAR_SCANNER_CLI = "sonarsource/sonar-scanner-cli:5.0" -DEFAULT_PHP_VERSION = "7.4" +DEFAULT_PHP_VERSION = "8.2" DEFAULT_NODEJS_VERSION = "18" dirs = { diff --git a/composer.json b/composer.json index cde884246..19b11d6d5 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "owncloud/ocis", "config" : { "platform": { - "php": "7.4" + "php": "8.2" }, "vendor-dir": "./vendor-php", "allow-plugins": { diff --git a/tests/acceptance/docker/src/acceptance.yml b/tests/acceptance/docker/src/acceptance.yml index e98a1f7f6..fe380a958 100644 --- a/tests/acceptance/docker/src/acceptance.yml +++ b/tests/acceptance/docker/src/acceptance.yml @@ -1,6 +1,6 @@ services: acceptance-tests: - image: owncloudci/php:7.4 + image: owncloudci/php:8.2 working_dir: /drone/src command: /bin/bash /test/run-tests.sh environment: diff --git a/vendor-bin/behat/composer.json b/vendor-bin/behat/composer.json index 0192865a4..07344d2cc 100644 --- a/vendor-bin/behat/composer.json +++ b/vendor-bin/behat/composer.json @@ -1,7 +1,7 @@ { "config" : { "platform": { - "php": "7.4" + "php": "8.2" }, "allow-plugins": { "composer/package-versions-deprecated": true From e6894474bed50454cce70da4516d8098aa9c354a Mon Sep 17 00:00:00 2001 From: Viktor Scharf Date: Mon, 22 Apr 2024 12:24:29 +0200 Subject: [PATCH 02/19] delete php string deprication (#8911) (#8912) --- tests/acceptance/features/bootstrap/Sharing.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/features/bootstrap/Sharing.php b/tests/acceptance/features/bootstrap/Sharing.php index 0b6ec311a..5f3e43a9f 100755 --- a/tests/acceptance/features/bootstrap/Sharing.php +++ b/tests/acceptance/features/bootstrap/Sharing.php @@ -2690,7 +2690,7 @@ trait Sharing { $expectedElementsArray['path'], (string) $elementResponded->path[0], __METHOD__ - . " Expected '${expectedElementsArray['path']}' but got '" + . " Expected '{$expectedElementsArray['path']}' but got '" . $elementResponded->path[0] . "'" ); @@ -2698,7 +2698,7 @@ trait Sharing { $expectedElementsArray['permissions'], (string) $elementResponded->permissions[0], __METHOD__ - . " Expected '${expectedElementsArray['permissions']}' but got '" + . " Expected '{$expectedElementsArray['permissions']}' but got '" . $elementResponded->permissions[0] . "'" ); From dd3ad75c006200379cef5b8799fee0fbcd0f46fc Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Thu, 18 Apr 2024 23:34:35 +0200 Subject: [PATCH 03/19] fix: always assign the admin role to the default admin --- .../unreleased/fix-admin-role-assignment.md | 6 ++ services/settings/pkg/store/metadata/store.go | 71 ++++++++++++++++++- 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/fix-admin-role-assignment.md diff --git a/changelog/unreleased/fix-admin-role-assignment.md b/changelog/unreleased/fix-admin-role-assignment.md new file mode 100644 index 000000000..25b2cc84d --- /dev/null +++ b/changelog/unreleased/fix-admin-role-assignment.md @@ -0,0 +1,6 @@ +Bugfix: Update the admin user role assignment to enforce the config + +The admin user role assigment was not updated after the first assignment. We now read the assigned role during init and update the admin user ID accordingly if the role is not assigned. +This is especially needed when the OCIS_ADMIN_USER_ID is set after the autoprovisioning of the admin user when it originates from an external Identity Provider. + +https://github.com/owncloud/ocis/pull/8897 diff --git a/services/settings/pkg/store/metadata/store.go b/services/settings/pkg/store/metadata/store.go index 68946a3a8..3985e84a1 100644 --- a/services/settings/pkg/store/metadata/store.go +++ b/services/settings/pkg/store/metadata/store.go @@ -7,6 +7,7 @@ import ( "log" "sync" + "github.com/cs3org/reva/v2/pkg/errtypes" "github.com/cs3org/reva/v2/pkg/storage/utils/metadata" "github.com/gofrs/uuid" olog "github.com/owncloud/ocis/v2/ocis-pkg/log" @@ -139,10 +140,20 @@ func (s *Store) initMetadataClient(mdc MetadataClient) error { if err != nil { return err } - if len(assIDs) > 0 { + + adminUserID := accountUUID == s.cfg.AdminUserID + if len(assIDs) > 0 && !adminUserID { // There is already a role assignment for this ID, skip to the next continue } + // for the adminUserID we need to check if the user has the admin role every time + if adminUserID { + err = s.userMustHaveAdminRole(accountUUID, assIDs, mdc) + if err != nil { + return err + } + continue + } ass := &settingsmsg.UserRoleAssignment{ Id: uuid.Must(uuid.NewV4()).String(), @@ -164,6 +175,64 @@ func (s *Store) initMetadataClient(mdc MetadataClient) error { return nil } +func (s *Store) userMustHaveAdminRole(accountUUID string, assIDs []string, mdc MetadataClient) error { + ctx := context.TODO() + var hasAdminRole bool + + // load the assignments from the store and check if the admin role is already assigned + for _, assID := range assIDs { + b, err := mdc.SimpleDownload(ctx, assignmentPath(accountUUID, assID)) + switch err.(type) { + case nil: + // continue + case errtypes.NotFound: + continue + default: + return err + } + + a := &settingsmsg.UserRoleAssignment{} + err = json.Unmarshal(b, a) + if err != nil { + return err + } + + if a.RoleId == defaults.BundleUUIDRoleAdmin { + hasAdminRole = true + } + } + + // delete old role assignment and set admin role + if !hasAdminRole { + err := mdc.Delete(ctx, accountPath(accountUUID)) + switch err.(type) { + case nil: + // continue + case errtypes.NotFound: + // already gone, continue + default: + return err + } + + err = mdc.MakeDirIfNotExist(ctx, accountPath(accountUUID)) + if err != nil { + return err + } + + ass := &settingsmsg.UserRoleAssignment{ + Id: uuid.Must(uuid.NewV4()).String(), + AccountUuid: accountUUID, + RoleId: defaults.BundleUUIDRoleAdmin, + } + b, err := json.Marshal(ass) + if err != nil { + return err + } + return mdc.SimpleUpload(ctx, assignmentPath(accountUUID, ass.Id), b) + } + return nil +} + func init() { settings.Registry[managerName] = New } From f54a6e424db45bf35a63c1456d35554c1619cc8c Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Fri, 19 Apr 2024 11:20:29 +0200 Subject: [PATCH 04/19] tests: add unit tests for admin role assignment --- .../unreleased/fix-admin-role-assignment.md | 1 + .../settings/pkg/store/metadata/store_test.go | 76 +++++++++++++++++++ 2 files changed, 77 insertions(+) diff --git a/changelog/unreleased/fix-admin-role-assignment.md b/changelog/unreleased/fix-admin-role-assignment.md index 25b2cc84d..30e20f041 100644 --- a/changelog/unreleased/fix-admin-role-assignment.md +++ b/changelog/unreleased/fix-admin-role-assignment.md @@ -3,4 +3,5 @@ Bugfix: Update the admin user role assignment to enforce the config The admin user role assigment was not updated after the first assignment. We now read the assigned role during init and update the admin user ID accordingly if the role is not assigned. This is especially needed when the OCIS_ADMIN_USER_ID is set after the autoprovisioning of the admin user when it originates from an external Identity Provider. +https://github.com/owncloud/ocis/pull/8918 https://github.com/owncloud/ocis/pull/8897 diff --git a/services/settings/pkg/store/metadata/store_test.go b/services/settings/pkg/store/metadata/store_test.go index 0859d38b5..e204618f2 100644 --- a/services/settings/pkg/store/metadata/store_test.go +++ b/services/settings/pkg/store/metadata/store_test.go @@ -2,10 +2,15 @@ package store import ( "context" + "encoding/json" "strings" + "testing" "github.com/cs3org/reva/v2/pkg/errtypes" + . "github.com/onsi/gomega" + settingsmsg "github.com/owncloud/ocis/v2/protogen/gen/ocis/messages/settings/v0" "github.com/owncloud/ocis/v2/services/settings/pkg/config/defaults" + rdefaults "github.com/owncloud/ocis/v2/services/settings/pkg/store/defaults" ) const ( @@ -112,3 +117,74 @@ func (m *MockedMetadataClient) IDExists(id string) bool { func (m *MockedMetadataClient) IDHasContent(id string, content []byte) bool { return string(m.data[id]) == string(content) } + +// TestAdminUserIDInit test the happy path during initialization +func TestAdminUserIDInit(t *testing.T) { + RegisterTestingT(t) + s := &Store{ + cfg: defaults.DefaultConfig(), + } + s.cfg.Bundles = rdefaults.GenerateBundlesDefaultRoles() + s.cfg.AdminUserID = "admin" + + // the first assignment is always happening during the initialisation of the metadata client + err := NewMDC(s) + Expect(err).To(BeNil()) + + assID, err := s.mdc.ReadDir(context.TODO(), accountPath(s.cfg.AdminUserID)) + Expect(len(assID)).To(Equal(1)) + ass, err := s.mdc.SimpleDownload(context.TODO(), assignmentPath(s.cfg.AdminUserID, assID[0])) + Expect(ass).ToNot(BeNil()) + + assignment := &settingsmsg.UserRoleAssignment{} + err = json.Unmarshal(ass, assignment) + Expect(err).To(BeNil()) + Expect(assignment.RoleId).To(Equal(rdefaults.BundleUUIDRoleAdmin)) +} + +// TestAdminUserIDUpdate test the update on following initialisations +func TestAdminUserIDUpdate(t *testing.T) { + RegisterTestingT(t) + s := &Store{ + cfg: defaults.DefaultConfig(), + } + s.cfg.Bundles = rdefaults.GenerateBundlesDefaultRoles() + s.cfg.AdminUserID = "admin" + + // the first assignment is always happening during the initialisation of the metadata client + err := NewMDC(s) + Expect(err).To(BeNil()) + + // read assignment + assID, err := s.mdc.ReadDir(context.TODO(), accountPath(s.cfg.AdminUserID)) + Expect(len(assID)).To(Equal(1)) + + // set assignment to user role + userRoleAssignment := &settingsmsg.UserRoleAssignment{ + AccountUuid: s.cfg.AdminUserID, + RoleId: rdefaults.BundleUUIDRoleUser, + } + b, err := json.Marshal(userRoleAssignment) + err = s.mdc.Delete(context.TODO(), assignmentPath(s.cfg.AdminUserID, assID[0])) + Expect(err).To(BeNil()) + err = s.mdc.SimpleUpload(context.TODO(), assignmentPath(s.cfg.AdminUserID, assID[0]), b) + Expect(err).To(BeNil()) + + // this happens on every Read / Write on the store + // the actual init is only done if the metadata client has not been initialized before + // this normally needs a restart of the service + err = s.initMetadataClient(s.mdc) + Expect(err).To(BeNil()) + + // read assignment id, changes every time the assignment is written + assID, err = s.mdc.ReadDir(context.TODO(), accountPath(s.cfg.AdminUserID)) + Expect(len(assID)).To(Equal(1)) + + // check if the assignment is the admin role again + ass, err := s.mdc.SimpleDownload(context.TODO(), assignmentPath(s.cfg.AdminUserID, assID[0])) + Expect(ass).ToNot(BeNil()) + assignment := &settingsmsg.UserRoleAssignment{} + err = json.Unmarshal(ass, assignment) + Expect(err).To(BeNil()) + Expect(assignment.RoleId).To(Equal(rdefaults.BundleUUIDRoleAdmin)) +} From 8e0f3b9e1c25b0480b04675e3fd5367bcb8ac769 Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Tue, 23 Apr 2024 07:00:30 +0000 Subject: [PATCH 05/19] Automated changelog update [skip ci] --- CHANGELOG.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1869cee2..7e5dffc50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Table of Contents +* [Changelog for unreleased](#changelog-for-unreleased-unreleased) * [Changelog for 5.0.2](#changelog-for-502-2024-04-17) * [Changelog for 5.0.1](#changelog-for-501-2024-04-10) * [Changelog for 5.0.0](#changelog-for-500-2024-03-18) @@ -35,6 +36,29 @@ * [Changelog for 1.1.0](#changelog-for-110-2021-01-22) * [Changelog for 1.0.0](#changelog-for-100-2020-12-17) +# Changelog for [unreleased] (UNRELEASED) + +The following sections list the changes for unreleased. + +[unreleased]: https://github.com/owncloud/ocis/compare/v5.0.2...master + +## Summary + +* Bugfix - Update the admin user role assignment to enforce the config: [#8918](https://github.com/owncloud/ocis/pull/8918) + +## Details + +* Bugfix - Update the admin user role assignment to enforce the config: [#8918](https://github.com/owncloud/ocis/pull/8918) + + The admin user role assigment was not updated after the first assignment. We now + read the assigned role during init and update the admin user ID accordingly if + the role is not assigned. This is especially needed when the OCIS_ADMIN_USER_ID + is set after the autoprovisioning of the admin user when it originates from an + external Identity Provider. + + https://github.com/owncloud/ocis/pull/8918 + https://github.com/owncloud/ocis/pull/8897 + # Changelog for [5.0.2] (2024-04-17) The following sections list the changes for 5.0.2. From a544de75c41b5be74f2f5114fd41d76a04f6901c Mon Sep 17 00:00:00 2001 From: Prajwol Amatya Date: Tue, 23 Apr 2024 14:20:15 +0545 Subject: [PATCH 06/19] remove web smoke tests from nightly and full-ci --- .drone.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.star b/.drone.star index 87908424e..5298ae3c2 100644 --- a/.drone.star +++ b/.drone.star @@ -1079,7 +1079,7 @@ def uiTests(ctx): # For ordinary PRs, always run the "minimal" UI test pipeline # That has its own expected-failures file, and we always want to know that it is correct, - if (ctx.build.event != "tag"): + if (ctx.build.event != "tag" and ctx.build.event != "cron" and "full-ci" not in ctx.build.title.lower()): pipelines.append(uiTestPipeline(ctx, filterTags, 1, 2, "ocis", "smoke")) pipelines.append(uiTestPipeline(ctx, filterTags, 2, 2, "ocis", "smoke")) From dff6990e157eeeaeb5a8d7a8bdd833ab538dc456 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <1005065+DeepDiver1975@users.noreply.github.com> Date: Fri, 26 Apr 2024 15:03:36 +0200 Subject: [PATCH 07/19] fix: replace github.com/disintegration/imaging with github.com/kovidgoyal/imaging (#8985) --- changelog/unreleased/CVE-2023-36308.md | 7 + go.mod | 2 +- go.sum | 5 +- .../pkg/preprocessor/preprocessor.go | 2 +- .../thumbnails/pkg/thumbnail/generator.go | 2 +- .../thumbnails/pkg/thumbnail/processor.go | 4 +- .../pkg/thumbnail/processor_test.go | 2 +- .../disintegration/imaging/.travis.yml | 12 - .../github.com/kovidgoyal/imaging/.gitignore | 2 + .../kovidgoyal/imaging/.goreleaser.yaml | 41 ++ .../imaging/LICENSE | 0 .../imaging/README.md | 457 +++++++++--------- .../imaging/adjust.go | 44 ++ .../imaging/convolution.go | 0 .../imaging/doc.go | 0 .../imaging/effects.go | 0 .../imaging/histogram.go | 0 .../imaging/io.go | 0 .../github.com/kovidgoyal/imaging/publish.py | 29 ++ .../imaging/resize.go | 10 +- .../imaging/scanner.go | 2 +- .../github.com/kovidgoyal/imaging/session.vim | 2 + .../imaging/tools.go | 8 + .../imaging/transform.go | 0 .../imaging/utils.go | 13 + vendor/modules.txt | 6 +- 26 files changed, 395 insertions(+), 255 deletions(-) create mode 100644 changelog/unreleased/CVE-2023-36308.md delete mode 100644 vendor/github.com/disintegration/imaging/.travis.yml create mode 100644 vendor/github.com/kovidgoyal/imaging/.gitignore create mode 100644 vendor/github.com/kovidgoyal/imaging/.goreleaser.yaml rename vendor/github.com/{disintegration => kovidgoyal}/imaging/LICENSE (100%) rename vendor/github.com/{disintegration => kovidgoyal}/imaging/README.md (88%) rename vendor/github.com/{disintegration => kovidgoyal}/imaging/adjust.go (86%) rename vendor/github.com/{disintegration => kovidgoyal}/imaging/convolution.go (100%) rename vendor/github.com/{disintegration => kovidgoyal}/imaging/doc.go (100%) rename vendor/github.com/{disintegration => kovidgoyal}/imaging/effects.go (100%) rename vendor/github.com/{disintegration => kovidgoyal}/imaging/histogram.go (100%) rename vendor/github.com/{disintegration => kovidgoyal}/imaging/io.go (100%) create mode 100644 vendor/github.com/kovidgoyal/imaging/publish.py rename vendor/github.com/{disintegration => kovidgoyal}/imaging/resize.go (99%) rename vendor/github.com/{disintegration => kovidgoyal}/imaging/scanner.go (98%) create mode 100644 vendor/github.com/kovidgoyal/imaging/session.vim rename vendor/github.com/{disintegration => kovidgoyal}/imaging/tools.go (98%) rename vendor/github.com/{disintegration => kovidgoyal}/imaging/transform.go (100%) rename vendor/github.com/{disintegration => kovidgoyal}/imaging/utils.go (88%) diff --git a/changelog/unreleased/CVE-2023-36308.md b/changelog/unreleased/CVE-2023-36308.md new file mode 100644 index 000000000..a8abb0321 --- /dev/null +++ b/changelog/unreleased/CVE-2023-36308.md @@ -0,0 +1,7 @@ +Bugfix: Crash when processing crafted TIFF files + +Fix for a vulnerability with low severity in disintegration/imaging. + +https://github.com/advisories/GHSA-q7pp-wcgr-pffx +https://github.com/owncloud/ocis/pull/8981 + diff --git a/go.mod b/go.mod index c08e14806..70d708039 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,6 @@ require ( github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781 github.com/cs3org/reva/v2 v2.19.5 github.com/dhowden/tag v0.0.0-20230630033851-978a0926ee25 - github.com/disintegration/imaging v1.6.2 github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e github.com/egirna/icap-client v0.1.1 github.com/gabriel-vasile/mimetype v1.4.3 @@ -54,6 +53,7 @@ require ( github.com/jellydator/ttlcache/v3 v3.2.0 github.com/jinzhu/now v1.1.5 github.com/justinas/alice v1.2.0 + github.com/kovidgoyal/imaging v1.6.3 github.com/leonelquinteros/gotext v1.5.3-0.20230317130943-71a59c05b2c1 github.com/libregraph/idm v0.4.1-0.20231213140724-56a222fb4215 github.com/libregraph/lico v0.61.3-0.20240322112242-72cf9221d3a7 diff --git a/go.sum b/go.sum index 9230fc802..2414ba7c7 100644 --- a/go.sum +++ b/go.sum @@ -1048,8 +1048,6 @@ github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8 github.com/dhowden/tag v0.0.0-20230630033851-978a0926ee25 h1:simG0vMYFvNriGhaaat7QVVkaVkXzvqcohaBoLZl9Hg= github.com/dhowden/tag v0.0.0-20230630033851-978a0926ee25/go.mod h1:Z3Lomva4pyMWYezjMAU5QWRh0p1VvO4199OHlFnyKkM= github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= -github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c= -github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4= github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E= github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= @@ -1601,6 +1599,8 @@ github.com/kolo/xmlrpc v0.0.0-20200310150728-e0350524596b/go.mod h1:o03bZfuBwAXH github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kovidgoyal/imaging v1.6.3 h1:iNPpv7ygiaB/NOztc6APMT7yr9UwBS+rOZwIbAdtyY8= +github.com/kovidgoyal/imaging v1.6.3/go.mod h1:sHvcLOOVhJuto2IoNdPLEqnAUoL5ZfHEF0PpNH+882g= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -2190,7 +2190,6 @@ golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86h golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20200618115811-c13761719519/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= diff --git a/services/thumbnails/pkg/preprocessor/preprocessor.go b/services/thumbnails/pkg/preprocessor/preprocessor.go index b8949dc95..d8addd3a7 100644 --- a/services/thumbnails/pkg/preprocessor/preprocessor.go +++ b/services/thumbnails/pkg/preprocessor/preprocessor.go @@ -12,7 +12,7 @@ import ( "mime" "strings" - "github.com/disintegration/imaging" + "github.com/kovidgoyal/imaging" "github.com/pkg/errors" "golang.org/x/image/font" "golang.org/x/image/font/opentype" diff --git a/services/thumbnails/pkg/thumbnail/generator.go b/services/thumbnails/pkg/thumbnail/generator.go index 64aa086df..80796ad7c 100644 --- a/services/thumbnails/pkg/thumbnail/generator.go +++ b/services/thumbnails/pkg/thumbnail/generator.go @@ -7,7 +7,7 @@ import ( "image/gif" "strings" - "github.com/disintegration/imaging" + "github.com/kovidgoyal/imaging" ) // Generator generates a web friendly file version. diff --git a/services/thumbnails/pkg/thumbnail/processor.go b/services/thumbnails/pkg/thumbnail/processor.go index 3782fac4f..59bbe3a63 100644 --- a/services/thumbnails/pkg/thumbnail/processor.go +++ b/services/thumbnails/pkg/thumbnail/processor.go @@ -4,7 +4,7 @@ import ( "image" "strings" - "github.com/disintegration/imaging" + "github.com/kovidgoyal/imaging" ) // Processor processes the thumbnail by applying different transformations to it. @@ -13,7 +13,7 @@ type Processor interface { Process(img image.Image, width, height int, filter imaging.ResampleFilter) *image.NRGBA } -// DefinableProcessor is the most simple processor, it holds a replaceable image converter function. +// DefinableProcessor is the simplest processor, it holds a replaceable image converter function. type DefinableProcessor struct { Slug string Converter func(img image.Image, width, height int, filter imaging.ResampleFilter) *image.NRGBA diff --git a/services/thumbnails/pkg/thumbnail/processor_test.go b/services/thumbnails/pkg/thumbnail/processor_test.go index febda33b8..893931a87 100644 --- a/services/thumbnails/pkg/thumbnail/processor_test.go +++ b/services/thumbnails/pkg/thumbnail/processor_test.go @@ -3,7 +3,7 @@ package thumbnail_test import ( "testing" - "github.com/disintegration/imaging" + "github.com/kovidgoyal/imaging" tAssert "github.com/stretchr/testify/assert" "github.com/owncloud/ocis/v2/services/thumbnails/pkg/thumbnail" diff --git a/vendor/github.com/disintegration/imaging/.travis.yml b/vendor/github.com/disintegration/imaging/.travis.yml deleted file mode 100644 index 7ae5e4b25..000000000 --- a/vendor/github.com/disintegration/imaging/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: go -go: - - "1.10.x" - - "1.11.x" - - "1.12.x" - -before_install: - - go get github.com/mattn/goveralls - -script: - - go test -v -race -cover - - $GOPATH/bin/goveralls -service=travis-ci diff --git a/vendor/github.com/kovidgoyal/imaging/.gitignore b/vendor/github.com/kovidgoyal/imaging/.gitignore new file mode 100644 index 000000000..cde012322 --- /dev/null +++ b/vendor/github.com/kovidgoyal/imaging/.gitignore @@ -0,0 +1,2 @@ + +dist/ diff --git a/vendor/github.com/kovidgoyal/imaging/.goreleaser.yaml b/vendor/github.com/kovidgoyal/imaging/.goreleaser.yaml new file mode 100644 index 000000000..25c4966c4 --- /dev/null +++ b/vendor/github.com/kovidgoyal/imaging/.goreleaser.yaml @@ -0,0 +1,41 @@ +# This is an example .goreleaser.yml file with some sensible defaults. +# Make sure to check the documentation at https://goreleaser.com + +# The lines below are called `modelines`. See `:help modeline` +# Feel free to remove those if you don't want/need to use them. +# yaml-language-server: $schema=https://goreleaser.com/static/schema.json +# vim: set ts=2 sw=2 tw=0 fo=cnqoj + +version: 1 + +before: + hooks: + # You may remove this if you don't use go modules. + - go mod tidy + # you may remove this if you don't need go generate + - go generate ./... + +builds: + - skip: true + +archives: + - format: tar.gz + # this name template makes the OS and Arch compatible with the results of `uname`. + name_template: >- + {{ .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} + # use zip for windows archives + format_overrides: + - goos: windows + format: zip + +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:" diff --git a/vendor/github.com/disintegration/imaging/LICENSE b/vendor/github.com/kovidgoyal/imaging/LICENSE similarity index 100% rename from vendor/github.com/disintegration/imaging/LICENSE rename to vendor/github.com/kovidgoyal/imaging/LICENSE diff --git a/vendor/github.com/disintegration/imaging/README.md b/vendor/github.com/kovidgoyal/imaging/README.md similarity index 88% rename from vendor/github.com/disintegration/imaging/README.md rename to vendor/github.com/kovidgoyal/imaging/README.md index a1fd764d2..7ca37e409 100644 --- a/vendor/github.com/disintegration/imaging/README.md +++ b/vendor/github.com/kovidgoyal/imaging/README.md @@ -1,226 +1,231 @@ -# Imaging - -[![GoDoc](https://godoc.org/github.com/disintegration/imaging?status.svg)](https://godoc.org/github.com/disintegration/imaging) -[![Build Status](https://travis-ci.org/disintegration/imaging.svg?branch=master)](https://travis-ci.org/disintegration/imaging) -[![Coverage Status](https://coveralls.io/repos/github/disintegration/imaging/badge.svg?branch=master&service=github)](https://coveralls.io/github/disintegration/imaging?branch=master) -[![Go Report Card](https://goreportcard.com/badge/github.com/disintegration/imaging)](https://goreportcard.com/report/github.com/disintegration/imaging) - -Package imaging provides basic image processing functions (resize, rotate, crop, brightness/contrast adjustments, etc.). - -All the image processing functions provided by the package accept any image type that implements `image.Image` interface -as an input, and return a new image of `*image.NRGBA` type (32bit RGBA colors, non-premultiplied alpha). - -## Installation - - go get -u github.com/disintegration/imaging - -## Documentation - -http://godoc.org/github.com/disintegration/imaging - -## Usage examples - -A few usage examples can be found below. See the documentation for the full list of supported functions. - -### Image resizing - -```go -// Resize srcImage to size = 128x128px using the Lanczos filter. -dstImage128 := imaging.Resize(srcImage, 128, 128, imaging.Lanczos) - -// Resize srcImage to width = 800px preserving the aspect ratio. -dstImage800 := imaging.Resize(srcImage, 800, 0, imaging.Lanczos) - -// Scale down srcImage to fit the 800x600px bounding box. -dstImageFit := imaging.Fit(srcImage, 800, 600, imaging.Lanczos) - -// Resize and crop the srcImage to fill the 100x100px area. -dstImageFill := imaging.Fill(srcImage, 100, 100, imaging.Center, imaging.Lanczos) -``` - -Imaging supports image resizing using various resampling filters. The most notable ones: -- `Lanczos` - A high-quality resampling filter for photographic images yielding sharp results. -- `CatmullRom` - A sharp cubic filter that is faster than Lanczos filter while providing similar results. -- `MitchellNetravali` - A cubic filter that produces smoother results with less ringing artifacts than CatmullRom. -- `Linear` - Bilinear resampling filter, produces smooth output. Faster than cubic filters. -- `Box` - Simple and fast averaging filter appropriate for downscaling. When upscaling it's similar to NearestNeighbor. -- `NearestNeighbor` - Fastest resampling filter, no antialiasing. - -The full list of supported filters: NearestNeighbor, Box, Linear, Hermite, MitchellNetravali, CatmullRom, BSpline, Gaussian, Lanczos, Hann, Hamming, Blackman, Bartlett, Welch, Cosine. Custom filters can be created using ResampleFilter struct. - -**Resampling filters comparison** - -Original image: - -![srcImage](testdata/branches.png) - -The same image resized from 600x400px to 150x100px using different resampling filters. -From faster (lower quality) to slower (higher quality): - -Filter | Resize result ---------------------------|--------------------------------------------- -`imaging.NearestNeighbor` | ![dstImage](testdata/out_resize_nearest.png) -`imaging.Linear` | ![dstImage](testdata/out_resize_linear.png) -`imaging.CatmullRom` | ![dstImage](testdata/out_resize_catrom.png) -`imaging.Lanczos` | ![dstImage](testdata/out_resize_lanczos.png) - - -### Gaussian Blur - -```go -dstImage := imaging.Blur(srcImage, 0.5) -``` - -Sigma parameter allows to control the strength of the blurring effect. - -Original image | Sigma = 0.5 | Sigma = 1.5 ------------------------------------|----------------------------------------|--------------------------------------- -![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_blur_0.5.png) | ![dstImage](testdata/out_blur_1.5.png) - -### Sharpening - -```go -dstImage := imaging.Sharpen(srcImage, 0.5) -``` - -`Sharpen` uses gaussian function internally. Sigma parameter allows to control the strength of the sharpening effect. - -Original image | Sigma = 0.5 | Sigma = 1.5 ------------------------------------|-------------------------------------------|------------------------------------------ -![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_sharpen_0.5.png) | ![dstImage](testdata/out_sharpen_1.5.png) - -### Gamma correction - -```go -dstImage := imaging.AdjustGamma(srcImage, 0.75) -``` - -Original image | Gamma = 0.75 | Gamma = 1.25 ------------------------------------|------------------------------------------|----------------------------------------- -![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_gamma_0.75.png) | ![dstImage](testdata/out_gamma_1.25.png) - -### Contrast adjustment - -```go -dstImage := imaging.AdjustContrast(srcImage, 20) -``` - -Original image | Contrast = 15 | Contrast = -15 ------------------------------------|--------------------------------------------|------------------------------------------- -![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_contrast_p15.png) | ![dstImage](testdata/out_contrast_m15.png) - -### Brightness adjustment - -```go -dstImage := imaging.AdjustBrightness(srcImage, 20) -``` - -Original image | Brightness = 10 | Brightness = -10 ------------------------------------|----------------------------------------------|--------------------------------------------- -![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_brightness_p10.png) | ![dstImage](testdata/out_brightness_m10.png) - -### Saturation adjustment - -```go -dstImage := imaging.AdjustSaturation(srcImage, 20) -``` - -Original image | Saturation = 30 | Saturation = -30 ------------------------------------|----------------------------------------------|--------------------------------------------- -![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_saturation_p30.png) | ![dstImage](testdata/out_saturation_m30.png) - -## FAQ - -### Incorrect image orientation after processing (e.g. an image appears rotated after resizing) - -Most probably, the given image contains the EXIF orientation tag. -The stadard `image/*` packages do not support loading and saving -this kind of information. To fix the issue, try opening images with -the `AutoOrientation` decode option. If this option is set to `true`, -the image orientation is changed after decoding, according to the -orientation tag (if present). Here's the example: - -```go -img, err := imaging.Open("test.jpg", imaging.AutoOrientation(true)) -``` - -### What's the difference between `imaging` and `gift` packages? - -[imaging](https://github.com/disintegration/imaging) -is designed to be a lightweight and simple image manipulation package. -It provides basic image processing functions and a few helper functions -such as `Open` and `Save`. It consistently returns *image.NRGBA image -type (8 bits per channel, RGBA). - -[gift](https://github.com/disintegration/gift) -supports more advanced image processing, for example, sRGB/Linear color -space conversions. It also supports different output image types -(e.g. 16 bits per channel) and provides easy-to-use API for chaining -multiple processing steps together. - -## Example code - -```go -package main - -import ( - "image" - "image/color" - "log" - - "github.com/disintegration/imaging" -) - -func main() { - // Open a test image. - src, err := imaging.Open("testdata/flowers.png") - if err != nil { - log.Fatalf("failed to open image: %v", err) - } - - // Crop the original image to 300x300px size using the center anchor. - src = imaging.CropAnchor(src, 300, 300, imaging.Center) - - // Resize the cropped image to width = 200px preserving the aspect ratio. - src = imaging.Resize(src, 200, 0, imaging.Lanczos) - - // Create a blurred version of the image. - img1 := imaging.Blur(src, 5) - - // Create a grayscale version of the image with higher contrast and sharpness. - img2 := imaging.Grayscale(src) - img2 = imaging.AdjustContrast(img2, 20) - img2 = imaging.Sharpen(img2, 2) - - // Create an inverted version of the image. - img3 := imaging.Invert(src) - - // Create an embossed version of the image using a convolution filter. - img4 := imaging.Convolve3x3( - src, - [9]float64{ - -1, -1, 0, - -1, 1, 1, - 0, 1, 1, - }, - nil, - ) - - // Create a new image and paste the four produced images into it. - dst := imaging.New(400, 400, color.NRGBA{0, 0, 0, 0}) - dst = imaging.Paste(dst, img1, image.Pt(0, 0)) - dst = imaging.Paste(dst, img2, image.Pt(0, 200)) - dst = imaging.Paste(dst, img3, image.Pt(200, 0)) - dst = imaging.Paste(dst, img4, image.Pt(200, 200)) - - // Save the resulting image as JPEG. - err = imaging.Save(dst, "testdata/out_example.jpg") - if err != nil { - log.Fatalf("failed to save image: %v", err) - } -} -``` - -Output: - -![dstImage](testdata/out_example.jpg) +# Imaging + +Package imaging provides basic image processing functions (resize, rotate, crop, brightness/contrast adjustments, etc.). + +All the image processing functions provided by the package accept any image type that implements `image.Image` interface +as an input, and return a new image of `*image.NRGBA` type (32bit RGBA colors, non-premultiplied alpha). + +## Installation + + go get -u github.com/kovidgoyal/imaging + +## Documentation + +https://pkg.go.dev/github.com/kovidgoyal/imaging + +## Usage examples + +A few usage examples can be found below. See the documentation for the full list of supported functions. + +### Image resizing + +```go +// Resize srcImage to size = 128x128px using the Lanczos filter. +dstImage128 := imaging.Resize(srcImage, 128, 128, imaging.Lanczos) + +// Resize srcImage to width = 800px preserving the aspect ratio. +dstImage800 := imaging.Resize(srcImage, 800, 0, imaging.Lanczos) + +// Scale down srcImage to fit the 800x600px bounding box. +dstImageFit := imaging.Fit(srcImage, 800, 600, imaging.Lanczos) + +// Resize and crop the srcImage to fill the 100x100px area. +dstImageFill := imaging.Fill(srcImage, 100, 100, imaging.Center, imaging.Lanczos) +``` + +Imaging supports image resizing using various resampling filters. The most notable ones: +- `Lanczos` - A high-quality resampling filter for photographic images yielding sharp results. +- `CatmullRom` - A sharp cubic filter that is faster than Lanczos filter while providing similar results. +- `MitchellNetravali` - A cubic filter that produces smoother results with less ringing artifacts than CatmullRom. +- `Linear` - Bilinear resampling filter, produces smooth output. Faster than cubic filters. +- `Box` - Simple and fast averaging filter appropriate for downscaling. When upscaling it's similar to NearestNeighbor. +- `NearestNeighbor` - Fastest resampling filter, no antialiasing. + +The full list of supported filters: NearestNeighbor, Box, Linear, Hermite, MitchellNetravali, CatmullRom, BSpline, Gaussian, Lanczos, Hann, Hamming, Blackman, Bartlett, Welch, Cosine. Custom filters can be created using ResampleFilter struct. + +**Resampling filters comparison** + +Original image: + +![srcImage](testdata/branches.png) + +The same image resized from 600x400px to 150x100px using different resampling filters. +From faster (lower quality) to slower (higher quality): + +Filter | Resize result +--------------------------|--------------------------------------------- +`imaging.NearestNeighbor` | ![dstImage](testdata/out_resize_nearest.png) +`imaging.Linear` | ![dstImage](testdata/out_resize_linear.png) +`imaging.CatmullRom` | ![dstImage](testdata/out_resize_catrom.png) +`imaging.Lanczos` | ![dstImage](testdata/out_resize_lanczos.png) + + +### Gaussian Blur + +```go +dstImage := imaging.Blur(srcImage, 0.5) +``` + +Sigma parameter allows to control the strength of the blurring effect. + +Original image | Sigma = 0.5 | Sigma = 1.5 +-----------------------------------|----------------------------------------|--------------------------------------- +![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_blur_0.5.png) | ![dstImage](testdata/out_blur_1.5.png) + +### Sharpening + +```go +dstImage := imaging.Sharpen(srcImage, 0.5) +``` + +`Sharpen` uses gaussian function internally. Sigma parameter allows to control the strength of the sharpening effect. + +Original image | Sigma = 0.5 | Sigma = 1.5 +-----------------------------------|-------------------------------------------|------------------------------------------ +![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_sharpen_0.5.png) | ![dstImage](testdata/out_sharpen_1.5.png) + +### Gamma correction + +```go +dstImage := imaging.AdjustGamma(srcImage, 0.75) +``` + +Original image | Gamma = 0.75 | Gamma = 1.25 +-----------------------------------|------------------------------------------|----------------------------------------- +![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_gamma_0.75.png) | ![dstImage](testdata/out_gamma_1.25.png) + +### Contrast adjustment + +```go +dstImage := imaging.AdjustContrast(srcImage, 20) +``` + +Original image | Contrast = 15 | Contrast = -15 +-----------------------------------|--------------------------------------------|------------------------------------------- +![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_contrast_p15.png) | ![dstImage](testdata/out_contrast_m15.png) + +### Brightness adjustment + +```go +dstImage := imaging.AdjustBrightness(srcImage, 20) +``` + +Original image | Brightness = 10 | Brightness = -10 +-----------------------------------|----------------------------------------------|--------------------------------------------- +![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_brightness_p10.png) | ![dstImage](testdata/out_brightness_m10.png) + +### Saturation adjustment + +```go +dstImage := imaging.AdjustSaturation(srcImage, 20) +``` + +Original image | Saturation = 30 | Saturation = -30 +-----------------------------------|----------------------------------------------|--------------------------------------------- +![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_saturation_p30.png) | ![dstImage](testdata/out_saturation_m30.png) + +### Hue adjustment + +```go +dstImage := imaging.AdjustHue(srcImage, 20) +``` + +Original image | Hue = 60 | Hue = -60 +-----------------------------------|----------------------------------------------|--------------------------------------------- +![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_hue_p60.png) | ![dstImage](testdata/out_hue_m60.png) + +## FAQ + +### Incorrect image orientation after processing (e.g. an image appears rotated after resizing) + +Most probably, the given image contains the EXIF orientation tag. +The standard `image/*` packages do not support loading and saving +this kind of information. To fix the issue, try opening images with +the `AutoOrientation` decode option. If this option is set to `true`, +the image orientation is changed after decoding, according to the +orientation tag (if present). Here's the example: + +```go +img, err := imaging.Open("test.jpg", imaging.AutoOrientation(true)) +``` + +### What's the difference between `imaging` and `gift` packages? + +[imaging](https://github.com/kovidgoyal/imaging) +is designed to be a lightweight and simple image manipulation package. +It provides basic image processing functions and a few helper functions +such as `Open` and `Save`. It consistently returns *image.NRGBA image +type (8 bits per channel, RGBA). + +[gift](https://github.com/disintegration/gift) +supports more advanced image processing, for example, sRGB/Linear color +space conversions. It also supports different output image types +(e.g. 16 bits per channel) and provides easy-to-use API for chaining +multiple processing steps together. + +## Example code + +```go +package main + +import ( + "image" + "image/color" + "log" + + "github.com/kovidgoyal/imaging" +) + +func main() { + // Open a test image. + src, err := imaging.Open("testdata/flowers.png") + if err != nil { + log.Fatalf("failed to open image: %v", err) + } + + // Crop the original image to 300x300px size using the center anchor. + src = imaging.CropAnchor(src, 300, 300, imaging.Center) + + // Resize the cropped image to width = 200px preserving the aspect ratio. + src = imaging.Resize(src, 200, 0, imaging.Lanczos) + + // Create a blurred version of the image. + img1 := imaging.Blur(src, 5) + + // Create a grayscale version of the image with higher contrast and sharpness. + img2 := imaging.Grayscale(src) + img2 = imaging.AdjustContrast(img2, 20) + img2 = imaging.Sharpen(img2, 2) + + // Create an inverted version of the image. + img3 := imaging.Invert(src) + + // Create an embossed version of the image using a convolution filter. + img4 := imaging.Convolve3x3( + src, + [9]float64{ + -1, -1, 0, + -1, 1, 1, + 0, 1, 1, + }, + nil, + ) + + // Create a new image and paste the four produced images into it. + dst := imaging.New(400, 400, color.NRGBA{0, 0, 0, 0}) + dst = imaging.Paste(dst, img1, image.Pt(0, 0)) + dst = imaging.Paste(dst, img2, image.Pt(0, 200)) + dst = imaging.Paste(dst, img3, image.Pt(200, 0)) + dst = imaging.Paste(dst, img4, image.Pt(200, 200)) + + // Save the resulting image as JPEG. + err = imaging.Save(dst, "testdata/out_example.jpg") + if err != nil { + log.Fatalf("failed to save image: %v", err) + } +} +``` + +Output: + +![dstImage](testdata/out_example.jpg) diff --git a/vendor/github.com/disintegration/imaging/adjust.go b/vendor/github.com/kovidgoyal/imaging/adjust.go similarity index 86% rename from vendor/github.com/disintegration/imaging/adjust.go rename to vendor/github.com/kovidgoyal/imaging/adjust.go index daaf1de86..971aebc6f 100644 --- a/vendor/github.com/disintegration/imaging/adjust.go +++ b/vendor/github.com/kovidgoyal/imaging/adjust.go @@ -62,6 +62,10 @@ func Invert(img image.Image) *image.NRGBA { // dstImage = imaging.AdjustSaturation(srcImage, -10) // Decrease image saturation by 10%. // func AdjustSaturation(img image.Image, percentage float64) *image.NRGBA { + if percentage == 0 { + return Clone(img) + } + percentage = math.Min(math.Max(percentage, -100), 100) multiplier := 1 + percentage/100 @@ -76,6 +80,34 @@ func AdjustSaturation(img image.Image, percentage float64) *image.NRGBA { }) } +// AdjustHue changes the hue of the image using the shift parameter (measured in degrees) and returns the adjusted image. +// The shift = 0 (or 360 / -360 / etc.) gives the original image. +// The shift = 180 (or -180) corresponds to a 180° degree rotation of the color wheel and thus gives the image with its hue inverted for each pixel. +// +// Examples: +// dstImage = imaging.AdjustHue(srcImage, 90) // Shift Hue by 90°. +// dstImage = imaging.AdjustHue(srcImage, -30) // Shift Hue by -30°. +// +func AdjustHue(img image.Image, shift float64) *image.NRGBA { + if math.Mod(shift, 360) == 0 { + return Clone(img) + } + + summand := shift / 360 + + return AdjustFunc(img, func(c color.NRGBA) color.NRGBA { + h, s, l := rgbToHSL(c.R, c.G, c.B) + h += summand + h = math.Mod(h, 1) + //Adding 1 because Golang's Modulo function behaves differently to similar operators in most other languages. + if h < 0 { + h++ + } + r, g, b := hslToRGB(h, s, l) + return color.NRGBA{r, g, b, c.A} + }) +} + // AdjustContrast changes the contrast of the image using the percentage parameter and returns the adjusted image. // The percentage must be in range (-100, 100). The percentage = 0 gives the original image. // The percentage = -100 gives solid gray image. @@ -86,6 +118,10 @@ func AdjustSaturation(img image.Image, percentage float64) *image.NRGBA { // dstImage = imaging.AdjustContrast(srcImage, 20) // Increase image contrast by 20%. // func AdjustContrast(img image.Image, percentage float64) *image.NRGBA { + if percentage == 0 { + return Clone(img) + } + percentage = math.Min(math.Max(percentage, -100.0), 100.0) lut := make([]uint8, 256) @@ -114,6 +150,10 @@ func AdjustContrast(img image.Image, percentage float64) *image.NRGBA { // dstImage = imaging.AdjustBrightness(srcImage, 10) // Increase image brightness by 10%. // func AdjustBrightness(img image.Image, percentage float64) *image.NRGBA { + if percentage == 0 { + return Clone(img) + } + percentage = math.Min(math.Max(percentage, -100.0), 100.0) lut := make([]uint8, 256) @@ -134,6 +174,10 @@ func AdjustBrightness(img image.Image, percentage float64) *image.NRGBA { // dstImage = imaging.AdjustGamma(srcImage, 0.7) // func AdjustGamma(img image.Image, gamma float64) *image.NRGBA { + if gamma == 1 { + return Clone(img) + } + e := 1.0 / math.Max(gamma, 0.0001) lut := make([]uint8, 256) diff --git a/vendor/github.com/disintegration/imaging/convolution.go b/vendor/github.com/kovidgoyal/imaging/convolution.go similarity index 100% rename from vendor/github.com/disintegration/imaging/convolution.go rename to vendor/github.com/kovidgoyal/imaging/convolution.go diff --git a/vendor/github.com/disintegration/imaging/doc.go b/vendor/github.com/kovidgoyal/imaging/doc.go similarity index 100% rename from vendor/github.com/disintegration/imaging/doc.go rename to vendor/github.com/kovidgoyal/imaging/doc.go diff --git a/vendor/github.com/disintegration/imaging/effects.go b/vendor/github.com/kovidgoyal/imaging/effects.go similarity index 100% rename from vendor/github.com/disintegration/imaging/effects.go rename to vendor/github.com/kovidgoyal/imaging/effects.go diff --git a/vendor/github.com/disintegration/imaging/histogram.go b/vendor/github.com/kovidgoyal/imaging/histogram.go similarity index 100% rename from vendor/github.com/disintegration/imaging/histogram.go rename to vendor/github.com/kovidgoyal/imaging/histogram.go diff --git a/vendor/github.com/disintegration/imaging/io.go b/vendor/github.com/kovidgoyal/imaging/io.go similarity index 100% rename from vendor/github.com/disintegration/imaging/io.go rename to vendor/github.com/kovidgoyal/imaging/io.go diff --git a/vendor/github.com/kovidgoyal/imaging/publish.py b/vendor/github.com/kovidgoyal/imaging/publish.py new file mode 100644 index 000000000..3b0317bf4 --- /dev/null +++ b/vendor/github.com/kovidgoyal/imaging/publish.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python +# License: GPLv3 Copyright: 2024, Kovid Goyal + +import os +import subprocess + + +def run(*args: str): + cp = subprocess.run(args) + if cp.returncode != 0: + raise SystemExit(cp.returncode) + + +def main(): + version = input('Enter the version to publish: ') + try: + ans = input(f'Publish version \033[91m{version}\033[m (y/n): ') + except KeyboardInterrupt: + ans = 'n' + if ans.lower() != 'y': + return + os.environ['GITHUB_TOKEN'] = open(os.path.join(os.environ['PENV'], 'github-token')).read().strip() + run('git', 'tag', '-a', 'v' + version, '-m', f'version {version}') + run('git', 'push') + run('goreleaser', 'release') + + +if __name__ == '__main__': + main() diff --git a/vendor/github.com/disintegration/imaging/resize.go b/vendor/github.com/kovidgoyal/imaging/resize.go similarity index 99% rename from vendor/github.com/disintegration/imaging/resize.go rename to vendor/github.com/kovidgoyal/imaging/resize.go index 706435e3d..963f40c48 100644 --- a/vendor/github.com/disintegration/imaging/resize.go +++ b/vendor/github.com/kovidgoyal/imaging/resize.go @@ -87,6 +87,10 @@ func Resize(img image.Image, width, height int, filter ResampleFilter) *image.NR dstH = int(math.Max(1.0, math.Floor(tmpH+0.5))) } + if srcW == dstW && srcH == dstH { + return Clone(img) + } + if filter.Support <= 0 { // Nearest-neighbor special case. return resizeNearest(img, dstW, dstH) @@ -98,10 +102,8 @@ func Resize(img image.Image, width, height int, filter ResampleFilter) *image.NR if srcW != dstW { return resizeHorizontal(img, dstW, filter) } - if srcH != dstH { - return resizeVertical(img, dstH, filter) - } - return Clone(img) + return resizeVertical(img, dstH, filter) + } func resizeHorizontal(img image.Image, width int, filter ResampleFilter) *image.NRGBA { diff --git a/vendor/github.com/disintegration/imaging/scanner.go b/vendor/github.com/kovidgoyal/imaging/scanner.go similarity index 98% rename from vendor/github.com/disintegration/imaging/scanner.go rename to vendor/github.com/kovidgoyal/imaging/scanner.go index 37d92cef8..84de2fc90 100644 --- a/vendor/github.com/disintegration/imaging/scanner.go +++ b/vendor/github.com/kovidgoyal/imaging/scanner.go @@ -18,7 +18,7 @@ func newScanner(img image.Image) *scanner { h: img.Bounds().Dy(), } if img, ok := img.(*image.Paletted); ok { - s.palette = make([]color.NRGBA, len(img.Palette)) + s.palette = make([]color.NRGBA, max(256, len(img.Palette))) for i := 0; i < len(img.Palette); i++ { s.palette[i] = color.NRGBAModel.Convert(img.Palette[i]).(color.NRGBA) } diff --git a/vendor/github.com/kovidgoyal/imaging/session.vim b/vendor/github.com/kovidgoyal/imaging/session.vim new file mode 100644 index 000000000..76924354f --- /dev/null +++ b/vendor/github.com/kovidgoyal/imaging/session.vim @@ -0,0 +1,2 @@ +" Empty for the moment + diff --git a/vendor/github.com/disintegration/imaging/tools.go b/vendor/github.com/kovidgoyal/imaging/tools.go similarity index 98% rename from vendor/github.com/disintegration/imaging/tools.go rename to vendor/github.com/kovidgoyal/imaging/tools.go index 0ec19a039..9591ebc5a 100644 --- a/vendor/github.com/disintegration/imaging/tools.go +++ b/vendor/github.com/kovidgoyal/imaging/tools.go @@ -96,6 +96,10 @@ func Crop(img image.Image, rect image.Rectangle) *image.NRGBA { if r.Empty() { return &image.NRGBA{} } + if r.Eq(img.Bounds().Sub(img.Bounds().Min)) { + return Clone(img) + } + src := newScanner(img) dst := image.NewNRGBA(image.Rect(0, 0, r.Dx(), r.Dy())) rowSize := r.Dx() * 4 @@ -133,6 +137,10 @@ func Paste(background, img image.Image, pos image.Point) *image.NRGBA { if interRect.Empty() { return dst } + if interRect.Eq(dst.Bounds()) { + return Clone(img) + } + src := newScanner(img) parallel(interRect.Min.Y, interRect.Max.Y, func(ys <-chan int) { for y := range ys { diff --git a/vendor/github.com/disintegration/imaging/transform.go b/vendor/github.com/kovidgoyal/imaging/transform.go similarity index 100% rename from vendor/github.com/disintegration/imaging/transform.go rename to vendor/github.com/kovidgoyal/imaging/transform.go diff --git a/vendor/github.com/disintegration/imaging/utils.go b/vendor/github.com/kovidgoyal/imaging/utils.go similarity index 88% rename from vendor/github.com/disintegration/imaging/utils.go rename to vendor/github.com/kovidgoyal/imaging/utils.go index 6c7af1a51..f650c05bc 100644 --- a/vendor/github.com/disintegration/imaging/utils.go +++ b/vendor/github.com/kovidgoyal/imaging/utils.go @@ -5,8 +5,17 @@ import ( "math" "runtime" "sync" + "sync/atomic" ) +var maxProcs int64 + +// SetMaxProcs limits the number of concurrent processing goroutines to the given value. +// A value <= 0 clears the limit. +func SetMaxProcs(value int) { + atomic.StoreInt64(&maxProcs, int64(value)) +} + // parallel processes the data in separate goroutines. func parallel(start, stop int, fn func(<-chan int)) { count := stop - start @@ -15,6 +24,10 @@ func parallel(start, stop int, fn func(<-chan int)) { } procs := runtime.GOMAXPROCS(0) + limit := int(atomic.LoadInt64(&maxProcs)) + if procs > limit && limit > 0 { + procs = limit + } if procs > count { procs = count } diff --git a/vendor/modules.txt b/vendor/modules.txt index e83f4f2cc..53edcd3f5 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -747,9 +747,6 @@ github.com/dgryski/go-rendezvous # github.com/dhowden/tag v0.0.0-20230630033851-978a0926ee25 ## explicit; go 1.18 github.com/dhowden/tag -# github.com/disintegration/imaging v1.6.2 -## explicit -github.com/disintegration/imaging # github.com/dlclark/regexp2 v1.4.0 ## explicit github.com/dlclark/regexp2 @@ -1245,6 +1242,9 @@ github.com/klauspost/compress/s2 # github.com/klauspost/cpuid/v2 v2.2.6 ## explicit; go 1.15 github.com/klauspost/cpuid/v2 +# github.com/kovidgoyal/imaging v1.6.3 +## explicit; go 1.21 +github.com/kovidgoyal/imaging # github.com/leodido/go-urn v1.4.0 ## explicit; go 1.18 github.com/leodido/go-urn From b74af1e78521e6cae9effec45bbbfb4f09ac4f82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <1005065+DeepDiver1975@users.noreply.github.com> Date: Fri, 26 Apr 2024 13:04:23 +0000 Subject: [PATCH 08/19] Automated changelog update [skip ci] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e5dffc50..99887dbc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ The following sections list the changes for unreleased. ## Summary * Bugfix - Update the admin user role assignment to enforce the config: [#8918](https://github.com/owncloud/ocis/pull/8918) +* Bugfix - Crash when processing crafted TIFF files: [#8981](https://github.com/owncloud/ocis/pull/8981) ## Details @@ -59,6 +60,13 @@ The following sections list the changes for unreleased. https://github.com/owncloud/ocis/pull/8918 https://github.com/owncloud/ocis/pull/8897 +* Bugfix - Crash when processing crafted TIFF files: [#8981](https://github.com/owncloud/ocis/pull/8981) + + Fix for a vulnerability with low severity in disintegration/imaging. + + https://github.com/owncloud/ocis/pull/8981 + https://github.com/advisories/GHSA-q7pp-wcgr-pffx + # Changelog for [5.0.2] (2024-04-17) The following sections list the changes for 5.0.2. From e3c48f164aaf77065cef3bc229f9812e7f956c6c Mon Sep 17 00:00:00 2001 From: jkoberg Date: Mon, 29 Apr 2024 16:01:06 +0200 Subject: [PATCH 09/19] feat(reva): bump reva Signed-off-by: jkoberg --- go.mod | 2 +- go.sum | 4 +- .../internal/grpc/interceptors/auth/scope.go | 14 +- .../http/services/owncloud/ocdav/tus.go | 12 +- .../manager/owncloudsql/conversions.go | 2 - .../share/manager/owncloudsql/conversions.go | 2 - .../cs3org/reva/v2/pkg/share/share.go | 2 - .../reva/v2/pkg/storage/fs/posix/tree/tree.go | 2 - .../v2/pkg/storage/registry/spaces/spaces.go | 2 - .../cs3org/reva/v2/pkg/storage/uploads.go | 3 + .../utils/decomposedfs/decomposedfs.go | 19 +- .../storage/utils/decomposedfs/node/node.go | 8 +- .../permissions/spacepermissions.go | 3 - .../storage/utils/decomposedfs/tree/tree.go | 2 - .../utils/decomposedfs/upload/session.go | 24 +- .../utils/decomposedfs/upload/store.go | 10 +- .../utils/decomposedfs/upload/upload.go | 27 +- .../v2/pkg/storage/utils/indexer/indexer.go | 2 - .../v2/pkg/storage/utils/metadata/storage.go | 2 - .../cs3mocks/mocks/CollaborationAPIClient.go | 345 +- .../tests/cs3mocks/mocks/GatewayAPIClient.go | 3994 ++++++++++++++++- .../github.com/kovidgoyal/imaging/README.md | 462 +- vendor/modules.txt | 2 +- 23 files changed, 4658 insertions(+), 287 deletions(-) diff --git a/go.mod b/go.mod index 70d708039..a2e233976 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/cenkalti/backoff v2.2.1+incompatible github.com/coreos/go-oidc/v3 v3.9.0 github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781 - github.com/cs3org/reva/v2 v2.19.5 + github.com/cs3org/reva/v2 v2.19.6 github.com/dhowden/tag v0.0.0-20230630033851-978a0926ee25 github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e github.com/egirna/icap-client v0.1.1 diff --git a/go.sum b/go.sum index 2414ba7c7..2e9d44a20 100644 --- a/go.sum +++ b/go.sum @@ -1019,8 +1019,8 @@ github.com/crewjam/saml v0.4.14 h1:g9FBNx62osKusnFzs3QTN5L9CVA/Egfgm+stJShzw/c= github.com/crewjam/saml v0.4.14/go.mod h1:UVSZCf18jJkk6GpWNVqcyQJMD5HsRugBPf4I1nl2mME= github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781 h1:BUdwkIlf8IS2FasrrPg8gGPHQPOrQ18MS1Oew2tmGtY= github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= -github.com/cs3org/reva/v2 v2.19.5 h1:Qh38wpPovnb0jPpgGR6L6HfbQ8vwObcrB8yUCRJldSw= -github.com/cs3org/reva/v2 v2.19.5/go.mod h1:GRUrOp5HbFVwZTgR9bVrMZ/MvVy+Jhxw1PdMmhhKP9E= +github.com/cs3org/reva/v2 v2.19.6 h1:n7fsTwdIN20vmQFkfOiJUbF2D7JFMLLMgOnEBRM5OTU= +github.com/cs3org/reva/v2 v2.19.6/go.mod h1:GRUrOp5HbFVwZTgR9bVrMZ/MvVy+Jhxw1PdMmhhKP9E= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= diff --git a/vendor/github.com/cs3org/reva/v2/internal/grpc/interceptors/auth/scope.go b/vendor/github.com/cs3org/reva/v2/internal/grpc/interceptors/auth/scope.go index 5cb6183c6..353b2c676 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/grpc/interceptors/auth/scope.go +++ b/vendor/github.com/cs3org/reva/v2/internal/grpc/interceptors/auth/scope.go @@ -261,7 +261,7 @@ func checkIfNestedResource(ctx context.Context, ref *provider.Reference, parent if err != nil { return false, err } - if statResponse.Status.Code != rpc.Code_CODE_OK { + if statResponse.GetStatus().GetCode() != rpc.Code_CODE_OK { return false, statuspkg.NewErrorFromCode(statResponse.Status.Code, "auth interceptor") } @@ -313,14 +313,22 @@ func checkIfNestedResource(ctx context.Context, ref *provider.Reference, parent if err != nil { return false, err } - if childStat.Status.Code != rpc.Code_CODE_OK { + if childStat.GetStatus().GetCode() == rpc.Code_CODE_NOT_FOUND && ref.GetPath() != "" && ref.GetPath() != "." { + // The resource does not seem to exist (yet?). We might be part of an initiate upload request. + // Stat the parent to get its path and check that against the root path. + childStat, err = client.Stat(ctx, &provider.StatRequest{Ref: &provider.Reference{ResourceId: ref.GetResourceId()}}) + if err != nil { + return false, err + } + } + if childStat.GetStatus().GetCode() != rpc.Code_CODE_OK { return false, statuspkg.NewErrorFromCode(childStat.Status.Code, "auth interceptor") } pathResp, err = client.GetPath(ctx, &provider.GetPathRequest{ResourceId: childStat.GetInfo().GetId()}) if err != nil { return false, err } - if pathResp.Status.Code != rpc.Code_CODE_OK { + if pathResp.GetStatus().GetCode() != rpc.Code_CODE_OK { return false, statuspkg.NewErrorFromCode(pathResp.Status.Code, "auth interceptor") } childPath = pathResp.Path diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/tus.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/tus.go index bd5831d4e..c22651978 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/tus.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/tus.go @@ -319,9 +319,15 @@ func (s *svc) handleTusPost(ctx context.Context, w http.ResponseWriter, r *http. w.Header().Set(net.HeaderOCMtime, httpRes.Header.Get(net.HeaderOCMtime)) } - if resid, err := storagespace.ParseID(httpRes.Header.Get(net.HeaderOCFileID)); err == nil { - sReq.Ref = &provider.Reference{ - ResourceId: &resid, + if strings.HasPrefix(uReq.GetRef().GetPath(), "/public") && uReq.GetRef().GetResourceId() == nil { + // Use the path based request for the public link + sReq.Ref.Path = uReq.Ref.GetPath() + sReq.Ref.ResourceId = nil + } else { + if resid, err := storagespace.ParseID(httpRes.Header.Get(net.HeaderOCFileID)); err == nil { + sReq.Ref = &provider.Reference{ + ResourceId: &resid, + } } } finishUpload = httpRes.Header.Get(net.HeaderUploadOffset) == r.Header.Get(net.HeaderUploadLength) diff --git a/vendor/github.com/cs3org/reva/v2/pkg/publicshare/manager/owncloudsql/conversions.go b/vendor/github.com/cs3org/reva/v2/pkg/publicshare/manager/owncloudsql/conversions.go index edca2554e..33f533e2c 100644 --- a/vendor/github.com/cs3org/reva/v2/pkg/publicshare/manager/owncloudsql/conversions.go +++ b/vendor/github.com/cs3org/reva/v2/pkg/publicshare/manager/owncloudsql/conversions.go @@ -33,8 +33,6 @@ import ( "github.com/jellydator/ttlcache/v2" ) -//go:generate make --no-print-directory -C ../../../.. mockery NAME=UserConverter - // DBShare stores information about user and public shares. type DBShare struct { ID string diff --git a/vendor/github.com/cs3org/reva/v2/pkg/share/manager/owncloudsql/conversions.go b/vendor/github.com/cs3org/reva/v2/pkg/share/manager/owncloudsql/conversions.go index f3aa081d7..14660e480 100644 --- a/vendor/github.com/cs3org/reva/v2/pkg/share/manager/owncloudsql/conversions.go +++ b/vendor/github.com/cs3org/reva/v2/pkg/share/manager/owncloudsql/conversions.go @@ -37,8 +37,6 @@ import ( "github.com/jellydator/ttlcache/v2" ) -//go:generate make --no-print-directory -C ../../../.. mockery NAME=UserConverter - // DBShare stores information about user and public shares. type DBShare struct { ID string diff --git a/vendor/github.com/cs3org/reva/v2/pkg/share/share.go b/vendor/github.com/cs3org/reva/v2/pkg/share/share.go index 34644a1a8..8e2b45254 100644 --- a/vendor/github.com/cs3org/reva/v2/pkg/share/share.go +++ b/vendor/github.com/cs3org/reva/v2/pkg/share/share.go @@ -36,8 +36,6 @@ const ( NoState collaboration.ShareState = -1 ) -//go:generate make --no-print-directory -C ../.. mockery NAME=Manager - // Metadata contains Metadata for a share type Metadata struct { ETag string diff --git a/vendor/github.com/cs3org/reva/v2/pkg/storage/fs/posix/tree/tree.go b/vendor/github.com/cs3org/reva/v2/pkg/storage/fs/posix/tree/tree.go index bf6eeb70c..b157133ca 100644 --- a/vendor/github.com/cs3org/reva/v2/pkg/storage/fs/posix/tree/tree.go +++ b/vendor/github.com/cs3org/reva/v2/pkg/storage/fs/posix/tree/tree.go @@ -54,8 +54,6 @@ func init() { tracer = otel.Tracer("github.com/cs3org/reva/pkg/storage/utils/decomposedfs/tree") } -//go:generate make --no-print-directory -C ../../../../.. mockery NAME=Blobstore - // Blobstore defines an interface for storing blobs in a blobstore type Blobstore interface { Upload(node *node.Node, source string) error diff --git a/vendor/github.com/cs3org/reva/v2/pkg/storage/registry/spaces/spaces.go b/vendor/github.com/cs3org/reva/v2/pkg/storage/registry/spaces/spaces.go index aa8385f66..a2379f5ae 100644 --- a/vendor/github.com/cs3org/reva/v2/pkg/storage/registry/spaces/spaces.go +++ b/vendor/github.com/cs3org/reva/v2/pkg/storage/registry/spaces/spaces.go @@ -48,8 +48,6 @@ import ( "google.golang.org/grpc" ) -//go:generate make --no-print-directory -C ../../../.. mockery NAME=StorageProviderClient - func init() { pkgregistry.Register("spaces", NewDefault) } diff --git a/vendor/github.com/cs3org/reva/v2/pkg/storage/uploads.go b/vendor/github.com/cs3org/reva/v2/pkg/storage/uploads.go index 87d26115b..f6ef9ad2d 100644 --- a/vendor/github.com/cs3org/reva/v2/pkg/storage/uploads.go +++ b/vendor/github.com/cs3org/reva/v2/pkg/storage/uploads.go @@ -76,6 +76,9 @@ type UploadSession interface { // Purge allows completely removing an upload. Should emit a PostprocessingFinished event with a Delete outcome Purge(ctx context.Context) error + + // ScanData returns the scan data for the UploadSession + ScanData() (string, time.Time) } // UploadSessionFilter can be used to filter upload sessions diff --git a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go index 35cc29663..dc8dd0f3d 100644 --- a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go +++ b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go @@ -310,9 +310,16 @@ func (fs *Decomposedfs) Postprocessing(ch <-chan events.Event) { now := time.Now() if failed { - // propagate sizeDiff after failed postprocessing - if err := fs.tp.Propagate(ctx, n, -session.SizeDiff()); err != nil { - log.Error().Err(err).Str("uploadID", ev.UploadID).Msg("could not propagate tree size change") + // if no other upload session is in progress (processing id != session id) or has finished (processing id == "") + latestSession, err := n.ProcessingID(ctx) + if err != nil { + log.Error().Err(err).Str("node", n.ID).Str("uploadID", ev.UploadID).Msg("reading node for session failed") + } + if latestSession == session.ID() { + // propagate reverted sizeDiff after failed postprocessing + if err := fs.tp.Propagate(ctx, n, -session.SizeDiff()); err != nil { + log.Error().Err(err).Str("uploadID", ev.UploadID).Msg("could not propagate tree size change") + } } } else if p := getParent(); p != nil { // update parent tmtime to propagate etag change after successful postprocessing @@ -486,6 +493,12 @@ func (fs *Decomposedfs) Postprocessing(ch <-chan events.Event) { log.Error().Err(err).Interface("uploadID", ev.UploadID).Msg("Failed to get node after scan") continue } + sublog := log.With().Str("spaceid", session.SpaceID()).Str("nodeid", session.NodeID()).Logger() + + session.SetScanData(res.Description, res.Scandate) + if err := session.Persist(ctx); err != nil { + sublog.Error().Err(err).Msg("Failed to persist scan results") + } } if err := n.SetScanData(ctx, res.Description, res.Scandate); err != nil { diff --git a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/node/node.go b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/node/node.go index f201722da..db22961fd 100644 --- a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/node/node.go +++ b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/node/node.go @@ -54,8 +54,6 @@ import ( "go.opentelemetry.io/otel/trace" ) -//go:generate make --no-print-directory -C ../../../../.. mockery NAME=Tree - var tracer trace.Tracer func init() { @@ -1278,6 +1276,12 @@ func (n *Node) IsProcessing(ctx context.Context) bool { return err == nil && strings.HasPrefix(v, ProcessingStatus) } +// ProcessingID returns the latest upload session id +func (n *Node) ProcessingID(ctx context.Context) (string, error) { + v, err := n.XattrString(ctx, prefixes.StatusPrefix) + return strings.TrimPrefix(v, ProcessingStatus), err +} + // IsSpaceRoot checks if the node is a space root func (n *Node) IsSpaceRoot(ctx context.Context) bool { _, err := n.Xattr(ctx, prefixes.SpaceNameAttr) diff --git a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/permissions/spacepermissions.go b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/permissions/spacepermissions.go index 7de6144d3..75e8e73c6 100644 --- a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/permissions/spacepermissions.go +++ b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/permissions/spacepermissions.go @@ -16,9 +16,6 @@ import ( "google.golang.org/grpc" ) -//go:generate make --no-print-directory -C ../../../../.. mockery NAME=PermissionsChecker -//go:generate make --no-print-directory -C ../../../../.. mockery NAME=CS3PermissionsClient - var ( tracer trace.Tracer ) diff --git a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/tree/tree.go b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/tree/tree.go index 6fc5176af..1d119bd1b 100644 --- a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/tree/tree.go +++ b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/tree/tree.go @@ -53,8 +53,6 @@ func init() { tracer = otel.Tracer("github.com/cs3org/reva/pkg/storage/utils/decomposedfs/tree") } -//go:generate make --no-print-directory -C ../../../../.. mockery NAME=Blobstore - // Blobstore defines an interface for storing blobs in a blobstore type Blobstore interface { Upload(node *node.Node, source string) error diff --git a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/upload/session.go b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/upload/session.go index f438d684f..279dfd713 100644 --- a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/upload/session.go +++ b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/upload/session.go @@ -297,7 +297,8 @@ func (s *OcisSession) MTime() time.Time { // IsProcessing returns true if all bytes have been received. The session then has entered postprocessing state. func (s *OcisSession) IsProcessing() bool { - return s.info.Size == s.info.Offset + // We might need a more sophisticated way to determine processing status soon + return s.info.Size == s.info.Offset && s.info.MetaData["scanResult"] == "" } // binPath returns the path to the file storing the binary data. @@ -305,6 +306,27 @@ func (s *OcisSession) binPath() string { return filepath.Join(s.store.root, "uploads", s.info.ID) } +// InitiatorID returns the id of the initiating client +func (s *OcisSession) InitiatorID() string { + return s.info.MetaData["initiatorid"] +} + +// SetScanData sets virus scan data to the upload session +func (s *OcisSession) SetScanData(result string, date time.Time) { + s.info.MetaData["scanResult"] = result + s.info.MetaData["scanDate"] = date.Format(time.RFC3339) +} + +// ScanData returns the virus scan data +func (s *OcisSession) ScanData() (string, time.Time) { + date := s.info.MetaData["scanDate"] + if date == "" { + return "", time.Time{} + } + d, _ := time.Parse(time.RFC3339, date) + return s.info.MetaData["scanResult"], d +} + // sessionPath returns the path to the .info file storing the file's info. func sessionPath(root, id string) string { return filepath.Join(root, "uploads", id+".info") diff --git a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/upload/store.go b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/upload/store.go index 57a7aea8f..aeab235de 100644 --- a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/upload/store.go +++ b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/upload/store.go @@ -205,7 +205,15 @@ func (store OcisStore) CreateNodeForUpload(session *OcisSession, initAttrs node. } var f *lockedfile.File - if session.NodeExists() { + if session.NodeExists() { // TODO this is wrong. The node should be created when the upload starts, the revisions should be created independently of the node + // we do not need to propagate a change when a node is created, only when the upload is ready. + // that still creates problems for desktop clients because if another change causes propagation it will detects an empty file + // so the first upload has to point to the first revision with the expected size. The file cannot be downloaded, but it can be overwritten (which will create a new revision and make the node reflect the latest revision) + // any finished postprocessing will not affect the node metadata. + // *thinking* but then initializing an upload will lock the file until the upload has finished. That sucks. + // so we have to check if the node has been created meanwhile (well, only in case the upload does not know the nodeid ... or the NodeExists array that is checked by session.NodeExists()) + // FIXME look at the disk again to see if the file has been created in between, or just try initializing a new node and do the update existing node as a fallback. <- the latter! + f, err = store.updateExistingNode(ctx, session, n, session.SpaceID(), uint64(session.Size())) if f != nil { appctx.GetLogger(ctx).Info().Str("lockfile", f.Name()).Interface("err", err).Msg("got lock file from updateExistingNode") diff --git a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/upload/upload.go b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/upload/upload.go index 2f2713b45..e0fa97749 100644 --- a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/upload/upload.go +++ b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/upload/upload.go @@ -276,14 +276,12 @@ func (session *OcisSession) ConcatUploads(_ context.Context, uploads []tusd.Uplo func (session *OcisSession) Finalize() (err error) { ctx, span := tracer.Start(session.Context(context.Background()), "Finalize") defer span.End() - n, err := session.Node(ctx) - if err != nil { - return err - } + + revisionNode := &node.Node{SpaceID: session.SpaceID(), BlobID: session.ID(), Blobsize: session.Size()} // upload the data to the blobstore _, subspan := tracer.Start(ctx, "WriteBlob") - err = session.store.tp.WriteBlob(n, session.binPath()) + err = session.store.tp.WriteBlob(revisionNode, session.binPath()) subspan.End() if err != nil { return errors.Wrap(err, "failed to upload file to blobstore") @@ -316,12 +314,12 @@ func (session *OcisSession) Cleanup(revertNodeMetadata, cleanBin, cleanInfo bool ctx := session.Context(context.Background()) if revertNodeMetadata { + n, err := session.Node(ctx) + if err != nil { + appctx.GetLogger(ctx).Error().Err(err).Str("node", n.ID).Str("sessionid", session.ID()).Msg("reading node for session failed") + } if session.NodeExists() { p := session.info.MetaData["versionsPath"] - n, err := session.Node(ctx) - if err != nil { - appctx.GetLogger(ctx).Error().Err(err).Str("sessionid", session.ID()).Msg("reading node for session failed") - } if err := session.store.lu.CopyMetadata(ctx, p, n.InternalPath(), func(attributeName string, value []byte) (newValue []byte, copy bool) { return value, strings.HasPrefix(attributeName, prefixes.ChecksumPrefix) || attributeName == prefixes.TypeAttr || @@ -337,7 +335,16 @@ func (session *OcisSession) Cleanup(revertNodeMetadata, cleanBin, cleanInfo bool } } else { - session.removeNode(ctx) + // if no other upload session is in progress (processing id != session id) or has finished (processing id == "") + latestSession, err := n.ProcessingID(ctx) + if err != nil { + appctx.GetLogger(ctx).Error().Err(err).Str("node", n.ID).Str("sessionid", session.ID()).Msg("reading processingid for session failed") + } + if latestSession == session.ID() { + // actually delete the node + session.removeNode(ctx) + } + // FIXME else if the upload has become a revision, delete the revision, or if it is the last one, delete the node } } diff --git a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/indexer/indexer.go b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/indexer/indexer.go index a3a7ace29..6d463eaf7 100644 --- a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/indexer/indexer.go +++ b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/indexer/indexer.go @@ -36,8 +36,6 @@ import ( "github.com/cs3org/reva/v2/pkg/storage/utils/sync" ) -//go:generate make --no-print-directory -C ../../../.. mockery NAME=Indexer - // Indexer is a facade to configure and query over multiple indices. type Indexer interface { AddIndex(t interface{}, indexBy option.IndexBy, pkName, entityDirName, indexType string, bound *option.Bound, caseInsensitive bool) error diff --git a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/metadata/storage.go b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/metadata/storage.go index 24e74f4a9..5757674de 100644 --- a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/metadata/storage.go +++ b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/metadata/storage.go @@ -28,8 +28,6 @@ import ( provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" ) -//go:generate make --no-print-directory -C ../../../.. mockery NAME=Storage - // UploadRequest represents an upload request and its options type UploadRequest struct { Path string diff --git a/vendor/github.com/cs3org/reva/v2/tests/cs3mocks/mocks/CollaborationAPIClient.go b/vendor/github.com/cs3org/reva/v2/tests/cs3mocks/mocks/CollaborationAPIClient.go index acb687338..93cc14d37 100644 --- a/vendor/github.com/cs3org/reva/v2/tests/cs3mocks/mocks/CollaborationAPIClient.go +++ b/vendor/github.com/cs3org/reva/v2/tests/cs3mocks/mocks/CollaborationAPIClient.go @@ -16,7 +16,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.40.2. DO NOT EDIT. package mocks @@ -35,6 +35,14 @@ type CollaborationAPIClient struct { mock.Mock } +type CollaborationAPIClient_Expecter struct { + mock *mock.Mock +} + +func (_m *CollaborationAPIClient) EXPECT() *CollaborationAPIClient_Expecter { + return &CollaborationAPIClient_Expecter{mock: &_m.Mock} +} + // CreateShare provides a mock function with given fields: ctx, in, opts func (_m *CollaborationAPIClient) CreateShare(ctx context.Context, in *collaborationv1beta1.CreateShareRequest, opts ...grpc.CallOption) (*collaborationv1beta1.CreateShareResponse, error) { _va := make([]interface{}, len(opts)) @@ -46,6 +54,10 @@ func (_m *CollaborationAPIClient) CreateShare(ctx context.Context, in *collabora _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CreateShare") + } + var r0 *collaborationv1beta1.CreateShareResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.CreateShareRequest, ...grpc.CallOption) (*collaborationv1beta1.CreateShareResponse, error)); ok { @@ -68,6 +80,43 @@ func (_m *CollaborationAPIClient) CreateShare(ctx context.Context, in *collabora return r0, r1 } +// CollaborationAPIClient_CreateShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateShare' +type CollaborationAPIClient_CreateShare_Call struct { + *mock.Call +} + +// CreateShare is a helper method to define mock.On call +// - ctx context.Context +// - in *collaborationv1beta1.CreateShareRequest +// - opts ...grpc.CallOption +func (_e *CollaborationAPIClient_Expecter) CreateShare(ctx interface{}, in interface{}, opts ...interface{}) *CollaborationAPIClient_CreateShare_Call { + return &CollaborationAPIClient_CreateShare_Call{Call: _e.mock.On("CreateShare", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *CollaborationAPIClient_CreateShare_Call) Run(run func(ctx context.Context, in *collaborationv1beta1.CreateShareRequest, opts ...grpc.CallOption)) *CollaborationAPIClient_CreateShare_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*collaborationv1beta1.CreateShareRequest), variadicArgs...) + }) + return _c +} + +func (_c *CollaborationAPIClient_CreateShare_Call) Return(_a0 *collaborationv1beta1.CreateShareResponse, _a1 error) *CollaborationAPIClient_CreateShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *CollaborationAPIClient_CreateShare_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.CreateShareRequest, ...grpc.CallOption) (*collaborationv1beta1.CreateShareResponse, error)) *CollaborationAPIClient_CreateShare_Call { + _c.Call.Return(run) + return _c +} + // GetReceivedShare provides a mock function with given fields: ctx, in, opts func (_m *CollaborationAPIClient) GetReceivedShare(ctx context.Context, in *collaborationv1beta1.GetReceivedShareRequest, opts ...grpc.CallOption) (*collaborationv1beta1.GetReceivedShareResponse, error) { _va := make([]interface{}, len(opts)) @@ -79,6 +128,10 @@ func (_m *CollaborationAPIClient) GetReceivedShare(ctx context.Context, in *coll _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetReceivedShare") + } + var r0 *collaborationv1beta1.GetReceivedShareResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.GetReceivedShareRequest, ...grpc.CallOption) (*collaborationv1beta1.GetReceivedShareResponse, error)); ok { @@ -101,6 +154,43 @@ func (_m *CollaborationAPIClient) GetReceivedShare(ctx context.Context, in *coll return r0, r1 } +// CollaborationAPIClient_GetReceivedShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetReceivedShare' +type CollaborationAPIClient_GetReceivedShare_Call struct { + *mock.Call +} + +// GetReceivedShare is a helper method to define mock.On call +// - ctx context.Context +// - in *collaborationv1beta1.GetReceivedShareRequest +// - opts ...grpc.CallOption +func (_e *CollaborationAPIClient_Expecter) GetReceivedShare(ctx interface{}, in interface{}, opts ...interface{}) *CollaborationAPIClient_GetReceivedShare_Call { + return &CollaborationAPIClient_GetReceivedShare_Call{Call: _e.mock.On("GetReceivedShare", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *CollaborationAPIClient_GetReceivedShare_Call) Run(run func(ctx context.Context, in *collaborationv1beta1.GetReceivedShareRequest, opts ...grpc.CallOption)) *CollaborationAPIClient_GetReceivedShare_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*collaborationv1beta1.GetReceivedShareRequest), variadicArgs...) + }) + return _c +} + +func (_c *CollaborationAPIClient_GetReceivedShare_Call) Return(_a0 *collaborationv1beta1.GetReceivedShareResponse, _a1 error) *CollaborationAPIClient_GetReceivedShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *CollaborationAPIClient_GetReceivedShare_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.GetReceivedShareRequest, ...grpc.CallOption) (*collaborationv1beta1.GetReceivedShareResponse, error)) *CollaborationAPIClient_GetReceivedShare_Call { + _c.Call.Return(run) + return _c +} + // GetShare provides a mock function with given fields: ctx, in, opts func (_m *CollaborationAPIClient) GetShare(ctx context.Context, in *collaborationv1beta1.GetShareRequest, opts ...grpc.CallOption) (*collaborationv1beta1.GetShareResponse, error) { _va := make([]interface{}, len(opts)) @@ -112,6 +202,10 @@ func (_m *CollaborationAPIClient) GetShare(ctx context.Context, in *collaboratio _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetShare") + } + var r0 *collaborationv1beta1.GetShareResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.GetShareRequest, ...grpc.CallOption) (*collaborationv1beta1.GetShareResponse, error)); ok { @@ -134,6 +228,43 @@ func (_m *CollaborationAPIClient) GetShare(ctx context.Context, in *collaboratio return r0, r1 } +// CollaborationAPIClient_GetShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetShare' +type CollaborationAPIClient_GetShare_Call struct { + *mock.Call +} + +// GetShare is a helper method to define mock.On call +// - ctx context.Context +// - in *collaborationv1beta1.GetShareRequest +// - opts ...grpc.CallOption +func (_e *CollaborationAPIClient_Expecter) GetShare(ctx interface{}, in interface{}, opts ...interface{}) *CollaborationAPIClient_GetShare_Call { + return &CollaborationAPIClient_GetShare_Call{Call: _e.mock.On("GetShare", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *CollaborationAPIClient_GetShare_Call) Run(run func(ctx context.Context, in *collaborationv1beta1.GetShareRequest, opts ...grpc.CallOption)) *CollaborationAPIClient_GetShare_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*collaborationv1beta1.GetShareRequest), variadicArgs...) + }) + return _c +} + +func (_c *CollaborationAPIClient_GetShare_Call) Return(_a0 *collaborationv1beta1.GetShareResponse, _a1 error) *CollaborationAPIClient_GetShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *CollaborationAPIClient_GetShare_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.GetShareRequest, ...grpc.CallOption) (*collaborationv1beta1.GetShareResponse, error)) *CollaborationAPIClient_GetShare_Call { + _c.Call.Return(run) + return _c +} + // ListReceivedShares provides a mock function with given fields: ctx, in, opts func (_m *CollaborationAPIClient) ListReceivedShares(ctx context.Context, in *collaborationv1beta1.ListReceivedSharesRequest, opts ...grpc.CallOption) (*collaborationv1beta1.ListReceivedSharesResponse, error) { _va := make([]interface{}, len(opts)) @@ -145,6 +276,10 @@ func (_m *CollaborationAPIClient) ListReceivedShares(ctx context.Context, in *co _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListReceivedShares") + } + var r0 *collaborationv1beta1.ListReceivedSharesResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.ListReceivedSharesRequest, ...grpc.CallOption) (*collaborationv1beta1.ListReceivedSharesResponse, error)); ok { @@ -167,6 +302,43 @@ func (_m *CollaborationAPIClient) ListReceivedShares(ctx context.Context, in *co return r0, r1 } +// CollaborationAPIClient_ListReceivedShares_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListReceivedShares' +type CollaborationAPIClient_ListReceivedShares_Call struct { + *mock.Call +} + +// ListReceivedShares is a helper method to define mock.On call +// - ctx context.Context +// - in *collaborationv1beta1.ListReceivedSharesRequest +// - opts ...grpc.CallOption +func (_e *CollaborationAPIClient_Expecter) ListReceivedShares(ctx interface{}, in interface{}, opts ...interface{}) *CollaborationAPIClient_ListReceivedShares_Call { + return &CollaborationAPIClient_ListReceivedShares_Call{Call: _e.mock.On("ListReceivedShares", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *CollaborationAPIClient_ListReceivedShares_Call) Run(run func(ctx context.Context, in *collaborationv1beta1.ListReceivedSharesRequest, opts ...grpc.CallOption)) *CollaborationAPIClient_ListReceivedShares_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*collaborationv1beta1.ListReceivedSharesRequest), variadicArgs...) + }) + return _c +} + +func (_c *CollaborationAPIClient_ListReceivedShares_Call) Return(_a0 *collaborationv1beta1.ListReceivedSharesResponse, _a1 error) *CollaborationAPIClient_ListReceivedShares_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *CollaborationAPIClient_ListReceivedShares_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.ListReceivedSharesRequest, ...grpc.CallOption) (*collaborationv1beta1.ListReceivedSharesResponse, error)) *CollaborationAPIClient_ListReceivedShares_Call { + _c.Call.Return(run) + return _c +} + // ListShares provides a mock function with given fields: ctx, in, opts func (_m *CollaborationAPIClient) ListShares(ctx context.Context, in *collaborationv1beta1.ListSharesRequest, opts ...grpc.CallOption) (*collaborationv1beta1.ListSharesResponse, error) { _va := make([]interface{}, len(opts)) @@ -178,6 +350,10 @@ func (_m *CollaborationAPIClient) ListShares(ctx context.Context, in *collaborat _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListShares") + } + var r0 *collaborationv1beta1.ListSharesResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.ListSharesRequest, ...grpc.CallOption) (*collaborationv1beta1.ListSharesResponse, error)); ok { @@ -200,6 +376,43 @@ func (_m *CollaborationAPIClient) ListShares(ctx context.Context, in *collaborat return r0, r1 } +// CollaborationAPIClient_ListShares_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListShares' +type CollaborationAPIClient_ListShares_Call struct { + *mock.Call +} + +// ListShares is a helper method to define mock.On call +// - ctx context.Context +// - in *collaborationv1beta1.ListSharesRequest +// - opts ...grpc.CallOption +func (_e *CollaborationAPIClient_Expecter) ListShares(ctx interface{}, in interface{}, opts ...interface{}) *CollaborationAPIClient_ListShares_Call { + return &CollaborationAPIClient_ListShares_Call{Call: _e.mock.On("ListShares", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *CollaborationAPIClient_ListShares_Call) Run(run func(ctx context.Context, in *collaborationv1beta1.ListSharesRequest, opts ...grpc.CallOption)) *CollaborationAPIClient_ListShares_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*collaborationv1beta1.ListSharesRequest), variadicArgs...) + }) + return _c +} + +func (_c *CollaborationAPIClient_ListShares_Call) Return(_a0 *collaborationv1beta1.ListSharesResponse, _a1 error) *CollaborationAPIClient_ListShares_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *CollaborationAPIClient_ListShares_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.ListSharesRequest, ...grpc.CallOption) (*collaborationv1beta1.ListSharesResponse, error)) *CollaborationAPIClient_ListShares_Call { + _c.Call.Return(run) + return _c +} + // RemoveShare provides a mock function with given fields: ctx, in, opts func (_m *CollaborationAPIClient) RemoveShare(ctx context.Context, in *collaborationv1beta1.RemoveShareRequest, opts ...grpc.CallOption) (*collaborationv1beta1.RemoveShareResponse, error) { _va := make([]interface{}, len(opts)) @@ -211,6 +424,10 @@ func (_m *CollaborationAPIClient) RemoveShare(ctx context.Context, in *collabora _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for RemoveShare") + } + var r0 *collaborationv1beta1.RemoveShareResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.RemoveShareRequest, ...grpc.CallOption) (*collaborationv1beta1.RemoveShareResponse, error)); ok { @@ -233,6 +450,43 @@ func (_m *CollaborationAPIClient) RemoveShare(ctx context.Context, in *collabora return r0, r1 } +// CollaborationAPIClient_RemoveShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveShare' +type CollaborationAPIClient_RemoveShare_Call struct { + *mock.Call +} + +// RemoveShare is a helper method to define mock.On call +// - ctx context.Context +// - in *collaborationv1beta1.RemoveShareRequest +// - opts ...grpc.CallOption +func (_e *CollaborationAPIClient_Expecter) RemoveShare(ctx interface{}, in interface{}, opts ...interface{}) *CollaborationAPIClient_RemoveShare_Call { + return &CollaborationAPIClient_RemoveShare_Call{Call: _e.mock.On("RemoveShare", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *CollaborationAPIClient_RemoveShare_Call) Run(run func(ctx context.Context, in *collaborationv1beta1.RemoveShareRequest, opts ...grpc.CallOption)) *CollaborationAPIClient_RemoveShare_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*collaborationv1beta1.RemoveShareRequest), variadicArgs...) + }) + return _c +} + +func (_c *CollaborationAPIClient_RemoveShare_Call) Return(_a0 *collaborationv1beta1.RemoveShareResponse, _a1 error) *CollaborationAPIClient_RemoveShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *CollaborationAPIClient_RemoveShare_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.RemoveShareRequest, ...grpc.CallOption) (*collaborationv1beta1.RemoveShareResponse, error)) *CollaborationAPIClient_RemoveShare_Call { + _c.Call.Return(run) + return _c +} + // UpdateReceivedShare provides a mock function with given fields: ctx, in, opts func (_m *CollaborationAPIClient) UpdateReceivedShare(ctx context.Context, in *collaborationv1beta1.UpdateReceivedShareRequest, opts ...grpc.CallOption) (*collaborationv1beta1.UpdateReceivedShareResponse, error) { _va := make([]interface{}, len(opts)) @@ -244,6 +498,10 @@ func (_m *CollaborationAPIClient) UpdateReceivedShare(ctx context.Context, in *c _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UpdateReceivedShare") + } + var r0 *collaborationv1beta1.UpdateReceivedShareResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.UpdateReceivedShareRequest, ...grpc.CallOption) (*collaborationv1beta1.UpdateReceivedShareResponse, error)); ok { @@ -266,6 +524,43 @@ func (_m *CollaborationAPIClient) UpdateReceivedShare(ctx context.Context, in *c return r0, r1 } +// CollaborationAPIClient_UpdateReceivedShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateReceivedShare' +type CollaborationAPIClient_UpdateReceivedShare_Call struct { + *mock.Call +} + +// UpdateReceivedShare is a helper method to define mock.On call +// - ctx context.Context +// - in *collaborationv1beta1.UpdateReceivedShareRequest +// - opts ...grpc.CallOption +func (_e *CollaborationAPIClient_Expecter) UpdateReceivedShare(ctx interface{}, in interface{}, opts ...interface{}) *CollaborationAPIClient_UpdateReceivedShare_Call { + return &CollaborationAPIClient_UpdateReceivedShare_Call{Call: _e.mock.On("UpdateReceivedShare", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *CollaborationAPIClient_UpdateReceivedShare_Call) Run(run func(ctx context.Context, in *collaborationv1beta1.UpdateReceivedShareRequest, opts ...grpc.CallOption)) *CollaborationAPIClient_UpdateReceivedShare_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*collaborationv1beta1.UpdateReceivedShareRequest), variadicArgs...) + }) + return _c +} + +func (_c *CollaborationAPIClient_UpdateReceivedShare_Call) Return(_a0 *collaborationv1beta1.UpdateReceivedShareResponse, _a1 error) *CollaborationAPIClient_UpdateReceivedShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *CollaborationAPIClient_UpdateReceivedShare_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.UpdateReceivedShareRequest, ...grpc.CallOption) (*collaborationv1beta1.UpdateReceivedShareResponse, error)) *CollaborationAPIClient_UpdateReceivedShare_Call { + _c.Call.Return(run) + return _c +} + // UpdateShare provides a mock function with given fields: ctx, in, opts func (_m *CollaborationAPIClient) UpdateShare(ctx context.Context, in *collaborationv1beta1.UpdateShareRequest, opts ...grpc.CallOption) (*collaborationv1beta1.UpdateShareResponse, error) { _va := make([]interface{}, len(opts)) @@ -277,6 +572,10 @@ func (_m *CollaborationAPIClient) UpdateShare(ctx context.Context, in *collabora _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UpdateShare") + } + var r0 *collaborationv1beta1.UpdateShareResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.UpdateShareRequest, ...grpc.CallOption) (*collaborationv1beta1.UpdateShareResponse, error)); ok { @@ -299,13 +598,49 @@ func (_m *CollaborationAPIClient) UpdateShare(ctx context.Context, in *collabora return r0, r1 } -type mockConstructorTestingTNewCollaborationAPIClient interface { - mock.TestingT - Cleanup(func()) +// CollaborationAPIClient_UpdateShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateShare' +type CollaborationAPIClient_UpdateShare_Call struct { + *mock.Call +} + +// UpdateShare is a helper method to define mock.On call +// - ctx context.Context +// - in *collaborationv1beta1.UpdateShareRequest +// - opts ...grpc.CallOption +func (_e *CollaborationAPIClient_Expecter) UpdateShare(ctx interface{}, in interface{}, opts ...interface{}) *CollaborationAPIClient_UpdateShare_Call { + return &CollaborationAPIClient_UpdateShare_Call{Call: _e.mock.On("UpdateShare", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *CollaborationAPIClient_UpdateShare_Call) Run(run func(ctx context.Context, in *collaborationv1beta1.UpdateShareRequest, opts ...grpc.CallOption)) *CollaborationAPIClient_UpdateShare_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*collaborationv1beta1.UpdateShareRequest), variadicArgs...) + }) + return _c +} + +func (_c *CollaborationAPIClient_UpdateShare_Call) Return(_a0 *collaborationv1beta1.UpdateShareResponse, _a1 error) *CollaborationAPIClient_UpdateShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *CollaborationAPIClient_UpdateShare_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.UpdateShareRequest, ...grpc.CallOption) (*collaborationv1beta1.UpdateShareResponse, error)) *CollaborationAPIClient_UpdateShare_Call { + _c.Call.Return(run) + return _c } // NewCollaborationAPIClient creates a new instance of CollaborationAPIClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCollaborationAPIClient(t mockConstructorTestingTNewCollaborationAPIClient) *CollaborationAPIClient { +// The first argument is typically a *testing.T value. +func NewCollaborationAPIClient(t interface { + mock.TestingT + Cleanup(func()) +}) *CollaborationAPIClient { mock := &CollaborationAPIClient{} mock.Mock.Test(t) diff --git a/vendor/github.com/cs3org/reva/v2/tests/cs3mocks/mocks/GatewayAPIClient.go b/vendor/github.com/cs3org/reva/v2/tests/cs3mocks/mocks/GatewayAPIClient.go index a256382a1..b2fa6783f 100644 --- a/vendor/github.com/cs3org/reva/v2/tests/cs3mocks/mocks/GatewayAPIClient.go +++ b/vendor/github.com/cs3org/reva/v2/tests/cs3mocks/mocks/GatewayAPIClient.go @@ -16,7 +16,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.40.2. DO NOT EDIT. package mocks @@ -66,6 +66,14 @@ type GatewayAPIClient struct { mock.Mock } +type GatewayAPIClient_Expecter struct { + mock *mock.Mock +} + +func (_m *GatewayAPIClient) EXPECT() *GatewayAPIClient_Expecter { + return &GatewayAPIClient_Expecter{mock: &_m.Mock} +} + // AcceptInvite provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) AcceptInvite(ctx context.Context, in *invitev1beta1.AcceptInviteRequest, opts ...grpc.CallOption) (*invitev1beta1.AcceptInviteResponse, error) { _va := make([]interface{}, len(opts)) @@ -77,6 +85,10 @@ func (_m *GatewayAPIClient) AcceptInvite(ctx context.Context, in *invitev1beta1. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for AcceptInvite") + } + var r0 *invitev1beta1.AcceptInviteResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *invitev1beta1.AcceptInviteRequest, ...grpc.CallOption) (*invitev1beta1.AcceptInviteResponse, error)); ok { @@ -99,6 +111,43 @@ func (_m *GatewayAPIClient) AcceptInvite(ctx context.Context, in *invitev1beta1. return r0, r1 } +// GatewayAPIClient_AcceptInvite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AcceptInvite' +type GatewayAPIClient_AcceptInvite_Call struct { + *mock.Call +} + +// AcceptInvite is a helper method to define mock.On call +// - ctx context.Context +// - in *invitev1beta1.AcceptInviteRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) AcceptInvite(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_AcceptInvite_Call { + return &GatewayAPIClient_AcceptInvite_Call{Call: _e.mock.On("AcceptInvite", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_AcceptInvite_Call) Run(run func(ctx context.Context, in *invitev1beta1.AcceptInviteRequest, opts ...grpc.CallOption)) *GatewayAPIClient_AcceptInvite_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*invitev1beta1.AcceptInviteRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_AcceptInvite_Call) Return(_a0 *invitev1beta1.AcceptInviteResponse, _a1 error) *GatewayAPIClient_AcceptInvite_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_AcceptInvite_Call) RunAndReturn(run func(context.Context, *invitev1beta1.AcceptInviteRequest, ...grpc.CallOption) (*invitev1beta1.AcceptInviteResponse, error)) *GatewayAPIClient_AcceptInvite_Call { + _c.Call.Return(run) + return _c +} + // AddAppProvider provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) AddAppProvider(ctx context.Context, in *registryv1beta1.AddAppProviderRequest, opts ...grpc.CallOption) (*registryv1beta1.AddAppProviderResponse, error) { _va := make([]interface{}, len(opts)) @@ -110,6 +159,10 @@ func (_m *GatewayAPIClient) AddAppProvider(ctx context.Context, in *registryv1be _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for AddAppProvider") + } + var r0 *registryv1beta1.AddAppProviderResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *registryv1beta1.AddAppProviderRequest, ...grpc.CallOption) (*registryv1beta1.AddAppProviderResponse, error)); ok { @@ -132,6 +185,43 @@ func (_m *GatewayAPIClient) AddAppProvider(ctx context.Context, in *registryv1be return r0, r1 } +// GatewayAPIClient_AddAppProvider_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddAppProvider' +type GatewayAPIClient_AddAppProvider_Call struct { + *mock.Call +} + +// AddAppProvider is a helper method to define mock.On call +// - ctx context.Context +// - in *registryv1beta1.AddAppProviderRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) AddAppProvider(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_AddAppProvider_Call { + return &GatewayAPIClient_AddAppProvider_Call{Call: _e.mock.On("AddAppProvider", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_AddAppProvider_Call) Run(run func(ctx context.Context, in *registryv1beta1.AddAppProviderRequest, opts ...grpc.CallOption)) *GatewayAPIClient_AddAppProvider_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*registryv1beta1.AddAppProviderRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_AddAppProvider_Call) Return(_a0 *registryv1beta1.AddAppProviderResponse, _a1 error) *GatewayAPIClient_AddAppProvider_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_AddAppProvider_Call) RunAndReturn(run func(context.Context, *registryv1beta1.AddAppProviderRequest, ...grpc.CallOption) (*registryv1beta1.AddAppProviderResponse, error)) *GatewayAPIClient_AddAppProvider_Call { + _c.Call.Return(run) + return _c +} + // Authenticate provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) Authenticate(ctx context.Context, in *gatewayv1beta1.AuthenticateRequest, opts ...grpc.CallOption) (*gatewayv1beta1.AuthenticateResponse, error) { _va := make([]interface{}, len(opts)) @@ -143,6 +233,10 @@ func (_m *GatewayAPIClient) Authenticate(ctx context.Context, in *gatewayv1beta1 _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Authenticate") + } + var r0 *gatewayv1beta1.AuthenticateResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *gatewayv1beta1.AuthenticateRequest, ...grpc.CallOption) (*gatewayv1beta1.AuthenticateResponse, error)); ok { @@ -165,6 +259,43 @@ func (_m *GatewayAPIClient) Authenticate(ctx context.Context, in *gatewayv1beta1 return r0, r1 } +// GatewayAPIClient_Authenticate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Authenticate' +type GatewayAPIClient_Authenticate_Call struct { + *mock.Call +} + +// Authenticate is a helper method to define mock.On call +// - ctx context.Context +// - in *gatewayv1beta1.AuthenticateRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) Authenticate(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_Authenticate_Call { + return &GatewayAPIClient_Authenticate_Call{Call: _e.mock.On("Authenticate", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_Authenticate_Call) Run(run func(ctx context.Context, in *gatewayv1beta1.AuthenticateRequest, opts ...grpc.CallOption)) *GatewayAPIClient_Authenticate_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*gatewayv1beta1.AuthenticateRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_Authenticate_Call) Return(_a0 *gatewayv1beta1.AuthenticateResponse, _a1 error) *GatewayAPIClient_Authenticate_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_Authenticate_Call) RunAndReturn(run func(context.Context, *gatewayv1beta1.AuthenticateRequest, ...grpc.CallOption) (*gatewayv1beta1.AuthenticateResponse, error)) *GatewayAPIClient_Authenticate_Call { + _c.Call.Return(run) + return _c +} + // CancelTransfer provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) CancelTransfer(ctx context.Context, in *txv1beta1.CancelTransferRequest, opts ...grpc.CallOption) (*txv1beta1.CancelTransferResponse, error) { _va := make([]interface{}, len(opts)) @@ -176,6 +307,10 @@ func (_m *GatewayAPIClient) CancelTransfer(ctx context.Context, in *txv1beta1.Ca _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CancelTransfer") + } + var r0 *txv1beta1.CancelTransferResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *txv1beta1.CancelTransferRequest, ...grpc.CallOption) (*txv1beta1.CancelTransferResponse, error)); ok { @@ -198,6 +333,43 @@ func (_m *GatewayAPIClient) CancelTransfer(ctx context.Context, in *txv1beta1.Ca return r0, r1 } +// GatewayAPIClient_CancelTransfer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelTransfer' +type GatewayAPIClient_CancelTransfer_Call struct { + *mock.Call +} + +// CancelTransfer is a helper method to define mock.On call +// - ctx context.Context +// - in *txv1beta1.CancelTransferRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) CancelTransfer(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_CancelTransfer_Call { + return &GatewayAPIClient_CancelTransfer_Call{Call: _e.mock.On("CancelTransfer", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_CancelTransfer_Call) Run(run func(ctx context.Context, in *txv1beta1.CancelTransferRequest, opts ...grpc.CallOption)) *GatewayAPIClient_CancelTransfer_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*txv1beta1.CancelTransferRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_CancelTransfer_Call) Return(_a0 *txv1beta1.CancelTransferResponse, _a1 error) *GatewayAPIClient_CancelTransfer_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_CancelTransfer_Call) RunAndReturn(run func(context.Context, *txv1beta1.CancelTransferRequest, ...grpc.CallOption) (*txv1beta1.CancelTransferResponse, error)) *GatewayAPIClient_CancelTransfer_Call { + _c.Call.Return(run) + return _c +} + // CheckPermission provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) CheckPermission(ctx context.Context, in *permissionsv1beta1.CheckPermissionRequest, opts ...grpc.CallOption) (*permissionsv1beta1.CheckPermissionResponse, error) { _va := make([]interface{}, len(opts)) @@ -209,6 +381,10 @@ func (_m *GatewayAPIClient) CheckPermission(ctx context.Context, in *permissions _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CheckPermission") + } + var r0 *permissionsv1beta1.CheckPermissionResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *permissionsv1beta1.CheckPermissionRequest, ...grpc.CallOption) (*permissionsv1beta1.CheckPermissionResponse, error)); ok { @@ -231,6 +407,43 @@ func (_m *GatewayAPIClient) CheckPermission(ctx context.Context, in *permissions return r0, r1 } +// GatewayAPIClient_CheckPermission_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckPermission' +type GatewayAPIClient_CheckPermission_Call struct { + *mock.Call +} + +// CheckPermission is a helper method to define mock.On call +// - ctx context.Context +// - in *permissionsv1beta1.CheckPermissionRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) CheckPermission(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_CheckPermission_Call { + return &GatewayAPIClient_CheckPermission_Call{Call: _e.mock.On("CheckPermission", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_CheckPermission_Call) Run(run func(ctx context.Context, in *permissionsv1beta1.CheckPermissionRequest, opts ...grpc.CallOption)) *GatewayAPIClient_CheckPermission_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*permissionsv1beta1.CheckPermissionRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_CheckPermission_Call) Return(_a0 *permissionsv1beta1.CheckPermissionResponse, _a1 error) *GatewayAPIClient_CheckPermission_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_CheckPermission_Call) RunAndReturn(run func(context.Context, *permissionsv1beta1.CheckPermissionRequest, ...grpc.CallOption) (*permissionsv1beta1.CheckPermissionResponse, error)) *GatewayAPIClient_CheckPermission_Call { + _c.Call.Return(run) + return _c +} + // CreateContainer provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) CreateContainer(ctx context.Context, in *providerv1beta1.CreateContainerRequest, opts ...grpc.CallOption) (*providerv1beta1.CreateContainerResponse, error) { _va := make([]interface{}, len(opts)) @@ -242,6 +455,10 @@ func (_m *GatewayAPIClient) CreateContainer(ctx context.Context, in *providerv1b _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CreateContainer") + } + var r0 *providerv1beta1.CreateContainerResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.CreateContainerRequest, ...grpc.CallOption) (*providerv1beta1.CreateContainerResponse, error)); ok { @@ -264,6 +481,43 @@ func (_m *GatewayAPIClient) CreateContainer(ctx context.Context, in *providerv1b return r0, r1 } +// GatewayAPIClient_CreateContainer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateContainer' +type GatewayAPIClient_CreateContainer_Call struct { + *mock.Call +} + +// CreateContainer is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.CreateContainerRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) CreateContainer(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_CreateContainer_Call { + return &GatewayAPIClient_CreateContainer_Call{Call: _e.mock.On("CreateContainer", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_CreateContainer_Call) Run(run func(ctx context.Context, in *providerv1beta1.CreateContainerRequest, opts ...grpc.CallOption)) *GatewayAPIClient_CreateContainer_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.CreateContainerRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_CreateContainer_Call) Return(_a0 *providerv1beta1.CreateContainerResponse, _a1 error) *GatewayAPIClient_CreateContainer_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_CreateContainer_Call) RunAndReturn(run func(context.Context, *providerv1beta1.CreateContainerRequest, ...grpc.CallOption) (*providerv1beta1.CreateContainerResponse, error)) *GatewayAPIClient_CreateContainer_Call { + _c.Call.Return(run) + return _c +} + // CreateHome provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) CreateHome(ctx context.Context, in *providerv1beta1.CreateHomeRequest, opts ...grpc.CallOption) (*providerv1beta1.CreateHomeResponse, error) { _va := make([]interface{}, len(opts)) @@ -275,6 +529,10 @@ func (_m *GatewayAPIClient) CreateHome(ctx context.Context, in *providerv1beta1. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CreateHome") + } + var r0 *providerv1beta1.CreateHomeResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.CreateHomeRequest, ...grpc.CallOption) (*providerv1beta1.CreateHomeResponse, error)); ok { @@ -297,6 +555,43 @@ func (_m *GatewayAPIClient) CreateHome(ctx context.Context, in *providerv1beta1. return r0, r1 } +// GatewayAPIClient_CreateHome_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateHome' +type GatewayAPIClient_CreateHome_Call struct { + *mock.Call +} + +// CreateHome is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.CreateHomeRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) CreateHome(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_CreateHome_Call { + return &GatewayAPIClient_CreateHome_Call{Call: _e.mock.On("CreateHome", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_CreateHome_Call) Run(run func(ctx context.Context, in *providerv1beta1.CreateHomeRequest, opts ...grpc.CallOption)) *GatewayAPIClient_CreateHome_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.CreateHomeRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_CreateHome_Call) Return(_a0 *providerv1beta1.CreateHomeResponse, _a1 error) *GatewayAPIClient_CreateHome_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_CreateHome_Call) RunAndReturn(run func(context.Context, *providerv1beta1.CreateHomeRequest, ...grpc.CallOption) (*providerv1beta1.CreateHomeResponse, error)) *GatewayAPIClient_CreateHome_Call { + _c.Call.Return(run) + return _c +} + // CreateOCMCoreShare provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) CreateOCMCoreShare(ctx context.Context, in *corev1beta1.CreateOCMCoreShareRequest, opts ...grpc.CallOption) (*corev1beta1.CreateOCMCoreShareResponse, error) { _va := make([]interface{}, len(opts)) @@ -308,6 +603,10 @@ func (_m *GatewayAPIClient) CreateOCMCoreShare(ctx context.Context, in *corev1be _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CreateOCMCoreShare") + } + var r0 *corev1beta1.CreateOCMCoreShareResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *corev1beta1.CreateOCMCoreShareRequest, ...grpc.CallOption) (*corev1beta1.CreateOCMCoreShareResponse, error)); ok { @@ -330,6 +629,43 @@ func (_m *GatewayAPIClient) CreateOCMCoreShare(ctx context.Context, in *corev1be return r0, r1 } +// GatewayAPIClient_CreateOCMCoreShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateOCMCoreShare' +type GatewayAPIClient_CreateOCMCoreShare_Call struct { + *mock.Call +} + +// CreateOCMCoreShare is a helper method to define mock.On call +// - ctx context.Context +// - in *corev1beta1.CreateOCMCoreShareRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) CreateOCMCoreShare(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_CreateOCMCoreShare_Call { + return &GatewayAPIClient_CreateOCMCoreShare_Call{Call: _e.mock.On("CreateOCMCoreShare", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_CreateOCMCoreShare_Call) Run(run func(ctx context.Context, in *corev1beta1.CreateOCMCoreShareRequest, opts ...grpc.CallOption)) *GatewayAPIClient_CreateOCMCoreShare_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*corev1beta1.CreateOCMCoreShareRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_CreateOCMCoreShare_Call) Return(_a0 *corev1beta1.CreateOCMCoreShareResponse, _a1 error) *GatewayAPIClient_CreateOCMCoreShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_CreateOCMCoreShare_Call) RunAndReturn(run func(context.Context, *corev1beta1.CreateOCMCoreShareRequest, ...grpc.CallOption) (*corev1beta1.CreateOCMCoreShareResponse, error)) *GatewayAPIClient_CreateOCMCoreShare_Call { + _c.Call.Return(run) + return _c +} + // CreateOCMShare provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) CreateOCMShare(ctx context.Context, in *ocmv1beta1.CreateOCMShareRequest, opts ...grpc.CallOption) (*ocmv1beta1.CreateOCMShareResponse, error) { _va := make([]interface{}, len(opts)) @@ -341,6 +677,10 @@ func (_m *GatewayAPIClient) CreateOCMShare(ctx context.Context, in *ocmv1beta1.C _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CreateOCMShare") + } + var r0 *ocmv1beta1.CreateOCMShareResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *ocmv1beta1.CreateOCMShareRequest, ...grpc.CallOption) (*ocmv1beta1.CreateOCMShareResponse, error)); ok { @@ -363,6 +703,43 @@ func (_m *GatewayAPIClient) CreateOCMShare(ctx context.Context, in *ocmv1beta1.C return r0, r1 } +// GatewayAPIClient_CreateOCMShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateOCMShare' +type GatewayAPIClient_CreateOCMShare_Call struct { + *mock.Call +} + +// CreateOCMShare is a helper method to define mock.On call +// - ctx context.Context +// - in *ocmv1beta1.CreateOCMShareRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) CreateOCMShare(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_CreateOCMShare_Call { + return &GatewayAPIClient_CreateOCMShare_Call{Call: _e.mock.On("CreateOCMShare", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_CreateOCMShare_Call) Run(run func(ctx context.Context, in *ocmv1beta1.CreateOCMShareRequest, opts ...grpc.CallOption)) *GatewayAPIClient_CreateOCMShare_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*ocmv1beta1.CreateOCMShareRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_CreateOCMShare_Call) Return(_a0 *ocmv1beta1.CreateOCMShareResponse, _a1 error) *GatewayAPIClient_CreateOCMShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_CreateOCMShare_Call) RunAndReturn(run func(context.Context, *ocmv1beta1.CreateOCMShareRequest, ...grpc.CallOption) (*ocmv1beta1.CreateOCMShareResponse, error)) *GatewayAPIClient_CreateOCMShare_Call { + _c.Call.Return(run) + return _c +} + // CreatePublicShare provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) CreatePublicShare(ctx context.Context, in *linkv1beta1.CreatePublicShareRequest, opts ...grpc.CallOption) (*linkv1beta1.CreatePublicShareResponse, error) { _va := make([]interface{}, len(opts)) @@ -374,6 +751,10 @@ func (_m *GatewayAPIClient) CreatePublicShare(ctx context.Context, in *linkv1bet _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CreatePublicShare") + } + var r0 *linkv1beta1.CreatePublicShareResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *linkv1beta1.CreatePublicShareRequest, ...grpc.CallOption) (*linkv1beta1.CreatePublicShareResponse, error)); ok { @@ -396,6 +777,43 @@ func (_m *GatewayAPIClient) CreatePublicShare(ctx context.Context, in *linkv1bet return r0, r1 } +// GatewayAPIClient_CreatePublicShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePublicShare' +type GatewayAPIClient_CreatePublicShare_Call struct { + *mock.Call +} + +// CreatePublicShare is a helper method to define mock.On call +// - ctx context.Context +// - in *linkv1beta1.CreatePublicShareRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) CreatePublicShare(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_CreatePublicShare_Call { + return &GatewayAPIClient_CreatePublicShare_Call{Call: _e.mock.On("CreatePublicShare", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_CreatePublicShare_Call) Run(run func(ctx context.Context, in *linkv1beta1.CreatePublicShareRequest, opts ...grpc.CallOption)) *GatewayAPIClient_CreatePublicShare_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*linkv1beta1.CreatePublicShareRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_CreatePublicShare_Call) Return(_a0 *linkv1beta1.CreatePublicShareResponse, _a1 error) *GatewayAPIClient_CreatePublicShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_CreatePublicShare_Call) RunAndReturn(run func(context.Context, *linkv1beta1.CreatePublicShareRequest, ...grpc.CallOption) (*linkv1beta1.CreatePublicShareResponse, error)) *GatewayAPIClient_CreatePublicShare_Call { + _c.Call.Return(run) + return _c +} + // CreateShare provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) CreateShare(ctx context.Context, in *collaborationv1beta1.CreateShareRequest, opts ...grpc.CallOption) (*collaborationv1beta1.CreateShareResponse, error) { _va := make([]interface{}, len(opts)) @@ -407,6 +825,10 @@ func (_m *GatewayAPIClient) CreateShare(ctx context.Context, in *collaborationv1 _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CreateShare") + } + var r0 *collaborationv1beta1.CreateShareResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.CreateShareRequest, ...grpc.CallOption) (*collaborationv1beta1.CreateShareResponse, error)); ok { @@ -429,6 +851,43 @@ func (_m *GatewayAPIClient) CreateShare(ctx context.Context, in *collaborationv1 return r0, r1 } +// GatewayAPIClient_CreateShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateShare' +type GatewayAPIClient_CreateShare_Call struct { + *mock.Call +} + +// CreateShare is a helper method to define mock.On call +// - ctx context.Context +// - in *collaborationv1beta1.CreateShareRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) CreateShare(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_CreateShare_Call { + return &GatewayAPIClient_CreateShare_Call{Call: _e.mock.On("CreateShare", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_CreateShare_Call) Run(run func(ctx context.Context, in *collaborationv1beta1.CreateShareRequest, opts ...grpc.CallOption)) *GatewayAPIClient_CreateShare_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*collaborationv1beta1.CreateShareRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_CreateShare_Call) Return(_a0 *collaborationv1beta1.CreateShareResponse, _a1 error) *GatewayAPIClient_CreateShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_CreateShare_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.CreateShareRequest, ...grpc.CallOption) (*collaborationv1beta1.CreateShareResponse, error)) *GatewayAPIClient_CreateShare_Call { + _c.Call.Return(run) + return _c +} + // CreateStorageSpace provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) CreateStorageSpace(ctx context.Context, in *providerv1beta1.CreateStorageSpaceRequest, opts ...grpc.CallOption) (*providerv1beta1.CreateStorageSpaceResponse, error) { _va := make([]interface{}, len(opts)) @@ -440,6 +899,10 @@ func (_m *GatewayAPIClient) CreateStorageSpace(ctx context.Context, in *provider _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CreateStorageSpace") + } + var r0 *providerv1beta1.CreateStorageSpaceResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.CreateStorageSpaceRequest, ...grpc.CallOption) (*providerv1beta1.CreateStorageSpaceResponse, error)); ok { @@ -462,6 +925,43 @@ func (_m *GatewayAPIClient) CreateStorageSpace(ctx context.Context, in *provider return r0, r1 } +// GatewayAPIClient_CreateStorageSpace_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateStorageSpace' +type GatewayAPIClient_CreateStorageSpace_Call struct { + *mock.Call +} + +// CreateStorageSpace is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.CreateStorageSpaceRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) CreateStorageSpace(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_CreateStorageSpace_Call { + return &GatewayAPIClient_CreateStorageSpace_Call{Call: _e.mock.On("CreateStorageSpace", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_CreateStorageSpace_Call) Run(run func(ctx context.Context, in *providerv1beta1.CreateStorageSpaceRequest, opts ...grpc.CallOption)) *GatewayAPIClient_CreateStorageSpace_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.CreateStorageSpaceRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_CreateStorageSpace_Call) Return(_a0 *providerv1beta1.CreateStorageSpaceResponse, _a1 error) *GatewayAPIClient_CreateStorageSpace_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_CreateStorageSpace_Call) RunAndReturn(run func(context.Context, *providerv1beta1.CreateStorageSpaceRequest, ...grpc.CallOption) (*providerv1beta1.CreateStorageSpaceResponse, error)) *GatewayAPIClient_CreateStorageSpace_Call { + _c.Call.Return(run) + return _c +} + // CreateSymlink provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) CreateSymlink(ctx context.Context, in *providerv1beta1.CreateSymlinkRequest, opts ...grpc.CallOption) (*providerv1beta1.CreateSymlinkResponse, error) { _va := make([]interface{}, len(opts)) @@ -473,6 +973,10 @@ func (_m *GatewayAPIClient) CreateSymlink(ctx context.Context, in *providerv1bet _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CreateSymlink") + } + var r0 *providerv1beta1.CreateSymlinkResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.CreateSymlinkRequest, ...grpc.CallOption) (*providerv1beta1.CreateSymlinkResponse, error)); ok { @@ -495,6 +999,43 @@ func (_m *GatewayAPIClient) CreateSymlink(ctx context.Context, in *providerv1bet return r0, r1 } +// GatewayAPIClient_CreateSymlink_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateSymlink' +type GatewayAPIClient_CreateSymlink_Call struct { + *mock.Call +} + +// CreateSymlink is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.CreateSymlinkRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) CreateSymlink(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_CreateSymlink_Call { + return &GatewayAPIClient_CreateSymlink_Call{Call: _e.mock.On("CreateSymlink", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_CreateSymlink_Call) Run(run func(ctx context.Context, in *providerv1beta1.CreateSymlinkRequest, opts ...grpc.CallOption)) *GatewayAPIClient_CreateSymlink_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.CreateSymlinkRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_CreateSymlink_Call) Return(_a0 *providerv1beta1.CreateSymlinkResponse, _a1 error) *GatewayAPIClient_CreateSymlink_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_CreateSymlink_Call) RunAndReturn(run func(context.Context, *providerv1beta1.CreateSymlinkRequest, ...grpc.CallOption) (*providerv1beta1.CreateSymlinkResponse, error)) *GatewayAPIClient_CreateSymlink_Call { + _c.Call.Return(run) + return _c +} + // CreateTransfer provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) CreateTransfer(ctx context.Context, in *txv1beta1.CreateTransferRequest, opts ...grpc.CallOption) (*txv1beta1.CreateTransferResponse, error) { _va := make([]interface{}, len(opts)) @@ -506,6 +1047,10 @@ func (_m *GatewayAPIClient) CreateTransfer(ctx context.Context, in *txv1beta1.Cr _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CreateTransfer") + } + var r0 *txv1beta1.CreateTransferResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *txv1beta1.CreateTransferRequest, ...grpc.CallOption) (*txv1beta1.CreateTransferResponse, error)); ok { @@ -528,6 +1073,43 @@ func (_m *GatewayAPIClient) CreateTransfer(ctx context.Context, in *txv1beta1.Cr return r0, r1 } +// GatewayAPIClient_CreateTransfer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTransfer' +type GatewayAPIClient_CreateTransfer_Call struct { + *mock.Call +} + +// CreateTransfer is a helper method to define mock.On call +// - ctx context.Context +// - in *txv1beta1.CreateTransferRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) CreateTransfer(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_CreateTransfer_Call { + return &GatewayAPIClient_CreateTransfer_Call{Call: _e.mock.On("CreateTransfer", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_CreateTransfer_Call) Run(run func(ctx context.Context, in *txv1beta1.CreateTransferRequest, opts ...grpc.CallOption)) *GatewayAPIClient_CreateTransfer_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*txv1beta1.CreateTransferRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_CreateTransfer_Call) Return(_a0 *txv1beta1.CreateTransferResponse, _a1 error) *GatewayAPIClient_CreateTransfer_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_CreateTransfer_Call) RunAndReturn(run func(context.Context, *txv1beta1.CreateTransferRequest, ...grpc.CallOption) (*txv1beta1.CreateTransferResponse, error)) *GatewayAPIClient_CreateTransfer_Call { + _c.Call.Return(run) + return _c +} + // Delete provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) Delete(ctx context.Context, in *providerv1beta1.DeleteRequest, opts ...grpc.CallOption) (*providerv1beta1.DeleteResponse, error) { _va := make([]interface{}, len(opts)) @@ -539,6 +1121,10 @@ func (_m *GatewayAPIClient) Delete(ctx context.Context, in *providerv1beta1.Dele _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 *providerv1beta1.DeleteResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.DeleteRequest, ...grpc.CallOption) (*providerv1beta1.DeleteResponse, error)); ok { @@ -561,6 +1147,43 @@ func (_m *GatewayAPIClient) Delete(ctx context.Context, in *providerv1beta1.Dele return r0, r1 } +// GatewayAPIClient_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type GatewayAPIClient_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.DeleteRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) Delete(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_Delete_Call { + return &GatewayAPIClient_Delete_Call{Call: _e.mock.On("Delete", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_Delete_Call) Run(run func(ctx context.Context, in *providerv1beta1.DeleteRequest, opts ...grpc.CallOption)) *GatewayAPIClient_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.DeleteRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_Delete_Call) Return(_a0 *providerv1beta1.DeleteResponse, _a1 error) *GatewayAPIClient_Delete_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_Delete_Call) RunAndReturn(run func(context.Context, *providerv1beta1.DeleteRequest, ...grpc.CallOption) (*providerv1beta1.DeleteResponse, error)) *GatewayAPIClient_Delete_Call { + _c.Call.Return(run) + return _c +} + // DeleteAcceptedUser provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) DeleteAcceptedUser(ctx context.Context, in *invitev1beta1.DeleteAcceptedUserRequest, opts ...grpc.CallOption) (*invitev1beta1.DeleteAcceptedUserResponse, error) { _va := make([]interface{}, len(opts)) @@ -572,6 +1195,10 @@ func (_m *GatewayAPIClient) DeleteAcceptedUser(ctx context.Context, in *invitev1 _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DeleteAcceptedUser") + } + var r0 *invitev1beta1.DeleteAcceptedUserResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *invitev1beta1.DeleteAcceptedUserRequest, ...grpc.CallOption) (*invitev1beta1.DeleteAcceptedUserResponse, error)); ok { @@ -594,6 +1221,43 @@ func (_m *GatewayAPIClient) DeleteAcceptedUser(ctx context.Context, in *invitev1 return r0, r1 } +// GatewayAPIClient_DeleteAcceptedUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAcceptedUser' +type GatewayAPIClient_DeleteAcceptedUser_Call struct { + *mock.Call +} + +// DeleteAcceptedUser is a helper method to define mock.On call +// - ctx context.Context +// - in *invitev1beta1.DeleteAcceptedUserRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) DeleteAcceptedUser(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_DeleteAcceptedUser_Call { + return &GatewayAPIClient_DeleteAcceptedUser_Call{Call: _e.mock.On("DeleteAcceptedUser", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_DeleteAcceptedUser_Call) Run(run func(ctx context.Context, in *invitev1beta1.DeleteAcceptedUserRequest, opts ...grpc.CallOption)) *GatewayAPIClient_DeleteAcceptedUser_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*invitev1beta1.DeleteAcceptedUserRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_DeleteAcceptedUser_Call) Return(_a0 *invitev1beta1.DeleteAcceptedUserResponse, _a1 error) *GatewayAPIClient_DeleteAcceptedUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_DeleteAcceptedUser_Call) RunAndReturn(run func(context.Context, *invitev1beta1.DeleteAcceptedUserRequest, ...grpc.CallOption) (*invitev1beta1.DeleteAcceptedUserResponse, error)) *GatewayAPIClient_DeleteAcceptedUser_Call { + _c.Call.Return(run) + return _c +} + // DeleteOCMCoreShare provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) DeleteOCMCoreShare(ctx context.Context, in *corev1beta1.DeleteOCMCoreShareRequest, opts ...grpc.CallOption) (*corev1beta1.DeleteOCMCoreShareResponse, error) { _va := make([]interface{}, len(opts)) @@ -605,6 +1269,10 @@ func (_m *GatewayAPIClient) DeleteOCMCoreShare(ctx context.Context, in *corev1be _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DeleteOCMCoreShare") + } + var r0 *corev1beta1.DeleteOCMCoreShareResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *corev1beta1.DeleteOCMCoreShareRequest, ...grpc.CallOption) (*corev1beta1.DeleteOCMCoreShareResponse, error)); ok { @@ -627,6 +1295,43 @@ func (_m *GatewayAPIClient) DeleteOCMCoreShare(ctx context.Context, in *corev1be return r0, r1 } +// GatewayAPIClient_DeleteOCMCoreShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteOCMCoreShare' +type GatewayAPIClient_DeleteOCMCoreShare_Call struct { + *mock.Call +} + +// DeleteOCMCoreShare is a helper method to define mock.On call +// - ctx context.Context +// - in *corev1beta1.DeleteOCMCoreShareRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) DeleteOCMCoreShare(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_DeleteOCMCoreShare_Call { + return &GatewayAPIClient_DeleteOCMCoreShare_Call{Call: _e.mock.On("DeleteOCMCoreShare", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_DeleteOCMCoreShare_Call) Run(run func(ctx context.Context, in *corev1beta1.DeleteOCMCoreShareRequest, opts ...grpc.CallOption)) *GatewayAPIClient_DeleteOCMCoreShare_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*corev1beta1.DeleteOCMCoreShareRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_DeleteOCMCoreShare_Call) Return(_a0 *corev1beta1.DeleteOCMCoreShareResponse, _a1 error) *GatewayAPIClient_DeleteOCMCoreShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_DeleteOCMCoreShare_Call) RunAndReturn(run func(context.Context, *corev1beta1.DeleteOCMCoreShareRequest, ...grpc.CallOption) (*corev1beta1.DeleteOCMCoreShareResponse, error)) *GatewayAPIClient_DeleteOCMCoreShare_Call { + _c.Call.Return(run) + return _c +} + // DeleteStorageSpace provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) DeleteStorageSpace(ctx context.Context, in *providerv1beta1.DeleteStorageSpaceRequest, opts ...grpc.CallOption) (*providerv1beta1.DeleteStorageSpaceResponse, error) { _va := make([]interface{}, len(opts)) @@ -638,6 +1343,10 @@ func (_m *GatewayAPIClient) DeleteStorageSpace(ctx context.Context, in *provider _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DeleteStorageSpace") + } + var r0 *providerv1beta1.DeleteStorageSpaceResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.DeleteStorageSpaceRequest, ...grpc.CallOption) (*providerv1beta1.DeleteStorageSpaceResponse, error)); ok { @@ -660,6 +1369,43 @@ func (_m *GatewayAPIClient) DeleteStorageSpace(ctx context.Context, in *provider return r0, r1 } +// GatewayAPIClient_DeleteStorageSpace_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteStorageSpace' +type GatewayAPIClient_DeleteStorageSpace_Call struct { + *mock.Call +} + +// DeleteStorageSpace is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.DeleteStorageSpaceRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) DeleteStorageSpace(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_DeleteStorageSpace_Call { + return &GatewayAPIClient_DeleteStorageSpace_Call{Call: _e.mock.On("DeleteStorageSpace", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_DeleteStorageSpace_Call) Run(run func(ctx context.Context, in *providerv1beta1.DeleteStorageSpaceRequest, opts ...grpc.CallOption)) *GatewayAPIClient_DeleteStorageSpace_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.DeleteStorageSpaceRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_DeleteStorageSpace_Call) Return(_a0 *providerv1beta1.DeleteStorageSpaceResponse, _a1 error) *GatewayAPIClient_DeleteStorageSpace_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_DeleteStorageSpace_Call) RunAndReturn(run func(context.Context, *providerv1beta1.DeleteStorageSpaceRequest, ...grpc.CallOption) (*providerv1beta1.DeleteStorageSpaceResponse, error)) *GatewayAPIClient_DeleteStorageSpace_Call { + _c.Call.Return(run) + return _c +} + // FindAcceptedUsers provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) FindAcceptedUsers(ctx context.Context, in *invitev1beta1.FindAcceptedUsersRequest, opts ...grpc.CallOption) (*invitev1beta1.FindAcceptedUsersResponse, error) { _va := make([]interface{}, len(opts)) @@ -671,6 +1417,10 @@ func (_m *GatewayAPIClient) FindAcceptedUsers(ctx context.Context, in *invitev1b _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for FindAcceptedUsers") + } + var r0 *invitev1beta1.FindAcceptedUsersResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *invitev1beta1.FindAcceptedUsersRequest, ...grpc.CallOption) (*invitev1beta1.FindAcceptedUsersResponse, error)); ok { @@ -693,6 +1443,43 @@ func (_m *GatewayAPIClient) FindAcceptedUsers(ctx context.Context, in *invitev1b return r0, r1 } +// GatewayAPIClient_FindAcceptedUsers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindAcceptedUsers' +type GatewayAPIClient_FindAcceptedUsers_Call struct { + *mock.Call +} + +// FindAcceptedUsers is a helper method to define mock.On call +// - ctx context.Context +// - in *invitev1beta1.FindAcceptedUsersRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) FindAcceptedUsers(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_FindAcceptedUsers_Call { + return &GatewayAPIClient_FindAcceptedUsers_Call{Call: _e.mock.On("FindAcceptedUsers", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_FindAcceptedUsers_Call) Run(run func(ctx context.Context, in *invitev1beta1.FindAcceptedUsersRequest, opts ...grpc.CallOption)) *GatewayAPIClient_FindAcceptedUsers_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*invitev1beta1.FindAcceptedUsersRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_FindAcceptedUsers_Call) Return(_a0 *invitev1beta1.FindAcceptedUsersResponse, _a1 error) *GatewayAPIClient_FindAcceptedUsers_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_FindAcceptedUsers_Call) RunAndReturn(run func(context.Context, *invitev1beta1.FindAcceptedUsersRequest, ...grpc.CallOption) (*invitev1beta1.FindAcceptedUsersResponse, error)) *GatewayAPIClient_FindAcceptedUsers_Call { + _c.Call.Return(run) + return _c +} + // FindGroups provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) FindGroups(ctx context.Context, in *groupv1beta1.FindGroupsRequest, opts ...grpc.CallOption) (*groupv1beta1.FindGroupsResponse, error) { _va := make([]interface{}, len(opts)) @@ -704,6 +1491,10 @@ func (_m *GatewayAPIClient) FindGroups(ctx context.Context, in *groupv1beta1.Fin _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for FindGroups") + } + var r0 *groupv1beta1.FindGroupsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *groupv1beta1.FindGroupsRequest, ...grpc.CallOption) (*groupv1beta1.FindGroupsResponse, error)); ok { @@ -726,6 +1517,43 @@ func (_m *GatewayAPIClient) FindGroups(ctx context.Context, in *groupv1beta1.Fin return r0, r1 } +// GatewayAPIClient_FindGroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindGroups' +type GatewayAPIClient_FindGroups_Call struct { + *mock.Call +} + +// FindGroups is a helper method to define mock.On call +// - ctx context.Context +// - in *groupv1beta1.FindGroupsRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) FindGroups(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_FindGroups_Call { + return &GatewayAPIClient_FindGroups_Call{Call: _e.mock.On("FindGroups", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_FindGroups_Call) Run(run func(ctx context.Context, in *groupv1beta1.FindGroupsRequest, opts ...grpc.CallOption)) *GatewayAPIClient_FindGroups_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*groupv1beta1.FindGroupsRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_FindGroups_Call) Return(_a0 *groupv1beta1.FindGroupsResponse, _a1 error) *GatewayAPIClient_FindGroups_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_FindGroups_Call) RunAndReturn(run func(context.Context, *groupv1beta1.FindGroupsRequest, ...grpc.CallOption) (*groupv1beta1.FindGroupsResponse, error)) *GatewayAPIClient_FindGroups_Call { + _c.Call.Return(run) + return _c +} + // FindUsers provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) FindUsers(ctx context.Context, in *userv1beta1.FindUsersRequest, opts ...grpc.CallOption) (*userv1beta1.FindUsersResponse, error) { _va := make([]interface{}, len(opts)) @@ -737,6 +1565,10 @@ func (_m *GatewayAPIClient) FindUsers(ctx context.Context, in *userv1beta1.FindU _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for FindUsers") + } + var r0 *userv1beta1.FindUsersResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *userv1beta1.FindUsersRequest, ...grpc.CallOption) (*userv1beta1.FindUsersResponse, error)); ok { @@ -759,6 +1591,43 @@ func (_m *GatewayAPIClient) FindUsers(ctx context.Context, in *userv1beta1.FindU return r0, r1 } +// GatewayAPIClient_FindUsers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindUsers' +type GatewayAPIClient_FindUsers_Call struct { + *mock.Call +} + +// FindUsers is a helper method to define mock.On call +// - ctx context.Context +// - in *userv1beta1.FindUsersRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) FindUsers(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_FindUsers_Call { + return &GatewayAPIClient_FindUsers_Call{Call: _e.mock.On("FindUsers", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_FindUsers_Call) Run(run func(ctx context.Context, in *userv1beta1.FindUsersRequest, opts ...grpc.CallOption)) *GatewayAPIClient_FindUsers_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*userv1beta1.FindUsersRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_FindUsers_Call) Return(_a0 *userv1beta1.FindUsersResponse, _a1 error) *GatewayAPIClient_FindUsers_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_FindUsers_Call) RunAndReturn(run func(context.Context, *userv1beta1.FindUsersRequest, ...grpc.CallOption) (*userv1beta1.FindUsersResponse, error)) *GatewayAPIClient_FindUsers_Call { + _c.Call.Return(run) + return _c +} + // ForwardInvite provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) ForwardInvite(ctx context.Context, in *invitev1beta1.ForwardInviteRequest, opts ...grpc.CallOption) (*invitev1beta1.ForwardInviteResponse, error) { _va := make([]interface{}, len(opts)) @@ -770,6 +1639,10 @@ func (_m *GatewayAPIClient) ForwardInvite(ctx context.Context, in *invitev1beta1 _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ForwardInvite") + } + var r0 *invitev1beta1.ForwardInviteResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *invitev1beta1.ForwardInviteRequest, ...grpc.CallOption) (*invitev1beta1.ForwardInviteResponse, error)); ok { @@ -792,6 +1665,43 @@ func (_m *GatewayAPIClient) ForwardInvite(ctx context.Context, in *invitev1beta1 return r0, r1 } +// GatewayAPIClient_ForwardInvite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ForwardInvite' +type GatewayAPIClient_ForwardInvite_Call struct { + *mock.Call +} + +// ForwardInvite is a helper method to define mock.On call +// - ctx context.Context +// - in *invitev1beta1.ForwardInviteRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) ForwardInvite(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_ForwardInvite_Call { + return &GatewayAPIClient_ForwardInvite_Call{Call: _e.mock.On("ForwardInvite", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_ForwardInvite_Call) Run(run func(ctx context.Context, in *invitev1beta1.ForwardInviteRequest, opts ...grpc.CallOption)) *GatewayAPIClient_ForwardInvite_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*invitev1beta1.ForwardInviteRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_ForwardInvite_Call) Return(_a0 *invitev1beta1.ForwardInviteResponse, _a1 error) *GatewayAPIClient_ForwardInvite_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_ForwardInvite_Call) RunAndReturn(run func(context.Context, *invitev1beta1.ForwardInviteRequest, ...grpc.CallOption) (*invitev1beta1.ForwardInviteResponse, error)) *GatewayAPIClient_ForwardInvite_Call { + _c.Call.Return(run) + return _c +} + // GenerateAppPassword provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GenerateAppPassword(ctx context.Context, in *applicationsv1beta1.GenerateAppPasswordRequest, opts ...grpc.CallOption) (*applicationsv1beta1.GenerateAppPasswordResponse, error) { _va := make([]interface{}, len(opts)) @@ -803,6 +1713,10 @@ func (_m *GatewayAPIClient) GenerateAppPassword(ctx context.Context, in *applica _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GenerateAppPassword") + } + var r0 *applicationsv1beta1.GenerateAppPasswordResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *applicationsv1beta1.GenerateAppPasswordRequest, ...grpc.CallOption) (*applicationsv1beta1.GenerateAppPasswordResponse, error)); ok { @@ -825,6 +1739,43 @@ func (_m *GatewayAPIClient) GenerateAppPassword(ctx context.Context, in *applica return r0, r1 } +// GatewayAPIClient_GenerateAppPassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenerateAppPassword' +type GatewayAPIClient_GenerateAppPassword_Call struct { + *mock.Call +} + +// GenerateAppPassword is a helper method to define mock.On call +// - ctx context.Context +// - in *applicationsv1beta1.GenerateAppPasswordRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GenerateAppPassword(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GenerateAppPassword_Call { + return &GatewayAPIClient_GenerateAppPassword_Call{Call: _e.mock.On("GenerateAppPassword", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GenerateAppPassword_Call) Run(run func(ctx context.Context, in *applicationsv1beta1.GenerateAppPasswordRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GenerateAppPassword_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*applicationsv1beta1.GenerateAppPasswordRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GenerateAppPassword_Call) Return(_a0 *applicationsv1beta1.GenerateAppPasswordResponse, _a1 error) *GatewayAPIClient_GenerateAppPassword_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GenerateAppPassword_Call) RunAndReturn(run func(context.Context, *applicationsv1beta1.GenerateAppPasswordRequest, ...grpc.CallOption) (*applicationsv1beta1.GenerateAppPasswordResponse, error)) *GatewayAPIClient_GenerateAppPassword_Call { + _c.Call.Return(run) + return _c +} + // GenerateInviteToken provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GenerateInviteToken(ctx context.Context, in *invitev1beta1.GenerateInviteTokenRequest, opts ...grpc.CallOption) (*invitev1beta1.GenerateInviteTokenResponse, error) { _va := make([]interface{}, len(opts)) @@ -836,6 +1787,10 @@ func (_m *GatewayAPIClient) GenerateInviteToken(ctx context.Context, in *invitev _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GenerateInviteToken") + } + var r0 *invitev1beta1.GenerateInviteTokenResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *invitev1beta1.GenerateInviteTokenRequest, ...grpc.CallOption) (*invitev1beta1.GenerateInviteTokenResponse, error)); ok { @@ -858,6 +1813,43 @@ func (_m *GatewayAPIClient) GenerateInviteToken(ctx context.Context, in *invitev return r0, r1 } +// GatewayAPIClient_GenerateInviteToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenerateInviteToken' +type GatewayAPIClient_GenerateInviteToken_Call struct { + *mock.Call +} + +// GenerateInviteToken is a helper method to define mock.On call +// - ctx context.Context +// - in *invitev1beta1.GenerateInviteTokenRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GenerateInviteToken(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GenerateInviteToken_Call { + return &GatewayAPIClient_GenerateInviteToken_Call{Call: _e.mock.On("GenerateInviteToken", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GenerateInviteToken_Call) Run(run func(ctx context.Context, in *invitev1beta1.GenerateInviteTokenRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GenerateInviteToken_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*invitev1beta1.GenerateInviteTokenRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GenerateInviteToken_Call) Return(_a0 *invitev1beta1.GenerateInviteTokenResponse, _a1 error) *GatewayAPIClient_GenerateInviteToken_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GenerateInviteToken_Call) RunAndReturn(run func(context.Context, *invitev1beta1.GenerateInviteTokenRequest, ...grpc.CallOption) (*invitev1beta1.GenerateInviteTokenResponse, error)) *GatewayAPIClient_GenerateInviteToken_Call { + _c.Call.Return(run) + return _c +} + // GetAcceptedUser provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GetAcceptedUser(ctx context.Context, in *invitev1beta1.GetAcceptedUserRequest, opts ...grpc.CallOption) (*invitev1beta1.GetAcceptedUserResponse, error) { _va := make([]interface{}, len(opts)) @@ -869,6 +1861,10 @@ func (_m *GatewayAPIClient) GetAcceptedUser(ctx context.Context, in *invitev1bet _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetAcceptedUser") + } + var r0 *invitev1beta1.GetAcceptedUserResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *invitev1beta1.GetAcceptedUserRequest, ...grpc.CallOption) (*invitev1beta1.GetAcceptedUserResponse, error)); ok { @@ -891,6 +1887,43 @@ func (_m *GatewayAPIClient) GetAcceptedUser(ctx context.Context, in *invitev1bet return r0, r1 } +// GatewayAPIClient_GetAcceptedUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAcceptedUser' +type GatewayAPIClient_GetAcceptedUser_Call struct { + *mock.Call +} + +// GetAcceptedUser is a helper method to define mock.On call +// - ctx context.Context +// - in *invitev1beta1.GetAcceptedUserRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GetAcceptedUser(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GetAcceptedUser_Call { + return &GatewayAPIClient_GetAcceptedUser_Call{Call: _e.mock.On("GetAcceptedUser", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GetAcceptedUser_Call) Run(run func(ctx context.Context, in *invitev1beta1.GetAcceptedUserRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GetAcceptedUser_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*invitev1beta1.GetAcceptedUserRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GetAcceptedUser_Call) Return(_a0 *invitev1beta1.GetAcceptedUserResponse, _a1 error) *GatewayAPIClient_GetAcceptedUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GetAcceptedUser_Call) RunAndReturn(run func(context.Context, *invitev1beta1.GetAcceptedUserRequest, ...grpc.CallOption) (*invitev1beta1.GetAcceptedUserResponse, error)) *GatewayAPIClient_GetAcceptedUser_Call { + _c.Call.Return(run) + return _c +} + // GetAppPassword provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GetAppPassword(ctx context.Context, in *applicationsv1beta1.GetAppPasswordRequest, opts ...grpc.CallOption) (*applicationsv1beta1.GetAppPasswordResponse, error) { _va := make([]interface{}, len(opts)) @@ -902,6 +1935,10 @@ func (_m *GatewayAPIClient) GetAppPassword(ctx context.Context, in *applications _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetAppPassword") + } + var r0 *applicationsv1beta1.GetAppPasswordResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *applicationsv1beta1.GetAppPasswordRequest, ...grpc.CallOption) (*applicationsv1beta1.GetAppPasswordResponse, error)); ok { @@ -924,6 +1961,43 @@ func (_m *GatewayAPIClient) GetAppPassword(ctx context.Context, in *applications return r0, r1 } +// GatewayAPIClient_GetAppPassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAppPassword' +type GatewayAPIClient_GetAppPassword_Call struct { + *mock.Call +} + +// GetAppPassword is a helper method to define mock.On call +// - ctx context.Context +// - in *applicationsv1beta1.GetAppPasswordRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GetAppPassword(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GetAppPassword_Call { + return &GatewayAPIClient_GetAppPassword_Call{Call: _e.mock.On("GetAppPassword", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GetAppPassword_Call) Run(run func(ctx context.Context, in *applicationsv1beta1.GetAppPasswordRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GetAppPassword_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*applicationsv1beta1.GetAppPasswordRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GetAppPassword_Call) Return(_a0 *applicationsv1beta1.GetAppPasswordResponse, _a1 error) *GatewayAPIClient_GetAppPassword_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GetAppPassword_Call) RunAndReturn(run func(context.Context, *applicationsv1beta1.GetAppPasswordRequest, ...grpc.CallOption) (*applicationsv1beta1.GetAppPasswordResponse, error)) *GatewayAPIClient_GetAppPassword_Call { + _c.Call.Return(run) + return _c +} + // GetAppProviders provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GetAppProviders(ctx context.Context, in *registryv1beta1.GetAppProvidersRequest, opts ...grpc.CallOption) (*registryv1beta1.GetAppProvidersResponse, error) { _va := make([]interface{}, len(opts)) @@ -935,6 +2009,10 @@ func (_m *GatewayAPIClient) GetAppProviders(ctx context.Context, in *registryv1b _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetAppProviders") + } + var r0 *registryv1beta1.GetAppProvidersResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *registryv1beta1.GetAppProvidersRequest, ...grpc.CallOption) (*registryv1beta1.GetAppProvidersResponse, error)); ok { @@ -957,6 +2035,43 @@ func (_m *GatewayAPIClient) GetAppProviders(ctx context.Context, in *registryv1b return r0, r1 } +// GatewayAPIClient_GetAppProviders_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAppProviders' +type GatewayAPIClient_GetAppProviders_Call struct { + *mock.Call +} + +// GetAppProviders is a helper method to define mock.On call +// - ctx context.Context +// - in *registryv1beta1.GetAppProvidersRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GetAppProviders(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GetAppProviders_Call { + return &GatewayAPIClient_GetAppProviders_Call{Call: _e.mock.On("GetAppProviders", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GetAppProviders_Call) Run(run func(ctx context.Context, in *registryv1beta1.GetAppProvidersRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GetAppProviders_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*registryv1beta1.GetAppProvidersRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GetAppProviders_Call) Return(_a0 *registryv1beta1.GetAppProvidersResponse, _a1 error) *GatewayAPIClient_GetAppProviders_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GetAppProviders_Call) RunAndReturn(run func(context.Context, *registryv1beta1.GetAppProvidersRequest, ...grpc.CallOption) (*registryv1beta1.GetAppProvidersResponse, error)) *GatewayAPIClient_GetAppProviders_Call { + _c.Call.Return(run) + return _c +} + // GetDefaultAppProviderForMimeType provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GetDefaultAppProviderForMimeType(ctx context.Context, in *registryv1beta1.GetDefaultAppProviderForMimeTypeRequest, opts ...grpc.CallOption) (*registryv1beta1.GetDefaultAppProviderForMimeTypeResponse, error) { _va := make([]interface{}, len(opts)) @@ -968,6 +2083,10 @@ func (_m *GatewayAPIClient) GetDefaultAppProviderForMimeType(ctx context.Context _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetDefaultAppProviderForMimeType") + } + var r0 *registryv1beta1.GetDefaultAppProviderForMimeTypeResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *registryv1beta1.GetDefaultAppProviderForMimeTypeRequest, ...grpc.CallOption) (*registryv1beta1.GetDefaultAppProviderForMimeTypeResponse, error)); ok { @@ -990,6 +2109,43 @@ func (_m *GatewayAPIClient) GetDefaultAppProviderForMimeType(ctx context.Context return r0, r1 } +// GatewayAPIClient_GetDefaultAppProviderForMimeType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDefaultAppProviderForMimeType' +type GatewayAPIClient_GetDefaultAppProviderForMimeType_Call struct { + *mock.Call +} + +// GetDefaultAppProviderForMimeType is a helper method to define mock.On call +// - ctx context.Context +// - in *registryv1beta1.GetDefaultAppProviderForMimeTypeRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GetDefaultAppProviderForMimeType(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GetDefaultAppProviderForMimeType_Call { + return &GatewayAPIClient_GetDefaultAppProviderForMimeType_Call{Call: _e.mock.On("GetDefaultAppProviderForMimeType", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GetDefaultAppProviderForMimeType_Call) Run(run func(ctx context.Context, in *registryv1beta1.GetDefaultAppProviderForMimeTypeRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GetDefaultAppProviderForMimeType_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*registryv1beta1.GetDefaultAppProviderForMimeTypeRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GetDefaultAppProviderForMimeType_Call) Return(_a0 *registryv1beta1.GetDefaultAppProviderForMimeTypeResponse, _a1 error) *GatewayAPIClient_GetDefaultAppProviderForMimeType_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GetDefaultAppProviderForMimeType_Call) RunAndReturn(run func(context.Context, *registryv1beta1.GetDefaultAppProviderForMimeTypeRequest, ...grpc.CallOption) (*registryv1beta1.GetDefaultAppProviderForMimeTypeResponse, error)) *GatewayAPIClient_GetDefaultAppProviderForMimeType_Call { + _c.Call.Return(run) + return _c +} + // GetGroup provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GetGroup(ctx context.Context, in *groupv1beta1.GetGroupRequest, opts ...grpc.CallOption) (*groupv1beta1.GetGroupResponse, error) { _va := make([]interface{}, len(opts)) @@ -1001,6 +2157,10 @@ func (_m *GatewayAPIClient) GetGroup(ctx context.Context, in *groupv1beta1.GetGr _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetGroup") + } + var r0 *groupv1beta1.GetGroupResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *groupv1beta1.GetGroupRequest, ...grpc.CallOption) (*groupv1beta1.GetGroupResponse, error)); ok { @@ -1023,6 +2183,43 @@ func (_m *GatewayAPIClient) GetGroup(ctx context.Context, in *groupv1beta1.GetGr return r0, r1 } +// GatewayAPIClient_GetGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGroup' +type GatewayAPIClient_GetGroup_Call struct { + *mock.Call +} + +// GetGroup is a helper method to define mock.On call +// - ctx context.Context +// - in *groupv1beta1.GetGroupRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GetGroup(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GetGroup_Call { + return &GatewayAPIClient_GetGroup_Call{Call: _e.mock.On("GetGroup", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GetGroup_Call) Run(run func(ctx context.Context, in *groupv1beta1.GetGroupRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GetGroup_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*groupv1beta1.GetGroupRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GetGroup_Call) Return(_a0 *groupv1beta1.GetGroupResponse, _a1 error) *GatewayAPIClient_GetGroup_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GetGroup_Call) RunAndReturn(run func(context.Context, *groupv1beta1.GetGroupRequest, ...grpc.CallOption) (*groupv1beta1.GetGroupResponse, error)) *GatewayAPIClient_GetGroup_Call { + _c.Call.Return(run) + return _c +} + // GetGroupByClaim provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GetGroupByClaim(ctx context.Context, in *groupv1beta1.GetGroupByClaimRequest, opts ...grpc.CallOption) (*groupv1beta1.GetGroupByClaimResponse, error) { _va := make([]interface{}, len(opts)) @@ -1034,6 +2231,10 @@ func (_m *GatewayAPIClient) GetGroupByClaim(ctx context.Context, in *groupv1beta _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetGroupByClaim") + } + var r0 *groupv1beta1.GetGroupByClaimResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *groupv1beta1.GetGroupByClaimRequest, ...grpc.CallOption) (*groupv1beta1.GetGroupByClaimResponse, error)); ok { @@ -1056,6 +2257,43 @@ func (_m *GatewayAPIClient) GetGroupByClaim(ctx context.Context, in *groupv1beta return r0, r1 } +// GatewayAPIClient_GetGroupByClaim_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGroupByClaim' +type GatewayAPIClient_GetGroupByClaim_Call struct { + *mock.Call +} + +// GetGroupByClaim is a helper method to define mock.On call +// - ctx context.Context +// - in *groupv1beta1.GetGroupByClaimRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GetGroupByClaim(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GetGroupByClaim_Call { + return &GatewayAPIClient_GetGroupByClaim_Call{Call: _e.mock.On("GetGroupByClaim", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GetGroupByClaim_Call) Run(run func(ctx context.Context, in *groupv1beta1.GetGroupByClaimRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GetGroupByClaim_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*groupv1beta1.GetGroupByClaimRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GetGroupByClaim_Call) Return(_a0 *groupv1beta1.GetGroupByClaimResponse, _a1 error) *GatewayAPIClient_GetGroupByClaim_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GetGroupByClaim_Call) RunAndReturn(run func(context.Context, *groupv1beta1.GetGroupByClaimRequest, ...grpc.CallOption) (*groupv1beta1.GetGroupByClaimResponse, error)) *GatewayAPIClient_GetGroupByClaim_Call { + _c.Call.Return(run) + return _c +} + // GetHome provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GetHome(ctx context.Context, in *providerv1beta1.GetHomeRequest, opts ...grpc.CallOption) (*providerv1beta1.GetHomeResponse, error) { _va := make([]interface{}, len(opts)) @@ -1067,6 +2305,10 @@ func (_m *GatewayAPIClient) GetHome(ctx context.Context, in *providerv1beta1.Get _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetHome") + } + var r0 *providerv1beta1.GetHomeResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.GetHomeRequest, ...grpc.CallOption) (*providerv1beta1.GetHomeResponse, error)); ok { @@ -1089,6 +2331,43 @@ func (_m *GatewayAPIClient) GetHome(ctx context.Context, in *providerv1beta1.Get return r0, r1 } +// GatewayAPIClient_GetHome_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHome' +type GatewayAPIClient_GetHome_Call struct { + *mock.Call +} + +// GetHome is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.GetHomeRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GetHome(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GetHome_Call { + return &GatewayAPIClient_GetHome_Call{Call: _e.mock.On("GetHome", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GetHome_Call) Run(run func(ctx context.Context, in *providerv1beta1.GetHomeRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GetHome_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.GetHomeRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GetHome_Call) Return(_a0 *providerv1beta1.GetHomeResponse, _a1 error) *GatewayAPIClient_GetHome_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GetHome_Call) RunAndReturn(run func(context.Context, *providerv1beta1.GetHomeRequest, ...grpc.CallOption) (*providerv1beta1.GetHomeResponse, error)) *GatewayAPIClient_GetHome_Call { + _c.Call.Return(run) + return _c +} + // GetInfoByDomain provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GetInfoByDomain(ctx context.Context, in *v1beta1.GetInfoByDomainRequest, opts ...grpc.CallOption) (*v1beta1.GetInfoByDomainResponse, error) { _va := make([]interface{}, len(opts)) @@ -1100,6 +2379,10 @@ func (_m *GatewayAPIClient) GetInfoByDomain(ctx context.Context, in *v1beta1.Get _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetInfoByDomain") + } + var r0 *v1beta1.GetInfoByDomainResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1beta1.GetInfoByDomainRequest, ...grpc.CallOption) (*v1beta1.GetInfoByDomainResponse, error)); ok { @@ -1122,6 +2405,43 @@ func (_m *GatewayAPIClient) GetInfoByDomain(ctx context.Context, in *v1beta1.Get return r0, r1 } +// GatewayAPIClient_GetInfoByDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetInfoByDomain' +type GatewayAPIClient_GetInfoByDomain_Call struct { + *mock.Call +} + +// GetInfoByDomain is a helper method to define mock.On call +// - ctx context.Context +// - in *v1beta1.GetInfoByDomainRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GetInfoByDomain(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GetInfoByDomain_Call { + return &GatewayAPIClient_GetInfoByDomain_Call{Call: _e.mock.On("GetInfoByDomain", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GetInfoByDomain_Call) Run(run func(ctx context.Context, in *v1beta1.GetInfoByDomainRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GetInfoByDomain_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*v1beta1.GetInfoByDomainRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GetInfoByDomain_Call) Return(_a0 *v1beta1.GetInfoByDomainResponse, _a1 error) *GatewayAPIClient_GetInfoByDomain_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GetInfoByDomain_Call) RunAndReturn(run func(context.Context, *v1beta1.GetInfoByDomainRequest, ...grpc.CallOption) (*v1beta1.GetInfoByDomainResponse, error)) *GatewayAPIClient_GetInfoByDomain_Call { + _c.Call.Return(run) + return _c +} + // GetKey provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GetKey(ctx context.Context, in *preferencesv1beta1.GetKeyRequest, opts ...grpc.CallOption) (*preferencesv1beta1.GetKeyResponse, error) { _va := make([]interface{}, len(opts)) @@ -1133,6 +2453,10 @@ func (_m *GatewayAPIClient) GetKey(ctx context.Context, in *preferencesv1beta1.G _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetKey") + } + var r0 *preferencesv1beta1.GetKeyResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *preferencesv1beta1.GetKeyRequest, ...grpc.CallOption) (*preferencesv1beta1.GetKeyResponse, error)); ok { @@ -1155,6 +2479,43 @@ func (_m *GatewayAPIClient) GetKey(ctx context.Context, in *preferencesv1beta1.G return r0, r1 } +// GatewayAPIClient_GetKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetKey' +type GatewayAPIClient_GetKey_Call struct { + *mock.Call +} + +// GetKey is a helper method to define mock.On call +// - ctx context.Context +// - in *preferencesv1beta1.GetKeyRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GetKey(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GetKey_Call { + return &GatewayAPIClient_GetKey_Call{Call: _e.mock.On("GetKey", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GetKey_Call) Run(run func(ctx context.Context, in *preferencesv1beta1.GetKeyRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GetKey_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*preferencesv1beta1.GetKeyRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GetKey_Call) Return(_a0 *preferencesv1beta1.GetKeyResponse, _a1 error) *GatewayAPIClient_GetKey_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GetKey_Call) RunAndReturn(run func(context.Context, *preferencesv1beta1.GetKeyRequest, ...grpc.CallOption) (*preferencesv1beta1.GetKeyResponse, error)) *GatewayAPIClient_GetKey_Call { + _c.Call.Return(run) + return _c +} + // GetLock provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GetLock(ctx context.Context, in *providerv1beta1.GetLockRequest, opts ...grpc.CallOption) (*providerv1beta1.GetLockResponse, error) { _va := make([]interface{}, len(opts)) @@ -1166,6 +2527,10 @@ func (_m *GatewayAPIClient) GetLock(ctx context.Context, in *providerv1beta1.Get _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetLock") + } + var r0 *providerv1beta1.GetLockResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.GetLockRequest, ...grpc.CallOption) (*providerv1beta1.GetLockResponse, error)); ok { @@ -1188,6 +2553,43 @@ func (_m *GatewayAPIClient) GetLock(ctx context.Context, in *providerv1beta1.Get return r0, r1 } +// GatewayAPIClient_GetLock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLock' +type GatewayAPIClient_GetLock_Call struct { + *mock.Call +} + +// GetLock is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.GetLockRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GetLock(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GetLock_Call { + return &GatewayAPIClient_GetLock_Call{Call: _e.mock.On("GetLock", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GetLock_Call) Run(run func(ctx context.Context, in *providerv1beta1.GetLockRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GetLock_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.GetLockRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GetLock_Call) Return(_a0 *providerv1beta1.GetLockResponse, _a1 error) *GatewayAPIClient_GetLock_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GetLock_Call) RunAndReturn(run func(context.Context, *providerv1beta1.GetLockRequest, ...grpc.CallOption) (*providerv1beta1.GetLockResponse, error)) *GatewayAPIClient_GetLock_Call { + _c.Call.Return(run) + return _c +} + // GetMembers provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GetMembers(ctx context.Context, in *groupv1beta1.GetMembersRequest, opts ...grpc.CallOption) (*groupv1beta1.GetMembersResponse, error) { _va := make([]interface{}, len(opts)) @@ -1199,6 +2601,10 @@ func (_m *GatewayAPIClient) GetMembers(ctx context.Context, in *groupv1beta1.Get _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetMembers") + } + var r0 *groupv1beta1.GetMembersResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *groupv1beta1.GetMembersRequest, ...grpc.CallOption) (*groupv1beta1.GetMembersResponse, error)); ok { @@ -1221,6 +2627,43 @@ func (_m *GatewayAPIClient) GetMembers(ctx context.Context, in *groupv1beta1.Get return r0, r1 } +// GatewayAPIClient_GetMembers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMembers' +type GatewayAPIClient_GetMembers_Call struct { + *mock.Call +} + +// GetMembers is a helper method to define mock.On call +// - ctx context.Context +// - in *groupv1beta1.GetMembersRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GetMembers(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GetMembers_Call { + return &GatewayAPIClient_GetMembers_Call{Call: _e.mock.On("GetMembers", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GetMembers_Call) Run(run func(ctx context.Context, in *groupv1beta1.GetMembersRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GetMembers_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*groupv1beta1.GetMembersRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GetMembers_Call) Return(_a0 *groupv1beta1.GetMembersResponse, _a1 error) *GatewayAPIClient_GetMembers_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GetMembers_Call) RunAndReturn(run func(context.Context, *groupv1beta1.GetMembersRequest, ...grpc.CallOption) (*groupv1beta1.GetMembersResponse, error)) *GatewayAPIClient_GetMembers_Call { + _c.Call.Return(run) + return _c +} + // GetOCMShare provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GetOCMShare(ctx context.Context, in *ocmv1beta1.GetOCMShareRequest, opts ...grpc.CallOption) (*ocmv1beta1.GetOCMShareResponse, error) { _va := make([]interface{}, len(opts)) @@ -1232,6 +2675,10 @@ func (_m *GatewayAPIClient) GetOCMShare(ctx context.Context, in *ocmv1beta1.GetO _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetOCMShare") + } + var r0 *ocmv1beta1.GetOCMShareResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *ocmv1beta1.GetOCMShareRequest, ...grpc.CallOption) (*ocmv1beta1.GetOCMShareResponse, error)); ok { @@ -1254,6 +2701,43 @@ func (_m *GatewayAPIClient) GetOCMShare(ctx context.Context, in *ocmv1beta1.GetO return r0, r1 } +// GatewayAPIClient_GetOCMShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOCMShare' +type GatewayAPIClient_GetOCMShare_Call struct { + *mock.Call +} + +// GetOCMShare is a helper method to define mock.On call +// - ctx context.Context +// - in *ocmv1beta1.GetOCMShareRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GetOCMShare(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GetOCMShare_Call { + return &GatewayAPIClient_GetOCMShare_Call{Call: _e.mock.On("GetOCMShare", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GetOCMShare_Call) Run(run func(ctx context.Context, in *ocmv1beta1.GetOCMShareRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GetOCMShare_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*ocmv1beta1.GetOCMShareRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GetOCMShare_Call) Return(_a0 *ocmv1beta1.GetOCMShareResponse, _a1 error) *GatewayAPIClient_GetOCMShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GetOCMShare_Call) RunAndReturn(run func(context.Context, *ocmv1beta1.GetOCMShareRequest, ...grpc.CallOption) (*ocmv1beta1.GetOCMShareResponse, error)) *GatewayAPIClient_GetOCMShare_Call { + _c.Call.Return(run) + return _c +} + // GetOCMShareByToken provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GetOCMShareByToken(ctx context.Context, in *ocmv1beta1.GetOCMShareByTokenRequest, opts ...grpc.CallOption) (*ocmv1beta1.GetOCMShareByTokenResponse, error) { _va := make([]interface{}, len(opts)) @@ -1265,6 +2749,10 @@ func (_m *GatewayAPIClient) GetOCMShareByToken(ctx context.Context, in *ocmv1bet _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetOCMShareByToken") + } + var r0 *ocmv1beta1.GetOCMShareByTokenResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *ocmv1beta1.GetOCMShareByTokenRequest, ...grpc.CallOption) (*ocmv1beta1.GetOCMShareByTokenResponse, error)); ok { @@ -1287,6 +2775,43 @@ func (_m *GatewayAPIClient) GetOCMShareByToken(ctx context.Context, in *ocmv1bet return r0, r1 } +// GatewayAPIClient_GetOCMShareByToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOCMShareByToken' +type GatewayAPIClient_GetOCMShareByToken_Call struct { + *mock.Call +} + +// GetOCMShareByToken is a helper method to define mock.On call +// - ctx context.Context +// - in *ocmv1beta1.GetOCMShareByTokenRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GetOCMShareByToken(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GetOCMShareByToken_Call { + return &GatewayAPIClient_GetOCMShareByToken_Call{Call: _e.mock.On("GetOCMShareByToken", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GetOCMShareByToken_Call) Run(run func(ctx context.Context, in *ocmv1beta1.GetOCMShareByTokenRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GetOCMShareByToken_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*ocmv1beta1.GetOCMShareByTokenRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GetOCMShareByToken_Call) Return(_a0 *ocmv1beta1.GetOCMShareByTokenResponse, _a1 error) *GatewayAPIClient_GetOCMShareByToken_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GetOCMShareByToken_Call) RunAndReturn(run func(context.Context, *ocmv1beta1.GetOCMShareByTokenRequest, ...grpc.CallOption) (*ocmv1beta1.GetOCMShareByTokenResponse, error)) *GatewayAPIClient_GetOCMShareByToken_Call { + _c.Call.Return(run) + return _c +} + // GetPath provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GetPath(ctx context.Context, in *providerv1beta1.GetPathRequest, opts ...grpc.CallOption) (*providerv1beta1.GetPathResponse, error) { _va := make([]interface{}, len(opts)) @@ -1298,6 +2823,10 @@ func (_m *GatewayAPIClient) GetPath(ctx context.Context, in *providerv1beta1.Get _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetPath") + } + var r0 *providerv1beta1.GetPathResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.GetPathRequest, ...grpc.CallOption) (*providerv1beta1.GetPathResponse, error)); ok { @@ -1320,6 +2849,43 @@ func (_m *GatewayAPIClient) GetPath(ctx context.Context, in *providerv1beta1.Get return r0, r1 } +// GatewayAPIClient_GetPath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPath' +type GatewayAPIClient_GetPath_Call struct { + *mock.Call +} + +// GetPath is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.GetPathRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GetPath(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GetPath_Call { + return &GatewayAPIClient_GetPath_Call{Call: _e.mock.On("GetPath", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GetPath_Call) Run(run func(ctx context.Context, in *providerv1beta1.GetPathRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GetPath_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.GetPathRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GetPath_Call) Return(_a0 *providerv1beta1.GetPathResponse, _a1 error) *GatewayAPIClient_GetPath_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GetPath_Call) RunAndReturn(run func(context.Context, *providerv1beta1.GetPathRequest, ...grpc.CallOption) (*providerv1beta1.GetPathResponse, error)) *GatewayAPIClient_GetPath_Call { + _c.Call.Return(run) + return _c +} + // GetPublicShare provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GetPublicShare(ctx context.Context, in *linkv1beta1.GetPublicShareRequest, opts ...grpc.CallOption) (*linkv1beta1.GetPublicShareResponse, error) { _va := make([]interface{}, len(opts)) @@ -1331,6 +2897,10 @@ func (_m *GatewayAPIClient) GetPublicShare(ctx context.Context, in *linkv1beta1. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetPublicShare") + } + var r0 *linkv1beta1.GetPublicShareResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *linkv1beta1.GetPublicShareRequest, ...grpc.CallOption) (*linkv1beta1.GetPublicShareResponse, error)); ok { @@ -1353,6 +2923,43 @@ func (_m *GatewayAPIClient) GetPublicShare(ctx context.Context, in *linkv1beta1. return r0, r1 } +// GatewayAPIClient_GetPublicShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPublicShare' +type GatewayAPIClient_GetPublicShare_Call struct { + *mock.Call +} + +// GetPublicShare is a helper method to define mock.On call +// - ctx context.Context +// - in *linkv1beta1.GetPublicShareRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GetPublicShare(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GetPublicShare_Call { + return &GatewayAPIClient_GetPublicShare_Call{Call: _e.mock.On("GetPublicShare", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GetPublicShare_Call) Run(run func(ctx context.Context, in *linkv1beta1.GetPublicShareRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GetPublicShare_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*linkv1beta1.GetPublicShareRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GetPublicShare_Call) Return(_a0 *linkv1beta1.GetPublicShareResponse, _a1 error) *GatewayAPIClient_GetPublicShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GetPublicShare_Call) RunAndReturn(run func(context.Context, *linkv1beta1.GetPublicShareRequest, ...grpc.CallOption) (*linkv1beta1.GetPublicShareResponse, error)) *GatewayAPIClient_GetPublicShare_Call { + _c.Call.Return(run) + return _c +} + // GetPublicShareByToken provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GetPublicShareByToken(ctx context.Context, in *linkv1beta1.GetPublicShareByTokenRequest, opts ...grpc.CallOption) (*linkv1beta1.GetPublicShareByTokenResponse, error) { _va := make([]interface{}, len(opts)) @@ -1364,6 +2971,10 @@ func (_m *GatewayAPIClient) GetPublicShareByToken(ctx context.Context, in *linkv _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetPublicShareByToken") + } + var r0 *linkv1beta1.GetPublicShareByTokenResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *linkv1beta1.GetPublicShareByTokenRequest, ...grpc.CallOption) (*linkv1beta1.GetPublicShareByTokenResponse, error)); ok { @@ -1386,6 +2997,43 @@ func (_m *GatewayAPIClient) GetPublicShareByToken(ctx context.Context, in *linkv return r0, r1 } +// GatewayAPIClient_GetPublicShareByToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPublicShareByToken' +type GatewayAPIClient_GetPublicShareByToken_Call struct { + *mock.Call +} + +// GetPublicShareByToken is a helper method to define mock.On call +// - ctx context.Context +// - in *linkv1beta1.GetPublicShareByTokenRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GetPublicShareByToken(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GetPublicShareByToken_Call { + return &GatewayAPIClient_GetPublicShareByToken_Call{Call: _e.mock.On("GetPublicShareByToken", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GetPublicShareByToken_Call) Run(run func(ctx context.Context, in *linkv1beta1.GetPublicShareByTokenRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GetPublicShareByToken_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*linkv1beta1.GetPublicShareByTokenRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GetPublicShareByToken_Call) Return(_a0 *linkv1beta1.GetPublicShareByTokenResponse, _a1 error) *GatewayAPIClient_GetPublicShareByToken_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GetPublicShareByToken_Call) RunAndReturn(run func(context.Context, *linkv1beta1.GetPublicShareByTokenRequest, ...grpc.CallOption) (*linkv1beta1.GetPublicShareByTokenResponse, error)) *GatewayAPIClient_GetPublicShareByToken_Call { + _c.Call.Return(run) + return _c +} + // GetQuota provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GetQuota(ctx context.Context, in *gatewayv1beta1.GetQuotaRequest, opts ...grpc.CallOption) (*providerv1beta1.GetQuotaResponse, error) { _va := make([]interface{}, len(opts)) @@ -1397,6 +3045,10 @@ func (_m *GatewayAPIClient) GetQuota(ctx context.Context, in *gatewayv1beta1.Get _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetQuota") + } + var r0 *providerv1beta1.GetQuotaResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *gatewayv1beta1.GetQuotaRequest, ...grpc.CallOption) (*providerv1beta1.GetQuotaResponse, error)); ok { @@ -1419,6 +3071,43 @@ func (_m *GatewayAPIClient) GetQuota(ctx context.Context, in *gatewayv1beta1.Get return r0, r1 } +// GatewayAPIClient_GetQuota_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetQuota' +type GatewayAPIClient_GetQuota_Call struct { + *mock.Call +} + +// GetQuota is a helper method to define mock.On call +// - ctx context.Context +// - in *gatewayv1beta1.GetQuotaRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GetQuota(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GetQuota_Call { + return &GatewayAPIClient_GetQuota_Call{Call: _e.mock.On("GetQuota", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GetQuota_Call) Run(run func(ctx context.Context, in *gatewayv1beta1.GetQuotaRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GetQuota_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*gatewayv1beta1.GetQuotaRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GetQuota_Call) Return(_a0 *providerv1beta1.GetQuotaResponse, _a1 error) *GatewayAPIClient_GetQuota_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GetQuota_Call) RunAndReturn(run func(context.Context, *gatewayv1beta1.GetQuotaRequest, ...grpc.CallOption) (*providerv1beta1.GetQuotaResponse, error)) *GatewayAPIClient_GetQuota_Call { + _c.Call.Return(run) + return _c +} + // GetReceivedOCMShare provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GetReceivedOCMShare(ctx context.Context, in *ocmv1beta1.GetReceivedOCMShareRequest, opts ...grpc.CallOption) (*ocmv1beta1.GetReceivedOCMShareResponse, error) { _va := make([]interface{}, len(opts)) @@ -1430,6 +3119,10 @@ func (_m *GatewayAPIClient) GetReceivedOCMShare(ctx context.Context, in *ocmv1be _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetReceivedOCMShare") + } + var r0 *ocmv1beta1.GetReceivedOCMShareResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *ocmv1beta1.GetReceivedOCMShareRequest, ...grpc.CallOption) (*ocmv1beta1.GetReceivedOCMShareResponse, error)); ok { @@ -1452,6 +3145,43 @@ func (_m *GatewayAPIClient) GetReceivedOCMShare(ctx context.Context, in *ocmv1be return r0, r1 } +// GatewayAPIClient_GetReceivedOCMShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetReceivedOCMShare' +type GatewayAPIClient_GetReceivedOCMShare_Call struct { + *mock.Call +} + +// GetReceivedOCMShare is a helper method to define mock.On call +// - ctx context.Context +// - in *ocmv1beta1.GetReceivedOCMShareRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GetReceivedOCMShare(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GetReceivedOCMShare_Call { + return &GatewayAPIClient_GetReceivedOCMShare_Call{Call: _e.mock.On("GetReceivedOCMShare", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GetReceivedOCMShare_Call) Run(run func(ctx context.Context, in *ocmv1beta1.GetReceivedOCMShareRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GetReceivedOCMShare_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*ocmv1beta1.GetReceivedOCMShareRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GetReceivedOCMShare_Call) Return(_a0 *ocmv1beta1.GetReceivedOCMShareResponse, _a1 error) *GatewayAPIClient_GetReceivedOCMShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GetReceivedOCMShare_Call) RunAndReturn(run func(context.Context, *ocmv1beta1.GetReceivedOCMShareRequest, ...grpc.CallOption) (*ocmv1beta1.GetReceivedOCMShareResponse, error)) *GatewayAPIClient_GetReceivedOCMShare_Call { + _c.Call.Return(run) + return _c +} + // GetReceivedShare provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GetReceivedShare(ctx context.Context, in *collaborationv1beta1.GetReceivedShareRequest, opts ...grpc.CallOption) (*collaborationv1beta1.GetReceivedShareResponse, error) { _va := make([]interface{}, len(opts)) @@ -1463,6 +3193,10 @@ func (_m *GatewayAPIClient) GetReceivedShare(ctx context.Context, in *collaborat _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetReceivedShare") + } + var r0 *collaborationv1beta1.GetReceivedShareResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.GetReceivedShareRequest, ...grpc.CallOption) (*collaborationv1beta1.GetReceivedShareResponse, error)); ok { @@ -1485,6 +3219,43 @@ func (_m *GatewayAPIClient) GetReceivedShare(ctx context.Context, in *collaborat return r0, r1 } +// GatewayAPIClient_GetReceivedShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetReceivedShare' +type GatewayAPIClient_GetReceivedShare_Call struct { + *mock.Call +} + +// GetReceivedShare is a helper method to define mock.On call +// - ctx context.Context +// - in *collaborationv1beta1.GetReceivedShareRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GetReceivedShare(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GetReceivedShare_Call { + return &GatewayAPIClient_GetReceivedShare_Call{Call: _e.mock.On("GetReceivedShare", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GetReceivedShare_Call) Run(run func(ctx context.Context, in *collaborationv1beta1.GetReceivedShareRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GetReceivedShare_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*collaborationv1beta1.GetReceivedShareRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GetReceivedShare_Call) Return(_a0 *collaborationv1beta1.GetReceivedShareResponse, _a1 error) *GatewayAPIClient_GetReceivedShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GetReceivedShare_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.GetReceivedShareRequest, ...grpc.CallOption) (*collaborationv1beta1.GetReceivedShareResponse, error)) *GatewayAPIClient_GetReceivedShare_Call { + _c.Call.Return(run) + return _c +} + // GetShare provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GetShare(ctx context.Context, in *collaborationv1beta1.GetShareRequest, opts ...grpc.CallOption) (*collaborationv1beta1.GetShareResponse, error) { _va := make([]interface{}, len(opts)) @@ -1496,6 +3267,10 @@ func (_m *GatewayAPIClient) GetShare(ctx context.Context, in *collaborationv1bet _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetShare") + } + var r0 *collaborationv1beta1.GetShareResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.GetShareRequest, ...grpc.CallOption) (*collaborationv1beta1.GetShareResponse, error)); ok { @@ -1518,6 +3293,43 @@ func (_m *GatewayAPIClient) GetShare(ctx context.Context, in *collaborationv1bet return r0, r1 } +// GatewayAPIClient_GetShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetShare' +type GatewayAPIClient_GetShare_Call struct { + *mock.Call +} + +// GetShare is a helper method to define mock.On call +// - ctx context.Context +// - in *collaborationv1beta1.GetShareRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GetShare(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GetShare_Call { + return &GatewayAPIClient_GetShare_Call{Call: _e.mock.On("GetShare", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GetShare_Call) Run(run func(ctx context.Context, in *collaborationv1beta1.GetShareRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GetShare_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*collaborationv1beta1.GetShareRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GetShare_Call) Return(_a0 *collaborationv1beta1.GetShareResponse, _a1 error) *GatewayAPIClient_GetShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GetShare_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.GetShareRequest, ...grpc.CallOption) (*collaborationv1beta1.GetShareResponse, error)) *GatewayAPIClient_GetShare_Call { + _c.Call.Return(run) + return _c +} + // GetTransferStatus provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GetTransferStatus(ctx context.Context, in *txv1beta1.GetTransferStatusRequest, opts ...grpc.CallOption) (*txv1beta1.GetTransferStatusResponse, error) { _va := make([]interface{}, len(opts)) @@ -1529,6 +3341,10 @@ func (_m *GatewayAPIClient) GetTransferStatus(ctx context.Context, in *txv1beta1 _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetTransferStatus") + } + var r0 *txv1beta1.GetTransferStatusResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *txv1beta1.GetTransferStatusRequest, ...grpc.CallOption) (*txv1beta1.GetTransferStatusResponse, error)); ok { @@ -1551,6 +3367,43 @@ func (_m *GatewayAPIClient) GetTransferStatus(ctx context.Context, in *txv1beta1 return r0, r1 } +// GatewayAPIClient_GetTransferStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTransferStatus' +type GatewayAPIClient_GetTransferStatus_Call struct { + *mock.Call +} + +// GetTransferStatus is a helper method to define mock.On call +// - ctx context.Context +// - in *txv1beta1.GetTransferStatusRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GetTransferStatus(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GetTransferStatus_Call { + return &GatewayAPIClient_GetTransferStatus_Call{Call: _e.mock.On("GetTransferStatus", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GetTransferStatus_Call) Run(run func(ctx context.Context, in *txv1beta1.GetTransferStatusRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GetTransferStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*txv1beta1.GetTransferStatusRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GetTransferStatus_Call) Return(_a0 *txv1beta1.GetTransferStatusResponse, _a1 error) *GatewayAPIClient_GetTransferStatus_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GetTransferStatus_Call) RunAndReturn(run func(context.Context, *txv1beta1.GetTransferStatusRequest, ...grpc.CallOption) (*txv1beta1.GetTransferStatusResponse, error)) *GatewayAPIClient_GetTransferStatus_Call { + _c.Call.Return(run) + return _c +} + // GetUser provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GetUser(ctx context.Context, in *userv1beta1.GetUserRequest, opts ...grpc.CallOption) (*userv1beta1.GetUserResponse, error) { _va := make([]interface{}, len(opts)) @@ -1562,6 +3415,10 @@ func (_m *GatewayAPIClient) GetUser(ctx context.Context, in *userv1beta1.GetUser _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetUser") + } + var r0 *userv1beta1.GetUserResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *userv1beta1.GetUserRequest, ...grpc.CallOption) (*userv1beta1.GetUserResponse, error)); ok { @@ -1584,6 +3441,43 @@ func (_m *GatewayAPIClient) GetUser(ctx context.Context, in *userv1beta1.GetUser return r0, r1 } +// GatewayAPIClient_GetUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUser' +type GatewayAPIClient_GetUser_Call struct { + *mock.Call +} + +// GetUser is a helper method to define mock.On call +// - ctx context.Context +// - in *userv1beta1.GetUserRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GetUser(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GetUser_Call { + return &GatewayAPIClient_GetUser_Call{Call: _e.mock.On("GetUser", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GetUser_Call) Run(run func(ctx context.Context, in *userv1beta1.GetUserRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GetUser_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*userv1beta1.GetUserRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GetUser_Call) Return(_a0 *userv1beta1.GetUserResponse, _a1 error) *GatewayAPIClient_GetUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GetUser_Call) RunAndReturn(run func(context.Context, *userv1beta1.GetUserRequest, ...grpc.CallOption) (*userv1beta1.GetUserResponse, error)) *GatewayAPIClient_GetUser_Call { + _c.Call.Return(run) + return _c +} + // GetUserByClaim provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GetUserByClaim(ctx context.Context, in *userv1beta1.GetUserByClaimRequest, opts ...grpc.CallOption) (*userv1beta1.GetUserByClaimResponse, error) { _va := make([]interface{}, len(opts)) @@ -1595,6 +3489,10 @@ func (_m *GatewayAPIClient) GetUserByClaim(ctx context.Context, in *userv1beta1. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetUserByClaim") + } + var r0 *userv1beta1.GetUserByClaimResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *userv1beta1.GetUserByClaimRequest, ...grpc.CallOption) (*userv1beta1.GetUserByClaimResponse, error)); ok { @@ -1617,6 +3515,43 @@ func (_m *GatewayAPIClient) GetUserByClaim(ctx context.Context, in *userv1beta1. return r0, r1 } +// GatewayAPIClient_GetUserByClaim_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserByClaim' +type GatewayAPIClient_GetUserByClaim_Call struct { + *mock.Call +} + +// GetUserByClaim is a helper method to define mock.On call +// - ctx context.Context +// - in *userv1beta1.GetUserByClaimRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GetUserByClaim(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GetUserByClaim_Call { + return &GatewayAPIClient_GetUserByClaim_Call{Call: _e.mock.On("GetUserByClaim", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GetUserByClaim_Call) Run(run func(ctx context.Context, in *userv1beta1.GetUserByClaimRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GetUserByClaim_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*userv1beta1.GetUserByClaimRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GetUserByClaim_Call) Return(_a0 *userv1beta1.GetUserByClaimResponse, _a1 error) *GatewayAPIClient_GetUserByClaim_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GetUserByClaim_Call) RunAndReturn(run func(context.Context, *userv1beta1.GetUserByClaimRequest, ...grpc.CallOption) (*userv1beta1.GetUserByClaimResponse, error)) *GatewayAPIClient_GetUserByClaim_Call { + _c.Call.Return(run) + return _c +} + // GetUserGroups provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) GetUserGroups(ctx context.Context, in *userv1beta1.GetUserGroupsRequest, opts ...grpc.CallOption) (*userv1beta1.GetUserGroupsResponse, error) { _va := make([]interface{}, len(opts)) @@ -1628,6 +3563,10 @@ func (_m *GatewayAPIClient) GetUserGroups(ctx context.Context, in *userv1beta1.G _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetUserGroups") + } + var r0 *userv1beta1.GetUserGroupsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *userv1beta1.GetUserGroupsRequest, ...grpc.CallOption) (*userv1beta1.GetUserGroupsResponse, error)); ok { @@ -1650,6 +3589,43 @@ func (_m *GatewayAPIClient) GetUserGroups(ctx context.Context, in *userv1beta1.G return r0, r1 } +// GatewayAPIClient_GetUserGroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserGroups' +type GatewayAPIClient_GetUserGroups_Call struct { + *mock.Call +} + +// GetUserGroups is a helper method to define mock.On call +// - ctx context.Context +// - in *userv1beta1.GetUserGroupsRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) GetUserGroups(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_GetUserGroups_Call { + return &GatewayAPIClient_GetUserGroups_Call{Call: _e.mock.On("GetUserGroups", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_GetUserGroups_Call) Run(run func(ctx context.Context, in *userv1beta1.GetUserGroupsRequest, opts ...grpc.CallOption)) *GatewayAPIClient_GetUserGroups_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*userv1beta1.GetUserGroupsRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_GetUserGroups_Call) Return(_a0 *userv1beta1.GetUserGroupsResponse, _a1 error) *GatewayAPIClient_GetUserGroups_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_GetUserGroups_Call) RunAndReturn(run func(context.Context, *userv1beta1.GetUserGroupsRequest, ...grpc.CallOption) (*userv1beta1.GetUserGroupsResponse, error)) *GatewayAPIClient_GetUserGroups_Call { + _c.Call.Return(run) + return _c +} + // HasMember provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) HasMember(ctx context.Context, in *groupv1beta1.HasMemberRequest, opts ...grpc.CallOption) (*groupv1beta1.HasMemberResponse, error) { _va := make([]interface{}, len(opts)) @@ -1661,6 +3637,10 @@ func (_m *GatewayAPIClient) HasMember(ctx context.Context, in *groupv1beta1.HasM _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for HasMember") + } + var r0 *groupv1beta1.HasMemberResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *groupv1beta1.HasMemberRequest, ...grpc.CallOption) (*groupv1beta1.HasMemberResponse, error)); ok { @@ -1683,6 +3663,43 @@ func (_m *GatewayAPIClient) HasMember(ctx context.Context, in *groupv1beta1.HasM return r0, r1 } +// GatewayAPIClient_HasMember_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasMember' +type GatewayAPIClient_HasMember_Call struct { + *mock.Call +} + +// HasMember is a helper method to define mock.On call +// - ctx context.Context +// - in *groupv1beta1.HasMemberRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) HasMember(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_HasMember_Call { + return &GatewayAPIClient_HasMember_Call{Call: _e.mock.On("HasMember", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_HasMember_Call) Run(run func(ctx context.Context, in *groupv1beta1.HasMemberRequest, opts ...grpc.CallOption)) *GatewayAPIClient_HasMember_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*groupv1beta1.HasMemberRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_HasMember_Call) Return(_a0 *groupv1beta1.HasMemberResponse, _a1 error) *GatewayAPIClient_HasMember_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_HasMember_Call) RunAndReturn(run func(context.Context, *groupv1beta1.HasMemberRequest, ...grpc.CallOption) (*groupv1beta1.HasMemberResponse, error)) *GatewayAPIClient_HasMember_Call { + _c.Call.Return(run) + return _c +} + // InitiateFileDownload provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) InitiateFileDownload(ctx context.Context, in *providerv1beta1.InitiateFileDownloadRequest, opts ...grpc.CallOption) (*gatewayv1beta1.InitiateFileDownloadResponse, error) { _va := make([]interface{}, len(opts)) @@ -1694,6 +3711,10 @@ func (_m *GatewayAPIClient) InitiateFileDownload(ctx context.Context, in *provid _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for InitiateFileDownload") + } + var r0 *gatewayv1beta1.InitiateFileDownloadResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.InitiateFileDownloadRequest, ...grpc.CallOption) (*gatewayv1beta1.InitiateFileDownloadResponse, error)); ok { @@ -1716,6 +3737,43 @@ func (_m *GatewayAPIClient) InitiateFileDownload(ctx context.Context, in *provid return r0, r1 } +// GatewayAPIClient_InitiateFileDownload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InitiateFileDownload' +type GatewayAPIClient_InitiateFileDownload_Call struct { + *mock.Call +} + +// InitiateFileDownload is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.InitiateFileDownloadRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) InitiateFileDownload(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_InitiateFileDownload_Call { + return &GatewayAPIClient_InitiateFileDownload_Call{Call: _e.mock.On("InitiateFileDownload", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_InitiateFileDownload_Call) Run(run func(ctx context.Context, in *providerv1beta1.InitiateFileDownloadRequest, opts ...grpc.CallOption)) *GatewayAPIClient_InitiateFileDownload_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.InitiateFileDownloadRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_InitiateFileDownload_Call) Return(_a0 *gatewayv1beta1.InitiateFileDownloadResponse, _a1 error) *GatewayAPIClient_InitiateFileDownload_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_InitiateFileDownload_Call) RunAndReturn(run func(context.Context, *providerv1beta1.InitiateFileDownloadRequest, ...grpc.CallOption) (*gatewayv1beta1.InitiateFileDownloadResponse, error)) *GatewayAPIClient_InitiateFileDownload_Call { + _c.Call.Return(run) + return _c +} + // InitiateFileUpload provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) InitiateFileUpload(ctx context.Context, in *providerv1beta1.InitiateFileUploadRequest, opts ...grpc.CallOption) (*gatewayv1beta1.InitiateFileUploadResponse, error) { _va := make([]interface{}, len(opts)) @@ -1727,6 +3785,10 @@ func (_m *GatewayAPIClient) InitiateFileUpload(ctx context.Context, in *provider _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for InitiateFileUpload") + } + var r0 *gatewayv1beta1.InitiateFileUploadResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.InitiateFileUploadRequest, ...grpc.CallOption) (*gatewayv1beta1.InitiateFileUploadResponse, error)); ok { @@ -1749,6 +3811,43 @@ func (_m *GatewayAPIClient) InitiateFileUpload(ctx context.Context, in *provider return r0, r1 } +// GatewayAPIClient_InitiateFileUpload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InitiateFileUpload' +type GatewayAPIClient_InitiateFileUpload_Call struct { + *mock.Call +} + +// InitiateFileUpload is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.InitiateFileUploadRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) InitiateFileUpload(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_InitiateFileUpload_Call { + return &GatewayAPIClient_InitiateFileUpload_Call{Call: _e.mock.On("InitiateFileUpload", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_InitiateFileUpload_Call) Run(run func(ctx context.Context, in *providerv1beta1.InitiateFileUploadRequest, opts ...grpc.CallOption)) *GatewayAPIClient_InitiateFileUpload_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.InitiateFileUploadRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_InitiateFileUpload_Call) Return(_a0 *gatewayv1beta1.InitiateFileUploadResponse, _a1 error) *GatewayAPIClient_InitiateFileUpload_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_InitiateFileUpload_Call) RunAndReturn(run func(context.Context, *providerv1beta1.InitiateFileUploadRequest, ...grpc.CallOption) (*gatewayv1beta1.InitiateFileUploadResponse, error)) *GatewayAPIClient_InitiateFileUpload_Call { + _c.Call.Return(run) + return _c +} + // InvalidateAppPassword provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) InvalidateAppPassword(ctx context.Context, in *applicationsv1beta1.InvalidateAppPasswordRequest, opts ...grpc.CallOption) (*applicationsv1beta1.InvalidateAppPasswordResponse, error) { _va := make([]interface{}, len(opts)) @@ -1760,6 +3859,10 @@ func (_m *GatewayAPIClient) InvalidateAppPassword(ctx context.Context, in *appli _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for InvalidateAppPassword") + } + var r0 *applicationsv1beta1.InvalidateAppPasswordResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *applicationsv1beta1.InvalidateAppPasswordRequest, ...grpc.CallOption) (*applicationsv1beta1.InvalidateAppPasswordResponse, error)); ok { @@ -1782,6 +3885,43 @@ func (_m *GatewayAPIClient) InvalidateAppPassword(ctx context.Context, in *appli return r0, r1 } +// GatewayAPIClient_InvalidateAppPassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InvalidateAppPassword' +type GatewayAPIClient_InvalidateAppPassword_Call struct { + *mock.Call +} + +// InvalidateAppPassword is a helper method to define mock.On call +// - ctx context.Context +// - in *applicationsv1beta1.InvalidateAppPasswordRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) InvalidateAppPassword(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_InvalidateAppPassword_Call { + return &GatewayAPIClient_InvalidateAppPassword_Call{Call: _e.mock.On("InvalidateAppPassword", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_InvalidateAppPassword_Call) Run(run func(ctx context.Context, in *applicationsv1beta1.InvalidateAppPasswordRequest, opts ...grpc.CallOption)) *GatewayAPIClient_InvalidateAppPassword_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*applicationsv1beta1.InvalidateAppPasswordRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_InvalidateAppPassword_Call) Return(_a0 *applicationsv1beta1.InvalidateAppPasswordResponse, _a1 error) *GatewayAPIClient_InvalidateAppPassword_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_InvalidateAppPassword_Call) RunAndReturn(run func(context.Context, *applicationsv1beta1.InvalidateAppPasswordRequest, ...grpc.CallOption) (*applicationsv1beta1.InvalidateAppPasswordResponse, error)) *GatewayAPIClient_InvalidateAppPassword_Call { + _c.Call.Return(run) + return _c +} + // IsProviderAllowed provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) IsProviderAllowed(ctx context.Context, in *v1beta1.IsProviderAllowedRequest, opts ...grpc.CallOption) (*v1beta1.IsProviderAllowedResponse, error) { _va := make([]interface{}, len(opts)) @@ -1793,6 +3933,10 @@ func (_m *GatewayAPIClient) IsProviderAllowed(ctx context.Context, in *v1beta1.I _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for IsProviderAllowed") + } + var r0 *v1beta1.IsProviderAllowedResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1beta1.IsProviderAllowedRequest, ...grpc.CallOption) (*v1beta1.IsProviderAllowedResponse, error)); ok { @@ -1815,6 +3959,43 @@ func (_m *GatewayAPIClient) IsProviderAllowed(ctx context.Context, in *v1beta1.I return r0, r1 } +// GatewayAPIClient_IsProviderAllowed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsProviderAllowed' +type GatewayAPIClient_IsProviderAllowed_Call struct { + *mock.Call +} + +// IsProviderAllowed is a helper method to define mock.On call +// - ctx context.Context +// - in *v1beta1.IsProviderAllowedRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) IsProviderAllowed(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_IsProviderAllowed_Call { + return &GatewayAPIClient_IsProviderAllowed_Call{Call: _e.mock.On("IsProviderAllowed", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_IsProviderAllowed_Call) Run(run func(ctx context.Context, in *v1beta1.IsProviderAllowedRequest, opts ...grpc.CallOption)) *GatewayAPIClient_IsProviderAllowed_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*v1beta1.IsProviderAllowedRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_IsProviderAllowed_Call) Return(_a0 *v1beta1.IsProviderAllowedResponse, _a1 error) *GatewayAPIClient_IsProviderAllowed_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_IsProviderAllowed_Call) RunAndReturn(run func(context.Context, *v1beta1.IsProviderAllowedRequest, ...grpc.CallOption) (*v1beta1.IsProviderAllowedResponse, error)) *GatewayAPIClient_IsProviderAllowed_Call { + _c.Call.Return(run) + return _c +} + // ListAllProviders provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) ListAllProviders(ctx context.Context, in *v1beta1.ListAllProvidersRequest, opts ...grpc.CallOption) (*v1beta1.ListAllProvidersResponse, error) { _va := make([]interface{}, len(opts)) @@ -1826,6 +4007,10 @@ func (_m *GatewayAPIClient) ListAllProviders(ctx context.Context, in *v1beta1.Li _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListAllProviders") + } + var r0 *v1beta1.ListAllProvidersResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1beta1.ListAllProvidersRequest, ...grpc.CallOption) (*v1beta1.ListAllProvidersResponse, error)); ok { @@ -1848,6 +4033,43 @@ func (_m *GatewayAPIClient) ListAllProviders(ctx context.Context, in *v1beta1.Li return r0, r1 } +// GatewayAPIClient_ListAllProviders_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAllProviders' +type GatewayAPIClient_ListAllProviders_Call struct { + *mock.Call +} + +// ListAllProviders is a helper method to define mock.On call +// - ctx context.Context +// - in *v1beta1.ListAllProvidersRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) ListAllProviders(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_ListAllProviders_Call { + return &GatewayAPIClient_ListAllProviders_Call{Call: _e.mock.On("ListAllProviders", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_ListAllProviders_Call) Run(run func(ctx context.Context, in *v1beta1.ListAllProvidersRequest, opts ...grpc.CallOption)) *GatewayAPIClient_ListAllProviders_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*v1beta1.ListAllProvidersRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_ListAllProviders_Call) Return(_a0 *v1beta1.ListAllProvidersResponse, _a1 error) *GatewayAPIClient_ListAllProviders_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_ListAllProviders_Call) RunAndReturn(run func(context.Context, *v1beta1.ListAllProvidersRequest, ...grpc.CallOption) (*v1beta1.ListAllProvidersResponse, error)) *GatewayAPIClient_ListAllProviders_Call { + _c.Call.Return(run) + return _c +} + // ListAppPasswords provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) ListAppPasswords(ctx context.Context, in *applicationsv1beta1.ListAppPasswordsRequest, opts ...grpc.CallOption) (*applicationsv1beta1.ListAppPasswordsResponse, error) { _va := make([]interface{}, len(opts)) @@ -1859,6 +4081,10 @@ func (_m *GatewayAPIClient) ListAppPasswords(ctx context.Context, in *applicatio _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListAppPasswords") + } + var r0 *applicationsv1beta1.ListAppPasswordsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *applicationsv1beta1.ListAppPasswordsRequest, ...grpc.CallOption) (*applicationsv1beta1.ListAppPasswordsResponse, error)); ok { @@ -1881,6 +4107,43 @@ func (_m *GatewayAPIClient) ListAppPasswords(ctx context.Context, in *applicatio return r0, r1 } +// GatewayAPIClient_ListAppPasswords_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAppPasswords' +type GatewayAPIClient_ListAppPasswords_Call struct { + *mock.Call +} + +// ListAppPasswords is a helper method to define mock.On call +// - ctx context.Context +// - in *applicationsv1beta1.ListAppPasswordsRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) ListAppPasswords(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_ListAppPasswords_Call { + return &GatewayAPIClient_ListAppPasswords_Call{Call: _e.mock.On("ListAppPasswords", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_ListAppPasswords_Call) Run(run func(ctx context.Context, in *applicationsv1beta1.ListAppPasswordsRequest, opts ...grpc.CallOption)) *GatewayAPIClient_ListAppPasswords_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*applicationsv1beta1.ListAppPasswordsRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_ListAppPasswords_Call) Return(_a0 *applicationsv1beta1.ListAppPasswordsResponse, _a1 error) *GatewayAPIClient_ListAppPasswords_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_ListAppPasswords_Call) RunAndReturn(run func(context.Context, *applicationsv1beta1.ListAppPasswordsRequest, ...grpc.CallOption) (*applicationsv1beta1.ListAppPasswordsResponse, error)) *GatewayAPIClient_ListAppPasswords_Call { + _c.Call.Return(run) + return _c +} + // ListAppProviders provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) ListAppProviders(ctx context.Context, in *registryv1beta1.ListAppProvidersRequest, opts ...grpc.CallOption) (*registryv1beta1.ListAppProvidersResponse, error) { _va := make([]interface{}, len(opts)) @@ -1892,6 +4155,10 @@ func (_m *GatewayAPIClient) ListAppProviders(ctx context.Context, in *registryv1 _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListAppProviders") + } + var r0 *registryv1beta1.ListAppProvidersResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *registryv1beta1.ListAppProvidersRequest, ...grpc.CallOption) (*registryv1beta1.ListAppProvidersResponse, error)); ok { @@ -1914,6 +4181,43 @@ func (_m *GatewayAPIClient) ListAppProviders(ctx context.Context, in *registryv1 return r0, r1 } +// GatewayAPIClient_ListAppProviders_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAppProviders' +type GatewayAPIClient_ListAppProviders_Call struct { + *mock.Call +} + +// ListAppProviders is a helper method to define mock.On call +// - ctx context.Context +// - in *registryv1beta1.ListAppProvidersRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) ListAppProviders(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_ListAppProviders_Call { + return &GatewayAPIClient_ListAppProviders_Call{Call: _e.mock.On("ListAppProviders", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_ListAppProviders_Call) Run(run func(ctx context.Context, in *registryv1beta1.ListAppProvidersRequest, opts ...grpc.CallOption)) *GatewayAPIClient_ListAppProviders_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*registryv1beta1.ListAppProvidersRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_ListAppProviders_Call) Return(_a0 *registryv1beta1.ListAppProvidersResponse, _a1 error) *GatewayAPIClient_ListAppProviders_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_ListAppProviders_Call) RunAndReturn(run func(context.Context, *registryv1beta1.ListAppProvidersRequest, ...grpc.CallOption) (*registryv1beta1.ListAppProvidersResponse, error)) *GatewayAPIClient_ListAppProviders_Call { + _c.Call.Return(run) + return _c +} + // ListAuthProviders provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) ListAuthProviders(ctx context.Context, in *authregistryv1beta1.ListAuthProvidersRequest, opts ...grpc.CallOption) (*gatewayv1beta1.ListAuthProvidersResponse, error) { _va := make([]interface{}, len(opts)) @@ -1925,6 +4229,10 @@ func (_m *GatewayAPIClient) ListAuthProviders(ctx context.Context, in *authregis _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListAuthProviders") + } + var r0 *gatewayv1beta1.ListAuthProvidersResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *authregistryv1beta1.ListAuthProvidersRequest, ...grpc.CallOption) (*gatewayv1beta1.ListAuthProvidersResponse, error)); ok { @@ -1947,6 +4255,43 @@ func (_m *GatewayAPIClient) ListAuthProviders(ctx context.Context, in *authregis return r0, r1 } +// GatewayAPIClient_ListAuthProviders_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAuthProviders' +type GatewayAPIClient_ListAuthProviders_Call struct { + *mock.Call +} + +// ListAuthProviders is a helper method to define mock.On call +// - ctx context.Context +// - in *authregistryv1beta1.ListAuthProvidersRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) ListAuthProviders(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_ListAuthProviders_Call { + return &GatewayAPIClient_ListAuthProviders_Call{Call: _e.mock.On("ListAuthProviders", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_ListAuthProviders_Call) Run(run func(ctx context.Context, in *authregistryv1beta1.ListAuthProvidersRequest, opts ...grpc.CallOption)) *GatewayAPIClient_ListAuthProviders_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*authregistryv1beta1.ListAuthProvidersRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_ListAuthProviders_Call) Return(_a0 *gatewayv1beta1.ListAuthProvidersResponse, _a1 error) *GatewayAPIClient_ListAuthProviders_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_ListAuthProviders_Call) RunAndReturn(run func(context.Context, *authregistryv1beta1.ListAuthProvidersRequest, ...grpc.CallOption) (*gatewayv1beta1.ListAuthProvidersResponse, error)) *GatewayAPIClient_ListAuthProviders_Call { + _c.Call.Return(run) + return _c +} + // ListContainer provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) ListContainer(ctx context.Context, in *providerv1beta1.ListContainerRequest, opts ...grpc.CallOption) (*providerv1beta1.ListContainerResponse, error) { _va := make([]interface{}, len(opts)) @@ -1958,6 +4303,10 @@ func (_m *GatewayAPIClient) ListContainer(ctx context.Context, in *providerv1bet _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListContainer") + } + var r0 *providerv1beta1.ListContainerResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ListContainerRequest, ...grpc.CallOption) (*providerv1beta1.ListContainerResponse, error)); ok { @@ -1980,6 +4329,43 @@ func (_m *GatewayAPIClient) ListContainer(ctx context.Context, in *providerv1bet return r0, r1 } +// GatewayAPIClient_ListContainer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListContainer' +type GatewayAPIClient_ListContainer_Call struct { + *mock.Call +} + +// ListContainer is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.ListContainerRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) ListContainer(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_ListContainer_Call { + return &GatewayAPIClient_ListContainer_Call{Call: _e.mock.On("ListContainer", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_ListContainer_Call) Run(run func(ctx context.Context, in *providerv1beta1.ListContainerRequest, opts ...grpc.CallOption)) *GatewayAPIClient_ListContainer_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.ListContainerRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_ListContainer_Call) Return(_a0 *providerv1beta1.ListContainerResponse, _a1 error) *GatewayAPIClient_ListContainer_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_ListContainer_Call) RunAndReturn(run func(context.Context, *providerv1beta1.ListContainerRequest, ...grpc.CallOption) (*providerv1beta1.ListContainerResponse, error)) *GatewayAPIClient_ListContainer_Call { + _c.Call.Return(run) + return _c +} + // ListContainerStream provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) ListContainerStream(ctx context.Context, in *providerv1beta1.ListContainerStreamRequest, opts ...grpc.CallOption) (gatewayv1beta1.GatewayAPI_ListContainerStreamClient, error) { _va := make([]interface{}, len(opts)) @@ -1991,6 +4377,10 @@ func (_m *GatewayAPIClient) ListContainerStream(ctx context.Context, in *provide _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListContainerStream") + } + var r0 gatewayv1beta1.GatewayAPI_ListContainerStreamClient var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ListContainerStreamRequest, ...grpc.CallOption) (gatewayv1beta1.GatewayAPI_ListContainerStreamClient, error)); ok { @@ -2013,6 +4403,43 @@ func (_m *GatewayAPIClient) ListContainerStream(ctx context.Context, in *provide return r0, r1 } +// GatewayAPIClient_ListContainerStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListContainerStream' +type GatewayAPIClient_ListContainerStream_Call struct { + *mock.Call +} + +// ListContainerStream is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.ListContainerStreamRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) ListContainerStream(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_ListContainerStream_Call { + return &GatewayAPIClient_ListContainerStream_Call{Call: _e.mock.On("ListContainerStream", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_ListContainerStream_Call) Run(run func(ctx context.Context, in *providerv1beta1.ListContainerStreamRequest, opts ...grpc.CallOption)) *GatewayAPIClient_ListContainerStream_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.ListContainerStreamRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_ListContainerStream_Call) Return(_a0 gatewayv1beta1.GatewayAPI_ListContainerStreamClient, _a1 error) *GatewayAPIClient_ListContainerStream_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_ListContainerStream_Call) RunAndReturn(run func(context.Context, *providerv1beta1.ListContainerStreamRequest, ...grpc.CallOption) (gatewayv1beta1.GatewayAPI_ListContainerStreamClient, error)) *GatewayAPIClient_ListContainerStream_Call { + _c.Call.Return(run) + return _c +} + // ListFileVersions provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) ListFileVersions(ctx context.Context, in *providerv1beta1.ListFileVersionsRequest, opts ...grpc.CallOption) (*providerv1beta1.ListFileVersionsResponse, error) { _va := make([]interface{}, len(opts)) @@ -2024,6 +4451,10 @@ func (_m *GatewayAPIClient) ListFileVersions(ctx context.Context, in *providerv1 _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListFileVersions") + } + var r0 *providerv1beta1.ListFileVersionsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ListFileVersionsRequest, ...grpc.CallOption) (*providerv1beta1.ListFileVersionsResponse, error)); ok { @@ -2046,6 +4477,43 @@ func (_m *GatewayAPIClient) ListFileVersions(ctx context.Context, in *providerv1 return r0, r1 } +// GatewayAPIClient_ListFileVersions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListFileVersions' +type GatewayAPIClient_ListFileVersions_Call struct { + *mock.Call +} + +// ListFileVersions is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.ListFileVersionsRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) ListFileVersions(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_ListFileVersions_Call { + return &GatewayAPIClient_ListFileVersions_Call{Call: _e.mock.On("ListFileVersions", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_ListFileVersions_Call) Run(run func(ctx context.Context, in *providerv1beta1.ListFileVersionsRequest, opts ...grpc.CallOption)) *GatewayAPIClient_ListFileVersions_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.ListFileVersionsRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_ListFileVersions_Call) Return(_a0 *providerv1beta1.ListFileVersionsResponse, _a1 error) *GatewayAPIClient_ListFileVersions_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_ListFileVersions_Call) RunAndReturn(run func(context.Context, *providerv1beta1.ListFileVersionsRequest, ...grpc.CallOption) (*providerv1beta1.ListFileVersionsResponse, error)) *GatewayAPIClient_ListFileVersions_Call { + _c.Call.Return(run) + return _c +} + // ListInviteTokens provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) ListInviteTokens(ctx context.Context, in *invitev1beta1.ListInviteTokensRequest, opts ...grpc.CallOption) (*invitev1beta1.ListInviteTokensResponse, error) { _va := make([]interface{}, len(opts)) @@ -2057,6 +4525,10 @@ func (_m *GatewayAPIClient) ListInviteTokens(ctx context.Context, in *invitev1be _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListInviteTokens") + } + var r0 *invitev1beta1.ListInviteTokensResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *invitev1beta1.ListInviteTokensRequest, ...grpc.CallOption) (*invitev1beta1.ListInviteTokensResponse, error)); ok { @@ -2079,6 +4551,43 @@ func (_m *GatewayAPIClient) ListInviteTokens(ctx context.Context, in *invitev1be return r0, r1 } +// GatewayAPIClient_ListInviteTokens_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListInviteTokens' +type GatewayAPIClient_ListInviteTokens_Call struct { + *mock.Call +} + +// ListInviteTokens is a helper method to define mock.On call +// - ctx context.Context +// - in *invitev1beta1.ListInviteTokensRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) ListInviteTokens(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_ListInviteTokens_Call { + return &GatewayAPIClient_ListInviteTokens_Call{Call: _e.mock.On("ListInviteTokens", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_ListInviteTokens_Call) Run(run func(ctx context.Context, in *invitev1beta1.ListInviteTokensRequest, opts ...grpc.CallOption)) *GatewayAPIClient_ListInviteTokens_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*invitev1beta1.ListInviteTokensRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_ListInviteTokens_Call) Return(_a0 *invitev1beta1.ListInviteTokensResponse, _a1 error) *GatewayAPIClient_ListInviteTokens_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_ListInviteTokens_Call) RunAndReturn(run func(context.Context, *invitev1beta1.ListInviteTokensRequest, ...grpc.CallOption) (*invitev1beta1.ListInviteTokensResponse, error)) *GatewayAPIClient_ListInviteTokens_Call { + _c.Call.Return(run) + return _c +} + // ListOCMShares provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) ListOCMShares(ctx context.Context, in *ocmv1beta1.ListOCMSharesRequest, opts ...grpc.CallOption) (*ocmv1beta1.ListOCMSharesResponse, error) { _va := make([]interface{}, len(opts)) @@ -2090,6 +4599,10 @@ func (_m *GatewayAPIClient) ListOCMShares(ctx context.Context, in *ocmv1beta1.Li _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListOCMShares") + } + var r0 *ocmv1beta1.ListOCMSharesResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *ocmv1beta1.ListOCMSharesRequest, ...grpc.CallOption) (*ocmv1beta1.ListOCMSharesResponse, error)); ok { @@ -2112,6 +4625,43 @@ func (_m *GatewayAPIClient) ListOCMShares(ctx context.Context, in *ocmv1beta1.Li return r0, r1 } +// GatewayAPIClient_ListOCMShares_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListOCMShares' +type GatewayAPIClient_ListOCMShares_Call struct { + *mock.Call +} + +// ListOCMShares is a helper method to define mock.On call +// - ctx context.Context +// - in *ocmv1beta1.ListOCMSharesRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) ListOCMShares(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_ListOCMShares_Call { + return &GatewayAPIClient_ListOCMShares_Call{Call: _e.mock.On("ListOCMShares", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_ListOCMShares_Call) Run(run func(ctx context.Context, in *ocmv1beta1.ListOCMSharesRequest, opts ...grpc.CallOption)) *GatewayAPIClient_ListOCMShares_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*ocmv1beta1.ListOCMSharesRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_ListOCMShares_Call) Return(_a0 *ocmv1beta1.ListOCMSharesResponse, _a1 error) *GatewayAPIClient_ListOCMShares_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_ListOCMShares_Call) RunAndReturn(run func(context.Context, *ocmv1beta1.ListOCMSharesRequest, ...grpc.CallOption) (*ocmv1beta1.ListOCMSharesResponse, error)) *GatewayAPIClient_ListOCMShares_Call { + _c.Call.Return(run) + return _c +} + // ListPublicShares provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) ListPublicShares(ctx context.Context, in *linkv1beta1.ListPublicSharesRequest, opts ...grpc.CallOption) (*linkv1beta1.ListPublicSharesResponse, error) { _va := make([]interface{}, len(opts)) @@ -2123,6 +4673,10 @@ func (_m *GatewayAPIClient) ListPublicShares(ctx context.Context, in *linkv1beta _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListPublicShares") + } + var r0 *linkv1beta1.ListPublicSharesResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *linkv1beta1.ListPublicSharesRequest, ...grpc.CallOption) (*linkv1beta1.ListPublicSharesResponse, error)); ok { @@ -2145,6 +4699,43 @@ func (_m *GatewayAPIClient) ListPublicShares(ctx context.Context, in *linkv1beta return r0, r1 } +// GatewayAPIClient_ListPublicShares_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPublicShares' +type GatewayAPIClient_ListPublicShares_Call struct { + *mock.Call +} + +// ListPublicShares is a helper method to define mock.On call +// - ctx context.Context +// - in *linkv1beta1.ListPublicSharesRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) ListPublicShares(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_ListPublicShares_Call { + return &GatewayAPIClient_ListPublicShares_Call{Call: _e.mock.On("ListPublicShares", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_ListPublicShares_Call) Run(run func(ctx context.Context, in *linkv1beta1.ListPublicSharesRequest, opts ...grpc.CallOption)) *GatewayAPIClient_ListPublicShares_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*linkv1beta1.ListPublicSharesRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_ListPublicShares_Call) Return(_a0 *linkv1beta1.ListPublicSharesResponse, _a1 error) *GatewayAPIClient_ListPublicShares_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_ListPublicShares_Call) RunAndReturn(run func(context.Context, *linkv1beta1.ListPublicSharesRequest, ...grpc.CallOption) (*linkv1beta1.ListPublicSharesResponse, error)) *GatewayAPIClient_ListPublicShares_Call { + _c.Call.Return(run) + return _c +} + // ListReceivedOCMShares provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) ListReceivedOCMShares(ctx context.Context, in *ocmv1beta1.ListReceivedOCMSharesRequest, opts ...grpc.CallOption) (*ocmv1beta1.ListReceivedOCMSharesResponse, error) { _va := make([]interface{}, len(opts)) @@ -2156,6 +4747,10 @@ func (_m *GatewayAPIClient) ListReceivedOCMShares(ctx context.Context, in *ocmv1 _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListReceivedOCMShares") + } + var r0 *ocmv1beta1.ListReceivedOCMSharesResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *ocmv1beta1.ListReceivedOCMSharesRequest, ...grpc.CallOption) (*ocmv1beta1.ListReceivedOCMSharesResponse, error)); ok { @@ -2178,6 +4773,43 @@ func (_m *GatewayAPIClient) ListReceivedOCMShares(ctx context.Context, in *ocmv1 return r0, r1 } +// GatewayAPIClient_ListReceivedOCMShares_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListReceivedOCMShares' +type GatewayAPIClient_ListReceivedOCMShares_Call struct { + *mock.Call +} + +// ListReceivedOCMShares is a helper method to define mock.On call +// - ctx context.Context +// - in *ocmv1beta1.ListReceivedOCMSharesRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) ListReceivedOCMShares(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_ListReceivedOCMShares_Call { + return &GatewayAPIClient_ListReceivedOCMShares_Call{Call: _e.mock.On("ListReceivedOCMShares", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_ListReceivedOCMShares_Call) Run(run func(ctx context.Context, in *ocmv1beta1.ListReceivedOCMSharesRequest, opts ...grpc.CallOption)) *GatewayAPIClient_ListReceivedOCMShares_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*ocmv1beta1.ListReceivedOCMSharesRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_ListReceivedOCMShares_Call) Return(_a0 *ocmv1beta1.ListReceivedOCMSharesResponse, _a1 error) *GatewayAPIClient_ListReceivedOCMShares_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_ListReceivedOCMShares_Call) RunAndReturn(run func(context.Context, *ocmv1beta1.ListReceivedOCMSharesRequest, ...grpc.CallOption) (*ocmv1beta1.ListReceivedOCMSharesResponse, error)) *GatewayAPIClient_ListReceivedOCMShares_Call { + _c.Call.Return(run) + return _c +} + // ListReceivedShares provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) ListReceivedShares(ctx context.Context, in *collaborationv1beta1.ListReceivedSharesRequest, opts ...grpc.CallOption) (*collaborationv1beta1.ListReceivedSharesResponse, error) { _va := make([]interface{}, len(opts)) @@ -2189,6 +4821,10 @@ func (_m *GatewayAPIClient) ListReceivedShares(ctx context.Context, in *collabor _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListReceivedShares") + } + var r0 *collaborationv1beta1.ListReceivedSharesResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.ListReceivedSharesRequest, ...grpc.CallOption) (*collaborationv1beta1.ListReceivedSharesResponse, error)); ok { @@ -2211,6 +4847,43 @@ func (_m *GatewayAPIClient) ListReceivedShares(ctx context.Context, in *collabor return r0, r1 } +// GatewayAPIClient_ListReceivedShares_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListReceivedShares' +type GatewayAPIClient_ListReceivedShares_Call struct { + *mock.Call +} + +// ListReceivedShares is a helper method to define mock.On call +// - ctx context.Context +// - in *collaborationv1beta1.ListReceivedSharesRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) ListReceivedShares(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_ListReceivedShares_Call { + return &GatewayAPIClient_ListReceivedShares_Call{Call: _e.mock.On("ListReceivedShares", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_ListReceivedShares_Call) Run(run func(ctx context.Context, in *collaborationv1beta1.ListReceivedSharesRequest, opts ...grpc.CallOption)) *GatewayAPIClient_ListReceivedShares_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*collaborationv1beta1.ListReceivedSharesRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_ListReceivedShares_Call) Return(_a0 *collaborationv1beta1.ListReceivedSharesResponse, _a1 error) *GatewayAPIClient_ListReceivedShares_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_ListReceivedShares_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.ListReceivedSharesRequest, ...grpc.CallOption) (*collaborationv1beta1.ListReceivedSharesResponse, error)) *GatewayAPIClient_ListReceivedShares_Call { + _c.Call.Return(run) + return _c +} + // ListRecycle provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) ListRecycle(ctx context.Context, in *providerv1beta1.ListRecycleRequest, opts ...grpc.CallOption) (*providerv1beta1.ListRecycleResponse, error) { _va := make([]interface{}, len(opts)) @@ -2222,6 +4895,10 @@ func (_m *GatewayAPIClient) ListRecycle(ctx context.Context, in *providerv1beta1 _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListRecycle") + } + var r0 *providerv1beta1.ListRecycleResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ListRecycleRequest, ...grpc.CallOption) (*providerv1beta1.ListRecycleResponse, error)); ok { @@ -2244,6 +4921,43 @@ func (_m *GatewayAPIClient) ListRecycle(ctx context.Context, in *providerv1beta1 return r0, r1 } +// GatewayAPIClient_ListRecycle_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRecycle' +type GatewayAPIClient_ListRecycle_Call struct { + *mock.Call +} + +// ListRecycle is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.ListRecycleRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) ListRecycle(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_ListRecycle_Call { + return &GatewayAPIClient_ListRecycle_Call{Call: _e.mock.On("ListRecycle", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_ListRecycle_Call) Run(run func(ctx context.Context, in *providerv1beta1.ListRecycleRequest, opts ...grpc.CallOption)) *GatewayAPIClient_ListRecycle_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.ListRecycleRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_ListRecycle_Call) Return(_a0 *providerv1beta1.ListRecycleResponse, _a1 error) *GatewayAPIClient_ListRecycle_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_ListRecycle_Call) RunAndReturn(run func(context.Context, *providerv1beta1.ListRecycleRequest, ...grpc.CallOption) (*providerv1beta1.ListRecycleResponse, error)) *GatewayAPIClient_ListRecycle_Call { + _c.Call.Return(run) + return _c +} + // ListRecycleStream provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) ListRecycleStream(ctx context.Context, in *providerv1beta1.ListRecycleStreamRequest, opts ...grpc.CallOption) (gatewayv1beta1.GatewayAPI_ListRecycleStreamClient, error) { _va := make([]interface{}, len(opts)) @@ -2255,6 +4969,10 @@ func (_m *GatewayAPIClient) ListRecycleStream(ctx context.Context, in *providerv _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListRecycleStream") + } + var r0 gatewayv1beta1.GatewayAPI_ListRecycleStreamClient var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ListRecycleStreamRequest, ...grpc.CallOption) (gatewayv1beta1.GatewayAPI_ListRecycleStreamClient, error)); ok { @@ -2277,6 +4995,43 @@ func (_m *GatewayAPIClient) ListRecycleStream(ctx context.Context, in *providerv return r0, r1 } +// GatewayAPIClient_ListRecycleStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRecycleStream' +type GatewayAPIClient_ListRecycleStream_Call struct { + *mock.Call +} + +// ListRecycleStream is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.ListRecycleStreamRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) ListRecycleStream(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_ListRecycleStream_Call { + return &GatewayAPIClient_ListRecycleStream_Call{Call: _e.mock.On("ListRecycleStream", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_ListRecycleStream_Call) Run(run func(ctx context.Context, in *providerv1beta1.ListRecycleStreamRequest, opts ...grpc.CallOption)) *GatewayAPIClient_ListRecycleStream_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.ListRecycleStreamRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_ListRecycleStream_Call) Return(_a0 gatewayv1beta1.GatewayAPI_ListRecycleStreamClient, _a1 error) *GatewayAPIClient_ListRecycleStream_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_ListRecycleStream_Call) RunAndReturn(run func(context.Context, *providerv1beta1.ListRecycleStreamRequest, ...grpc.CallOption) (gatewayv1beta1.GatewayAPI_ListRecycleStreamClient, error)) *GatewayAPIClient_ListRecycleStream_Call { + _c.Call.Return(run) + return _c +} + // ListShares provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) ListShares(ctx context.Context, in *collaborationv1beta1.ListSharesRequest, opts ...grpc.CallOption) (*collaborationv1beta1.ListSharesResponse, error) { _va := make([]interface{}, len(opts)) @@ -2288,6 +5043,10 @@ func (_m *GatewayAPIClient) ListShares(ctx context.Context, in *collaborationv1b _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListShares") + } + var r0 *collaborationv1beta1.ListSharesResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.ListSharesRequest, ...grpc.CallOption) (*collaborationv1beta1.ListSharesResponse, error)); ok { @@ -2310,6 +5069,43 @@ func (_m *GatewayAPIClient) ListShares(ctx context.Context, in *collaborationv1b return r0, r1 } +// GatewayAPIClient_ListShares_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListShares' +type GatewayAPIClient_ListShares_Call struct { + *mock.Call +} + +// ListShares is a helper method to define mock.On call +// - ctx context.Context +// - in *collaborationv1beta1.ListSharesRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) ListShares(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_ListShares_Call { + return &GatewayAPIClient_ListShares_Call{Call: _e.mock.On("ListShares", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_ListShares_Call) Run(run func(ctx context.Context, in *collaborationv1beta1.ListSharesRequest, opts ...grpc.CallOption)) *GatewayAPIClient_ListShares_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*collaborationv1beta1.ListSharesRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_ListShares_Call) Return(_a0 *collaborationv1beta1.ListSharesResponse, _a1 error) *GatewayAPIClient_ListShares_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_ListShares_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.ListSharesRequest, ...grpc.CallOption) (*collaborationv1beta1.ListSharesResponse, error)) *GatewayAPIClient_ListShares_Call { + _c.Call.Return(run) + return _c +} + // ListStorageSpaces provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) ListStorageSpaces(ctx context.Context, in *providerv1beta1.ListStorageSpacesRequest, opts ...grpc.CallOption) (*providerv1beta1.ListStorageSpacesResponse, error) { _va := make([]interface{}, len(opts)) @@ -2321,6 +5117,10 @@ func (_m *GatewayAPIClient) ListStorageSpaces(ctx context.Context, in *providerv _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListStorageSpaces") + } + var r0 *providerv1beta1.ListStorageSpacesResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ListStorageSpacesRequest, ...grpc.CallOption) (*providerv1beta1.ListStorageSpacesResponse, error)); ok { @@ -2343,6 +5143,43 @@ func (_m *GatewayAPIClient) ListStorageSpaces(ctx context.Context, in *providerv return r0, r1 } +// GatewayAPIClient_ListStorageSpaces_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListStorageSpaces' +type GatewayAPIClient_ListStorageSpaces_Call struct { + *mock.Call +} + +// ListStorageSpaces is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.ListStorageSpacesRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) ListStorageSpaces(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_ListStorageSpaces_Call { + return &GatewayAPIClient_ListStorageSpaces_Call{Call: _e.mock.On("ListStorageSpaces", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_ListStorageSpaces_Call) Run(run func(ctx context.Context, in *providerv1beta1.ListStorageSpacesRequest, opts ...grpc.CallOption)) *GatewayAPIClient_ListStorageSpaces_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.ListStorageSpacesRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_ListStorageSpaces_Call) Return(_a0 *providerv1beta1.ListStorageSpacesResponse, _a1 error) *GatewayAPIClient_ListStorageSpaces_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_ListStorageSpaces_Call) RunAndReturn(run func(context.Context, *providerv1beta1.ListStorageSpacesRequest, ...grpc.CallOption) (*providerv1beta1.ListStorageSpacesResponse, error)) *GatewayAPIClient_ListStorageSpaces_Call { + _c.Call.Return(run) + return _c +} + // ListSupportedMimeTypes provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) ListSupportedMimeTypes(ctx context.Context, in *registryv1beta1.ListSupportedMimeTypesRequest, opts ...grpc.CallOption) (*registryv1beta1.ListSupportedMimeTypesResponse, error) { _va := make([]interface{}, len(opts)) @@ -2354,6 +5191,10 @@ func (_m *GatewayAPIClient) ListSupportedMimeTypes(ctx context.Context, in *regi _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListSupportedMimeTypes") + } + var r0 *registryv1beta1.ListSupportedMimeTypesResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *registryv1beta1.ListSupportedMimeTypesRequest, ...grpc.CallOption) (*registryv1beta1.ListSupportedMimeTypesResponse, error)); ok { @@ -2376,6 +5217,43 @@ func (_m *GatewayAPIClient) ListSupportedMimeTypes(ctx context.Context, in *regi return r0, r1 } +// GatewayAPIClient_ListSupportedMimeTypes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSupportedMimeTypes' +type GatewayAPIClient_ListSupportedMimeTypes_Call struct { + *mock.Call +} + +// ListSupportedMimeTypes is a helper method to define mock.On call +// - ctx context.Context +// - in *registryv1beta1.ListSupportedMimeTypesRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) ListSupportedMimeTypes(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_ListSupportedMimeTypes_Call { + return &GatewayAPIClient_ListSupportedMimeTypes_Call{Call: _e.mock.On("ListSupportedMimeTypes", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_ListSupportedMimeTypes_Call) Run(run func(ctx context.Context, in *registryv1beta1.ListSupportedMimeTypesRequest, opts ...grpc.CallOption)) *GatewayAPIClient_ListSupportedMimeTypes_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*registryv1beta1.ListSupportedMimeTypesRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_ListSupportedMimeTypes_Call) Return(_a0 *registryv1beta1.ListSupportedMimeTypesResponse, _a1 error) *GatewayAPIClient_ListSupportedMimeTypes_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_ListSupportedMimeTypes_Call) RunAndReturn(run func(context.Context, *registryv1beta1.ListSupportedMimeTypesRequest, ...grpc.CallOption) (*registryv1beta1.ListSupportedMimeTypesResponse, error)) *GatewayAPIClient_ListSupportedMimeTypes_Call { + _c.Call.Return(run) + return _c +} + // ListTransfers provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) ListTransfers(ctx context.Context, in *txv1beta1.ListTransfersRequest, opts ...grpc.CallOption) (*txv1beta1.ListTransfersResponse, error) { _va := make([]interface{}, len(opts)) @@ -2387,6 +5265,10 @@ func (_m *GatewayAPIClient) ListTransfers(ctx context.Context, in *txv1beta1.Lis _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListTransfers") + } + var r0 *txv1beta1.ListTransfersResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *txv1beta1.ListTransfersRequest, ...grpc.CallOption) (*txv1beta1.ListTransfersResponse, error)); ok { @@ -2409,6 +5291,43 @@ func (_m *GatewayAPIClient) ListTransfers(ctx context.Context, in *txv1beta1.Lis return r0, r1 } +// GatewayAPIClient_ListTransfers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListTransfers' +type GatewayAPIClient_ListTransfers_Call struct { + *mock.Call +} + +// ListTransfers is a helper method to define mock.On call +// - ctx context.Context +// - in *txv1beta1.ListTransfersRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) ListTransfers(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_ListTransfers_Call { + return &GatewayAPIClient_ListTransfers_Call{Call: _e.mock.On("ListTransfers", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_ListTransfers_Call) Run(run func(ctx context.Context, in *txv1beta1.ListTransfersRequest, opts ...grpc.CallOption)) *GatewayAPIClient_ListTransfers_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*txv1beta1.ListTransfersRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_ListTransfers_Call) Return(_a0 *txv1beta1.ListTransfersResponse, _a1 error) *GatewayAPIClient_ListTransfers_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_ListTransfers_Call) RunAndReturn(run func(context.Context, *txv1beta1.ListTransfersRequest, ...grpc.CallOption) (*txv1beta1.ListTransfersResponse, error)) *GatewayAPIClient_ListTransfers_Call { + _c.Call.Return(run) + return _c +} + // Move provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) Move(ctx context.Context, in *providerv1beta1.MoveRequest, opts ...grpc.CallOption) (*providerv1beta1.MoveResponse, error) { _va := make([]interface{}, len(opts)) @@ -2420,6 +5339,10 @@ func (_m *GatewayAPIClient) Move(ctx context.Context, in *providerv1beta1.MoveRe _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Move") + } + var r0 *providerv1beta1.MoveResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.MoveRequest, ...grpc.CallOption) (*providerv1beta1.MoveResponse, error)); ok { @@ -2442,6 +5365,43 @@ func (_m *GatewayAPIClient) Move(ctx context.Context, in *providerv1beta1.MoveRe return r0, r1 } +// GatewayAPIClient_Move_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Move' +type GatewayAPIClient_Move_Call struct { + *mock.Call +} + +// Move is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.MoveRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) Move(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_Move_Call { + return &GatewayAPIClient_Move_Call{Call: _e.mock.On("Move", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_Move_Call) Run(run func(ctx context.Context, in *providerv1beta1.MoveRequest, opts ...grpc.CallOption)) *GatewayAPIClient_Move_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.MoveRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_Move_Call) Return(_a0 *providerv1beta1.MoveResponse, _a1 error) *GatewayAPIClient_Move_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_Move_Call) RunAndReturn(run func(context.Context, *providerv1beta1.MoveRequest, ...grpc.CallOption) (*providerv1beta1.MoveResponse, error)) *GatewayAPIClient_Move_Call { + _c.Call.Return(run) + return _c +} + // OpenInApp provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) OpenInApp(ctx context.Context, in *gatewayv1beta1.OpenInAppRequest, opts ...grpc.CallOption) (*appproviderv1beta1.OpenInAppResponse, error) { _va := make([]interface{}, len(opts)) @@ -2453,6 +5413,10 @@ func (_m *GatewayAPIClient) OpenInApp(ctx context.Context, in *gatewayv1beta1.Op _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for OpenInApp") + } + var r0 *appproviderv1beta1.OpenInAppResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *gatewayv1beta1.OpenInAppRequest, ...grpc.CallOption) (*appproviderv1beta1.OpenInAppResponse, error)); ok { @@ -2475,6 +5439,43 @@ func (_m *GatewayAPIClient) OpenInApp(ctx context.Context, in *gatewayv1beta1.Op return r0, r1 } +// GatewayAPIClient_OpenInApp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OpenInApp' +type GatewayAPIClient_OpenInApp_Call struct { + *mock.Call +} + +// OpenInApp is a helper method to define mock.On call +// - ctx context.Context +// - in *gatewayv1beta1.OpenInAppRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) OpenInApp(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_OpenInApp_Call { + return &GatewayAPIClient_OpenInApp_Call{Call: _e.mock.On("OpenInApp", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_OpenInApp_Call) Run(run func(ctx context.Context, in *gatewayv1beta1.OpenInAppRequest, opts ...grpc.CallOption)) *GatewayAPIClient_OpenInApp_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*gatewayv1beta1.OpenInAppRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_OpenInApp_Call) Return(_a0 *appproviderv1beta1.OpenInAppResponse, _a1 error) *GatewayAPIClient_OpenInApp_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_OpenInApp_Call) RunAndReturn(run func(context.Context, *gatewayv1beta1.OpenInAppRequest, ...grpc.CallOption) (*appproviderv1beta1.OpenInAppResponse, error)) *GatewayAPIClient_OpenInApp_Call { + _c.Call.Return(run) + return _c +} + // PurgeRecycle provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) PurgeRecycle(ctx context.Context, in *providerv1beta1.PurgeRecycleRequest, opts ...grpc.CallOption) (*providerv1beta1.PurgeRecycleResponse, error) { _va := make([]interface{}, len(opts)) @@ -2486,6 +5487,10 @@ func (_m *GatewayAPIClient) PurgeRecycle(ctx context.Context, in *providerv1beta _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for PurgeRecycle") + } + var r0 *providerv1beta1.PurgeRecycleResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.PurgeRecycleRequest, ...grpc.CallOption) (*providerv1beta1.PurgeRecycleResponse, error)); ok { @@ -2508,6 +5513,43 @@ func (_m *GatewayAPIClient) PurgeRecycle(ctx context.Context, in *providerv1beta return r0, r1 } +// GatewayAPIClient_PurgeRecycle_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PurgeRecycle' +type GatewayAPIClient_PurgeRecycle_Call struct { + *mock.Call +} + +// PurgeRecycle is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.PurgeRecycleRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) PurgeRecycle(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_PurgeRecycle_Call { + return &GatewayAPIClient_PurgeRecycle_Call{Call: _e.mock.On("PurgeRecycle", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_PurgeRecycle_Call) Run(run func(ctx context.Context, in *providerv1beta1.PurgeRecycleRequest, opts ...grpc.CallOption)) *GatewayAPIClient_PurgeRecycle_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.PurgeRecycleRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_PurgeRecycle_Call) Return(_a0 *providerv1beta1.PurgeRecycleResponse, _a1 error) *GatewayAPIClient_PurgeRecycle_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_PurgeRecycle_Call) RunAndReturn(run func(context.Context, *providerv1beta1.PurgeRecycleRequest, ...grpc.CallOption) (*providerv1beta1.PurgeRecycleResponse, error)) *GatewayAPIClient_PurgeRecycle_Call { + _c.Call.Return(run) + return _c +} + // RefreshLock provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) RefreshLock(ctx context.Context, in *providerv1beta1.RefreshLockRequest, opts ...grpc.CallOption) (*providerv1beta1.RefreshLockResponse, error) { _va := make([]interface{}, len(opts)) @@ -2519,6 +5561,10 @@ func (_m *GatewayAPIClient) RefreshLock(ctx context.Context, in *providerv1beta1 _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for RefreshLock") + } + var r0 *providerv1beta1.RefreshLockResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.RefreshLockRequest, ...grpc.CallOption) (*providerv1beta1.RefreshLockResponse, error)); ok { @@ -2541,6 +5587,43 @@ func (_m *GatewayAPIClient) RefreshLock(ctx context.Context, in *providerv1beta1 return r0, r1 } +// GatewayAPIClient_RefreshLock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RefreshLock' +type GatewayAPIClient_RefreshLock_Call struct { + *mock.Call +} + +// RefreshLock is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.RefreshLockRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) RefreshLock(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_RefreshLock_Call { + return &GatewayAPIClient_RefreshLock_Call{Call: _e.mock.On("RefreshLock", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_RefreshLock_Call) Run(run func(ctx context.Context, in *providerv1beta1.RefreshLockRequest, opts ...grpc.CallOption)) *GatewayAPIClient_RefreshLock_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.RefreshLockRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_RefreshLock_Call) Return(_a0 *providerv1beta1.RefreshLockResponse, _a1 error) *GatewayAPIClient_RefreshLock_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_RefreshLock_Call) RunAndReturn(run func(context.Context, *providerv1beta1.RefreshLockRequest, ...grpc.CallOption) (*providerv1beta1.RefreshLockResponse, error)) *GatewayAPIClient_RefreshLock_Call { + _c.Call.Return(run) + return _c +} + // RemoveOCMShare provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) RemoveOCMShare(ctx context.Context, in *ocmv1beta1.RemoveOCMShareRequest, opts ...grpc.CallOption) (*ocmv1beta1.RemoveOCMShareResponse, error) { _va := make([]interface{}, len(opts)) @@ -2552,6 +5635,10 @@ func (_m *GatewayAPIClient) RemoveOCMShare(ctx context.Context, in *ocmv1beta1.R _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for RemoveOCMShare") + } + var r0 *ocmv1beta1.RemoveOCMShareResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *ocmv1beta1.RemoveOCMShareRequest, ...grpc.CallOption) (*ocmv1beta1.RemoveOCMShareResponse, error)); ok { @@ -2574,6 +5661,43 @@ func (_m *GatewayAPIClient) RemoveOCMShare(ctx context.Context, in *ocmv1beta1.R return r0, r1 } +// GatewayAPIClient_RemoveOCMShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveOCMShare' +type GatewayAPIClient_RemoveOCMShare_Call struct { + *mock.Call +} + +// RemoveOCMShare is a helper method to define mock.On call +// - ctx context.Context +// - in *ocmv1beta1.RemoveOCMShareRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) RemoveOCMShare(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_RemoveOCMShare_Call { + return &GatewayAPIClient_RemoveOCMShare_Call{Call: _e.mock.On("RemoveOCMShare", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_RemoveOCMShare_Call) Run(run func(ctx context.Context, in *ocmv1beta1.RemoveOCMShareRequest, opts ...grpc.CallOption)) *GatewayAPIClient_RemoveOCMShare_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*ocmv1beta1.RemoveOCMShareRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_RemoveOCMShare_Call) Return(_a0 *ocmv1beta1.RemoveOCMShareResponse, _a1 error) *GatewayAPIClient_RemoveOCMShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_RemoveOCMShare_Call) RunAndReturn(run func(context.Context, *ocmv1beta1.RemoveOCMShareRequest, ...grpc.CallOption) (*ocmv1beta1.RemoveOCMShareResponse, error)) *GatewayAPIClient_RemoveOCMShare_Call { + _c.Call.Return(run) + return _c +} + // RemovePublicShare provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) RemovePublicShare(ctx context.Context, in *linkv1beta1.RemovePublicShareRequest, opts ...grpc.CallOption) (*linkv1beta1.RemovePublicShareResponse, error) { _va := make([]interface{}, len(opts)) @@ -2585,6 +5709,10 @@ func (_m *GatewayAPIClient) RemovePublicShare(ctx context.Context, in *linkv1bet _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for RemovePublicShare") + } + var r0 *linkv1beta1.RemovePublicShareResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *linkv1beta1.RemovePublicShareRequest, ...grpc.CallOption) (*linkv1beta1.RemovePublicShareResponse, error)); ok { @@ -2607,6 +5735,43 @@ func (_m *GatewayAPIClient) RemovePublicShare(ctx context.Context, in *linkv1bet return r0, r1 } +// GatewayAPIClient_RemovePublicShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemovePublicShare' +type GatewayAPIClient_RemovePublicShare_Call struct { + *mock.Call +} + +// RemovePublicShare is a helper method to define mock.On call +// - ctx context.Context +// - in *linkv1beta1.RemovePublicShareRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) RemovePublicShare(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_RemovePublicShare_Call { + return &GatewayAPIClient_RemovePublicShare_Call{Call: _e.mock.On("RemovePublicShare", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_RemovePublicShare_Call) Run(run func(ctx context.Context, in *linkv1beta1.RemovePublicShareRequest, opts ...grpc.CallOption)) *GatewayAPIClient_RemovePublicShare_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*linkv1beta1.RemovePublicShareRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_RemovePublicShare_Call) Return(_a0 *linkv1beta1.RemovePublicShareResponse, _a1 error) *GatewayAPIClient_RemovePublicShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_RemovePublicShare_Call) RunAndReturn(run func(context.Context, *linkv1beta1.RemovePublicShareRequest, ...grpc.CallOption) (*linkv1beta1.RemovePublicShareResponse, error)) *GatewayAPIClient_RemovePublicShare_Call { + _c.Call.Return(run) + return _c +} + // RemoveShare provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) RemoveShare(ctx context.Context, in *collaborationv1beta1.RemoveShareRequest, opts ...grpc.CallOption) (*collaborationv1beta1.RemoveShareResponse, error) { _va := make([]interface{}, len(opts)) @@ -2618,6 +5783,10 @@ func (_m *GatewayAPIClient) RemoveShare(ctx context.Context, in *collaborationv1 _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for RemoveShare") + } + var r0 *collaborationv1beta1.RemoveShareResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.RemoveShareRequest, ...grpc.CallOption) (*collaborationv1beta1.RemoveShareResponse, error)); ok { @@ -2640,6 +5809,43 @@ func (_m *GatewayAPIClient) RemoveShare(ctx context.Context, in *collaborationv1 return r0, r1 } +// GatewayAPIClient_RemoveShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveShare' +type GatewayAPIClient_RemoveShare_Call struct { + *mock.Call +} + +// RemoveShare is a helper method to define mock.On call +// - ctx context.Context +// - in *collaborationv1beta1.RemoveShareRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) RemoveShare(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_RemoveShare_Call { + return &GatewayAPIClient_RemoveShare_Call{Call: _e.mock.On("RemoveShare", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_RemoveShare_Call) Run(run func(ctx context.Context, in *collaborationv1beta1.RemoveShareRequest, opts ...grpc.CallOption)) *GatewayAPIClient_RemoveShare_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*collaborationv1beta1.RemoveShareRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_RemoveShare_Call) Return(_a0 *collaborationv1beta1.RemoveShareResponse, _a1 error) *GatewayAPIClient_RemoveShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_RemoveShare_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.RemoveShareRequest, ...grpc.CallOption) (*collaborationv1beta1.RemoveShareResponse, error)) *GatewayAPIClient_RemoveShare_Call { + _c.Call.Return(run) + return _c +} + // RestoreFileVersion provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) RestoreFileVersion(ctx context.Context, in *providerv1beta1.RestoreFileVersionRequest, opts ...grpc.CallOption) (*providerv1beta1.RestoreFileVersionResponse, error) { _va := make([]interface{}, len(opts)) @@ -2651,6 +5857,10 @@ func (_m *GatewayAPIClient) RestoreFileVersion(ctx context.Context, in *provider _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for RestoreFileVersion") + } + var r0 *providerv1beta1.RestoreFileVersionResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.RestoreFileVersionRequest, ...grpc.CallOption) (*providerv1beta1.RestoreFileVersionResponse, error)); ok { @@ -2673,6 +5883,43 @@ func (_m *GatewayAPIClient) RestoreFileVersion(ctx context.Context, in *provider return r0, r1 } +// GatewayAPIClient_RestoreFileVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RestoreFileVersion' +type GatewayAPIClient_RestoreFileVersion_Call struct { + *mock.Call +} + +// RestoreFileVersion is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.RestoreFileVersionRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) RestoreFileVersion(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_RestoreFileVersion_Call { + return &GatewayAPIClient_RestoreFileVersion_Call{Call: _e.mock.On("RestoreFileVersion", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_RestoreFileVersion_Call) Run(run func(ctx context.Context, in *providerv1beta1.RestoreFileVersionRequest, opts ...grpc.CallOption)) *GatewayAPIClient_RestoreFileVersion_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.RestoreFileVersionRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_RestoreFileVersion_Call) Return(_a0 *providerv1beta1.RestoreFileVersionResponse, _a1 error) *GatewayAPIClient_RestoreFileVersion_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_RestoreFileVersion_Call) RunAndReturn(run func(context.Context, *providerv1beta1.RestoreFileVersionRequest, ...grpc.CallOption) (*providerv1beta1.RestoreFileVersionResponse, error)) *GatewayAPIClient_RestoreFileVersion_Call { + _c.Call.Return(run) + return _c +} + // RestoreRecycleItem provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) RestoreRecycleItem(ctx context.Context, in *providerv1beta1.RestoreRecycleItemRequest, opts ...grpc.CallOption) (*providerv1beta1.RestoreRecycleItemResponse, error) { _va := make([]interface{}, len(opts)) @@ -2684,6 +5931,10 @@ func (_m *GatewayAPIClient) RestoreRecycleItem(ctx context.Context, in *provider _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for RestoreRecycleItem") + } + var r0 *providerv1beta1.RestoreRecycleItemResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.RestoreRecycleItemRequest, ...grpc.CallOption) (*providerv1beta1.RestoreRecycleItemResponse, error)); ok { @@ -2706,6 +5957,43 @@ func (_m *GatewayAPIClient) RestoreRecycleItem(ctx context.Context, in *provider return r0, r1 } +// GatewayAPIClient_RestoreRecycleItem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RestoreRecycleItem' +type GatewayAPIClient_RestoreRecycleItem_Call struct { + *mock.Call +} + +// RestoreRecycleItem is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.RestoreRecycleItemRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) RestoreRecycleItem(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_RestoreRecycleItem_Call { + return &GatewayAPIClient_RestoreRecycleItem_Call{Call: _e.mock.On("RestoreRecycleItem", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_RestoreRecycleItem_Call) Run(run func(ctx context.Context, in *providerv1beta1.RestoreRecycleItemRequest, opts ...grpc.CallOption)) *GatewayAPIClient_RestoreRecycleItem_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.RestoreRecycleItemRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_RestoreRecycleItem_Call) Return(_a0 *providerv1beta1.RestoreRecycleItemResponse, _a1 error) *GatewayAPIClient_RestoreRecycleItem_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_RestoreRecycleItem_Call) RunAndReturn(run func(context.Context, *providerv1beta1.RestoreRecycleItemRequest, ...grpc.CallOption) (*providerv1beta1.RestoreRecycleItemResponse, error)) *GatewayAPIClient_RestoreRecycleItem_Call { + _c.Call.Return(run) + return _c +} + // RetryTransfer provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) RetryTransfer(ctx context.Context, in *txv1beta1.RetryTransferRequest, opts ...grpc.CallOption) (*txv1beta1.RetryTransferResponse, error) { _va := make([]interface{}, len(opts)) @@ -2717,6 +6005,10 @@ func (_m *GatewayAPIClient) RetryTransfer(ctx context.Context, in *txv1beta1.Ret _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for RetryTransfer") + } + var r0 *txv1beta1.RetryTransferResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *txv1beta1.RetryTransferRequest, ...grpc.CallOption) (*txv1beta1.RetryTransferResponse, error)); ok { @@ -2739,6 +6031,43 @@ func (_m *GatewayAPIClient) RetryTransfer(ctx context.Context, in *txv1beta1.Ret return r0, r1 } +// GatewayAPIClient_RetryTransfer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RetryTransfer' +type GatewayAPIClient_RetryTransfer_Call struct { + *mock.Call +} + +// RetryTransfer is a helper method to define mock.On call +// - ctx context.Context +// - in *txv1beta1.RetryTransferRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) RetryTransfer(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_RetryTransfer_Call { + return &GatewayAPIClient_RetryTransfer_Call{Call: _e.mock.On("RetryTransfer", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_RetryTransfer_Call) Run(run func(ctx context.Context, in *txv1beta1.RetryTransferRequest, opts ...grpc.CallOption)) *GatewayAPIClient_RetryTransfer_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*txv1beta1.RetryTransferRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_RetryTransfer_Call) Return(_a0 *txv1beta1.RetryTransferResponse, _a1 error) *GatewayAPIClient_RetryTransfer_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_RetryTransfer_Call) RunAndReturn(run func(context.Context, *txv1beta1.RetryTransferRequest, ...grpc.CallOption) (*txv1beta1.RetryTransferResponse, error)) *GatewayAPIClient_RetryTransfer_Call { + _c.Call.Return(run) + return _c +} + // SetArbitraryMetadata provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) SetArbitraryMetadata(ctx context.Context, in *providerv1beta1.SetArbitraryMetadataRequest, opts ...grpc.CallOption) (*providerv1beta1.SetArbitraryMetadataResponse, error) { _va := make([]interface{}, len(opts)) @@ -2750,6 +6079,10 @@ func (_m *GatewayAPIClient) SetArbitraryMetadata(ctx context.Context, in *provid _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SetArbitraryMetadata") + } + var r0 *providerv1beta1.SetArbitraryMetadataResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.SetArbitraryMetadataRequest, ...grpc.CallOption) (*providerv1beta1.SetArbitraryMetadataResponse, error)); ok { @@ -2772,6 +6105,43 @@ func (_m *GatewayAPIClient) SetArbitraryMetadata(ctx context.Context, in *provid return r0, r1 } +// GatewayAPIClient_SetArbitraryMetadata_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetArbitraryMetadata' +type GatewayAPIClient_SetArbitraryMetadata_Call struct { + *mock.Call +} + +// SetArbitraryMetadata is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.SetArbitraryMetadataRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) SetArbitraryMetadata(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_SetArbitraryMetadata_Call { + return &GatewayAPIClient_SetArbitraryMetadata_Call{Call: _e.mock.On("SetArbitraryMetadata", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_SetArbitraryMetadata_Call) Run(run func(ctx context.Context, in *providerv1beta1.SetArbitraryMetadataRequest, opts ...grpc.CallOption)) *GatewayAPIClient_SetArbitraryMetadata_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.SetArbitraryMetadataRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_SetArbitraryMetadata_Call) Return(_a0 *providerv1beta1.SetArbitraryMetadataResponse, _a1 error) *GatewayAPIClient_SetArbitraryMetadata_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_SetArbitraryMetadata_Call) RunAndReturn(run func(context.Context, *providerv1beta1.SetArbitraryMetadataRequest, ...grpc.CallOption) (*providerv1beta1.SetArbitraryMetadataResponse, error)) *GatewayAPIClient_SetArbitraryMetadata_Call { + _c.Call.Return(run) + return _c +} + // SetDefaultAppProviderForMimeType provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) SetDefaultAppProviderForMimeType(ctx context.Context, in *registryv1beta1.SetDefaultAppProviderForMimeTypeRequest, opts ...grpc.CallOption) (*registryv1beta1.SetDefaultAppProviderForMimeTypeResponse, error) { _va := make([]interface{}, len(opts)) @@ -2783,6 +6153,10 @@ func (_m *GatewayAPIClient) SetDefaultAppProviderForMimeType(ctx context.Context _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SetDefaultAppProviderForMimeType") + } + var r0 *registryv1beta1.SetDefaultAppProviderForMimeTypeResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *registryv1beta1.SetDefaultAppProviderForMimeTypeRequest, ...grpc.CallOption) (*registryv1beta1.SetDefaultAppProviderForMimeTypeResponse, error)); ok { @@ -2805,6 +6179,43 @@ func (_m *GatewayAPIClient) SetDefaultAppProviderForMimeType(ctx context.Context return r0, r1 } +// GatewayAPIClient_SetDefaultAppProviderForMimeType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetDefaultAppProviderForMimeType' +type GatewayAPIClient_SetDefaultAppProviderForMimeType_Call struct { + *mock.Call +} + +// SetDefaultAppProviderForMimeType is a helper method to define mock.On call +// - ctx context.Context +// - in *registryv1beta1.SetDefaultAppProviderForMimeTypeRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) SetDefaultAppProviderForMimeType(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_SetDefaultAppProviderForMimeType_Call { + return &GatewayAPIClient_SetDefaultAppProviderForMimeType_Call{Call: _e.mock.On("SetDefaultAppProviderForMimeType", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_SetDefaultAppProviderForMimeType_Call) Run(run func(ctx context.Context, in *registryv1beta1.SetDefaultAppProviderForMimeTypeRequest, opts ...grpc.CallOption)) *GatewayAPIClient_SetDefaultAppProviderForMimeType_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*registryv1beta1.SetDefaultAppProviderForMimeTypeRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_SetDefaultAppProviderForMimeType_Call) Return(_a0 *registryv1beta1.SetDefaultAppProviderForMimeTypeResponse, _a1 error) *GatewayAPIClient_SetDefaultAppProviderForMimeType_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_SetDefaultAppProviderForMimeType_Call) RunAndReturn(run func(context.Context, *registryv1beta1.SetDefaultAppProviderForMimeTypeRequest, ...grpc.CallOption) (*registryv1beta1.SetDefaultAppProviderForMimeTypeResponse, error)) *GatewayAPIClient_SetDefaultAppProviderForMimeType_Call { + _c.Call.Return(run) + return _c +} + // SetKey provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) SetKey(ctx context.Context, in *preferencesv1beta1.SetKeyRequest, opts ...grpc.CallOption) (*preferencesv1beta1.SetKeyResponse, error) { _va := make([]interface{}, len(opts)) @@ -2816,6 +6227,10 @@ func (_m *GatewayAPIClient) SetKey(ctx context.Context, in *preferencesv1beta1.S _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SetKey") + } + var r0 *preferencesv1beta1.SetKeyResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *preferencesv1beta1.SetKeyRequest, ...grpc.CallOption) (*preferencesv1beta1.SetKeyResponse, error)); ok { @@ -2838,6 +6253,43 @@ func (_m *GatewayAPIClient) SetKey(ctx context.Context, in *preferencesv1beta1.S return r0, r1 } +// GatewayAPIClient_SetKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetKey' +type GatewayAPIClient_SetKey_Call struct { + *mock.Call +} + +// SetKey is a helper method to define mock.On call +// - ctx context.Context +// - in *preferencesv1beta1.SetKeyRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) SetKey(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_SetKey_Call { + return &GatewayAPIClient_SetKey_Call{Call: _e.mock.On("SetKey", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_SetKey_Call) Run(run func(ctx context.Context, in *preferencesv1beta1.SetKeyRequest, opts ...grpc.CallOption)) *GatewayAPIClient_SetKey_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*preferencesv1beta1.SetKeyRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_SetKey_Call) Return(_a0 *preferencesv1beta1.SetKeyResponse, _a1 error) *GatewayAPIClient_SetKey_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_SetKey_Call) RunAndReturn(run func(context.Context, *preferencesv1beta1.SetKeyRequest, ...grpc.CallOption) (*preferencesv1beta1.SetKeyResponse, error)) *GatewayAPIClient_SetKey_Call { + _c.Call.Return(run) + return _c +} + // SetLock provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) SetLock(ctx context.Context, in *providerv1beta1.SetLockRequest, opts ...grpc.CallOption) (*providerv1beta1.SetLockResponse, error) { _va := make([]interface{}, len(opts)) @@ -2849,6 +6301,10 @@ func (_m *GatewayAPIClient) SetLock(ctx context.Context, in *providerv1beta1.Set _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SetLock") + } + var r0 *providerv1beta1.SetLockResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.SetLockRequest, ...grpc.CallOption) (*providerv1beta1.SetLockResponse, error)); ok { @@ -2871,6 +6327,43 @@ func (_m *GatewayAPIClient) SetLock(ctx context.Context, in *providerv1beta1.Set return r0, r1 } +// GatewayAPIClient_SetLock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetLock' +type GatewayAPIClient_SetLock_Call struct { + *mock.Call +} + +// SetLock is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.SetLockRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) SetLock(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_SetLock_Call { + return &GatewayAPIClient_SetLock_Call{Call: _e.mock.On("SetLock", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_SetLock_Call) Run(run func(ctx context.Context, in *providerv1beta1.SetLockRequest, opts ...grpc.CallOption)) *GatewayAPIClient_SetLock_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.SetLockRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_SetLock_Call) Return(_a0 *providerv1beta1.SetLockResponse, _a1 error) *GatewayAPIClient_SetLock_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_SetLock_Call) RunAndReturn(run func(context.Context, *providerv1beta1.SetLockRequest, ...grpc.CallOption) (*providerv1beta1.SetLockResponse, error)) *GatewayAPIClient_SetLock_Call { + _c.Call.Return(run) + return _c +} + // Stat provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) Stat(ctx context.Context, in *providerv1beta1.StatRequest, opts ...grpc.CallOption) (*providerv1beta1.StatResponse, error) { _va := make([]interface{}, len(opts)) @@ -2882,6 +6375,10 @@ func (_m *GatewayAPIClient) Stat(ctx context.Context, in *providerv1beta1.StatRe _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Stat") + } + var r0 *providerv1beta1.StatResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.StatRequest, ...grpc.CallOption) (*providerv1beta1.StatResponse, error)); ok { @@ -2904,6 +6401,43 @@ func (_m *GatewayAPIClient) Stat(ctx context.Context, in *providerv1beta1.StatRe return r0, r1 } +// GatewayAPIClient_Stat_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stat' +type GatewayAPIClient_Stat_Call struct { + *mock.Call +} + +// Stat is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.StatRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) Stat(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_Stat_Call { + return &GatewayAPIClient_Stat_Call{Call: _e.mock.On("Stat", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_Stat_Call) Run(run func(ctx context.Context, in *providerv1beta1.StatRequest, opts ...grpc.CallOption)) *GatewayAPIClient_Stat_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.StatRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_Stat_Call) Return(_a0 *providerv1beta1.StatResponse, _a1 error) *GatewayAPIClient_Stat_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_Stat_Call) RunAndReturn(run func(context.Context, *providerv1beta1.StatRequest, ...grpc.CallOption) (*providerv1beta1.StatResponse, error)) *GatewayAPIClient_Stat_Call { + _c.Call.Return(run) + return _c +} + // TouchFile provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) TouchFile(ctx context.Context, in *providerv1beta1.TouchFileRequest, opts ...grpc.CallOption) (*providerv1beta1.TouchFileResponse, error) { _va := make([]interface{}, len(opts)) @@ -2915,6 +6449,10 @@ func (_m *GatewayAPIClient) TouchFile(ctx context.Context, in *providerv1beta1.T _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for TouchFile") + } + var r0 *providerv1beta1.TouchFileResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.TouchFileRequest, ...grpc.CallOption) (*providerv1beta1.TouchFileResponse, error)); ok { @@ -2937,6 +6475,43 @@ func (_m *GatewayAPIClient) TouchFile(ctx context.Context, in *providerv1beta1.T return r0, r1 } +// GatewayAPIClient_TouchFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TouchFile' +type GatewayAPIClient_TouchFile_Call struct { + *mock.Call +} + +// TouchFile is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.TouchFileRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) TouchFile(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_TouchFile_Call { + return &GatewayAPIClient_TouchFile_Call{Call: _e.mock.On("TouchFile", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_TouchFile_Call) Run(run func(ctx context.Context, in *providerv1beta1.TouchFileRequest, opts ...grpc.CallOption)) *GatewayAPIClient_TouchFile_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.TouchFileRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_TouchFile_Call) Return(_a0 *providerv1beta1.TouchFileResponse, _a1 error) *GatewayAPIClient_TouchFile_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_TouchFile_Call) RunAndReturn(run func(context.Context, *providerv1beta1.TouchFileRequest, ...grpc.CallOption) (*providerv1beta1.TouchFileResponse, error)) *GatewayAPIClient_TouchFile_Call { + _c.Call.Return(run) + return _c +} + // Unlock provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) Unlock(ctx context.Context, in *providerv1beta1.UnlockRequest, opts ...grpc.CallOption) (*providerv1beta1.UnlockResponse, error) { _va := make([]interface{}, len(opts)) @@ -2948,6 +6523,10 @@ func (_m *GatewayAPIClient) Unlock(ctx context.Context, in *providerv1beta1.Unlo _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Unlock") + } + var r0 *providerv1beta1.UnlockResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.UnlockRequest, ...grpc.CallOption) (*providerv1beta1.UnlockResponse, error)); ok { @@ -2970,6 +6549,43 @@ func (_m *GatewayAPIClient) Unlock(ctx context.Context, in *providerv1beta1.Unlo return r0, r1 } +// GatewayAPIClient_Unlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unlock' +type GatewayAPIClient_Unlock_Call struct { + *mock.Call +} + +// Unlock is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.UnlockRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) Unlock(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_Unlock_Call { + return &GatewayAPIClient_Unlock_Call{Call: _e.mock.On("Unlock", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_Unlock_Call) Run(run func(ctx context.Context, in *providerv1beta1.UnlockRequest, opts ...grpc.CallOption)) *GatewayAPIClient_Unlock_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.UnlockRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_Unlock_Call) Return(_a0 *providerv1beta1.UnlockResponse, _a1 error) *GatewayAPIClient_Unlock_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_Unlock_Call) RunAndReturn(run func(context.Context, *providerv1beta1.UnlockRequest, ...grpc.CallOption) (*providerv1beta1.UnlockResponse, error)) *GatewayAPIClient_Unlock_Call { + _c.Call.Return(run) + return _c +} + // UnsetArbitraryMetadata provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) UnsetArbitraryMetadata(ctx context.Context, in *providerv1beta1.UnsetArbitraryMetadataRequest, opts ...grpc.CallOption) (*providerv1beta1.UnsetArbitraryMetadataResponse, error) { _va := make([]interface{}, len(opts)) @@ -2981,6 +6597,10 @@ func (_m *GatewayAPIClient) UnsetArbitraryMetadata(ctx context.Context, in *prov _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UnsetArbitraryMetadata") + } + var r0 *providerv1beta1.UnsetArbitraryMetadataResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.UnsetArbitraryMetadataRequest, ...grpc.CallOption) (*providerv1beta1.UnsetArbitraryMetadataResponse, error)); ok { @@ -3003,6 +6623,43 @@ func (_m *GatewayAPIClient) UnsetArbitraryMetadata(ctx context.Context, in *prov return r0, r1 } +// GatewayAPIClient_UnsetArbitraryMetadata_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnsetArbitraryMetadata' +type GatewayAPIClient_UnsetArbitraryMetadata_Call struct { + *mock.Call +} + +// UnsetArbitraryMetadata is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.UnsetArbitraryMetadataRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) UnsetArbitraryMetadata(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_UnsetArbitraryMetadata_Call { + return &GatewayAPIClient_UnsetArbitraryMetadata_Call{Call: _e.mock.On("UnsetArbitraryMetadata", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_UnsetArbitraryMetadata_Call) Run(run func(ctx context.Context, in *providerv1beta1.UnsetArbitraryMetadataRequest, opts ...grpc.CallOption)) *GatewayAPIClient_UnsetArbitraryMetadata_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.UnsetArbitraryMetadataRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_UnsetArbitraryMetadata_Call) Return(_a0 *providerv1beta1.UnsetArbitraryMetadataResponse, _a1 error) *GatewayAPIClient_UnsetArbitraryMetadata_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_UnsetArbitraryMetadata_Call) RunAndReturn(run func(context.Context, *providerv1beta1.UnsetArbitraryMetadataRequest, ...grpc.CallOption) (*providerv1beta1.UnsetArbitraryMetadataResponse, error)) *GatewayAPIClient_UnsetArbitraryMetadata_Call { + _c.Call.Return(run) + return _c +} + // UpdateOCMCoreShare provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) UpdateOCMCoreShare(ctx context.Context, in *corev1beta1.UpdateOCMCoreShareRequest, opts ...grpc.CallOption) (*corev1beta1.UpdateOCMCoreShareResponse, error) { _va := make([]interface{}, len(opts)) @@ -3014,6 +6671,10 @@ func (_m *GatewayAPIClient) UpdateOCMCoreShare(ctx context.Context, in *corev1be _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UpdateOCMCoreShare") + } + var r0 *corev1beta1.UpdateOCMCoreShareResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *corev1beta1.UpdateOCMCoreShareRequest, ...grpc.CallOption) (*corev1beta1.UpdateOCMCoreShareResponse, error)); ok { @@ -3036,6 +6697,43 @@ func (_m *GatewayAPIClient) UpdateOCMCoreShare(ctx context.Context, in *corev1be return r0, r1 } +// GatewayAPIClient_UpdateOCMCoreShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateOCMCoreShare' +type GatewayAPIClient_UpdateOCMCoreShare_Call struct { + *mock.Call +} + +// UpdateOCMCoreShare is a helper method to define mock.On call +// - ctx context.Context +// - in *corev1beta1.UpdateOCMCoreShareRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) UpdateOCMCoreShare(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_UpdateOCMCoreShare_Call { + return &GatewayAPIClient_UpdateOCMCoreShare_Call{Call: _e.mock.On("UpdateOCMCoreShare", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_UpdateOCMCoreShare_Call) Run(run func(ctx context.Context, in *corev1beta1.UpdateOCMCoreShareRequest, opts ...grpc.CallOption)) *GatewayAPIClient_UpdateOCMCoreShare_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*corev1beta1.UpdateOCMCoreShareRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_UpdateOCMCoreShare_Call) Return(_a0 *corev1beta1.UpdateOCMCoreShareResponse, _a1 error) *GatewayAPIClient_UpdateOCMCoreShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_UpdateOCMCoreShare_Call) RunAndReturn(run func(context.Context, *corev1beta1.UpdateOCMCoreShareRequest, ...grpc.CallOption) (*corev1beta1.UpdateOCMCoreShareResponse, error)) *GatewayAPIClient_UpdateOCMCoreShare_Call { + _c.Call.Return(run) + return _c +} + // UpdateOCMShare provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) UpdateOCMShare(ctx context.Context, in *ocmv1beta1.UpdateOCMShareRequest, opts ...grpc.CallOption) (*ocmv1beta1.UpdateOCMShareResponse, error) { _va := make([]interface{}, len(opts)) @@ -3047,6 +6745,10 @@ func (_m *GatewayAPIClient) UpdateOCMShare(ctx context.Context, in *ocmv1beta1.U _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UpdateOCMShare") + } + var r0 *ocmv1beta1.UpdateOCMShareResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *ocmv1beta1.UpdateOCMShareRequest, ...grpc.CallOption) (*ocmv1beta1.UpdateOCMShareResponse, error)); ok { @@ -3069,6 +6771,43 @@ func (_m *GatewayAPIClient) UpdateOCMShare(ctx context.Context, in *ocmv1beta1.U return r0, r1 } +// GatewayAPIClient_UpdateOCMShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateOCMShare' +type GatewayAPIClient_UpdateOCMShare_Call struct { + *mock.Call +} + +// UpdateOCMShare is a helper method to define mock.On call +// - ctx context.Context +// - in *ocmv1beta1.UpdateOCMShareRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) UpdateOCMShare(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_UpdateOCMShare_Call { + return &GatewayAPIClient_UpdateOCMShare_Call{Call: _e.mock.On("UpdateOCMShare", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_UpdateOCMShare_Call) Run(run func(ctx context.Context, in *ocmv1beta1.UpdateOCMShareRequest, opts ...grpc.CallOption)) *GatewayAPIClient_UpdateOCMShare_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*ocmv1beta1.UpdateOCMShareRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_UpdateOCMShare_Call) Return(_a0 *ocmv1beta1.UpdateOCMShareResponse, _a1 error) *GatewayAPIClient_UpdateOCMShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_UpdateOCMShare_Call) RunAndReturn(run func(context.Context, *ocmv1beta1.UpdateOCMShareRequest, ...grpc.CallOption) (*ocmv1beta1.UpdateOCMShareResponse, error)) *GatewayAPIClient_UpdateOCMShare_Call { + _c.Call.Return(run) + return _c +} + // UpdatePublicShare provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) UpdatePublicShare(ctx context.Context, in *linkv1beta1.UpdatePublicShareRequest, opts ...grpc.CallOption) (*linkv1beta1.UpdatePublicShareResponse, error) { _va := make([]interface{}, len(opts)) @@ -3080,6 +6819,10 @@ func (_m *GatewayAPIClient) UpdatePublicShare(ctx context.Context, in *linkv1bet _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UpdatePublicShare") + } + var r0 *linkv1beta1.UpdatePublicShareResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *linkv1beta1.UpdatePublicShareRequest, ...grpc.CallOption) (*linkv1beta1.UpdatePublicShareResponse, error)); ok { @@ -3102,6 +6845,43 @@ func (_m *GatewayAPIClient) UpdatePublicShare(ctx context.Context, in *linkv1bet return r0, r1 } +// GatewayAPIClient_UpdatePublicShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePublicShare' +type GatewayAPIClient_UpdatePublicShare_Call struct { + *mock.Call +} + +// UpdatePublicShare is a helper method to define mock.On call +// - ctx context.Context +// - in *linkv1beta1.UpdatePublicShareRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) UpdatePublicShare(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_UpdatePublicShare_Call { + return &GatewayAPIClient_UpdatePublicShare_Call{Call: _e.mock.On("UpdatePublicShare", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_UpdatePublicShare_Call) Run(run func(ctx context.Context, in *linkv1beta1.UpdatePublicShareRequest, opts ...grpc.CallOption)) *GatewayAPIClient_UpdatePublicShare_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*linkv1beta1.UpdatePublicShareRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_UpdatePublicShare_Call) Return(_a0 *linkv1beta1.UpdatePublicShareResponse, _a1 error) *GatewayAPIClient_UpdatePublicShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_UpdatePublicShare_Call) RunAndReturn(run func(context.Context, *linkv1beta1.UpdatePublicShareRequest, ...grpc.CallOption) (*linkv1beta1.UpdatePublicShareResponse, error)) *GatewayAPIClient_UpdatePublicShare_Call { + _c.Call.Return(run) + return _c +} + // UpdateReceivedOCMShare provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) UpdateReceivedOCMShare(ctx context.Context, in *ocmv1beta1.UpdateReceivedOCMShareRequest, opts ...grpc.CallOption) (*ocmv1beta1.UpdateReceivedOCMShareResponse, error) { _va := make([]interface{}, len(opts)) @@ -3113,6 +6893,10 @@ func (_m *GatewayAPIClient) UpdateReceivedOCMShare(ctx context.Context, in *ocmv _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UpdateReceivedOCMShare") + } + var r0 *ocmv1beta1.UpdateReceivedOCMShareResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *ocmv1beta1.UpdateReceivedOCMShareRequest, ...grpc.CallOption) (*ocmv1beta1.UpdateReceivedOCMShareResponse, error)); ok { @@ -3135,6 +6919,43 @@ func (_m *GatewayAPIClient) UpdateReceivedOCMShare(ctx context.Context, in *ocmv return r0, r1 } +// GatewayAPIClient_UpdateReceivedOCMShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateReceivedOCMShare' +type GatewayAPIClient_UpdateReceivedOCMShare_Call struct { + *mock.Call +} + +// UpdateReceivedOCMShare is a helper method to define mock.On call +// - ctx context.Context +// - in *ocmv1beta1.UpdateReceivedOCMShareRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) UpdateReceivedOCMShare(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_UpdateReceivedOCMShare_Call { + return &GatewayAPIClient_UpdateReceivedOCMShare_Call{Call: _e.mock.On("UpdateReceivedOCMShare", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_UpdateReceivedOCMShare_Call) Run(run func(ctx context.Context, in *ocmv1beta1.UpdateReceivedOCMShareRequest, opts ...grpc.CallOption)) *GatewayAPIClient_UpdateReceivedOCMShare_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*ocmv1beta1.UpdateReceivedOCMShareRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_UpdateReceivedOCMShare_Call) Return(_a0 *ocmv1beta1.UpdateReceivedOCMShareResponse, _a1 error) *GatewayAPIClient_UpdateReceivedOCMShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_UpdateReceivedOCMShare_Call) RunAndReturn(run func(context.Context, *ocmv1beta1.UpdateReceivedOCMShareRequest, ...grpc.CallOption) (*ocmv1beta1.UpdateReceivedOCMShareResponse, error)) *GatewayAPIClient_UpdateReceivedOCMShare_Call { + _c.Call.Return(run) + return _c +} + // UpdateReceivedShare provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) UpdateReceivedShare(ctx context.Context, in *collaborationv1beta1.UpdateReceivedShareRequest, opts ...grpc.CallOption) (*collaborationv1beta1.UpdateReceivedShareResponse, error) { _va := make([]interface{}, len(opts)) @@ -3146,6 +6967,10 @@ func (_m *GatewayAPIClient) UpdateReceivedShare(ctx context.Context, in *collabo _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UpdateReceivedShare") + } + var r0 *collaborationv1beta1.UpdateReceivedShareResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.UpdateReceivedShareRequest, ...grpc.CallOption) (*collaborationv1beta1.UpdateReceivedShareResponse, error)); ok { @@ -3168,6 +6993,43 @@ func (_m *GatewayAPIClient) UpdateReceivedShare(ctx context.Context, in *collabo return r0, r1 } +// GatewayAPIClient_UpdateReceivedShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateReceivedShare' +type GatewayAPIClient_UpdateReceivedShare_Call struct { + *mock.Call +} + +// UpdateReceivedShare is a helper method to define mock.On call +// - ctx context.Context +// - in *collaborationv1beta1.UpdateReceivedShareRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) UpdateReceivedShare(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_UpdateReceivedShare_Call { + return &GatewayAPIClient_UpdateReceivedShare_Call{Call: _e.mock.On("UpdateReceivedShare", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_UpdateReceivedShare_Call) Run(run func(ctx context.Context, in *collaborationv1beta1.UpdateReceivedShareRequest, opts ...grpc.CallOption)) *GatewayAPIClient_UpdateReceivedShare_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*collaborationv1beta1.UpdateReceivedShareRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_UpdateReceivedShare_Call) Return(_a0 *collaborationv1beta1.UpdateReceivedShareResponse, _a1 error) *GatewayAPIClient_UpdateReceivedShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_UpdateReceivedShare_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.UpdateReceivedShareRequest, ...grpc.CallOption) (*collaborationv1beta1.UpdateReceivedShareResponse, error)) *GatewayAPIClient_UpdateReceivedShare_Call { + _c.Call.Return(run) + return _c +} + // UpdateShare provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) UpdateShare(ctx context.Context, in *collaborationv1beta1.UpdateShareRequest, opts ...grpc.CallOption) (*collaborationv1beta1.UpdateShareResponse, error) { _va := make([]interface{}, len(opts)) @@ -3179,6 +7041,10 @@ func (_m *GatewayAPIClient) UpdateShare(ctx context.Context, in *collaborationv1 _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UpdateShare") + } + var r0 *collaborationv1beta1.UpdateShareResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.UpdateShareRequest, ...grpc.CallOption) (*collaborationv1beta1.UpdateShareResponse, error)); ok { @@ -3201,6 +7067,43 @@ func (_m *GatewayAPIClient) UpdateShare(ctx context.Context, in *collaborationv1 return r0, r1 } +// GatewayAPIClient_UpdateShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateShare' +type GatewayAPIClient_UpdateShare_Call struct { + *mock.Call +} + +// UpdateShare is a helper method to define mock.On call +// - ctx context.Context +// - in *collaborationv1beta1.UpdateShareRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) UpdateShare(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_UpdateShare_Call { + return &GatewayAPIClient_UpdateShare_Call{Call: _e.mock.On("UpdateShare", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_UpdateShare_Call) Run(run func(ctx context.Context, in *collaborationv1beta1.UpdateShareRequest, opts ...grpc.CallOption)) *GatewayAPIClient_UpdateShare_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*collaborationv1beta1.UpdateShareRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_UpdateShare_Call) Return(_a0 *collaborationv1beta1.UpdateShareResponse, _a1 error) *GatewayAPIClient_UpdateShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_UpdateShare_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.UpdateShareRequest, ...grpc.CallOption) (*collaborationv1beta1.UpdateShareResponse, error)) *GatewayAPIClient_UpdateShare_Call { + _c.Call.Return(run) + return _c +} + // UpdateStorageSpace provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) UpdateStorageSpace(ctx context.Context, in *providerv1beta1.UpdateStorageSpaceRequest, opts ...grpc.CallOption) (*providerv1beta1.UpdateStorageSpaceResponse, error) { _va := make([]interface{}, len(opts)) @@ -3212,6 +7115,10 @@ func (_m *GatewayAPIClient) UpdateStorageSpace(ctx context.Context, in *provider _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UpdateStorageSpace") + } + var r0 *providerv1beta1.UpdateStorageSpaceResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.UpdateStorageSpaceRequest, ...grpc.CallOption) (*providerv1beta1.UpdateStorageSpaceResponse, error)); ok { @@ -3234,6 +7141,43 @@ func (_m *GatewayAPIClient) UpdateStorageSpace(ctx context.Context, in *provider return r0, r1 } +// GatewayAPIClient_UpdateStorageSpace_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateStorageSpace' +type GatewayAPIClient_UpdateStorageSpace_Call struct { + *mock.Call +} + +// UpdateStorageSpace is a helper method to define mock.On call +// - ctx context.Context +// - in *providerv1beta1.UpdateStorageSpaceRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) UpdateStorageSpace(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_UpdateStorageSpace_Call { + return &GatewayAPIClient_UpdateStorageSpace_Call{Call: _e.mock.On("UpdateStorageSpace", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_UpdateStorageSpace_Call) Run(run func(ctx context.Context, in *providerv1beta1.UpdateStorageSpaceRequest, opts ...grpc.CallOption)) *GatewayAPIClient_UpdateStorageSpace_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*providerv1beta1.UpdateStorageSpaceRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_UpdateStorageSpace_Call) Return(_a0 *providerv1beta1.UpdateStorageSpaceResponse, _a1 error) *GatewayAPIClient_UpdateStorageSpace_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_UpdateStorageSpace_Call) RunAndReturn(run func(context.Context, *providerv1beta1.UpdateStorageSpaceRequest, ...grpc.CallOption) (*providerv1beta1.UpdateStorageSpaceResponse, error)) *GatewayAPIClient_UpdateStorageSpace_Call { + _c.Call.Return(run) + return _c +} + // WhoAmI provides a mock function with given fields: ctx, in, opts func (_m *GatewayAPIClient) WhoAmI(ctx context.Context, in *gatewayv1beta1.WhoAmIRequest, opts ...grpc.CallOption) (*gatewayv1beta1.WhoAmIResponse, error) { _va := make([]interface{}, len(opts)) @@ -3245,6 +7189,10 @@ func (_m *GatewayAPIClient) WhoAmI(ctx context.Context, in *gatewayv1beta1.WhoAm _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for WhoAmI") + } + var r0 *gatewayv1beta1.WhoAmIResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *gatewayv1beta1.WhoAmIRequest, ...grpc.CallOption) (*gatewayv1beta1.WhoAmIResponse, error)); ok { @@ -3267,13 +7215,49 @@ func (_m *GatewayAPIClient) WhoAmI(ctx context.Context, in *gatewayv1beta1.WhoAm return r0, r1 } -type mockConstructorTestingTNewGatewayAPIClient interface { - mock.TestingT - Cleanup(func()) +// GatewayAPIClient_WhoAmI_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WhoAmI' +type GatewayAPIClient_WhoAmI_Call struct { + *mock.Call +} + +// WhoAmI is a helper method to define mock.On call +// - ctx context.Context +// - in *gatewayv1beta1.WhoAmIRequest +// - opts ...grpc.CallOption +func (_e *GatewayAPIClient_Expecter) WhoAmI(ctx interface{}, in interface{}, opts ...interface{}) *GatewayAPIClient_WhoAmI_Call { + return &GatewayAPIClient_WhoAmI_Call{Call: _e.mock.On("WhoAmI", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *GatewayAPIClient_WhoAmI_Call) Run(run func(ctx context.Context, in *gatewayv1beta1.WhoAmIRequest, opts ...grpc.CallOption)) *GatewayAPIClient_WhoAmI_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*gatewayv1beta1.WhoAmIRequest), variadicArgs...) + }) + return _c +} + +func (_c *GatewayAPIClient_WhoAmI_Call) Return(_a0 *gatewayv1beta1.WhoAmIResponse, _a1 error) *GatewayAPIClient_WhoAmI_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayAPIClient_WhoAmI_Call) RunAndReturn(run func(context.Context, *gatewayv1beta1.WhoAmIRequest, ...grpc.CallOption) (*gatewayv1beta1.WhoAmIResponse, error)) *GatewayAPIClient_WhoAmI_Call { + _c.Call.Return(run) + return _c } // NewGatewayAPIClient creates a new instance of GatewayAPIClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewGatewayAPIClient(t mockConstructorTestingTNewGatewayAPIClient) *GatewayAPIClient { +// The first argument is typically a *testing.T value. +func NewGatewayAPIClient(t interface { + mock.TestingT + Cleanup(func()) +}) *GatewayAPIClient { mock := &GatewayAPIClient{} mock.Mock.Test(t) diff --git a/vendor/github.com/kovidgoyal/imaging/README.md b/vendor/github.com/kovidgoyal/imaging/README.md index 7ca37e409..5343a4c1a 100644 --- a/vendor/github.com/kovidgoyal/imaging/README.md +++ b/vendor/github.com/kovidgoyal/imaging/README.md @@ -1,231 +1,231 @@ -# Imaging - -Package imaging provides basic image processing functions (resize, rotate, crop, brightness/contrast adjustments, etc.). - -All the image processing functions provided by the package accept any image type that implements `image.Image` interface -as an input, and return a new image of `*image.NRGBA` type (32bit RGBA colors, non-premultiplied alpha). - -## Installation - - go get -u github.com/kovidgoyal/imaging - -## Documentation - -https://pkg.go.dev/github.com/kovidgoyal/imaging - -## Usage examples - -A few usage examples can be found below. See the documentation for the full list of supported functions. - -### Image resizing - -```go -// Resize srcImage to size = 128x128px using the Lanczos filter. -dstImage128 := imaging.Resize(srcImage, 128, 128, imaging.Lanczos) - -// Resize srcImage to width = 800px preserving the aspect ratio. -dstImage800 := imaging.Resize(srcImage, 800, 0, imaging.Lanczos) - -// Scale down srcImage to fit the 800x600px bounding box. -dstImageFit := imaging.Fit(srcImage, 800, 600, imaging.Lanczos) - -// Resize and crop the srcImage to fill the 100x100px area. -dstImageFill := imaging.Fill(srcImage, 100, 100, imaging.Center, imaging.Lanczos) -``` - -Imaging supports image resizing using various resampling filters. The most notable ones: -- `Lanczos` - A high-quality resampling filter for photographic images yielding sharp results. -- `CatmullRom` - A sharp cubic filter that is faster than Lanczos filter while providing similar results. -- `MitchellNetravali` - A cubic filter that produces smoother results with less ringing artifacts than CatmullRom. -- `Linear` - Bilinear resampling filter, produces smooth output. Faster than cubic filters. -- `Box` - Simple and fast averaging filter appropriate for downscaling. When upscaling it's similar to NearestNeighbor. -- `NearestNeighbor` - Fastest resampling filter, no antialiasing. - -The full list of supported filters: NearestNeighbor, Box, Linear, Hermite, MitchellNetravali, CatmullRom, BSpline, Gaussian, Lanczos, Hann, Hamming, Blackman, Bartlett, Welch, Cosine. Custom filters can be created using ResampleFilter struct. - -**Resampling filters comparison** - -Original image: - -![srcImage](testdata/branches.png) - -The same image resized from 600x400px to 150x100px using different resampling filters. -From faster (lower quality) to slower (higher quality): - -Filter | Resize result ---------------------------|--------------------------------------------- -`imaging.NearestNeighbor` | ![dstImage](testdata/out_resize_nearest.png) -`imaging.Linear` | ![dstImage](testdata/out_resize_linear.png) -`imaging.CatmullRom` | ![dstImage](testdata/out_resize_catrom.png) -`imaging.Lanczos` | ![dstImage](testdata/out_resize_lanczos.png) - - -### Gaussian Blur - -```go -dstImage := imaging.Blur(srcImage, 0.5) -``` - -Sigma parameter allows to control the strength of the blurring effect. - -Original image | Sigma = 0.5 | Sigma = 1.5 ------------------------------------|----------------------------------------|--------------------------------------- -![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_blur_0.5.png) | ![dstImage](testdata/out_blur_1.5.png) - -### Sharpening - -```go -dstImage := imaging.Sharpen(srcImage, 0.5) -``` - -`Sharpen` uses gaussian function internally. Sigma parameter allows to control the strength of the sharpening effect. - -Original image | Sigma = 0.5 | Sigma = 1.5 ------------------------------------|-------------------------------------------|------------------------------------------ -![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_sharpen_0.5.png) | ![dstImage](testdata/out_sharpen_1.5.png) - -### Gamma correction - -```go -dstImage := imaging.AdjustGamma(srcImage, 0.75) -``` - -Original image | Gamma = 0.75 | Gamma = 1.25 ------------------------------------|------------------------------------------|----------------------------------------- -![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_gamma_0.75.png) | ![dstImage](testdata/out_gamma_1.25.png) - -### Contrast adjustment - -```go -dstImage := imaging.AdjustContrast(srcImage, 20) -``` - -Original image | Contrast = 15 | Contrast = -15 ------------------------------------|--------------------------------------------|------------------------------------------- -![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_contrast_p15.png) | ![dstImage](testdata/out_contrast_m15.png) - -### Brightness adjustment - -```go -dstImage := imaging.AdjustBrightness(srcImage, 20) -``` - -Original image | Brightness = 10 | Brightness = -10 ------------------------------------|----------------------------------------------|--------------------------------------------- -![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_brightness_p10.png) | ![dstImage](testdata/out_brightness_m10.png) - -### Saturation adjustment - -```go -dstImage := imaging.AdjustSaturation(srcImage, 20) -``` - -Original image | Saturation = 30 | Saturation = -30 ------------------------------------|----------------------------------------------|--------------------------------------------- -![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_saturation_p30.png) | ![dstImage](testdata/out_saturation_m30.png) - -### Hue adjustment - -```go -dstImage := imaging.AdjustHue(srcImage, 20) -``` - -Original image | Hue = 60 | Hue = -60 ------------------------------------|----------------------------------------------|--------------------------------------------- -![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_hue_p60.png) | ![dstImage](testdata/out_hue_m60.png) - -## FAQ - -### Incorrect image orientation after processing (e.g. an image appears rotated after resizing) - -Most probably, the given image contains the EXIF orientation tag. -The standard `image/*` packages do not support loading and saving -this kind of information. To fix the issue, try opening images with -the `AutoOrientation` decode option. If this option is set to `true`, -the image orientation is changed after decoding, according to the -orientation tag (if present). Here's the example: - -```go -img, err := imaging.Open("test.jpg", imaging.AutoOrientation(true)) -``` - -### What's the difference between `imaging` and `gift` packages? - -[imaging](https://github.com/kovidgoyal/imaging) -is designed to be a lightweight and simple image manipulation package. -It provides basic image processing functions and a few helper functions -such as `Open` and `Save`. It consistently returns *image.NRGBA image -type (8 bits per channel, RGBA). - -[gift](https://github.com/disintegration/gift) -supports more advanced image processing, for example, sRGB/Linear color -space conversions. It also supports different output image types -(e.g. 16 bits per channel) and provides easy-to-use API for chaining -multiple processing steps together. - -## Example code - -```go -package main - -import ( - "image" - "image/color" - "log" - - "github.com/kovidgoyal/imaging" -) - -func main() { - // Open a test image. - src, err := imaging.Open("testdata/flowers.png") - if err != nil { - log.Fatalf("failed to open image: %v", err) - } - - // Crop the original image to 300x300px size using the center anchor. - src = imaging.CropAnchor(src, 300, 300, imaging.Center) - - // Resize the cropped image to width = 200px preserving the aspect ratio. - src = imaging.Resize(src, 200, 0, imaging.Lanczos) - - // Create a blurred version of the image. - img1 := imaging.Blur(src, 5) - - // Create a grayscale version of the image with higher contrast and sharpness. - img2 := imaging.Grayscale(src) - img2 = imaging.AdjustContrast(img2, 20) - img2 = imaging.Sharpen(img2, 2) - - // Create an inverted version of the image. - img3 := imaging.Invert(src) - - // Create an embossed version of the image using a convolution filter. - img4 := imaging.Convolve3x3( - src, - [9]float64{ - -1, -1, 0, - -1, 1, 1, - 0, 1, 1, - }, - nil, - ) - - // Create a new image and paste the four produced images into it. - dst := imaging.New(400, 400, color.NRGBA{0, 0, 0, 0}) - dst = imaging.Paste(dst, img1, image.Pt(0, 0)) - dst = imaging.Paste(dst, img2, image.Pt(0, 200)) - dst = imaging.Paste(dst, img3, image.Pt(200, 0)) - dst = imaging.Paste(dst, img4, image.Pt(200, 200)) - - // Save the resulting image as JPEG. - err = imaging.Save(dst, "testdata/out_example.jpg") - if err != nil { - log.Fatalf("failed to save image: %v", err) - } -} -``` - -Output: - -![dstImage](testdata/out_example.jpg) +# Imaging + +Package imaging provides basic image processing functions (resize, rotate, crop, brightness/contrast adjustments, etc.). + +All the image processing functions provided by the package accept any image type that implements `image.Image` interface +as an input, and return a new image of `*image.NRGBA` type (32bit RGBA colors, non-premultiplied alpha). + +## Installation + + go get -u github.com/kovidgoyal/imaging + +## Documentation + +https://pkg.go.dev/github.com/kovidgoyal/imaging + +## Usage examples + +A few usage examples can be found below. See the documentation for the full list of supported functions. + +### Image resizing + +```go +// Resize srcImage to size = 128x128px using the Lanczos filter. +dstImage128 := imaging.Resize(srcImage, 128, 128, imaging.Lanczos) + +// Resize srcImage to width = 800px preserving the aspect ratio. +dstImage800 := imaging.Resize(srcImage, 800, 0, imaging.Lanczos) + +// Scale down srcImage to fit the 800x600px bounding box. +dstImageFit := imaging.Fit(srcImage, 800, 600, imaging.Lanczos) + +// Resize and crop the srcImage to fill the 100x100px area. +dstImageFill := imaging.Fill(srcImage, 100, 100, imaging.Center, imaging.Lanczos) +``` + +Imaging supports image resizing using various resampling filters. The most notable ones: +- `Lanczos` - A high-quality resampling filter for photographic images yielding sharp results. +- `CatmullRom` - A sharp cubic filter that is faster than Lanczos filter while providing similar results. +- `MitchellNetravali` - A cubic filter that produces smoother results with less ringing artifacts than CatmullRom. +- `Linear` - Bilinear resampling filter, produces smooth output. Faster than cubic filters. +- `Box` - Simple and fast averaging filter appropriate for downscaling. When upscaling it's similar to NearestNeighbor. +- `NearestNeighbor` - Fastest resampling filter, no antialiasing. + +The full list of supported filters: NearestNeighbor, Box, Linear, Hermite, MitchellNetravali, CatmullRom, BSpline, Gaussian, Lanczos, Hann, Hamming, Blackman, Bartlett, Welch, Cosine. Custom filters can be created using ResampleFilter struct. + +**Resampling filters comparison** + +Original image: + +![srcImage](testdata/branches.png) + +The same image resized from 600x400px to 150x100px using different resampling filters. +From faster (lower quality) to slower (higher quality): + +Filter | Resize result +--------------------------|--------------------------------------------- +`imaging.NearestNeighbor` | ![dstImage](testdata/out_resize_nearest.png) +`imaging.Linear` | ![dstImage](testdata/out_resize_linear.png) +`imaging.CatmullRom` | ![dstImage](testdata/out_resize_catrom.png) +`imaging.Lanczos` | ![dstImage](testdata/out_resize_lanczos.png) + + +### Gaussian Blur + +```go +dstImage := imaging.Blur(srcImage, 0.5) +``` + +Sigma parameter allows to control the strength of the blurring effect. + +Original image | Sigma = 0.5 | Sigma = 1.5 +-----------------------------------|----------------------------------------|--------------------------------------- +![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_blur_0.5.png) | ![dstImage](testdata/out_blur_1.5.png) + +### Sharpening + +```go +dstImage := imaging.Sharpen(srcImage, 0.5) +``` + +`Sharpen` uses gaussian function internally. Sigma parameter allows to control the strength of the sharpening effect. + +Original image | Sigma = 0.5 | Sigma = 1.5 +-----------------------------------|-------------------------------------------|------------------------------------------ +![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_sharpen_0.5.png) | ![dstImage](testdata/out_sharpen_1.5.png) + +### Gamma correction + +```go +dstImage := imaging.AdjustGamma(srcImage, 0.75) +``` + +Original image | Gamma = 0.75 | Gamma = 1.25 +-----------------------------------|------------------------------------------|----------------------------------------- +![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_gamma_0.75.png) | ![dstImage](testdata/out_gamma_1.25.png) + +### Contrast adjustment + +```go +dstImage := imaging.AdjustContrast(srcImage, 20) +``` + +Original image | Contrast = 15 | Contrast = -15 +-----------------------------------|--------------------------------------------|------------------------------------------- +![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_contrast_p15.png) | ![dstImage](testdata/out_contrast_m15.png) + +### Brightness adjustment + +```go +dstImage := imaging.AdjustBrightness(srcImage, 20) +``` + +Original image | Brightness = 10 | Brightness = -10 +-----------------------------------|----------------------------------------------|--------------------------------------------- +![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_brightness_p10.png) | ![dstImage](testdata/out_brightness_m10.png) + +### Saturation adjustment + +```go +dstImage := imaging.AdjustSaturation(srcImage, 20) +``` + +Original image | Saturation = 30 | Saturation = -30 +-----------------------------------|----------------------------------------------|--------------------------------------------- +![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_saturation_p30.png) | ![dstImage](testdata/out_saturation_m30.png) + +### Hue adjustment + +```go +dstImage := imaging.AdjustHue(srcImage, 20) +``` + +Original image | Hue = 60 | Hue = -60 +-----------------------------------|----------------------------------------------|--------------------------------------------- +![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_hue_p60.png) | ![dstImage](testdata/out_hue_m60.png) + +## FAQ + +### Incorrect image orientation after processing (e.g. an image appears rotated after resizing) + +Most probably, the given image contains the EXIF orientation tag. +The standard `image/*` packages do not support loading and saving +this kind of information. To fix the issue, try opening images with +the `AutoOrientation` decode option. If this option is set to `true`, +the image orientation is changed after decoding, according to the +orientation tag (if present). Here's the example: + +```go +img, err := imaging.Open("test.jpg", imaging.AutoOrientation(true)) +``` + +### What's the difference between `imaging` and `gift` packages? + +[imaging](https://github.com/kovidgoyal/imaging) +is designed to be a lightweight and simple image manipulation package. +It provides basic image processing functions and a few helper functions +such as `Open` and `Save`. It consistently returns *image.NRGBA image +type (8 bits per channel, RGBA). + +[gift](https://github.com/disintegration/gift) +supports more advanced image processing, for example, sRGB/Linear color +space conversions. It also supports different output image types +(e.g. 16 bits per channel) and provides easy-to-use API for chaining +multiple processing steps together. + +## Example code + +```go +package main + +import ( + "image" + "image/color" + "log" + + "github.com/kovidgoyal/imaging" +) + +func main() { + // Open a test image. + src, err := imaging.Open("testdata/flowers.png") + if err != nil { + log.Fatalf("failed to open image: %v", err) + } + + // Crop the original image to 300x300px size using the center anchor. + src = imaging.CropAnchor(src, 300, 300, imaging.Center) + + // Resize the cropped image to width = 200px preserving the aspect ratio. + src = imaging.Resize(src, 200, 0, imaging.Lanczos) + + // Create a blurred version of the image. + img1 := imaging.Blur(src, 5) + + // Create a grayscale version of the image with higher contrast and sharpness. + img2 := imaging.Grayscale(src) + img2 = imaging.AdjustContrast(img2, 20) + img2 = imaging.Sharpen(img2, 2) + + // Create an inverted version of the image. + img3 := imaging.Invert(src) + + // Create an embossed version of the image using a convolution filter. + img4 := imaging.Convolve3x3( + src, + [9]float64{ + -1, -1, 0, + -1, 1, 1, + 0, 1, 1, + }, + nil, + ) + + // Create a new image and paste the four produced images into it. + dst := imaging.New(400, 400, color.NRGBA{0, 0, 0, 0}) + dst = imaging.Paste(dst, img1, image.Pt(0, 0)) + dst = imaging.Paste(dst, img2, image.Pt(0, 200)) + dst = imaging.Paste(dst, img3, image.Pt(200, 0)) + dst = imaging.Paste(dst, img4, image.Pt(200, 200)) + + // Save the resulting image as JPEG. + err = imaging.Save(dst, "testdata/out_example.jpg") + if err != nil { + log.Fatalf("failed to save image: %v", err) + } +} +``` + +Output: + +![dstImage](testdata/out_example.jpg) diff --git a/vendor/modules.txt b/vendor/modules.txt index 53edcd3f5..f266b335a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -359,7 +359,7 @@ github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1 github.com/cs3org/go-cs3apis/cs3/storage/registry/v1beta1 github.com/cs3org/go-cs3apis/cs3/tx/v1beta1 github.com/cs3org/go-cs3apis/cs3/types/v1beta1 -# github.com/cs3org/reva/v2 v2.19.5 +# github.com/cs3org/reva/v2 v2.19.6 ## explicit; go 1.21 github.com/cs3org/reva/v2/cmd/revad/internal/grace github.com/cs3org/reva/v2/cmd/revad/runtime From be983bb96bfe5bdbce6271513dc5f7df7b06dc09 Mon Sep 17 00:00:00 2001 From: jkoberg Date: Wed, 24 Apr 2024 11:48:33 +0200 Subject: [PATCH 10/19] feat(storage-users): add scandata to upload command Signed-off-by: jkoberg --- services/antivirus/pkg/service/service.go | 3 +-- services/storage-users/pkg/command/uploads.go | 10 +++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/services/antivirus/pkg/service/service.go b/services/antivirus/pkg/service/service.go index 21ab9a774..a1d41c651 100644 --- a/services/antivirus/pkg/service/service.go +++ b/services/antivirus/pkg/service/service.go @@ -146,7 +146,7 @@ func (av Antivirus) processEvent(e events.Event, s events.Publisher) error { } if av.c.DebugScanOutcome != "" { - av.l.Warn().Str("antivir, clamav", ">>>>>>> ANTIVIRUS_DEBUG_SCAN_OUTCOME IS SET NO ACTUAL VIRUS SCAN IS PERFORMED!") + av.l.Warn().Str("antivir, clamav", ">>>>>>> ANTIVIRUS_DEBUG_SCAN_OUTCOME IS SET NO ACTUAL VIRUS SCAN IS PERFORMED!").Send() if err := events.Publish(ctx, s, events.PostprocessingStepFinished{ FinishedStep: events.PPStepAntivirus, Outcome: events.PostprocessingOutcome(av.c.DebugScanOutcome), @@ -158,7 +158,6 @@ func (av Antivirus) processEvent(e events.Event, s events.Publisher) error { Description: "DEBUG: forced outcome", Scandate: time.Now(), ResourceID: ev.ResourceID, - ErrorMsg: "DEBUG: forced outcome", }, }); err != nil { av.l.Fatal().Err(err).Str("uploadid", ev.UploadID).Interface("resourceID", ev.ResourceID).Msg("cannot publish events - exiting") diff --git a/services/storage-users/pkg/command/uploads.go b/services/storage-users/pkg/command/uploads.go index e5ae4f256..433773637 100644 --- a/services/storage-users/pkg/command/uploads.go +++ b/services/storage-users/pkg/command/uploads.go @@ -191,6 +191,7 @@ func ListUploadSessions(cfg *config.Config) *cli.Command { if c.Bool("json") { for _, u := range uploads { ref := u.Reference() + sr, sd := u.ScanData() s := struct { ID string `json:"id"` Space string `json:"space"` @@ -201,6 +202,8 @@ func ListUploadSessions(cfg *config.Config) *cli.Command { SpaceOwner *userpb.UserId `json:"spaceowner,omitempty"` Expires time.Time `json:"expires"` Processing bool `json:"processing"` + ScanDate time.Time `json:"virus_scan_date"` + ScanResult string `json:"virus_scan_result"` }{ Space: ref.GetResourceId().GetSpaceId(), ID: u.ID(), @@ -211,6 +214,8 @@ func ListUploadSessions(cfg *config.Config) *cli.Command { SpaceOwner: u.SpaceOwner(), Expires: u.Expires(), Processing: u.IsProcessing(), + ScanDate: sd, + ScanResult: sr, } j, err := json.Marshal(s) if err != nil { @@ -236,10 +241,11 @@ func ListUploadSessions(cfg *config.Config) *cli.Command { // start a table table = tw.NewWriter(os.Stdout) - table.SetHeader([]string{"Space", "Upload Id", "Name", "Offset", "Size", "Executant", "Owner", "Expires", "Processing"}) + table.SetHeader([]string{"Space", "Upload Id", "Name", "Offset", "Size", "Executant", "Owner", "Expires", "Processing", "Scan Date", "Scan Result"}) table.SetAutoFormatHeaders(false) for _, u := range uploads { + sr, sd := u.ScanData() table.Append([]string{ u.Reference().ResourceId.GetSpaceId(), u.ID(), @@ -250,6 +256,8 @@ func ListUploadSessions(cfg *config.Config) *cli.Command { u.SpaceOwner().GetOpaqueId(), u.Expires().Format(time.RFC3339), strconv.FormatBool(u.IsProcessing()), + sd.Format(time.RFC3339), + sr, }) if c.Bool("restart") { From caa83ab952b5d4694282536dd7694184276d0c6f Mon Sep 17 00:00:00 2001 From: jkoberg Date: Wed, 24 Apr 2024 11:56:30 +0200 Subject: [PATCH 11/19] feat(postprocessing): dont retry finished uploads Signed-off-by: jkoberg --- .../pkg/postprocessing/postprocessing.go | 1 + services/postprocessing/pkg/service/service.go | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/services/postprocessing/pkg/postprocessing/postprocessing.go b/services/postprocessing/pkg/postprocessing/postprocessing.go index 40b94d56f..d1efcc2bb 100644 --- a/services/postprocessing/pkg/postprocessing/postprocessing.go +++ b/services/postprocessing/pkg/postprocessing/postprocessing.go @@ -21,6 +21,7 @@ type Postprocessing struct { Steps []events.Postprocessingstep Status Status Failures int + Finished bool config config.Postprocessing } diff --git a/services/postprocessing/pkg/service/service.go b/services/postprocessing/pkg/service/service.go index 70e1221a5..4b38e6f3f 100644 --- a/services/postprocessing/pkg/service/service.go +++ b/services/postprocessing/pkg/service/service.go @@ -148,8 +148,14 @@ func (pps *PostprocessingService) processEvent(e events.Event) error { next = pp.Delay() case events.UploadReady: if ev.Failed { - // the upload failed - let's keep it around for a while - return nil + // the upload failed - let's keep it around for a while - but mark it as finished + pp, err = pps.getPP(pps.store, ev.UploadID) + if err != nil { + pps.log.Error().Str("uploadID", ev.UploadID).Err(err).Msg("cannot get upload") + return fmt.Errorf("%w: cannot get upload", ErrEvent) + } + pp.Finished = true + return storePP(pps.store, pp) } // the storage provider thinks the upload is done - so no need to keep it any more @@ -256,6 +262,11 @@ func (pps *PostprocessingService) resumePP(ctx context.Context, uploadID string) return fmt.Errorf("cannot get upload: %w", err) } + if pp.Finished { + // dont retry finished uploads + return nil + } + return events.Publish(ctx, pps.pub, pp.CurrentStep()) } From ce92021fead9de32a3d1c9084b9bd6f8e31dc938 Mon Sep 17 00:00:00 2001 From: jkoberg Date: Wed, 24 Apr 2024 15:42:41 +0200 Subject: [PATCH 12/19] fix(clientlog): dont send sse when upload failed Signed-off-by: jkoberg --- services/clientlog/pkg/service/service.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/clientlog/pkg/service/service.go b/services/clientlog/pkg/service/service.go index f905c8984..7e16acce1 100644 --- a/services/clientlog/pkg/service/service.go +++ b/services/clientlog/pkg/service/service.go @@ -97,6 +97,11 @@ func (cl *ClientlogService) processEvent(event events.Event) { default: err = errors.New("unhandled event") case events.UploadReady: + if e.Failed { + // we don't inform about failed uploads yet + return + } + info, err := utils.GetResource(ctx, e.FileRef, gwc) if err != nil { cl.log.Error().Err(err).Interface("event", event).Msg("error getting resource") From df545583d18cb67329c64b3a7b8c9fbde6cd3bbd Mon Sep 17 00:00:00 2001 From: jkoberg Date: Mon, 29 Apr 2024 16:51:27 +0200 Subject: [PATCH 13/19] feat(changelog): add changelog Signed-off-by: jkoberg --- changelog/unreleased/bump-reva.md | 11 +++++++++++ changelog/unreleased/rework-virus-handling.md | 5 +++++ 2 files changed, 16 insertions(+) create mode 100644 changelog/unreleased/bump-reva.md create mode 100644 changelog/unreleased/rework-virus-handling.md diff --git a/changelog/unreleased/bump-reva.md b/changelog/unreleased/bump-reva.md new file mode 100644 index 000000000..765ed26ab --- /dev/null +++ b/changelog/unreleased/bump-reva.md @@ -0,0 +1,11 @@ +Bugfix: Update reva to v2.19.5 + +We updated reva to v2.19.5 + +* Bugfix [cs3org/reva#4654](https://github.com/cs3org/reva/pull/4654): Write blob based on session id +* Bugfix [cs3org/reva#4666](https://github.com/cs3org/reva/pull/4666): Fix uploading via a public link +* Bugfix [cs3org/reva#4665](https://github.com/cs3org/reva/pull/4665): Fix creating documents in nested folders of public shares +* Enhancement [cs3org/reva#4655](https://github.com/cs3org/reva/pull/4655): Bump mockery to v2.40.2 +* Enhancement [cs3org/reva#4664](https://github.com/cs3org/reva/pull/4664): Add ScanData to Uploadsession + +https://github.com/owncloud/ocis/pull/9011 diff --git a/changelog/unreleased/rework-virus-handling.md b/changelog/unreleased/rework-virus-handling.md new file mode 100644 index 000000000..270fe8987 --- /dev/null +++ b/changelog/unreleased/rework-virus-handling.md @@ -0,0 +1,5 @@ +Enhancement: Improve infected file handling + +Reworks virus handling.Shows scandate and outcome on ocis storage-users uploads sessions. Avoids retrying infected files on ocis postprocessing restart. + +https://github.com/owncloud/ocis/pull/9011 From 62b7f4502604cf7477fc44308b611bdc5a5dc394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Mon, 29 Apr 2024 17:08:21 +0200 Subject: [PATCH 14/19] Update changelog/unreleased/rework-virus-handling.md --- changelog/unreleased/rework-virus-handling.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog/unreleased/rework-virus-handling.md b/changelog/unreleased/rework-virus-handling.md index 270fe8987..ce4246d74 100644 --- a/changelog/unreleased/rework-virus-handling.md +++ b/changelog/unreleased/rework-virus-handling.md @@ -1,5 +1,5 @@ Enhancement: Improve infected file handling -Reworks virus handling.Shows scandate and outcome on ocis storage-users uploads sessions. Avoids retrying infected files on ocis postprocessing restart. +Reworks virus handling. Shows scandate and outcome on ocis storage-users uploads sessions. Avoids retrying infected files on ocis postprocessing restart. https://github.com/owncloud/ocis/pull/9011 From c75d47a75d1e69517d62a307c8c92797090f4c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Mon, 29 Apr 2024 17:09:35 +0200 Subject: [PATCH 15/19] Update changelog/unreleased/rework-virus-handling.md Co-authored-by: Michael Barz --- changelog/unreleased/rework-virus-handling.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog/unreleased/rework-virus-handling.md b/changelog/unreleased/rework-virus-handling.md index ce4246d74..4baade52f 100644 --- a/changelog/unreleased/rework-virus-handling.md +++ b/changelog/unreleased/rework-virus-handling.md @@ -1,4 +1,4 @@ -Enhancement: Improve infected file handling +Bugfix: Fix infected file handling Reworks virus handling. Shows scandate and outcome on ocis storage-users uploads sessions. Avoids retrying infected files on ocis postprocessing restart. From af437186fc424e746dc723daf6acc18ee5c58504 Mon Sep 17 00:00:00 2001 From: kobergj Date: Tue, 30 Apr 2024 07:24:15 +0000 Subject: [PATCH 16/19] Automated changelog update [skip ci] --- CHANGELOG.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99887dbc4..aec4ea48b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,8 @@ The following sections list the changes for unreleased. * Bugfix - Update the admin user role assignment to enforce the config: [#8918](https://github.com/owncloud/ocis/pull/8918) * Bugfix - Crash when processing crafted TIFF files: [#8981](https://github.com/owncloud/ocis/pull/8981) +* Bugfix - Update reva to v2.19.5: [#9011](https://github.com/owncloud/ocis/pull/9011) +* Bugfix - Fix infected file handling: [#9011](https://github.com/owncloud/ocis/pull/9011) ## Details @@ -67,6 +69,25 @@ The following sections list the changes for unreleased. https://github.com/owncloud/ocis/pull/8981 https://github.com/advisories/GHSA-q7pp-wcgr-pffx +* Bugfix - Update reva to v2.19.5: [#9011](https://github.com/owncloud/ocis/pull/9011) + + We updated reva to v2.19.5 + + * Bugfix [cs3org/reva#4654](https://github.com/cs3org/reva/pull/4654): Write blob based on session id + * Bugfix [cs3org/reva#4666](https://github.com/cs3org/reva/pull/4666): Fix uploading via a public link + * Bugfix [cs3org/reva#4665](https://github.com/cs3org/reva/pull/4665): Fix creating documents in nested folders of public shares + * Enhancement [cs3org/reva#4655](https://github.com/cs3org/reva/pull/4655): Bump mockery to v2.40.2 + * Enhancement [cs3org/reva#4664](https://github.com/cs3org/reva/pull/4664): Add ScanData to Uploadsession + + https://github.com/owncloud/ocis/pull/9011 + +* Bugfix - Fix infected file handling: [#9011](https://github.com/owncloud/ocis/pull/9011) + + Reworks virus handling. Shows scandate and outcome on ocis storage-users uploads + sessions. Avoids retrying infected files on ocis postprocessing restart. + + https://github.com/owncloud/ocis/pull/9011 + # Changelog for [5.0.2] (2024-04-17) The following sections list the changes for 5.0.2. From 7992a495ebd8e29722d4ac095b181c4d71da9066 Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Thu, 2 May 2024 17:10:57 +0200 Subject: [PATCH 17/19] chore: bump version, prepare changelog --- changelog/{unreleased => 5.0.3_2024-05-02}/CVE-2023-36308.md | 0 changelog/{unreleased => 5.0.3_2024-05-02}/bump-reva.md | 0 .../fix-admin-role-assignment.md | 0 .../{unreleased => 5.0.3_2024-05-02}/rework-virus-handling.md | 0 .../continuous-deployment-config/ocis_keycloak/released.yml | 2 +- deployments/continuous-deployment-config/ocis_ldap/released.yml | 2 +- .../continuous-deployment-config/ocis_traefik/released.yml | 2 +- deployments/continuous-deployment-config/ocis_wopi/released.yml | 2 +- ocis-pkg/version/version.go | 2 +- sonar-project.properties | 2 +- 10 files changed, 6 insertions(+), 6 deletions(-) rename changelog/{unreleased => 5.0.3_2024-05-02}/CVE-2023-36308.md (100%) rename changelog/{unreleased => 5.0.3_2024-05-02}/bump-reva.md (100%) rename changelog/{unreleased => 5.0.3_2024-05-02}/fix-admin-role-assignment.md (100%) rename changelog/{unreleased => 5.0.3_2024-05-02}/rework-virus-handling.md (100%) diff --git a/changelog/unreleased/CVE-2023-36308.md b/changelog/5.0.3_2024-05-02/CVE-2023-36308.md similarity index 100% rename from changelog/unreleased/CVE-2023-36308.md rename to changelog/5.0.3_2024-05-02/CVE-2023-36308.md diff --git a/changelog/unreleased/bump-reva.md b/changelog/5.0.3_2024-05-02/bump-reva.md similarity index 100% rename from changelog/unreleased/bump-reva.md rename to changelog/5.0.3_2024-05-02/bump-reva.md diff --git a/changelog/unreleased/fix-admin-role-assignment.md b/changelog/5.0.3_2024-05-02/fix-admin-role-assignment.md similarity index 100% rename from changelog/unreleased/fix-admin-role-assignment.md rename to changelog/5.0.3_2024-05-02/fix-admin-role-assignment.md diff --git a/changelog/unreleased/rework-virus-handling.md b/changelog/5.0.3_2024-05-02/rework-virus-handling.md similarity index 100% rename from changelog/unreleased/rework-virus-handling.md rename to changelog/5.0.3_2024-05-02/rework-virus-handling.md diff --git a/deployments/continuous-deployment-config/ocis_keycloak/released.yml b/deployments/continuous-deployment-config/ocis_keycloak/released.yml index 681878121..f614eefb2 100644 --- a/deployments/continuous-deployment-config/ocis_keycloak/released.yml +++ b/deployments/continuous-deployment-config/ocis_keycloak/released.yml @@ -32,7 +32,7 @@ env: INSECURE: "false" TRAEFIK_ACME_MAIL: mbarz@owncloud.com - OCIS_DOCKER_TAG: 5.0.1 + OCIS_DOCKER_TAG: 5.0.3 OCIS_DOMAIN: ocis.ocis-keycloak.released.owncloud.works KEYCLOAK_DOMAIN: keycloak.ocis-keycloak.released.owncloud.works COMPOSE_FILE: docker-compose.yml:monitoring_tracing/docker-compose-additions.yml diff --git a/deployments/continuous-deployment-config/ocis_ldap/released.yml b/deployments/continuous-deployment-config/ocis_ldap/released.yml index 1936bf758..e7883b9f5 100644 --- a/deployments/continuous-deployment-config/ocis_ldap/released.yml +++ b/deployments/continuous-deployment-config/ocis_ldap/released.yml @@ -32,7 +32,7 @@ env: INSECURE: "false" TRAEFIK_ACME_MAIL: mbarz@owncloud.com - OCIS_DOCKER_TAG: 5.0.1 + OCIS_DOCKER_TAG: 5.0.3 OCIS_DOMAIN: ocis.ocis-ldap.released.owncloud.works LDAP_MANAGER_DOMAIN: ldap.ocis-ldap.released.owncloud.works COMPOSE_FILE: docker-compose.yml:monitoring_tracing/docker-compose-additions.yml diff --git a/deployments/continuous-deployment-config/ocis_traefik/released.yml b/deployments/continuous-deployment-config/ocis_traefik/released.yml index 1345b85f1..76767fabb 100644 --- a/deployments/continuous-deployment-config/ocis_traefik/released.yml +++ b/deployments/continuous-deployment-config/ocis_traefik/released.yml @@ -32,7 +32,7 @@ env: INSECURE: "false" TRAEFIK_ACME_MAIL: mbarz@owncloud.com - OCIS_DOCKER_TAG: 5.0.1 + OCIS_DOCKER_TAG: 5.0.3 OCIS_DOMAIN: ocis.ocis-traefik.released.owncloud.works DEMO_USERS: "true" INBUCKET_DOMAIN: mail.ocis-traefik.released.owncloud.works diff --git a/deployments/continuous-deployment-config/ocis_wopi/released.yml b/deployments/continuous-deployment-config/ocis_wopi/released.yml index f7bfd9e0c..7eab00c53 100644 --- a/deployments/continuous-deployment-config/ocis_wopi/released.yml +++ b/deployments/continuous-deployment-config/ocis_wopi/released.yml @@ -32,7 +32,7 @@ env: INSECURE: "false" TRAEFIK_ACME_MAIL: mbarz@owncloud.com - OCIS_DOCKER_TAG: 5.0.2-rc.1 + OCIS_DOCKER_TAG: 5.0.3 OCIS_DOMAIN: ocis.ocis-wopi.released.owncloud.works COMPANION_DOMAIN: companion.ocis-wopi.released.owncloud.works COMPANION_IMAGE: owncloud/uppy-companion:3.12.13-owncloud diff --git a/ocis-pkg/version/version.go b/ocis-pkg/version/version.go index 43c7413e7..fe0b93a81 100644 --- a/ocis-pkg/version/version.go +++ b/ocis-pkg/version/version.go @@ -16,7 +16,7 @@ var ( // LatestTag is the latest released version plus the dev meta version. // Will be overwritten by the release pipeline // Needs a manual change for every tagged release - LatestTag = "5.0.2+dev" + LatestTag = "5.0.3+dev" // Date indicates the build date. // This has been removed, it looks like you can only replace static strings with recent go versions diff --git a/sonar-project.properties b/sonar-project.properties index 84ce284c0..db4ccc93f 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -2,7 +2,7 @@ sonar.projectKey=owncloud_ocis sonar.organization=owncloud-1 sonar.projectName=ocis -sonar.projectVersion=5.0.1 +sonar.projectVersion=5.0.3 sonar.host.url=https://sonarcloud.io # ===================================================== From d72e21bf2bd2c637da75fac74b2728ea3d921dec Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Thu, 2 May 2024 17:51:46 +0000 Subject: [PATCH 18/19] Automated changelog update [skip ci] --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aec4ea48b..e1009e963 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Table of Contents -* [Changelog for unreleased](#changelog-for-unreleased-unreleased) +* [Changelog for 5.0.3](#changelog-for-503-2024-05-02) * [Changelog for 5.0.2](#changelog-for-502-2024-04-17) * [Changelog for 5.0.1](#changelog-for-501-2024-04-10) * [Changelog for 5.0.0](#changelog-for-500-2024-03-18) @@ -36,11 +36,11 @@ * [Changelog for 1.1.0](#changelog-for-110-2021-01-22) * [Changelog for 1.0.0](#changelog-for-100-2020-12-17) -# Changelog for [unreleased] (UNRELEASED) +# Changelog for [5.0.3] (2024-05-02) -The following sections list the changes for unreleased. +The following sections list the changes for 5.0.3. -[unreleased]: https://github.com/owncloud/ocis/compare/v5.0.2...master +[5.0.3]: https://github.com/owncloud/ocis/compare/v5.0.2...v5.0.3 ## Summary From 743b10c323cd0e09486f689c982f97d1ee3b5cdf Mon Sep 17 00:00:00 2001 From: Prajwol Amatya Date: Thu, 2 May 2024 12:56:27 +0545 Subject: [PATCH 19/19] make return type similar --- .drone.star | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/.drone.star b/.drone.star index 5298ae3c2..095c7628e 100644 --- a/.drone.star +++ b/.drone.star @@ -238,18 +238,17 @@ def main(ctx): pipelines = [] - build_release_helpers = [ - changelog(), - docs(), - licenseCheck(ctx), - ] + build_release_helpers = \ + changelog() + \ + docs() + \ + licenseCheck(ctx) test_pipelines = \ codestyle(ctx) + \ checkTestSuitesInExpectedFailures(ctx) + \ buildWebCache(ctx) + \ getGoBinForTesting(ctx) + \ - [buildOcisBinaryForTesting(ctx)] + \ + buildOcisBinaryForTesting(ctx) + \ checkStarlark() + \ build_release_helpers + \ testOcisAndUploadResults(ctx) + \ @@ -543,7 +542,7 @@ def scanOcis(ctx): } def buildOcisBinaryForTesting(ctx): - return { + return [{ "kind": "pipeline", "type": "docker", "name": "build_ocis_binary_for_testing", @@ -563,7 +562,7 @@ def buildOcisBinaryForTesting(ctx): ], }, "volumes": [pipelineVolumeGo], - } + }] def uploadScanResults(ctx): sonar_env = { @@ -817,7 +816,7 @@ def localApiTestPipeline(ctx): localApiTests(suite, storage, params["extraEnvironment"]) + logRequests(), "services": emailService() if params["emailNeeded"] else [] + clamavService() if params["antivirusNeeded"] else [], - "depends_on": getPipelineNames([buildOcisBinaryForTesting(ctx)]), + "depends_on": getPipelineNames(buildOcisBinaryForTesting(ctx)), "trigger": { "ref": [ "refs/heads/stable-*", @@ -877,7 +876,7 @@ def cs3ApiTests(ctx, storage, accounts_hash_difficulty = 4): ], }, ], - "depends_on": getPipelineNames([buildOcisBinaryForTesting(ctx)]), + "depends_on": getPipelineNames(buildOcisBinaryForTesting(ctx)), "trigger": { "ref": [ "refs/heads/stable-*", @@ -984,7 +983,7 @@ def wopiValidatorTests(ctx, storage, accounts_hash_difficulty = 4): }, ] + validatorTests, - "depends_on": getPipelineNames([buildOcisBinaryForTesting(ctx)]), + "depends_on": getPipelineNames(buildOcisBinaryForTesting(ctx)), "trigger": { "ref": [ "refs/heads/stable-*", @@ -1033,7 +1032,7 @@ def coreApiTests(ctx, part_number = 1, number_of_parts = 1, storage = "ocis", ac ] + logRequests(), "services": redisForOCStorage(storage), - "depends_on": getPipelineNames([buildOcisBinaryForTesting(ctx)]), + "depends_on": getPipelineNames(buildOcisBinaryForTesting(ctx)), "trigger": { "ref": [ "refs/heads/stable-*", @@ -1157,7 +1156,7 @@ def uiTestPipeline(ctx, filterTags, runPart = 1, numberOfParts = 1, storage = "o "name": "uploads", "temp": {}, }], - "depends_on": getPipelineNames([buildOcisBinaryForTesting(ctx)] + buildWebCache(ctx)), + "depends_on": getPipelineNames(buildOcisBinaryForTesting(ctx) + buildWebCache(ctx)), "trigger": { "ref": [ "refs/heads/stable-*", @@ -1242,7 +1241,7 @@ def e2eTests(ctx): "type": "docker", "name": "e2e-tests-%s" % name, "steps": steps, - "depends_on": getPipelineNames([buildOcisBinaryForTesting(ctx)] + buildWebCache(ctx)), + "depends_on": getPipelineNames(buildOcisBinaryForTesting(ctx) + buildWebCache(ctx)), "trigger": e2e_trigger, "volumes": e2e_volumes, }) @@ -1564,7 +1563,7 @@ def licenseCheck(ctx): "target": target, } - return { + return [{ "kind": "pipeline", "type": "docker", "name": "check-licenses", @@ -1664,7 +1663,7 @@ def licenseCheck(ctx): ], }, "volumes": [pipelineVolumeGo], - } + }] def releaseDockerManifest(): return { @@ -1700,7 +1699,7 @@ def releaseDockerManifest(): } def changelog(): - return { + return [{ "kind": "pipeline", "type": "docker", "name": "changelog", @@ -1766,7 +1765,7 @@ def changelog(): "refs/pull/**", ], }, - } + }] def releaseDockerReadme(ctx): return { @@ -1802,7 +1801,7 @@ def releaseDockerReadme(ctx): } def docs(): - return { + return [{ "kind": "pipeline", "type": "docker", "name": "docs", @@ -1871,7 +1870,7 @@ def docs(): "refs/pull/**", ], }, - } + }] def makeNodeGenerate(module): if module == "": @@ -2582,7 +2581,7 @@ def litmus(ctx, storage): }, ], "services": redisForOCStorage(storage), - "depends_on": getPipelineNames([buildOcisBinaryForTesting(ctx)]), + "depends_on": getPipelineNames(buildOcisBinaryForTesting(ctx)), "trigger": { "ref": [ "refs/heads/stable-*",