From e3c48f164aaf77065cef3bc229f9812e7f956c6c Mon Sep 17 00:00:00 2001 From: jkoberg Date: Mon, 29 Apr 2024 16:01:06 +0200 Subject: [PATCH 1/7] 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 | 4030 ++++++++++++++++- .../github.com/kovidgoyal/imaging/README.md | 462 +- vendor/modules.txt | 2 +- 23 files changed, 4676 insertions(+), 305 deletions(-) diff --git a/go.mod b/go.mod index 70d70803951..a2e23397686 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 2414ba7c7e0..2e9d44a20f0 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 5cb6183c618..353b2c6762f 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 bd5831d4ebe..c22651978a7 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 edca2554e56..33f533e2cf5 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 f3aa081d768..14660e480d9 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 34644a1a8f2..8e2b45254f3 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 bf6eeb70c3e..b157133cac9 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 aa8385f6626..a2379f5ae09 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 87d26115bf2..f6ef9ad2d72 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 35cc29663fc..dc8dd0f3d13 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 f201722da69..db22961fd29 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 7de6144d30d..75e8e73c609 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 6fc5176af31..1d119bd1b36 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 f438d684f9a..279dfd71383 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 57a7aea8f4b..aeab235de17 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 2f2713b4544..e0fa977495f 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 a3a7ace296b..6d463eaf79f 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 24e74f4a9f0..5757674dee7 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 acb68733822..93cc14d3770 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 a256382a158..b2fa6783f4c 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,9 +1517,46 @@ func (_m *GatewayAPIClient) FindGroups(ctx context.Context, in *groupv1beta1.Fin return r0, r1 } -// 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)) +// 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)) for _i := range opts { _va[_i] = opts[_i] } @@ -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,17 +2923,58 @@ func (_m *GatewayAPIClient) GetPublicShare(ctx context.Context, in *linkv1beta1. return r0, r1 } -// 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)) - for _i := range opts { - _va[_i] = opts[_i] - } +// 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)) + for _i := range opts { + _va[_i] = opts[_i] + } var _ca []interface{} _ca = append(_ca, ctx, in) _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,9 +4329,46 @@ func (_m *GatewayAPIClient) ListContainer(ctx context.Context, in *providerv1bet return r0, r1 } -// 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)) +// 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)) for _i := range opts { _va[_i] = opts[_i] } @@ -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 { @@ -2631,13 +5800,50 @@ func (_m *GatewayAPIClient) RemoveShare(ctx context.Context, in *collaborationv1 } } - if rf, ok := ret.Get(1).(func(context.Context, *collaborationv1beta1.RemoveShareRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } + if rf, ok := ret.Get(1).(func(context.Context, *collaborationv1beta1.RemoveShareRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + 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 +} - return r0, r1 +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 @@ -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 7ca37e40907..5343a4c1aea 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 53edcd3f5d2..f266b335a94 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 2/7] 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 21ab9a77454..a1d41c651c9 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 e5ae4f25613..433773637c2 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 3/7] 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 40b94d56f82..d1efcc2bbaf 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 70e1221a572..4b38e6f3fca 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 4/7] 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 f905c8984c0..7e16acce191 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 5/7] 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 00000000000..765ed26abf7 --- /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 00000000000..270fe89872f --- /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 6/7] 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 270fe89872f..ce4246d743b 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 7/7] 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 ce4246d743b..4baade52f3e 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.