From 4f6f14d5b7a9839988020bf6b5f09d9cce918716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Fri, 5 Apr 2024 17:32:39 +0200 Subject: [PATCH] bump mockery, switch to .mockery.yaml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- .bingo/Variables.mk | 8 +- .bingo/go.mod | 4 +- .bingo/mockery.mod | 4 +- .bingo/mockery.sum | 18 + .bingo/variables.env | 4 +- .mockery.yaml | 41 + Makefile | 3 +- changelog/unreleased/bump-mockery.md | 5 + .../manager/owncloudsql/conversions.go | 2 - .../owncloudsql/mocks/UserConverter.go | 83 +- pkg/share/manager/owncloudsql/conversions.go | 2 - .../owncloudsql/mocks/UserConverter.go | 115 +- pkg/share/mocks/Manager.go | 288 +- pkg/share/share.go | 2 - pkg/storage/fs/posix/tree/mocks/Blobstore.go | 114 +- pkg/storage/fs/posix/tree/tree.go | 2 - .../spaces/mocks/StorageProviderClient.go | 58 +- pkg/storage/registry/spaces/spaces.go | 2 - .../utils/decomposedfs/node/mocks/Tree.go | 451 +- pkg/storage/utils/decomposedfs/node/node.go | 2 - .../permissions/mocks/CS3PermissionsClient.go | 58 +- .../permissions/mocks/PermissionsChecker.go | 83 +- .../permissions/spacepermissions.go | 3 - .../decomposedfs/tree/mocks/Blobstore.go | 114 +- pkg/storage/utils/decomposedfs/tree/tree.go | 2 - pkg/storage/utils/indexer/indexer.go | 2 - pkg/storage/utils/indexer/mocks/Indexer.go | 159 +- pkg/storage/utils/metadata/mocks/Storage.go | 446 +- pkg/storage/utils/metadata/storage.go | 2 - tests/cs3mocks/cs3.go | 3 - .../cs3mocks/mocks/CollaborationAPIClient.go | 345 +- tests/cs3mocks/mocks/GatewayAPIClient.go | 4030 ++++++++++++++++- 32 files changed, 6335 insertions(+), 120 deletions(-) create mode 100644 .mockery.yaml create mode 100644 changelog/unreleased/bump-mockery.md diff --git a/.bingo/Variables.mk b/.bingo/Variables.mk index ced2dc55c6..0428e894bc 100644 --- a/.bingo/Variables.mk +++ b/.bingo/Variables.mk @@ -1,4 +1,4 @@ -# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.8. DO NOT EDIT. +# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.9. DO NOT EDIT. # All tools are designed to be build inside $GOBIN. BINGO_DIR := $(dir $(lastword $(MAKEFILE_LIST))) GOPATH ?= $(shell go env GOPATH) @@ -23,9 +23,9 @@ $(BINGO): $(BINGO_DIR)/bingo.mod @echo "(re)installing $(GOBIN)/bingo-v0.7.0" @cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=bingo.mod -o=$(GOBIN)/bingo-v0.7.0 "github.com/bwplotka/bingo" -MOCKERY := $(GOBIN)/mockery-v2.22.1 +MOCKERY := $(GOBIN)/mockery-v2.40.2 $(MOCKERY): $(BINGO_DIR)/mockery.mod @# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies. - @echo "(re)installing $(GOBIN)/mockery-v2.22.1" - @cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=mockery.mod -o=$(GOBIN)/mockery-v2.22.1 "github.com/vektra/mockery/v2" + @echo "(re)installing $(GOBIN)/mockery-v2.40.2" + @cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=mockery.mod -o=$(GOBIN)/mockery-v2.40.2 "github.com/vektra/mockery/v2" diff --git a/.bingo/go.mod b/.bingo/go.mod index d2f6a83824..610249af0b 100644 --- a/.bingo/go.mod +++ b/.bingo/go.mod @@ -1,3 +1 @@ -module _ // Fake go.mod auto-created by 'bingo' for go -moddir compatibility with non-Go projects. Commit this file, together with other .mod files. - -go 1.20 +module _ // Fake go.mod auto-created by 'bingo' for go -moddir compatibility with non-Go projects. Commit this file, together with other .mod files. \ No newline at end of file diff --git a/.bingo/mockery.mod b/.bingo/mockery.mod index ba1c5607e5..7e24d5ba23 100644 --- a/.bingo/mockery.mod +++ b/.bingo/mockery.mod @@ -1,5 +1,5 @@ module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT -go 1.17 +go 1.22.1 -require github.com/vektra/mockery/v2 v2.22.1 +require github.com/vektra/mockery/v2 v2.40.2 diff --git a/.bingo/mockery.sum b/.bingo/mockery.sum index cc296285a3..2aa6a58b07 100644 --- a/.bingo/mockery.sum +++ b/.bingo/mockery.sum @@ -77,6 +77,8 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chigopher/pathlib v0.12.0 h1:1GM7fN/IwXXmOHbd1jkMqHD2wUhYqUvafgxTwmLT/q8= github.com/chigopher/pathlib v0.12.0/go.mod h1:EJ5UtJ/sK8Nt6q3VWN+EwZLZ3g0afJiG8NegYiQQ/gQ= +github.com/chigopher/pathlib v0.19.1 h1:RoLlUJc0CqBGwq239cilyhxPNLXTK+HXoASGyGznx5A= +github.com/chigopher/pathlib v0.19.1/go.mod h1:tzC1dZLW8o33UQpWkNkhvPwL5n4yyFRFm/jL1YGWFvY= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -263,6 +265,8 @@ github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOn github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= +github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -477,6 +481,10 @@ github.com/vektra/mockery/v2 v2.14.1 h1:Xamr4zUkFBDGdZhJ6iCiJ1AwkGRmUgZd8zkwjRXt github.com/vektra/mockery/v2 v2.14.1/go.mod h1:bnD1T8tExSgPD1ripLkDbr60JA9VtQeu12P3wgLZd7M= github.com/vektra/mockery/v2 v2.22.1 h1:ryH5jFQ35Z7o1Adt65fYO5n4Y7eRybjNWM6opb+ZjRE= github.com/vektra/mockery/v2 v2.22.1/go.mod h1:Zh3Kv1ckKs6FokhlVLcCu6UTyzfS3M8mpROz1lBNp+w= +github.com/vektra/mockery/v2 v2.40.1 h1:8D01rBqloDLDHKZGXkyUD9Yj5Z+oDXBqDZ+tRXYM/oA= +github.com/vektra/mockery/v2 v2.40.1/go.mod h1:dPzGtjT0/Uu4hqpF6QNHwz+GLago7lq1bxdj9wHbGKo= +github.com/vektra/mockery/v2 v2.40.2 h1:JKuQ74IXibMCGKG6F0yvH/s2sNs1CHy/nGBP0We5DJ8= +github.com/vektra/mockery/v2 v2.40.2/go.mod h1:KYBZF/7sqOa86BaOZPYsoCZWEWLS90a5oBLg2pVudxY= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -567,6 +575,10 @@ golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2 golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -722,6 +734,8 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -811,6 +825,10 @@ golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E golang.org/x/tools v0.1.11 h1:loJ25fNOEhSXfHrpoGj91eCUThwdNX6u24rO1xnNteY= golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= +golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= diff --git a/.bingo/variables.env b/.bingo/variables.env index f1256397d0..d54b7c6e41 100644 --- a/.bingo/variables.env +++ b/.bingo/variables.env @@ -1,4 +1,4 @@ -# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.8. DO NOT EDIT. +# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.9. DO NOT EDIT. # All tools are designed to be build inside $GOBIN. # Those variables will work only until 'bingo get' was invoked, or if tools were installed via Makefile's Variables.mk. GOBIN=${GOBIN:=$(go env GOBIN)} @@ -10,5 +10,5 @@ fi BINGO="${GOBIN}/bingo-v0.7.0" -MOCKERY="${GOBIN}/mockery-v2.22.1" +MOCKERY="${GOBIN}/mockery-v2.40.2" diff --git a/.mockery.yaml b/.mockery.yaml new file mode 100644 index 0000000000..9c97a06f3f --- /dev/null +++ b/.mockery.yaml @@ -0,0 +1,41 @@ +with-expecter: true +filename: "{{.InterfaceName }}.go" +dir: "{{.InterfaceDir}}/mocks" +mockname: "{{.InterfaceName}}" +outpkg: "mocks" +packages: + github.com/cs3org/reva/v2/pkg/publicshare/manager/owncloudsql: + interfaces: + UserConverter: + github.com/cs3org/reva/v2/pkg/share: + interfaces: + Manager: + github.com/cs3org/reva/v2/pkg/share/manager/owncloudsql: + interfaces: + UserConverter: + github.com/cs3org/reva/v2/pkg/storage/fs/posix/tree: + interfaces: + Blobstore: + github.com/cs3org/reva/v2/pkg/storage/registry/spaces: + interfaces: + StorageProviderClient: + github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/node: + interfaces: + Tree: + github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/permissions: + interfaces: + PermissionsChecker: + CS3PermissionsClient: + github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/tree: + interfaces: + Blobstore: + github.com/cs3org/reva/v2/pkg/storage/utils/indexer: + interfaces: + Indexer: + github.com/cs3org/reva/v2/pkg/storage/utils/metadata: + interfaces: + Storage: + github.com/cs3org/reva/v2/tests/cs3mocks: + interfaces: + GatewayAPIClient: + CollaborationAPIClient: \ No newline at end of file diff --git a/Makefile b/Makefile index a6ac489667..ea4233dfe2 100644 --- a/Makefile +++ b/Makefile @@ -178,8 +178,7 @@ dist: gen-doc .PHONY: mockery mockery: $(MOCKERY) - $(MOCKERY) --dir $(PWD) --output $(PWD)/mocks --boilerplate-file ./.templates/mockery.go.tmpl --name $(NAME) - @echo "" + $(MOCKERY) --boilerplate-file ./.templates/mockery.go.tmpl .PHONY: go-generate go-generate: diff --git a/changelog/unreleased/bump-mockery.md b/changelog/unreleased/bump-mockery.md new file mode 100644 index 0000000000..74d9cfe8ac --- /dev/null +++ b/changelog/unreleased/bump-mockery.md @@ -0,0 +1,5 @@ +Enhancement: Bump mockery to v2.40.2 + +We switched to the latest mockery and changed to .mockery.yaml based mock generation. + +https://github.com/cs3org/reva/pull/4614 diff --git a/pkg/publicshare/manager/owncloudsql/conversions.go b/pkg/publicshare/manager/owncloudsql/conversions.go index edca2554e5..33f533e2cf 100644 --- a/pkg/publicshare/manager/owncloudsql/conversions.go +++ b/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/pkg/publicshare/manager/owncloudsql/mocks/UserConverter.go b/pkg/publicshare/manager/owncloudsql/mocks/UserConverter.go index 50c7e127b1..58743ba1c4 100644 --- a/pkg/publicshare/manager/owncloudsql/mocks/UserConverter.go +++ b/pkg/publicshare/manager/owncloudsql/mocks/UserConverter.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 @@ -33,10 +33,22 @@ type UserConverter struct { mock.Mock } +type UserConverter_Expecter struct { + mock *mock.Mock +} + +func (_m *UserConverter) EXPECT() *UserConverter_Expecter { + return &UserConverter_Expecter{mock: &_m.Mock} +} + // UserIDToUserName provides a mock function with given fields: ctx, userid func (_m *UserConverter) UserIDToUserName(ctx context.Context, userid *userv1beta1.UserId) (string, error) { ret := _m.Called(ctx, userid) + if len(ret) == 0 { + panic("no return value specified for UserIDToUserName") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(context.Context, *userv1beta1.UserId) (string, error)); ok { @@ -57,10 +69,43 @@ func (_m *UserConverter) UserIDToUserName(ctx context.Context, userid *userv1bet return r0, r1 } +// UserConverter_UserIDToUserName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UserIDToUserName' +type UserConverter_UserIDToUserName_Call struct { + *mock.Call +} + +// UserIDToUserName is a helper method to define mock.On call +// - ctx context.Context +// - userid *userv1beta1.UserId +func (_e *UserConverter_Expecter) UserIDToUserName(ctx interface{}, userid interface{}) *UserConverter_UserIDToUserName_Call { + return &UserConverter_UserIDToUserName_Call{Call: _e.mock.On("UserIDToUserName", ctx, userid)} +} + +func (_c *UserConverter_UserIDToUserName_Call) Run(run func(ctx context.Context, userid *userv1beta1.UserId)) *UserConverter_UserIDToUserName_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*userv1beta1.UserId)) + }) + return _c +} + +func (_c *UserConverter_UserIDToUserName_Call) Return(_a0 string, _a1 error) *UserConverter_UserIDToUserName_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *UserConverter_UserIDToUserName_Call) RunAndReturn(run func(context.Context, *userv1beta1.UserId) (string, error)) *UserConverter_UserIDToUserName_Call { + _c.Call.Return(run) + return _c +} + // UserNameToUserID provides a mock function with given fields: ctx, username func (_m *UserConverter) UserNameToUserID(ctx context.Context, username string) (*userv1beta1.UserId, error) { ret := _m.Called(ctx, username) + if len(ret) == 0 { + panic("no return value specified for UserNameToUserID") + } + var r0 *userv1beta1.UserId var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*userv1beta1.UserId, error)); ok { @@ -83,13 +128,41 @@ func (_m *UserConverter) UserNameToUserID(ctx context.Context, username string) return r0, r1 } -type mockConstructorTestingTNewUserConverter interface { - mock.TestingT - Cleanup(func()) +// UserConverter_UserNameToUserID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UserNameToUserID' +type UserConverter_UserNameToUserID_Call struct { + *mock.Call +} + +// UserNameToUserID is a helper method to define mock.On call +// - ctx context.Context +// - username string +func (_e *UserConverter_Expecter) UserNameToUserID(ctx interface{}, username interface{}) *UserConverter_UserNameToUserID_Call { + return &UserConverter_UserNameToUserID_Call{Call: _e.mock.On("UserNameToUserID", ctx, username)} +} + +func (_c *UserConverter_UserNameToUserID_Call) Run(run func(ctx context.Context, username string)) *UserConverter_UserNameToUserID_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *UserConverter_UserNameToUserID_Call) Return(_a0 *userv1beta1.UserId, _a1 error) *UserConverter_UserNameToUserID_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *UserConverter_UserNameToUserID_Call) RunAndReturn(run func(context.Context, string) (*userv1beta1.UserId, error)) *UserConverter_UserNameToUserID_Call { + _c.Call.Return(run) + return _c } // NewUserConverter creates a new instance of UserConverter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewUserConverter(t mockConstructorTestingTNewUserConverter) *UserConverter { +// The first argument is typically a *testing.T value. +func NewUserConverter(t interface { + mock.TestingT + Cleanup(func()) +}) *UserConverter { mock := &UserConverter{} mock.Mock.Test(t) diff --git a/pkg/share/manager/owncloudsql/conversions.go b/pkg/share/manager/owncloudsql/conversions.go index f3aa081d76..14660e480d 100644 --- a/pkg/share/manager/owncloudsql/conversions.go +++ b/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/pkg/share/manager/owncloudsql/mocks/UserConverter.go b/pkg/share/manager/owncloudsql/mocks/UserConverter.go index 87411e7bb5..2b34f1ad84 100644 --- a/pkg/share/manager/owncloudsql/mocks/UserConverter.go +++ b/pkg/share/manager/owncloudsql/mocks/UserConverter.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 @@ -33,10 +33,22 @@ type UserConverter struct { mock.Mock } +type UserConverter_Expecter struct { + mock *mock.Mock +} + +func (_m *UserConverter) EXPECT() *UserConverter_Expecter { + return &UserConverter_Expecter{mock: &_m.Mock} +} + // GetUser provides a mock function with given fields: userid func (_m *UserConverter) GetUser(userid *userv1beta1.UserId) (*userv1beta1.User, error) { ret := _m.Called(userid) + if len(ret) == 0 { + panic("no return value specified for GetUser") + } + var r0 *userv1beta1.User var r1 error if rf, ok := ret.Get(0).(func(*userv1beta1.UserId) (*userv1beta1.User, error)); ok { @@ -59,10 +71,42 @@ func (_m *UserConverter) GetUser(userid *userv1beta1.UserId) (*userv1beta1.User, return r0, r1 } +// UserConverter_GetUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUser' +type UserConverter_GetUser_Call struct { + *mock.Call +} + +// GetUser is a helper method to define mock.On call +// - userid *userv1beta1.UserId +func (_e *UserConverter_Expecter) GetUser(userid interface{}) *UserConverter_GetUser_Call { + return &UserConverter_GetUser_Call{Call: _e.mock.On("GetUser", userid)} +} + +func (_c *UserConverter_GetUser_Call) Run(run func(userid *userv1beta1.UserId)) *UserConverter_GetUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*userv1beta1.UserId)) + }) + return _c +} + +func (_c *UserConverter_GetUser_Call) Return(_a0 *userv1beta1.User, _a1 error) *UserConverter_GetUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *UserConverter_GetUser_Call) RunAndReturn(run func(*userv1beta1.UserId) (*userv1beta1.User, error)) *UserConverter_GetUser_Call { + _c.Call.Return(run) + return _c +} + // UserIDToUserName provides a mock function with given fields: ctx, userid func (_m *UserConverter) UserIDToUserName(ctx context.Context, userid *userv1beta1.UserId) (string, error) { ret := _m.Called(ctx, userid) + if len(ret) == 0 { + panic("no return value specified for UserIDToUserName") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(context.Context, *userv1beta1.UserId) (string, error)); ok { @@ -83,10 +127,43 @@ func (_m *UserConverter) UserIDToUserName(ctx context.Context, userid *userv1bet return r0, r1 } +// UserConverter_UserIDToUserName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UserIDToUserName' +type UserConverter_UserIDToUserName_Call struct { + *mock.Call +} + +// UserIDToUserName is a helper method to define mock.On call +// - ctx context.Context +// - userid *userv1beta1.UserId +func (_e *UserConverter_Expecter) UserIDToUserName(ctx interface{}, userid interface{}) *UserConverter_UserIDToUserName_Call { + return &UserConverter_UserIDToUserName_Call{Call: _e.mock.On("UserIDToUserName", ctx, userid)} +} + +func (_c *UserConverter_UserIDToUserName_Call) Run(run func(ctx context.Context, userid *userv1beta1.UserId)) *UserConverter_UserIDToUserName_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*userv1beta1.UserId)) + }) + return _c +} + +func (_c *UserConverter_UserIDToUserName_Call) Return(_a0 string, _a1 error) *UserConverter_UserIDToUserName_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *UserConverter_UserIDToUserName_Call) RunAndReturn(run func(context.Context, *userv1beta1.UserId) (string, error)) *UserConverter_UserIDToUserName_Call { + _c.Call.Return(run) + return _c +} + // UserNameToUserID provides a mock function with given fields: ctx, username func (_m *UserConverter) UserNameToUserID(ctx context.Context, username string) (*userv1beta1.UserId, error) { ret := _m.Called(ctx, username) + if len(ret) == 0 { + panic("no return value specified for UserNameToUserID") + } + var r0 *userv1beta1.UserId var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*userv1beta1.UserId, error)); ok { @@ -109,13 +186,41 @@ func (_m *UserConverter) UserNameToUserID(ctx context.Context, username string) return r0, r1 } -type mockConstructorTestingTNewUserConverter interface { - mock.TestingT - Cleanup(func()) +// UserConverter_UserNameToUserID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UserNameToUserID' +type UserConverter_UserNameToUserID_Call struct { + *mock.Call +} + +// UserNameToUserID is a helper method to define mock.On call +// - ctx context.Context +// - username string +func (_e *UserConverter_Expecter) UserNameToUserID(ctx interface{}, username interface{}) *UserConverter_UserNameToUserID_Call { + return &UserConverter_UserNameToUserID_Call{Call: _e.mock.On("UserNameToUserID", ctx, username)} +} + +func (_c *UserConverter_UserNameToUserID_Call) Run(run func(ctx context.Context, username string)) *UserConverter_UserNameToUserID_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *UserConverter_UserNameToUserID_Call) Return(_a0 *userv1beta1.UserId, _a1 error) *UserConverter_UserNameToUserID_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *UserConverter_UserNameToUserID_Call) RunAndReturn(run func(context.Context, string) (*userv1beta1.UserId, error)) *UserConverter_UserNameToUserID_Call { + _c.Call.Return(run) + return _c } // NewUserConverter creates a new instance of UserConverter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewUserConverter(t mockConstructorTestingTNewUserConverter) *UserConverter { +// The first argument is typically a *testing.T value. +func NewUserConverter(t interface { + mock.TestingT + Cleanup(func()) +}) *UserConverter { mock := &UserConverter{} mock.Mock.Test(t) diff --git a/pkg/share/mocks/Manager.go b/pkg/share/mocks/Manager.go index cb634f1694..675eefd625 100644 --- a/pkg/share/mocks/Manager.go +++ b/pkg/share/mocks/Manager.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 @@ -39,10 +39,22 @@ type Manager struct { mock.Mock } +type Manager_Expecter struct { + mock *mock.Mock +} + +func (_m *Manager) EXPECT() *Manager_Expecter { + return &Manager_Expecter{mock: &_m.Mock} +} + // GetReceivedShare provides a mock function with given fields: ctx, ref func (_m *Manager) GetReceivedShare(ctx context.Context, ref *collaborationv1beta1.ShareReference) (*collaborationv1beta1.ReceivedShare, error) { ret := _m.Called(ctx, ref) + if len(ret) == 0 { + panic("no return value specified for GetReceivedShare") + } + var r0 *collaborationv1beta1.ReceivedShare var r1 error if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.ShareReference) (*collaborationv1beta1.ReceivedShare, error)); ok { @@ -65,10 +77,43 @@ func (_m *Manager) GetReceivedShare(ctx context.Context, ref *collaborationv1bet return r0, r1 } +// Manager_GetReceivedShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetReceivedShare' +type Manager_GetReceivedShare_Call struct { + *mock.Call +} + +// GetReceivedShare is a helper method to define mock.On call +// - ctx context.Context +// - ref *collaborationv1beta1.ShareReference +func (_e *Manager_Expecter) GetReceivedShare(ctx interface{}, ref interface{}) *Manager_GetReceivedShare_Call { + return &Manager_GetReceivedShare_Call{Call: _e.mock.On("GetReceivedShare", ctx, ref)} +} + +func (_c *Manager_GetReceivedShare_Call) Run(run func(ctx context.Context, ref *collaborationv1beta1.ShareReference)) *Manager_GetReceivedShare_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*collaborationv1beta1.ShareReference)) + }) + return _c +} + +func (_c *Manager_GetReceivedShare_Call) Return(_a0 *collaborationv1beta1.ReceivedShare, _a1 error) *Manager_GetReceivedShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Manager_GetReceivedShare_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.ShareReference) (*collaborationv1beta1.ReceivedShare, error)) *Manager_GetReceivedShare_Call { + _c.Call.Return(run) + return _c +} + // GetShare provides a mock function with given fields: ctx, ref func (_m *Manager) GetShare(ctx context.Context, ref *collaborationv1beta1.ShareReference) (*collaborationv1beta1.Share, error) { ret := _m.Called(ctx, ref) + if len(ret) == 0 { + panic("no return value specified for GetShare") + } + var r0 *collaborationv1beta1.Share var r1 error if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.ShareReference) (*collaborationv1beta1.Share, error)); ok { @@ -91,10 +136,43 @@ func (_m *Manager) GetShare(ctx context.Context, ref *collaborationv1beta1.Share return r0, r1 } +// Manager_GetShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetShare' +type Manager_GetShare_Call struct { + *mock.Call +} + +// GetShare is a helper method to define mock.On call +// - ctx context.Context +// - ref *collaborationv1beta1.ShareReference +func (_e *Manager_Expecter) GetShare(ctx interface{}, ref interface{}) *Manager_GetShare_Call { + return &Manager_GetShare_Call{Call: _e.mock.On("GetShare", ctx, ref)} +} + +func (_c *Manager_GetShare_Call) Run(run func(ctx context.Context, ref *collaborationv1beta1.ShareReference)) *Manager_GetShare_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*collaborationv1beta1.ShareReference)) + }) + return _c +} + +func (_c *Manager_GetShare_Call) Return(_a0 *collaborationv1beta1.Share, _a1 error) *Manager_GetShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Manager_GetShare_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.ShareReference) (*collaborationv1beta1.Share, error)) *Manager_GetShare_Call { + _c.Call.Return(run) + return _c +} + // ListReceivedShares provides a mock function with given fields: ctx, filters, forUser func (_m *Manager) ListReceivedShares(ctx context.Context, filters []*collaborationv1beta1.Filter, forUser *userv1beta1.UserId) ([]*collaborationv1beta1.ReceivedShare, error) { ret := _m.Called(ctx, filters, forUser) + if len(ret) == 0 { + panic("no return value specified for ListReceivedShares") + } + var r0 []*collaborationv1beta1.ReceivedShare var r1 error if rf, ok := ret.Get(0).(func(context.Context, []*collaborationv1beta1.Filter, *userv1beta1.UserId) ([]*collaborationv1beta1.ReceivedShare, error)); ok { @@ -117,10 +195,44 @@ func (_m *Manager) ListReceivedShares(ctx context.Context, filters []*collaborat return r0, r1 } +// Manager_ListReceivedShares_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListReceivedShares' +type Manager_ListReceivedShares_Call struct { + *mock.Call +} + +// ListReceivedShares is a helper method to define mock.On call +// - ctx context.Context +// - filters []*collaborationv1beta1.Filter +// - forUser *userv1beta1.UserId +func (_e *Manager_Expecter) ListReceivedShares(ctx interface{}, filters interface{}, forUser interface{}) *Manager_ListReceivedShares_Call { + return &Manager_ListReceivedShares_Call{Call: _e.mock.On("ListReceivedShares", ctx, filters, forUser)} +} + +func (_c *Manager_ListReceivedShares_Call) Run(run func(ctx context.Context, filters []*collaborationv1beta1.Filter, forUser *userv1beta1.UserId)) *Manager_ListReceivedShares_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]*collaborationv1beta1.Filter), args[2].(*userv1beta1.UserId)) + }) + return _c +} + +func (_c *Manager_ListReceivedShares_Call) Return(_a0 []*collaborationv1beta1.ReceivedShare, _a1 error) *Manager_ListReceivedShares_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Manager_ListReceivedShares_Call) RunAndReturn(run func(context.Context, []*collaborationv1beta1.Filter, *userv1beta1.UserId) ([]*collaborationv1beta1.ReceivedShare, error)) *Manager_ListReceivedShares_Call { + _c.Call.Return(run) + return _c +} + // ListShares provides a mock function with given fields: ctx, filters func (_m *Manager) ListShares(ctx context.Context, filters []*collaborationv1beta1.Filter) ([]*collaborationv1beta1.Share, error) { ret := _m.Called(ctx, filters) + if len(ret) == 0 { + panic("no return value specified for ListShares") + } + var r0 []*collaborationv1beta1.Share var r1 error if rf, ok := ret.Get(0).(func(context.Context, []*collaborationv1beta1.Filter) ([]*collaborationv1beta1.Share, error)); ok { @@ -143,10 +255,43 @@ func (_m *Manager) ListShares(ctx context.Context, filters []*collaborationv1bet return r0, r1 } +// Manager_ListShares_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListShares' +type Manager_ListShares_Call struct { + *mock.Call +} + +// ListShares is a helper method to define mock.On call +// - ctx context.Context +// - filters []*collaborationv1beta1.Filter +func (_e *Manager_Expecter) ListShares(ctx interface{}, filters interface{}) *Manager_ListShares_Call { + return &Manager_ListShares_Call{Call: _e.mock.On("ListShares", ctx, filters)} +} + +func (_c *Manager_ListShares_Call) Run(run func(ctx context.Context, filters []*collaborationv1beta1.Filter)) *Manager_ListShares_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]*collaborationv1beta1.Filter)) + }) + return _c +} + +func (_c *Manager_ListShares_Call) Return(_a0 []*collaborationv1beta1.Share, _a1 error) *Manager_ListShares_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Manager_ListShares_Call) RunAndReturn(run func(context.Context, []*collaborationv1beta1.Filter) ([]*collaborationv1beta1.Share, error)) *Manager_ListShares_Call { + _c.Call.Return(run) + return _c +} + // Share provides a mock function with given fields: ctx, md, g func (_m *Manager) Share(ctx context.Context, md *providerv1beta1.ResourceInfo, g *collaborationv1beta1.ShareGrant) (*collaborationv1beta1.Share, error) { ret := _m.Called(ctx, md, g) + if len(ret) == 0 { + panic("no return value specified for Share") + } + var r0 *collaborationv1beta1.Share var r1 error if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceInfo, *collaborationv1beta1.ShareGrant) (*collaborationv1beta1.Share, error)); ok { @@ -169,10 +314,44 @@ func (_m *Manager) Share(ctx context.Context, md *providerv1beta1.ResourceInfo, return r0, r1 } +// Manager_Share_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Share' +type Manager_Share_Call struct { + *mock.Call +} + +// Share is a helper method to define mock.On call +// - ctx context.Context +// - md *providerv1beta1.ResourceInfo +// - g *collaborationv1beta1.ShareGrant +func (_e *Manager_Expecter) Share(ctx interface{}, md interface{}, g interface{}) *Manager_Share_Call { + return &Manager_Share_Call{Call: _e.mock.On("Share", ctx, md, g)} +} + +func (_c *Manager_Share_Call) Run(run func(ctx context.Context, md *providerv1beta1.ResourceInfo, g *collaborationv1beta1.ShareGrant)) *Manager_Share_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*providerv1beta1.ResourceInfo), args[2].(*collaborationv1beta1.ShareGrant)) + }) + return _c +} + +func (_c *Manager_Share_Call) Return(_a0 *collaborationv1beta1.Share, _a1 error) *Manager_Share_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Manager_Share_Call) RunAndReturn(run func(context.Context, *providerv1beta1.ResourceInfo, *collaborationv1beta1.ShareGrant) (*collaborationv1beta1.Share, error)) *Manager_Share_Call { + _c.Call.Return(run) + return _c +} + // Unshare provides a mock function with given fields: ctx, ref func (_m *Manager) Unshare(ctx context.Context, ref *collaborationv1beta1.ShareReference) error { ret := _m.Called(ctx, ref) + if len(ret) == 0 { + panic("no return value specified for Unshare") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.ShareReference) error); ok { r0 = rf(ctx, ref) @@ -183,10 +362,43 @@ func (_m *Manager) Unshare(ctx context.Context, ref *collaborationv1beta1.ShareR return r0 } +// Manager_Unshare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unshare' +type Manager_Unshare_Call struct { + *mock.Call +} + +// Unshare is a helper method to define mock.On call +// - ctx context.Context +// - ref *collaborationv1beta1.ShareReference +func (_e *Manager_Expecter) Unshare(ctx interface{}, ref interface{}) *Manager_Unshare_Call { + return &Manager_Unshare_Call{Call: _e.mock.On("Unshare", ctx, ref)} +} + +func (_c *Manager_Unshare_Call) Run(run func(ctx context.Context, ref *collaborationv1beta1.ShareReference)) *Manager_Unshare_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*collaborationv1beta1.ShareReference)) + }) + return _c +} + +func (_c *Manager_Unshare_Call) Return(_a0 error) *Manager_Unshare_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Manager_Unshare_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.ShareReference) error) *Manager_Unshare_Call { + _c.Call.Return(run) + return _c +} + // UpdateReceivedShare provides a mock function with given fields: ctx, _a1, fieldMask, forUser func (_m *Manager) UpdateReceivedShare(ctx context.Context, _a1 *collaborationv1beta1.ReceivedShare, fieldMask *fieldmaskpb.FieldMask, forUser *userv1beta1.UserId) (*collaborationv1beta1.ReceivedShare, error) { ret := _m.Called(ctx, _a1, fieldMask, forUser) + if len(ret) == 0 { + panic("no return value specified for UpdateReceivedShare") + } + var r0 *collaborationv1beta1.ReceivedShare var r1 error if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.ReceivedShare, *fieldmaskpb.FieldMask, *userv1beta1.UserId) (*collaborationv1beta1.ReceivedShare, error)); ok { @@ -209,10 +421,45 @@ func (_m *Manager) UpdateReceivedShare(ctx context.Context, _a1 *collaborationv1 return r0, r1 } +// Manager_UpdateReceivedShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateReceivedShare' +type Manager_UpdateReceivedShare_Call struct { + *mock.Call +} + +// UpdateReceivedShare is a helper method to define mock.On call +// - ctx context.Context +// - _a1 *collaborationv1beta1.ReceivedShare +// - fieldMask *fieldmaskpb.FieldMask +// - forUser *userv1beta1.UserId +func (_e *Manager_Expecter) UpdateReceivedShare(ctx interface{}, _a1 interface{}, fieldMask interface{}, forUser interface{}) *Manager_UpdateReceivedShare_Call { + return &Manager_UpdateReceivedShare_Call{Call: _e.mock.On("UpdateReceivedShare", ctx, _a1, fieldMask, forUser)} +} + +func (_c *Manager_UpdateReceivedShare_Call) Run(run func(ctx context.Context, _a1 *collaborationv1beta1.ReceivedShare, fieldMask *fieldmaskpb.FieldMask, forUser *userv1beta1.UserId)) *Manager_UpdateReceivedShare_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*collaborationv1beta1.ReceivedShare), args[2].(*fieldmaskpb.FieldMask), args[3].(*userv1beta1.UserId)) + }) + return _c +} + +func (_c *Manager_UpdateReceivedShare_Call) Return(_a0 *collaborationv1beta1.ReceivedShare, _a1 error) *Manager_UpdateReceivedShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Manager_UpdateReceivedShare_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.ReceivedShare, *fieldmaskpb.FieldMask, *userv1beta1.UserId) (*collaborationv1beta1.ReceivedShare, error)) *Manager_UpdateReceivedShare_Call { + _c.Call.Return(run) + return _c +} + // UpdateShare provides a mock function with given fields: ctx, ref, p, updated, fieldMask func (_m *Manager) UpdateShare(ctx context.Context, ref *collaborationv1beta1.ShareReference, p *collaborationv1beta1.SharePermissions, updated *collaborationv1beta1.Share, fieldMask *fieldmaskpb.FieldMask) (*collaborationv1beta1.Share, error) { ret := _m.Called(ctx, ref, p, updated, fieldMask) + if len(ret) == 0 { + panic("no return value specified for UpdateShare") + } + var r0 *collaborationv1beta1.Share var r1 error if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.ShareReference, *collaborationv1beta1.SharePermissions, *collaborationv1beta1.Share, *fieldmaskpb.FieldMask) (*collaborationv1beta1.Share, error)); ok { @@ -235,13 +482,44 @@ func (_m *Manager) UpdateShare(ctx context.Context, ref *collaborationv1beta1.Sh return r0, r1 } -type mockConstructorTestingTNewManager interface { - mock.TestingT - Cleanup(func()) +// Manager_UpdateShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateShare' +type Manager_UpdateShare_Call struct { + *mock.Call +} + +// UpdateShare is a helper method to define mock.On call +// - ctx context.Context +// - ref *collaborationv1beta1.ShareReference +// - p *collaborationv1beta1.SharePermissions +// - updated *collaborationv1beta1.Share +// - fieldMask *fieldmaskpb.FieldMask +func (_e *Manager_Expecter) UpdateShare(ctx interface{}, ref interface{}, p interface{}, updated interface{}, fieldMask interface{}) *Manager_UpdateShare_Call { + return &Manager_UpdateShare_Call{Call: _e.mock.On("UpdateShare", ctx, ref, p, updated, fieldMask)} +} + +func (_c *Manager_UpdateShare_Call) Run(run func(ctx context.Context, ref *collaborationv1beta1.ShareReference, p *collaborationv1beta1.SharePermissions, updated *collaborationv1beta1.Share, fieldMask *fieldmaskpb.FieldMask)) *Manager_UpdateShare_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*collaborationv1beta1.ShareReference), args[2].(*collaborationv1beta1.SharePermissions), args[3].(*collaborationv1beta1.Share), args[4].(*fieldmaskpb.FieldMask)) + }) + return _c +} + +func (_c *Manager_UpdateShare_Call) Return(_a0 *collaborationv1beta1.Share, _a1 error) *Manager_UpdateShare_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Manager_UpdateShare_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.ShareReference, *collaborationv1beta1.SharePermissions, *collaborationv1beta1.Share, *fieldmaskpb.FieldMask) (*collaborationv1beta1.Share, error)) *Manager_UpdateShare_Call { + _c.Call.Return(run) + return _c } // NewManager creates a new instance of Manager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewManager(t mockConstructorTestingTNewManager) *Manager { +// The first argument is typically a *testing.T value. +func NewManager(t interface { + mock.TestingT + Cleanup(func()) +}) *Manager { mock := &Manager{} mock.Mock.Test(t) diff --git a/pkg/share/share.go b/pkg/share/share.go index 34644a1a8f..8e2b45254f 100644 --- a/pkg/share/share.go +++ b/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/pkg/storage/fs/posix/tree/mocks/Blobstore.go b/pkg/storage/fs/posix/tree/mocks/Blobstore.go index ba86b1666b..3f23a832e1 100644 --- a/pkg/storage/fs/posix/tree/mocks/Blobstore.go +++ b/pkg/storage/fs/posix/tree/mocks/Blobstore.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 @@ -32,10 +32,22 @@ type Blobstore struct { mock.Mock } +type Blobstore_Expecter struct { + mock *mock.Mock +} + +func (_m *Blobstore) EXPECT() *Blobstore_Expecter { + return &Blobstore_Expecter{mock: &_m.Mock} +} + // Delete provides a mock function with given fields: _a0 func (_m *Blobstore) Delete(_a0 *node.Node) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(*node.Node) error); ok { r0 = rf(_a0) @@ -46,10 +58,42 @@ func (_m *Blobstore) Delete(_a0 *node.Node) error { return r0 } +// Blobstore_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type Blobstore_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - _a0 *node.Node +func (_e *Blobstore_Expecter) Delete(_a0 interface{}) *Blobstore_Delete_Call { + return &Blobstore_Delete_Call{Call: _e.mock.On("Delete", _a0)} +} + +func (_c *Blobstore_Delete_Call) Run(run func(_a0 *node.Node)) *Blobstore_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*node.Node)) + }) + return _c +} + +func (_c *Blobstore_Delete_Call) Return(_a0 error) *Blobstore_Delete_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Blobstore_Delete_Call) RunAndReturn(run func(*node.Node) error) *Blobstore_Delete_Call { + _c.Call.Return(run) + return _c +} + // Download provides a mock function with given fields: _a0 func (_m *Blobstore) Download(_a0 *node.Node) (io.ReadCloser, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Download") + } + var r0 io.ReadCloser var r1 error if rf, ok := ret.Get(0).(func(*node.Node) (io.ReadCloser, error)); ok { @@ -72,10 +116,42 @@ func (_m *Blobstore) Download(_a0 *node.Node) (io.ReadCloser, error) { return r0, r1 } +// Blobstore_Download_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Download' +type Blobstore_Download_Call struct { + *mock.Call +} + +// Download is a helper method to define mock.On call +// - _a0 *node.Node +func (_e *Blobstore_Expecter) Download(_a0 interface{}) *Blobstore_Download_Call { + return &Blobstore_Download_Call{Call: _e.mock.On("Download", _a0)} +} + +func (_c *Blobstore_Download_Call) Run(run func(_a0 *node.Node)) *Blobstore_Download_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*node.Node)) + }) + return _c +} + +func (_c *Blobstore_Download_Call) Return(_a0 io.ReadCloser, _a1 error) *Blobstore_Download_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Blobstore_Download_Call) RunAndReturn(run func(*node.Node) (io.ReadCloser, error)) *Blobstore_Download_Call { + _c.Call.Return(run) + return _c +} + // Upload provides a mock function with given fields: _a0, source func (_m *Blobstore) Upload(_a0 *node.Node, source string) error { ret := _m.Called(_a0, source) + if len(ret) == 0 { + panic("no return value specified for Upload") + } + var r0 error if rf, ok := ret.Get(0).(func(*node.Node, string) error); ok { r0 = rf(_a0, source) @@ -86,13 +162,41 @@ func (_m *Blobstore) Upload(_a0 *node.Node, source string) error { return r0 } -type mockConstructorTestingTNewBlobstore interface { - mock.TestingT - Cleanup(func()) +// Blobstore_Upload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Upload' +type Blobstore_Upload_Call struct { + *mock.Call +} + +// Upload is a helper method to define mock.On call +// - _a0 *node.Node +// - source string +func (_e *Blobstore_Expecter) Upload(_a0 interface{}, source interface{}) *Blobstore_Upload_Call { + return &Blobstore_Upload_Call{Call: _e.mock.On("Upload", _a0, source)} +} + +func (_c *Blobstore_Upload_Call) Run(run func(_a0 *node.Node, source string)) *Blobstore_Upload_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*node.Node), args[1].(string)) + }) + return _c +} + +func (_c *Blobstore_Upload_Call) Return(_a0 error) *Blobstore_Upload_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Blobstore_Upload_Call) RunAndReturn(run func(*node.Node, string) error) *Blobstore_Upload_Call { + _c.Call.Return(run) + return _c } // NewBlobstore creates a new instance of Blobstore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBlobstore(t mockConstructorTestingTNewBlobstore) *Blobstore { +// The first argument is typically a *testing.T value. +func NewBlobstore(t interface { + mock.TestingT + Cleanup(func()) +}) *Blobstore { mock := &Blobstore{} mock.Mock.Test(t) diff --git a/pkg/storage/fs/posix/tree/tree.go b/pkg/storage/fs/posix/tree/tree.go index bf6eeb70c3..b157133cac 100644 --- a/pkg/storage/fs/posix/tree/tree.go +++ b/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/pkg/storage/registry/spaces/mocks/StorageProviderClient.go b/pkg/storage/registry/spaces/mocks/StorageProviderClient.go index d702698eaa..62762ca662 100644 --- a/pkg/storage/registry/spaces/mocks/StorageProviderClient.go +++ b/pkg/storage/registry/spaces/mocks/StorageProviderClient.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 StorageProviderClient struct { mock.Mock } +type StorageProviderClient_Expecter struct { + mock *mock.Mock +} + +func (_m *StorageProviderClient) EXPECT() *StorageProviderClient_Expecter { + return &StorageProviderClient_Expecter{mock: &_m.Mock} +} + // ListStorageSpaces provides a mock function with given fields: ctx, in, opts func (_m *StorageProviderClient) ListStorageSpaces(ctx context.Context, in *providerv1beta1.ListStorageSpacesRequest, opts ...grpc.CallOption) (*providerv1beta1.ListStorageSpacesResponse, error) { _va := make([]interface{}, len(opts)) @@ -46,6 +54,10 @@ func (_m *StorageProviderClient) ListStorageSpaces(ctx context.Context, in *prov _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 { @@ -68,13 +80,49 @@ func (_m *StorageProviderClient) ListStorageSpaces(ctx context.Context, in *prov return r0, r1 } -type mockConstructorTestingTNewStorageProviderClient interface { - mock.TestingT - Cleanup(func()) +// StorageProviderClient_ListStorageSpaces_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListStorageSpaces' +type StorageProviderClient_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 *StorageProviderClient_Expecter) ListStorageSpaces(ctx interface{}, in interface{}, opts ...interface{}) *StorageProviderClient_ListStorageSpaces_Call { + return &StorageProviderClient_ListStorageSpaces_Call{Call: _e.mock.On("ListStorageSpaces", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *StorageProviderClient_ListStorageSpaces_Call) Run(run func(ctx context.Context, in *providerv1beta1.ListStorageSpacesRequest, opts ...grpc.CallOption)) *StorageProviderClient_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 *StorageProviderClient_ListStorageSpaces_Call) Return(_a0 *providerv1beta1.ListStorageSpacesResponse, _a1 error) *StorageProviderClient_ListStorageSpaces_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StorageProviderClient_ListStorageSpaces_Call) RunAndReturn(run func(context.Context, *providerv1beta1.ListStorageSpacesRequest, ...grpc.CallOption) (*providerv1beta1.ListStorageSpacesResponse, error)) *StorageProviderClient_ListStorageSpaces_Call { + _c.Call.Return(run) + return _c } // NewStorageProviderClient creates a new instance of StorageProviderClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewStorageProviderClient(t mockConstructorTestingTNewStorageProviderClient) *StorageProviderClient { +// The first argument is typically a *testing.T value. +func NewStorageProviderClient(t interface { + mock.TestingT + Cleanup(func()) +}) *StorageProviderClient { mock := &StorageProviderClient{} mock.Mock.Test(t) diff --git a/pkg/storage/registry/spaces/spaces.go b/pkg/storage/registry/spaces/spaces.go index aa8385f662..a2379f5ae0 100644 --- a/pkg/storage/registry/spaces/spaces.go +++ b/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/pkg/storage/utils/decomposedfs/node/mocks/Tree.go b/pkg/storage/utils/decomposedfs/node/mocks/Tree.go index 0236927f78..d6a07c8137 100644 --- a/pkg/storage/utils/decomposedfs/node/mocks/Tree.go +++ b/pkg/storage/utils/decomposedfs/node/mocks/Tree.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 @@ -36,10 +36,22 @@ type Tree struct { mock.Mock } +type Tree_Expecter struct { + mock *mock.Mock +} + +func (_m *Tree) EXPECT() *Tree_Expecter { + return &Tree_Expecter{mock: &_m.Mock} +} + // CreateDir provides a mock function with given fields: ctx, _a1 func (_m *Tree) CreateDir(ctx context.Context, _a1 *node.Node) error { ret := _m.Called(ctx, _a1) + if len(ret) == 0 { + panic("no return value specified for CreateDir") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *node.Node) error); ok { r0 = rf(ctx, _a1) @@ -50,10 +62,43 @@ func (_m *Tree) CreateDir(ctx context.Context, _a1 *node.Node) error { return r0 } +// Tree_CreateDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateDir' +type Tree_CreateDir_Call struct { + *mock.Call +} + +// CreateDir is a helper method to define mock.On call +// - ctx context.Context +// - _a1 *node.Node +func (_e *Tree_Expecter) CreateDir(ctx interface{}, _a1 interface{}) *Tree_CreateDir_Call { + return &Tree_CreateDir_Call{Call: _e.mock.On("CreateDir", ctx, _a1)} +} + +func (_c *Tree_CreateDir_Call) Run(run func(ctx context.Context, _a1 *node.Node)) *Tree_CreateDir_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*node.Node)) + }) + return _c +} + +func (_c *Tree_CreateDir_Call) Return(err error) *Tree_CreateDir_Call { + _c.Call.Return(err) + return _c +} + +func (_c *Tree_CreateDir_Call) RunAndReturn(run func(context.Context, *node.Node) error) *Tree_CreateDir_Call { + _c.Call.Return(run) + return _c +} + // Delete provides a mock function with given fields: ctx, _a1 func (_m *Tree) Delete(ctx context.Context, _a1 *node.Node) error { ret := _m.Called(ctx, _a1) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *node.Node) error); ok { r0 = rf(ctx, _a1) @@ -64,10 +109,43 @@ func (_m *Tree) Delete(ctx context.Context, _a1 *node.Node) error { return r0 } +// Tree_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type Tree_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - ctx context.Context +// - _a1 *node.Node +func (_e *Tree_Expecter) Delete(ctx interface{}, _a1 interface{}) *Tree_Delete_Call { + return &Tree_Delete_Call{Call: _e.mock.On("Delete", ctx, _a1)} +} + +func (_c *Tree_Delete_Call) Run(run func(ctx context.Context, _a1 *node.Node)) *Tree_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*node.Node)) + }) + return _c +} + +func (_c *Tree_Delete_Call) Return(err error) *Tree_Delete_Call { + _c.Call.Return(err) + return _c +} + +func (_c *Tree_Delete_Call) RunAndReturn(run func(context.Context, *node.Node) error) *Tree_Delete_Call { + _c.Call.Return(run) + return _c +} + // DeleteBlob provides a mock function with given fields: _a0 func (_m *Tree) DeleteBlob(_a0 *node.Node) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for DeleteBlob") + } + var r0 error if rf, ok := ret.Get(0).(func(*node.Node) error); ok { r0 = rf(_a0) @@ -78,10 +156,42 @@ func (_m *Tree) DeleteBlob(_a0 *node.Node) error { return r0 } +// Tree_DeleteBlob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteBlob' +type Tree_DeleteBlob_Call struct { + *mock.Call +} + +// DeleteBlob is a helper method to define mock.On call +// - _a0 *node.Node +func (_e *Tree_Expecter) DeleteBlob(_a0 interface{}) *Tree_DeleteBlob_Call { + return &Tree_DeleteBlob_Call{Call: _e.mock.On("DeleteBlob", _a0)} +} + +func (_c *Tree_DeleteBlob_Call) Run(run func(_a0 *node.Node)) *Tree_DeleteBlob_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*node.Node)) + }) + return _c +} + +func (_c *Tree_DeleteBlob_Call) Return(_a0 error) *Tree_DeleteBlob_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Tree_DeleteBlob_Call) RunAndReturn(run func(*node.Node) error) *Tree_DeleteBlob_Call { + _c.Call.Return(run) + return _c +} + // GetMD provides a mock function with given fields: ctx, _a1 func (_m *Tree) GetMD(ctx context.Context, _a1 *node.Node) (fs.FileInfo, error) { ret := _m.Called(ctx, _a1) + if len(ret) == 0 { + panic("no return value specified for GetMD") + } + var r0 fs.FileInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context, *node.Node) (fs.FileInfo, error)); ok { @@ -104,10 +214,43 @@ func (_m *Tree) GetMD(ctx context.Context, _a1 *node.Node) (fs.FileInfo, error) return r0, r1 } +// Tree_GetMD_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMD' +type Tree_GetMD_Call struct { + *mock.Call +} + +// GetMD is a helper method to define mock.On call +// - ctx context.Context +// - _a1 *node.Node +func (_e *Tree_Expecter) GetMD(ctx interface{}, _a1 interface{}) *Tree_GetMD_Call { + return &Tree_GetMD_Call{Call: _e.mock.On("GetMD", ctx, _a1)} +} + +func (_c *Tree_GetMD_Call) Run(run func(ctx context.Context, _a1 *node.Node)) *Tree_GetMD_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*node.Node)) + }) + return _c +} + +func (_c *Tree_GetMD_Call) Return(_a0 fs.FileInfo, _a1 error) *Tree_GetMD_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Tree_GetMD_Call) RunAndReturn(run func(context.Context, *node.Node) (fs.FileInfo, error)) *Tree_GetMD_Call { + _c.Call.Return(run) + return _c +} + // ListFolder provides a mock function with given fields: ctx, _a1 func (_m *Tree) ListFolder(ctx context.Context, _a1 *node.Node) ([]*node.Node, error) { ret := _m.Called(ctx, _a1) + if len(ret) == 0 { + panic("no return value specified for ListFolder") + } + var r0 []*node.Node var r1 error if rf, ok := ret.Get(0).(func(context.Context, *node.Node) ([]*node.Node, error)); ok { @@ -130,10 +273,43 @@ func (_m *Tree) ListFolder(ctx context.Context, _a1 *node.Node) ([]*node.Node, e return r0, r1 } +// Tree_ListFolder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListFolder' +type Tree_ListFolder_Call struct { + *mock.Call +} + +// ListFolder is a helper method to define mock.On call +// - ctx context.Context +// - _a1 *node.Node +func (_e *Tree_Expecter) ListFolder(ctx interface{}, _a1 interface{}) *Tree_ListFolder_Call { + return &Tree_ListFolder_Call{Call: _e.mock.On("ListFolder", ctx, _a1)} +} + +func (_c *Tree_ListFolder_Call) Run(run func(ctx context.Context, _a1 *node.Node)) *Tree_ListFolder_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*node.Node)) + }) + return _c +} + +func (_c *Tree_ListFolder_Call) Return(_a0 []*node.Node, _a1 error) *Tree_ListFolder_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Tree_ListFolder_Call) RunAndReturn(run func(context.Context, *node.Node) ([]*node.Node, error)) *Tree_ListFolder_Call { + _c.Call.Return(run) + return _c +} + // Move provides a mock function with given fields: ctx, oldNode, newNode func (_m *Tree) Move(ctx context.Context, oldNode *node.Node, newNode *node.Node) error { ret := _m.Called(ctx, oldNode, newNode) + if len(ret) == 0 { + panic("no return value specified for Move") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *node.Node, *node.Node) error); ok { r0 = rf(ctx, oldNode, newNode) @@ -144,10 +320,44 @@ func (_m *Tree) Move(ctx context.Context, oldNode *node.Node, newNode *node.Node return r0 } +// Tree_Move_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Move' +type Tree_Move_Call struct { + *mock.Call +} + +// Move is a helper method to define mock.On call +// - ctx context.Context +// - oldNode *node.Node +// - newNode *node.Node +func (_e *Tree_Expecter) Move(ctx interface{}, oldNode interface{}, newNode interface{}) *Tree_Move_Call { + return &Tree_Move_Call{Call: _e.mock.On("Move", ctx, oldNode, newNode)} +} + +func (_c *Tree_Move_Call) Run(run func(ctx context.Context, oldNode *node.Node, newNode *node.Node)) *Tree_Move_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*node.Node), args[2].(*node.Node)) + }) + return _c +} + +func (_c *Tree_Move_Call) Return(err error) *Tree_Move_Call { + _c.Call.Return(err) + return _c +} + +func (_c *Tree_Move_Call) RunAndReturn(run func(context.Context, *node.Node, *node.Node) error) *Tree_Move_Call { + _c.Call.Return(run) + return _c +} + // Propagate provides a mock function with given fields: ctx, _a1, sizeDiff func (_m *Tree) Propagate(ctx context.Context, _a1 *node.Node, sizeDiff int64) error { ret := _m.Called(ctx, _a1, sizeDiff) + if len(ret) == 0 { + panic("no return value specified for Propagate") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *node.Node, int64) error); ok { r0 = rf(ctx, _a1, sizeDiff) @@ -158,10 +368,44 @@ func (_m *Tree) Propagate(ctx context.Context, _a1 *node.Node, sizeDiff int64) e return r0 } +// Tree_Propagate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Propagate' +type Tree_Propagate_Call struct { + *mock.Call +} + +// Propagate is a helper method to define mock.On call +// - ctx context.Context +// - _a1 *node.Node +// - sizeDiff int64 +func (_e *Tree_Expecter) Propagate(ctx interface{}, _a1 interface{}, sizeDiff interface{}) *Tree_Propagate_Call { + return &Tree_Propagate_Call{Call: _e.mock.On("Propagate", ctx, _a1, sizeDiff)} +} + +func (_c *Tree_Propagate_Call) Run(run func(ctx context.Context, _a1 *node.Node, sizeDiff int64)) *Tree_Propagate_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*node.Node), args[2].(int64)) + }) + return _c +} + +func (_c *Tree_Propagate_Call) Return(err error) *Tree_Propagate_Call { + _c.Call.Return(err) + return _c +} + +func (_c *Tree_Propagate_Call) RunAndReturn(run func(context.Context, *node.Node, int64) error) *Tree_Propagate_Call { + _c.Call.Return(run) + return _c +} + // PurgeRecycleItemFunc provides a mock function with given fields: ctx, spaceid, key, purgePath func (_m *Tree) PurgeRecycleItemFunc(ctx context.Context, spaceid string, key string, purgePath string) (*node.Node, func() error, error) { ret := _m.Called(ctx, spaceid, key, purgePath) + if len(ret) == 0 { + panic("no return value specified for PurgeRecycleItemFunc") + } + var r0 *node.Node var r1 func() error var r2 error @@ -193,10 +437,45 @@ func (_m *Tree) PurgeRecycleItemFunc(ctx context.Context, spaceid string, key st return r0, r1, r2 } +// Tree_PurgeRecycleItemFunc_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PurgeRecycleItemFunc' +type Tree_PurgeRecycleItemFunc_Call struct { + *mock.Call +} + +// PurgeRecycleItemFunc is a helper method to define mock.On call +// - ctx context.Context +// - spaceid string +// - key string +// - purgePath string +func (_e *Tree_Expecter) PurgeRecycleItemFunc(ctx interface{}, spaceid interface{}, key interface{}, purgePath interface{}) *Tree_PurgeRecycleItemFunc_Call { + return &Tree_PurgeRecycleItemFunc_Call{Call: _e.mock.On("PurgeRecycleItemFunc", ctx, spaceid, key, purgePath)} +} + +func (_c *Tree_PurgeRecycleItemFunc_Call) Run(run func(ctx context.Context, spaceid string, key string, purgePath string)) *Tree_PurgeRecycleItemFunc_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + }) + return _c +} + +func (_c *Tree_PurgeRecycleItemFunc_Call) Return(_a0 *node.Node, _a1 func() error, _a2 error) *Tree_PurgeRecycleItemFunc_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *Tree_PurgeRecycleItemFunc_Call) RunAndReturn(run func(context.Context, string, string, string) (*node.Node, func() error, error)) *Tree_PurgeRecycleItemFunc_Call { + _c.Call.Return(run) + return _c +} + // ReadBlob provides a mock function with given fields: _a0 func (_m *Tree) ReadBlob(_a0 *node.Node) (io.ReadCloser, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ReadBlob") + } + var r0 io.ReadCloser var r1 error if rf, ok := ret.Get(0).(func(*node.Node) (io.ReadCloser, error)); ok { @@ -219,10 +498,42 @@ func (_m *Tree) ReadBlob(_a0 *node.Node) (io.ReadCloser, error) { return r0, r1 } +// Tree_ReadBlob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadBlob' +type Tree_ReadBlob_Call struct { + *mock.Call +} + +// ReadBlob is a helper method to define mock.On call +// - _a0 *node.Node +func (_e *Tree_Expecter) ReadBlob(_a0 interface{}) *Tree_ReadBlob_Call { + return &Tree_ReadBlob_Call{Call: _e.mock.On("ReadBlob", _a0)} +} + +func (_c *Tree_ReadBlob_Call) Run(run func(_a0 *node.Node)) *Tree_ReadBlob_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*node.Node)) + }) + return _c +} + +func (_c *Tree_ReadBlob_Call) Return(_a0 io.ReadCloser, _a1 error) *Tree_ReadBlob_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Tree_ReadBlob_Call) RunAndReturn(run func(*node.Node) (io.ReadCloser, error)) *Tree_ReadBlob_Call { + _c.Call.Return(run) + return _c +} + // RestoreRecycleItemFunc provides a mock function with given fields: ctx, spaceid, key, trashPath, target func (_m *Tree) RestoreRecycleItemFunc(ctx context.Context, spaceid string, key string, trashPath string, target *node.Node) (*node.Node, *node.Node, func() error, error) { ret := _m.Called(ctx, spaceid, key, trashPath, target) + if len(ret) == 0 { + panic("no return value specified for RestoreRecycleItemFunc") + } + var r0 *node.Node var r1 *node.Node var r2 func() error @@ -263,10 +574,46 @@ func (_m *Tree) RestoreRecycleItemFunc(ctx context.Context, spaceid string, key return r0, r1, r2, r3 } +// Tree_RestoreRecycleItemFunc_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RestoreRecycleItemFunc' +type Tree_RestoreRecycleItemFunc_Call struct { + *mock.Call +} + +// RestoreRecycleItemFunc is a helper method to define mock.On call +// - ctx context.Context +// - spaceid string +// - key string +// - trashPath string +// - target *node.Node +func (_e *Tree_Expecter) RestoreRecycleItemFunc(ctx interface{}, spaceid interface{}, key interface{}, trashPath interface{}, target interface{}) *Tree_RestoreRecycleItemFunc_Call { + return &Tree_RestoreRecycleItemFunc_Call{Call: _e.mock.On("RestoreRecycleItemFunc", ctx, spaceid, key, trashPath, target)} +} + +func (_c *Tree_RestoreRecycleItemFunc_Call) Run(run func(ctx context.Context, spaceid string, key string, trashPath string, target *node.Node)) *Tree_RestoreRecycleItemFunc_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(*node.Node)) + }) + return _c +} + +func (_c *Tree_RestoreRecycleItemFunc_Call) Return(_a0 *node.Node, _a1 *node.Node, _a2 func() error, _a3 error) *Tree_RestoreRecycleItemFunc_Call { + _c.Call.Return(_a0, _a1, _a2, _a3) + return _c +} + +func (_c *Tree_RestoreRecycleItemFunc_Call) RunAndReturn(run func(context.Context, string, string, string, *node.Node) (*node.Node, *node.Node, func() error, error)) *Tree_RestoreRecycleItemFunc_Call { + _c.Call.Return(run) + return _c +} + // Setup provides a mock function with given fields: func (_m *Tree) Setup() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Setup") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -277,10 +624,41 @@ func (_m *Tree) Setup() error { return r0 } +// Tree_Setup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Setup' +type Tree_Setup_Call struct { + *mock.Call +} + +// Setup is a helper method to define mock.On call +func (_e *Tree_Expecter) Setup() *Tree_Setup_Call { + return &Tree_Setup_Call{Call: _e.mock.On("Setup")} +} + +func (_c *Tree_Setup_Call) Run(run func()) *Tree_Setup_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Tree_Setup_Call) Return(_a0 error) *Tree_Setup_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Tree_Setup_Call) RunAndReturn(run func() error) *Tree_Setup_Call { + _c.Call.Return(run) + return _c +} + // TouchFile provides a mock function with given fields: ctx, _a1, markprocessing, mtime func (_m *Tree) TouchFile(ctx context.Context, _a1 *node.Node, markprocessing bool, mtime string) error { ret := _m.Called(ctx, _a1, markprocessing, mtime) + if len(ret) == 0 { + panic("no return value specified for TouchFile") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *node.Node, bool, string) error); ok { r0 = rf(ctx, _a1, markprocessing, mtime) @@ -291,10 +669,45 @@ func (_m *Tree) TouchFile(ctx context.Context, _a1 *node.Node, markprocessing bo return r0 } +// Tree_TouchFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TouchFile' +type Tree_TouchFile_Call struct { + *mock.Call +} + +// TouchFile is a helper method to define mock.On call +// - ctx context.Context +// - _a1 *node.Node +// - markprocessing bool +// - mtime string +func (_e *Tree_Expecter) TouchFile(ctx interface{}, _a1 interface{}, markprocessing interface{}, mtime interface{}) *Tree_TouchFile_Call { + return &Tree_TouchFile_Call{Call: _e.mock.On("TouchFile", ctx, _a1, markprocessing, mtime)} +} + +func (_c *Tree_TouchFile_Call) Run(run func(ctx context.Context, _a1 *node.Node, markprocessing bool, mtime string)) *Tree_TouchFile_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*node.Node), args[2].(bool), args[3].(string)) + }) + return _c +} + +func (_c *Tree_TouchFile_Call) Return(_a0 error) *Tree_TouchFile_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Tree_TouchFile_Call) RunAndReturn(run func(context.Context, *node.Node, bool, string) error) *Tree_TouchFile_Call { + _c.Call.Return(run) + return _c +} + // WriteBlob provides a mock function with given fields: _a0, source func (_m *Tree) WriteBlob(_a0 *node.Node, source string) error { ret := _m.Called(_a0, source) + if len(ret) == 0 { + panic("no return value specified for WriteBlob") + } + var r0 error if rf, ok := ret.Get(0).(func(*node.Node, string) error); ok { r0 = rf(_a0, source) @@ -305,13 +718,41 @@ func (_m *Tree) WriteBlob(_a0 *node.Node, source string) error { return r0 } -type mockConstructorTestingTNewTree interface { - mock.TestingT - Cleanup(func()) +// Tree_WriteBlob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WriteBlob' +type Tree_WriteBlob_Call struct { + *mock.Call +} + +// WriteBlob is a helper method to define mock.On call +// - _a0 *node.Node +// - source string +func (_e *Tree_Expecter) WriteBlob(_a0 interface{}, source interface{}) *Tree_WriteBlob_Call { + return &Tree_WriteBlob_Call{Call: _e.mock.On("WriteBlob", _a0, source)} +} + +func (_c *Tree_WriteBlob_Call) Run(run func(_a0 *node.Node, source string)) *Tree_WriteBlob_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*node.Node), args[1].(string)) + }) + return _c +} + +func (_c *Tree_WriteBlob_Call) Return(_a0 error) *Tree_WriteBlob_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Tree_WriteBlob_Call) RunAndReturn(run func(*node.Node, string) error) *Tree_WriteBlob_Call { + _c.Call.Return(run) + return _c } // NewTree creates a new instance of Tree. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTree(t mockConstructorTestingTNewTree) *Tree { +// The first argument is typically a *testing.T value. +func NewTree(t interface { + mock.TestingT + Cleanup(func()) +}) *Tree { mock := &Tree{} mock.Mock.Test(t) diff --git a/pkg/storage/utils/decomposedfs/node/node.go b/pkg/storage/utils/decomposedfs/node/node.go index f201722da6..f1db7f5eb8 100644 --- a/pkg/storage/utils/decomposedfs/node/node.go +++ b/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() { diff --git a/pkg/storage/utils/decomposedfs/permissions/mocks/CS3PermissionsClient.go b/pkg/storage/utils/decomposedfs/permissions/mocks/CS3PermissionsClient.go index 35daa796fd..15829673b5 100644 --- a/pkg/storage/utils/decomposedfs/permissions/mocks/CS3PermissionsClient.go +++ b/pkg/storage/utils/decomposedfs/permissions/mocks/CS3PermissionsClient.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 CS3PermissionsClient struct { mock.Mock } +type CS3PermissionsClient_Expecter struct { + mock *mock.Mock +} + +func (_m *CS3PermissionsClient) EXPECT() *CS3PermissionsClient_Expecter { + return &CS3PermissionsClient_Expecter{mock: &_m.Mock} +} + // CheckPermission provides a mock function with given fields: ctx, in, opts func (_m *CS3PermissionsClient) CheckPermission(ctx context.Context, in *permissionsv1beta1.CheckPermissionRequest, opts ...grpc.CallOption) (*permissionsv1beta1.CheckPermissionResponse, error) { _va := make([]interface{}, len(opts)) @@ -46,6 +54,10 @@ func (_m *CS3PermissionsClient) CheckPermission(ctx context.Context, in *permiss _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 { @@ -68,13 +80,49 @@ func (_m *CS3PermissionsClient) CheckPermission(ctx context.Context, in *permiss return r0, r1 } -type mockConstructorTestingTNewCS3PermissionsClient interface { - mock.TestingT - Cleanup(func()) +// CS3PermissionsClient_CheckPermission_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckPermission' +type CS3PermissionsClient_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 *CS3PermissionsClient_Expecter) CheckPermission(ctx interface{}, in interface{}, opts ...interface{}) *CS3PermissionsClient_CheckPermission_Call { + return &CS3PermissionsClient_CheckPermission_Call{Call: _e.mock.On("CheckPermission", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *CS3PermissionsClient_CheckPermission_Call) Run(run func(ctx context.Context, in *permissionsv1beta1.CheckPermissionRequest, opts ...grpc.CallOption)) *CS3PermissionsClient_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 *CS3PermissionsClient_CheckPermission_Call) Return(_a0 *permissionsv1beta1.CheckPermissionResponse, _a1 error) *CS3PermissionsClient_CheckPermission_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *CS3PermissionsClient_CheckPermission_Call) RunAndReturn(run func(context.Context, *permissionsv1beta1.CheckPermissionRequest, ...grpc.CallOption) (*permissionsv1beta1.CheckPermissionResponse, error)) *CS3PermissionsClient_CheckPermission_Call { + _c.Call.Return(run) + return _c } // NewCS3PermissionsClient creates a new instance of CS3PermissionsClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCS3PermissionsClient(t mockConstructorTestingTNewCS3PermissionsClient) *CS3PermissionsClient { +// The first argument is typically a *testing.T value. +func NewCS3PermissionsClient(t interface { + mock.TestingT + Cleanup(func()) +}) *CS3PermissionsClient { mock := &CS3PermissionsClient{} mock.Mock.Test(t) diff --git a/pkg/storage/utils/decomposedfs/permissions/mocks/PermissionsChecker.go b/pkg/storage/utils/decomposedfs/permissions/mocks/PermissionsChecker.go index c5c14ea7e5..26af1da0f9 100644 --- a/pkg/storage/utils/decomposedfs/permissions/mocks/PermissionsChecker.go +++ b/pkg/storage/utils/decomposedfs/permissions/mocks/PermissionsChecker.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 @@ -34,10 +34,22 @@ type PermissionsChecker struct { mock.Mock } +type PermissionsChecker_Expecter struct { + mock *mock.Mock +} + +func (_m *PermissionsChecker) EXPECT() *PermissionsChecker_Expecter { + return &PermissionsChecker_Expecter{mock: &_m.Mock} +} + // AssemblePermissions provides a mock function with given fields: ctx, n func (_m *PermissionsChecker) AssemblePermissions(ctx context.Context, n *node.Node) (providerv1beta1.ResourcePermissions, error) { ret := _m.Called(ctx, n) + if len(ret) == 0 { + panic("no return value specified for AssemblePermissions") + } + var r0 providerv1beta1.ResourcePermissions var r1 error if rf, ok := ret.Get(0).(func(context.Context, *node.Node) (providerv1beta1.ResourcePermissions, error)); ok { @@ -58,10 +70,43 @@ func (_m *PermissionsChecker) AssemblePermissions(ctx context.Context, n *node.N return r0, r1 } +// PermissionsChecker_AssemblePermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AssemblePermissions' +type PermissionsChecker_AssemblePermissions_Call struct { + *mock.Call +} + +// AssemblePermissions is a helper method to define mock.On call +// - ctx context.Context +// - n *node.Node +func (_e *PermissionsChecker_Expecter) AssemblePermissions(ctx interface{}, n interface{}) *PermissionsChecker_AssemblePermissions_Call { + return &PermissionsChecker_AssemblePermissions_Call{Call: _e.mock.On("AssemblePermissions", ctx, n)} +} + +func (_c *PermissionsChecker_AssemblePermissions_Call) Run(run func(ctx context.Context, n *node.Node)) *PermissionsChecker_AssemblePermissions_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*node.Node)) + }) + return _c +} + +func (_c *PermissionsChecker_AssemblePermissions_Call) Return(ap providerv1beta1.ResourcePermissions, err error) *PermissionsChecker_AssemblePermissions_Call { + _c.Call.Return(ap, err) + return _c +} + +func (_c *PermissionsChecker_AssemblePermissions_Call) RunAndReturn(run func(context.Context, *node.Node) (providerv1beta1.ResourcePermissions, error)) *PermissionsChecker_AssemblePermissions_Call { + _c.Call.Return(run) + return _c +} + // AssembleTrashPermissions provides a mock function with given fields: ctx, n func (_m *PermissionsChecker) AssembleTrashPermissions(ctx context.Context, n *node.Node) (providerv1beta1.ResourcePermissions, error) { ret := _m.Called(ctx, n) + if len(ret) == 0 { + panic("no return value specified for AssembleTrashPermissions") + } + var r0 providerv1beta1.ResourcePermissions var r1 error if rf, ok := ret.Get(0).(func(context.Context, *node.Node) (providerv1beta1.ResourcePermissions, error)); ok { @@ -82,13 +127,41 @@ func (_m *PermissionsChecker) AssembleTrashPermissions(ctx context.Context, n *n return r0, r1 } -type mockConstructorTestingTNewPermissionsChecker interface { - mock.TestingT - Cleanup(func()) +// PermissionsChecker_AssembleTrashPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AssembleTrashPermissions' +type PermissionsChecker_AssembleTrashPermissions_Call struct { + *mock.Call +} + +// AssembleTrashPermissions is a helper method to define mock.On call +// - ctx context.Context +// - n *node.Node +func (_e *PermissionsChecker_Expecter) AssembleTrashPermissions(ctx interface{}, n interface{}) *PermissionsChecker_AssembleTrashPermissions_Call { + return &PermissionsChecker_AssembleTrashPermissions_Call{Call: _e.mock.On("AssembleTrashPermissions", ctx, n)} +} + +func (_c *PermissionsChecker_AssembleTrashPermissions_Call) Run(run func(ctx context.Context, n *node.Node)) *PermissionsChecker_AssembleTrashPermissions_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*node.Node)) + }) + return _c +} + +func (_c *PermissionsChecker_AssembleTrashPermissions_Call) Return(ap providerv1beta1.ResourcePermissions, err error) *PermissionsChecker_AssembleTrashPermissions_Call { + _c.Call.Return(ap, err) + return _c +} + +func (_c *PermissionsChecker_AssembleTrashPermissions_Call) RunAndReturn(run func(context.Context, *node.Node) (providerv1beta1.ResourcePermissions, error)) *PermissionsChecker_AssembleTrashPermissions_Call { + _c.Call.Return(run) + return _c } // NewPermissionsChecker creates a new instance of PermissionsChecker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPermissionsChecker(t mockConstructorTestingTNewPermissionsChecker) *PermissionsChecker { +// The first argument is typically a *testing.T value. +func NewPermissionsChecker(t interface { + mock.TestingT + Cleanup(func()) +}) *PermissionsChecker { mock := &PermissionsChecker{} mock.Mock.Test(t) diff --git a/pkg/storage/utils/decomposedfs/permissions/spacepermissions.go b/pkg/storage/utils/decomposedfs/permissions/spacepermissions.go index 7de6144d30..75e8e73c60 100644 --- a/pkg/storage/utils/decomposedfs/permissions/spacepermissions.go +++ b/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/pkg/storage/utils/decomposedfs/tree/mocks/Blobstore.go b/pkg/storage/utils/decomposedfs/tree/mocks/Blobstore.go index ba86b1666b..3f23a832e1 100644 --- a/pkg/storage/utils/decomposedfs/tree/mocks/Blobstore.go +++ b/pkg/storage/utils/decomposedfs/tree/mocks/Blobstore.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 @@ -32,10 +32,22 @@ type Blobstore struct { mock.Mock } +type Blobstore_Expecter struct { + mock *mock.Mock +} + +func (_m *Blobstore) EXPECT() *Blobstore_Expecter { + return &Blobstore_Expecter{mock: &_m.Mock} +} + // Delete provides a mock function with given fields: _a0 func (_m *Blobstore) Delete(_a0 *node.Node) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(*node.Node) error); ok { r0 = rf(_a0) @@ -46,10 +58,42 @@ func (_m *Blobstore) Delete(_a0 *node.Node) error { return r0 } +// Blobstore_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type Blobstore_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - _a0 *node.Node +func (_e *Blobstore_Expecter) Delete(_a0 interface{}) *Blobstore_Delete_Call { + return &Blobstore_Delete_Call{Call: _e.mock.On("Delete", _a0)} +} + +func (_c *Blobstore_Delete_Call) Run(run func(_a0 *node.Node)) *Blobstore_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*node.Node)) + }) + return _c +} + +func (_c *Blobstore_Delete_Call) Return(_a0 error) *Blobstore_Delete_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Blobstore_Delete_Call) RunAndReturn(run func(*node.Node) error) *Blobstore_Delete_Call { + _c.Call.Return(run) + return _c +} + // Download provides a mock function with given fields: _a0 func (_m *Blobstore) Download(_a0 *node.Node) (io.ReadCloser, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Download") + } + var r0 io.ReadCloser var r1 error if rf, ok := ret.Get(0).(func(*node.Node) (io.ReadCloser, error)); ok { @@ -72,10 +116,42 @@ func (_m *Blobstore) Download(_a0 *node.Node) (io.ReadCloser, error) { return r0, r1 } +// Blobstore_Download_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Download' +type Blobstore_Download_Call struct { + *mock.Call +} + +// Download is a helper method to define mock.On call +// - _a0 *node.Node +func (_e *Blobstore_Expecter) Download(_a0 interface{}) *Blobstore_Download_Call { + return &Blobstore_Download_Call{Call: _e.mock.On("Download", _a0)} +} + +func (_c *Blobstore_Download_Call) Run(run func(_a0 *node.Node)) *Blobstore_Download_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*node.Node)) + }) + return _c +} + +func (_c *Blobstore_Download_Call) Return(_a0 io.ReadCloser, _a1 error) *Blobstore_Download_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Blobstore_Download_Call) RunAndReturn(run func(*node.Node) (io.ReadCloser, error)) *Blobstore_Download_Call { + _c.Call.Return(run) + return _c +} + // Upload provides a mock function with given fields: _a0, source func (_m *Blobstore) Upload(_a0 *node.Node, source string) error { ret := _m.Called(_a0, source) + if len(ret) == 0 { + panic("no return value specified for Upload") + } + var r0 error if rf, ok := ret.Get(0).(func(*node.Node, string) error); ok { r0 = rf(_a0, source) @@ -86,13 +162,41 @@ func (_m *Blobstore) Upload(_a0 *node.Node, source string) error { return r0 } -type mockConstructorTestingTNewBlobstore interface { - mock.TestingT - Cleanup(func()) +// Blobstore_Upload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Upload' +type Blobstore_Upload_Call struct { + *mock.Call +} + +// Upload is a helper method to define mock.On call +// - _a0 *node.Node +// - source string +func (_e *Blobstore_Expecter) Upload(_a0 interface{}, source interface{}) *Blobstore_Upload_Call { + return &Blobstore_Upload_Call{Call: _e.mock.On("Upload", _a0, source)} +} + +func (_c *Blobstore_Upload_Call) Run(run func(_a0 *node.Node, source string)) *Blobstore_Upload_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*node.Node), args[1].(string)) + }) + return _c +} + +func (_c *Blobstore_Upload_Call) Return(_a0 error) *Blobstore_Upload_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Blobstore_Upload_Call) RunAndReturn(run func(*node.Node, string) error) *Blobstore_Upload_Call { + _c.Call.Return(run) + return _c } // NewBlobstore creates a new instance of Blobstore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBlobstore(t mockConstructorTestingTNewBlobstore) *Blobstore { +// The first argument is typically a *testing.T value. +func NewBlobstore(t interface { + mock.TestingT + Cleanup(func()) +}) *Blobstore { mock := &Blobstore{} mock.Mock.Test(t) diff --git a/pkg/storage/utils/decomposedfs/tree/tree.go b/pkg/storage/utils/decomposedfs/tree/tree.go index 1a1dae32f9..3d8a057d8b 100644 --- a/pkg/storage/utils/decomposedfs/tree/tree.go +++ b/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/pkg/storage/utils/indexer/indexer.go b/pkg/storage/utils/indexer/indexer.go index a3a7ace296..6d463eaf79 100644 --- a/pkg/storage/utils/indexer/indexer.go +++ b/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/pkg/storage/utils/indexer/mocks/Indexer.go b/pkg/storage/utils/indexer/mocks/Indexer.go index 7c5187eb2e..d03ca75d34 100644 --- a/pkg/storage/utils/indexer/mocks/Indexer.go +++ b/pkg/storage/utils/indexer/mocks/Indexer.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 @@ -32,10 +32,22 @@ type Indexer struct { mock.Mock } +type Indexer_Expecter struct { + mock *mock.Mock +} + +func (_m *Indexer) EXPECT() *Indexer_Expecter { + return &Indexer_Expecter{mock: &_m.Mock} +} + // Add provides a mock function with given fields: t func (_m *Indexer) Add(t interface{}) ([]indexer.IdxAddResult, error) { ret := _m.Called(t) + if len(ret) == 0 { + panic("no return value specified for Add") + } + var r0 []indexer.IdxAddResult var r1 error if rf, ok := ret.Get(0).(func(interface{}) ([]indexer.IdxAddResult, error)); ok { @@ -58,10 +70,42 @@ func (_m *Indexer) Add(t interface{}) ([]indexer.IdxAddResult, error) { return r0, r1 } +// Indexer_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add' +type Indexer_Add_Call struct { + *mock.Call +} + +// Add is a helper method to define mock.On call +// - t interface{} +func (_e *Indexer_Expecter) Add(t interface{}) *Indexer_Add_Call { + return &Indexer_Add_Call{Call: _e.mock.On("Add", t)} +} + +func (_c *Indexer_Add_Call) Run(run func(t interface{})) *Indexer_Add_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(interface{})) + }) + return _c +} + +func (_c *Indexer_Add_Call) Return(_a0 []indexer.IdxAddResult, _a1 error) *Indexer_Add_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Indexer_Add_Call) RunAndReturn(run func(interface{}) ([]indexer.IdxAddResult, error)) *Indexer_Add_Call { + _c.Call.Return(run) + return _c +} + // AddIndex provides a mock function with given fields: t, indexBy, pkName, entityDirName, indexType, bound, caseInsensitive func (_m *Indexer) AddIndex(t interface{}, indexBy option.IndexBy, pkName string, entityDirName string, indexType string, bound *option.Bound, caseInsensitive bool) error { ret := _m.Called(t, indexBy, pkName, entityDirName, indexType, bound, caseInsensitive) + if len(ret) == 0 { + panic("no return value specified for AddIndex") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}, option.IndexBy, string, string, string, *option.Bound, bool) error); ok { r0 = rf(t, indexBy, pkName, entityDirName, indexType, bound, caseInsensitive) @@ -72,10 +116,48 @@ func (_m *Indexer) AddIndex(t interface{}, indexBy option.IndexBy, pkName string return r0 } +// Indexer_AddIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddIndex' +type Indexer_AddIndex_Call struct { + *mock.Call +} + +// AddIndex is a helper method to define mock.On call +// - t interface{} +// - indexBy option.IndexBy +// - pkName string +// - entityDirName string +// - indexType string +// - bound *option.Bound +// - caseInsensitive bool +func (_e *Indexer_Expecter) AddIndex(t interface{}, indexBy interface{}, pkName interface{}, entityDirName interface{}, indexType interface{}, bound interface{}, caseInsensitive interface{}) *Indexer_AddIndex_Call { + return &Indexer_AddIndex_Call{Call: _e.mock.On("AddIndex", t, indexBy, pkName, entityDirName, indexType, bound, caseInsensitive)} +} + +func (_c *Indexer_AddIndex_Call) Run(run func(t interface{}, indexBy option.IndexBy, pkName string, entityDirName string, indexType string, bound *option.Bound, caseInsensitive bool)) *Indexer_AddIndex_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(interface{}), args[1].(option.IndexBy), args[2].(string), args[3].(string), args[4].(string), args[5].(*option.Bound), args[6].(bool)) + }) + return _c +} + +func (_c *Indexer_AddIndex_Call) Return(_a0 error) *Indexer_AddIndex_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Indexer_AddIndex_Call) RunAndReturn(run func(interface{}, option.IndexBy, string, string, string, *option.Bound, bool) error) *Indexer_AddIndex_Call { + _c.Call.Return(run) + return _c +} + // Delete provides a mock function with given fields: t func (_m *Indexer) Delete(t interface{}) error { ret := _m.Called(t) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(t) @@ -86,6 +168,34 @@ func (_m *Indexer) Delete(t interface{}) error { return r0 } +// Indexer_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type Indexer_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - t interface{} +func (_e *Indexer_Expecter) Delete(t interface{}) *Indexer_Delete_Call { + return &Indexer_Delete_Call{Call: _e.mock.On("Delete", t)} +} + +func (_c *Indexer_Delete_Call) Run(run func(t interface{})) *Indexer_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(interface{})) + }) + return _c +} + +func (_c *Indexer_Delete_Call) Return(_a0 error) *Indexer_Delete_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Indexer_Delete_Call) RunAndReturn(run func(interface{}) error) *Indexer_Delete_Call { + _c.Call.Return(run) + return _c +} + // FindBy provides a mock function with given fields: t, fields func (_m *Indexer) FindBy(t interface{}, fields ...indexer.Field) ([]string, error) { _va := make([]interface{}, len(fields)) @@ -97,6 +207,10 @@ func (_m *Indexer) FindBy(t interface{}, fields ...indexer.Field) ([]string, err _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for FindBy") + } + var r0 []string var r1 error if rf, ok := ret.Get(0).(func(interface{}, ...indexer.Field) ([]string, error)); ok { @@ -119,13 +233,48 @@ func (_m *Indexer) FindBy(t interface{}, fields ...indexer.Field) ([]string, err return r0, r1 } -type mockConstructorTestingTNewIndexer interface { - mock.TestingT - Cleanup(func()) +// Indexer_FindBy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindBy' +type Indexer_FindBy_Call struct { + *mock.Call +} + +// FindBy is a helper method to define mock.On call +// - t interface{} +// - fields ...indexer.Field +func (_e *Indexer_Expecter) FindBy(t interface{}, fields ...interface{}) *Indexer_FindBy_Call { + return &Indexer_FindBy_Call{Call: _e.mock.On("FindBy", + append([]interface{}{t}, fields...)...)} +} + +func (_c *Indexer_FindBy_Call) Run(run func(t interface{}, fields ...indexer.Field)) *Indexer_FindBy_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]indexer.Field, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(indexer.Field) + } + } + run(args[0].(interface{}), variadicArgs...) + }) + return _c +} + +func (_c *Indexer_FindBy_Call) Return(_a0 []string, _a1 error) *Indexer_FindBy_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Indexer_FindBy_Call) RunAndReturn(run func(interface{}, ...indexer.Field) ([]string, error)) *Indexer_FindBy_Call { + _c.Call.Return(run) + return _c } // NewIndexer creates a new instance of Indexer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewIndexer(t mockConstructorTestingTNewIndexer) *Indexer { +// The first argument is typically a *testing.T value. +func NewIndexer(t interface { + mock.TestingT + Cleanup(func()) +}) *Indexer { mock := &Indexer{} mock.Mock.Test(t) diff --git a/pkg/storage/utils/metadata/mocks/Storage.go b/pkg/storage/utils/metadata/mocks/Storage.go index 8523f3635a..a282fe0bf1 100644 --- a/pkg/storage/utils/metadata/mocks/Storage.go +++ b/pkg/storage/utils/metadata/mocks/Storage.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 @@ -34,10 +34,22 @@ type Storage struct { mock.Mock } +type Storage_Expecter struct { + mock *mock.Mock +} + +func (_m *Storage) EXPECT() *Storage_Expecter { + return &Storage_Expecter{mock: &_m.Mock} +} + // Backend provides a mock function with given fields: func (_m *Storage) Backend() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Backend") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -48,10 +60,41 @@ func (_m *Storage) Backend() string { return r0 } +// Storage_Backend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Backend' +type Storage_Backend_Call struct { + *mock.Call +} + +// Backend is a helper method to define mock.On call +func (_e *Storage_Expecter) Backend() *Storage_Backend_Call { + return &Storage_Backend_Call{Call: _e.mock.On("Backend")} +} + +func (_c *Storage_Backend_Call) Run(run func()) *Storage_Backend_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Storage_Backend_Call) Return(_a0 string) *Storage_Backend_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Storage_Backend_Call) RunAndReturn(run func() string) *Storage_Backend_Call { + _c.Call.Return(run) + return _c +} + // CreateSymlink provides a mock function with given fields: ctx, oldname, newname func (_m *Storage) CreateSymlink(ctx context.Context, oldname string, newname string) error { ret := _m.Called(ctx, oldname, newname) + if len(ret) == 0 { + panic("no return value specified for CreateSymlink") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { r0 = rf(ctx, oldname, newname) @@ -62,10 +105,44 @@ func (_m *Storage) CreateSymlink(ctx context.Context, oldname string, newname st return r0 } +// Storage_CreateSymlink_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateSymlink' +type Storage_CreateSymlink_Call struct { + *mock.Call +} + +// CreateSymlink is a helper method to define mock.On call +// - ctx context.Context +// - oldname string +// - newname string +func (_e *Storage_Expecter) CreateSymlink(ctx interface{}, oldname interface{}, newname interface{}) *Storage_CreateSymlink_Call { + return &Storage_CreateSymlink_Call{Call: _e.mock.On("CreateSymlink", ctx, oldname, newname)} +} + +func (_c *Storage_CreateSymlink_Call) Run(run func(ctx context.Context, oldname string, newname string)) *Storage_CreateSymlink_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string)) + }) + return _c +} + +func (_c *Storage_CreateSymlink_Call) Return(_a0 error) *Storage_CreateSymlink_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Storage_CreateSymlink_Call) RunAndReturn(run func(context.Context, string, string) error) *Storage_CreateSymlink_Call { + _c.Call.Return(run) + return _c +} + // Delete provides a mock function with given fields: ctx, path func (_m *Storage) Delete(ctx context.Context, path string) error { ret := _m.Called(ctx, path) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, path) @@ -76,10 +153,43 @@ func (_m *Storage) Delete(ctx context.Context, path string) error { return r0 } +// Storage_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type Storage_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - ctx context.Context +// - path string +func (_e *Storage_Expecter) Delete(ctx interface{}, path interface{}) *Storage_Delete_Call { + return &Storage_Delete_Call{Call: _e.mock.On("Delete", ctx, path)} +} + +func (_c *Storage_Delete_Call) Run(run func(ctx context.Context, path string)) *Storage_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *Storage_Delete_Call) Return(_a0 error) *Storage_Delete_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Storage_Delete_Call) RunAndReturn(run func(context.Context, string) error) *Storage_Delete_Call { + _c.Call.Return(run) + return _c +} + // Download provides a mock function with given fields: ctx, req func (_m *Storage) Download(ctx context.Context, req metadata.DownloadRequest) (*metadata.DownloadResponse, error) { ret := _m.Called(ctx, req) + if len(ret) == 0 { + panic("no return value specified for Download") + } + var r0 *metadata.DownloadResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, metadata.DownloadRequest) (*metadata.DownloadResponse, error)); ok { @@ -102,10 +212,43 @@ func (_m *Storage) Download(ctx context.Context, req metadata.DownloadRequest) ( return r0, r1 } +// Storage_Download_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Download' +type Storage_Download_Call struct { + *mock.Call +} + +// Download is a helper method to define mock.On call +// - ctx context.Context +// - req metadata.DownloadRequest +func (_e *Storage_Expecter) Download(ctx interface{}, req interface{}) *Storage_Download_Call { + return &Storage_Download_Call{Call: _e.mock.On("Download", ctx, req)} +} + +func (_c *Storage_Download_Call) Run(run func(ctx context.Context, req metadata.DownloadRequest)) *Storage_Download_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(metadata.DownloadRequest)) + }) + return _c +} + +func (_c *Storage_Download_Call) Return(_a0 *metadata.DownloadResponse, _a1 error) *Storage_Download_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Storage_Download_Call) RunAndReturn(run func(context.Context, metadata.DownloadRequest) (*metadata.DownloadResponse, error)) *Storage_Download_Call { + _c.Call.Return(run) + return _c +} + // Init provides a mock function with given fields: ctx, name func (_m *Storage) Init(ctx context.Context, name string) error { ret := _m.Called(ctx, name) + if len(ret) == 0 { + panic("no return value specified for Init") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, name) @@ -116,10 +259,43 @@ func (_m *Storage) Init(ctx context.Context, name string) error { return r0 } +// Storage_Init_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Init' +type Storage_Init_Call struct { + *mock.Call +} + +// Init is a helper method to define mock.On call +// - ctx context.Context +// - name string +func (_e *Storage_Expecter) Init(ctx interface{}, name interface{}) *Storage_Init_Call { + return &Storage_Init_Call{Call: _e.mock.On("Init", ctx, name)} +} + +func (_c *Storage_Init_Call) Run(run func(ctx context.Context, name string)) *Storage_Init_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *Storage_Init_Call) Return(err error) *Storage_Init_Call { + _c.Call.Return(err) + return _c +} + +func (_c *Storage_Init_Call) RunAndReturn(run func(context.Context, string) error) *Storage_Init_Call { + _c.Call.Return(run) + return _c +} + // ListDir provides a mock function with given fields: ctx, path func (_m *Storage) ListDir(ctx context.Context, path string) ([]*providerv1beta1.ResourceInfo, error) { ret := _m.Called(ctx, path) + if len(ret) == 0 { + panic("no return value specified for ListDir") + } + var r0 []*providerv1beta1.ResourceInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) ([]*providerv1beta1.ResourceInfo, error)); ok { @@ -142,10 +318,43 @@ func (_m *Storage) ListDir(ctx context.Context, path string) ([]*providerv1beta1 return r0, r1 } +// Storage_ListDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListDir' +type Storage_ListDir_Call struct { + *mock.Call +} + +// ListDir is a helper method to define mock.On call +// - ctx context.Context +// - path string +func (_e *Storage_Expecter) ListDir(ctx interface{}, path interface{}) *Storage_ListDir_Call { + return &Storage_ListDir_Call{Call: _e.mock.On("ListDir", ctx, path)} +} + +func (_c *Storage_ListDir_Call) Run(run func(ctx context.Context, path string)) *Storage_ListDir_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *Storage_ListDir_Call) Return(_a0 []*providerv1beta1.ResourceInfo, _a1 error) *Storage_ListDir_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Storage_ListDir_Call) RunAndReturn(run func(context.Context, string) ([]*providerv1beta1.ResourceInfo, error)) *Storage_ListDir_Call { + _c.Call.Return(run) + return _c +} + // MakeDirIfNotExist provides a mock function with given fields: ctx, name func (_m *Storage) MakeDirIfNotExist(ctx context.Context, name string) error { ret := _m.Called(ctx, name) + if len(ret) == 0 { + panic("no return value specified for MakeDirIfNotExist") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, name) @@ -156,10 +365,43 @@ func (_m *Storage) MakeDirIfNotExist(ctx context.Context, name string) error { return r0 } +// Storage_MakeDirIfNotExist_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MakeDirIfNotExist' +type Storage_MakeDirIfNotExist_Call struct { + *mock.Call +} + +// MakeDirIfNotExist is a helper method to define mock.On call +// - ctx context.Context +// - name string +func (_e *Storage_Expecter) MakeDirIfNotExist(ctx interface{}, name interface{}) *Storage_MakeDirIfNotExist_Call { + return &Storage_MakeDirIfNotExist_Call{Call: _e.mock.On("MakeDirIfNotExist", ctx, name)} +} + +func (_c *Storage_MakeDirIfNotExist_Call) Run(run func(ctx context.Context, name string)) *Storage_MakeDirIfNotExist_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *Storage_MakeDirIfNotExist_Call) Return(_a0 error) *Storage_MakeDirIfNotExist_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Storage_MakeDirIfNotExist_Call) RunAndReturn(run func(context.Context, string) error) *Storage_MakeDirIfNotExist_Call { + _c.Call.Return(run) + return _c +} + // ReadDir provides a mock function with given fields: ctx, path func (_m *Storage) ReadDir(ctx context.Context, path string) ([]string, error) { ret := _m.Called(ctx, path) + if len(ret) == 0 { + panic("no return value specified for ReadDir") + } + var r0 []string var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) ([]string, error)); ok { @@ -182,10 +424,43 @@ func (_m *Storage) ReadDir(ctx context.Context, path string) ([]string, error) { return r0, r1 } +// Storage_ReadDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadDir' +type Storage_ReadDir_Call struct { + *mock.Call +} + +// ReadDir is a helper method to define mock.On call +// - ctx context.Context +// - path string +func (_e *Storage_Expecter) ReadDir(ctx interface{}, path interface{}) *Storage_ReadDir_Call { + return &Storage_ReadDir_Call{Call: _e.mock.On("ReadDir", ctx, path)} +} + +func (_c *Storage_ReadDir_Call) Run(run func(ctx context.Context, path string)) *Storage_ReadDir_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *Storage_ReadDir_Call) Return(_a0 []string, _a1 error) *Storage_ReadDir_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Storage_ReadDir_Call) RunAndReturn(run func(context.Context, string) ([]string, error)) *Storage_ReadDir_Call { + _c.Call.Return(run) + return _c +} + // ResolveSymlink provides a mock function with given fields: ctx, name func (_m *Storage) ResolveSymlink(ctx context.Context, name string) (string, error) { ret := _m.Called(ctx, name) + if len(ret) == 0 { + panic("no return value specified for ResolveSymlink") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (string, error)); ok { @@ -206,10 +481,43 @@ func (_m *Storage) ResolveSymlink(ctx context.Context, name string) (string, err return r0, r1 } +// Storage_ResolveSymlink_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResolveSymlink' +type Storage_ResolveSymlink_Call struct { + *mock.Call +} + +// ResolveSymlink is a helper method to define mock.On call +// - ctx context.Context +// - name string +func (_e *Storage_Expecter) ResolveSymlink(ctx interface{}, name interface{}) *Storage_ResolveSymlink_Call { + return &Storage_ResolveSymlink_Call{Call: _e.mock.On("ResolveSymlink", ctx, name)} +} + +func (_c *Storage_ResolveSymlink_Call) Run(run func(ctx context.Context, name string)) *Storage_ResolveSymlink_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *Storage_ResolveSymlink_Call) Return(_a0 string, _a1 error) *Storage_ResolveSymlink_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Storage_ResolveSymlink_Call) RunAndReturn(run func(context.Context, string) (string, error)) *Storage_ResolveSymlink_Call { + _c.Call.Return(run) + return _c +} + // SimpleDownload provides a mock function with given fields: ctx, path func (_m *Storage) SimpleDownload(ctx context.Context, path string) ([]byte, error) { ret := _m.Called(ctx, path) + if len(ret) == 0 { + panic("no return value specified for SimpleDownload") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) ([]byte, error)); ok { @@ -232,10 +540,43 @@ func (_m *Storage) SimpleDownload(ctx context.Context, path string) ([]byte, err return r0, r1 } +// Storage_SimpleDownload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SimpleDownload' +type Storage_SimpleDownload_Call struct { + *mock.Call +} + +// SimpleDownload is a helper method to define mock.On call +// - ctx context.Context +// - path string +func (_e *Storage_Expecter) SimpleDownload(ctx interface{}, path interface{}) *Storage_SimpleDownload_Call { + return &Storage_SimpleDownload_Call{Call: _e.mock.On("SimpleDownload", ctx, path)} +} + +func (_c *Storage_SimpleDownload_Call) Run(run func(ctx context.Context, path string)) *Storage_SimpleDownload_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *Storage_SimpleDownload_Call) Return(_a0 []byte, _a1 error) *Storage_SimpleDownload_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Storage_SimpleDownload_Call) RunAndReturn(run func(context.Context, string) ([]byte, error)) *Storage_SimpleDownload_Call { + _c.Call.Return(run) + return _c +} + // SimpleUpload provides a mock function with given fields: ctx, uploadpath, content func (_m *Storage) SimpleUpload(ctx context.Context, uploadpath string, content []byte) error { ret := _m.Called(ctx, uploadpath, content) + if len(ret) == 0 { + panic("no return value specified for SimpleUpload") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, []byte) error); ok { r0 = rf(ctx, uploadpath, content) @@ -246,10 +587,44 @@ func (_m *Storage) SimpleUpload(ctx context.Context, uploadpath string, content return r0 } +// Storage_SimpleUpload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SimpleUpload' +type Storage_SimpleUpload_Call struct { + *mock.Call +} + +// SimpleUpload is a helper method to define mock.On call +// - ctx context.Context +// - uploadpath string +// - content []byte +func (_e *Storage_Expecter) SimpleUpload(ctx interface{}, uploadpath interface{}, content interface{}) *Storage_SimpleUpload_Call { + return &Storage_SimpleUpload_Call{Call: _e.mock.On("SimpleUpload", ctx, uploadpath, content)} +} + +func (_c *Storage_SimpleUpload_Call) Run(run func(ctx context.Context, uploadpath string, content []byte)) *Storage_SimpleUpload_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].([]byte)) + }) + return _c +} + +func (_c *Storage_SimpleUpload_Call) Return(_a0 error) *Storage_SimpleUpload_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Storage_SimpleUpload_Call) RunAndReturn(run func(context.Context, string, []byte) error) *Storage_SimpleUpload_Call { + _c.Call.Return(run) + return _c +} + // Stat provides a mock function with given fields: ctx, path func (_m *Storage) Stat(ctx context.Context, path string) (*providerv1beta1.ResourceInfo, error) { ret := _m.Called(ctx, path) + if len(ret) == 0 { + panic("no return value specified for Stat") + } + var r0 *providerv1beta1.ResourceInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*providerv1beta1.ResourceInfo, error)); ok { @@ -272,10 +647,43 @@ func (_m *Storage) Stat(ctx context.Context, path string) (*providerv1beta1.Reso return r0, r1 } +// Storage_Stat_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stat' +type Storage_Stat_Call struct { + *mock.Call +} + +// Stat is a helper method to define mock.On call +// - ctx context.Context +// - path string +func (_e *Storage_Expecter) Stat(ctx interface{}, path interface{}) *Storage_Stat_Call { + return &Storage_Stat_Call{Call: _e.mock.On("Stat", ctx, path)} +} + +func (_c *Storage_Stat_Call) Run(run func(ctx context.Context, path string)) *Storage_Stat_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *Storage_Stat_Call) Return(_a0 *providerv1beta1.ResourceInfo, _a1 error) *Storage_Stat_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Storage_Stat_Call) RunAndReturn(run func(context.Context, string) (*providerv1beta1.ResourceInfo, error)) *Storage_Stat_Call { + _c.Call.Return(run) + return _c +} + // Upload provides a mock function with given fields: ctx, req func (_m *Storage) Upload(ctx context.Context, req metadata.UploadRequest) (*metadata.UploadResponse, error) { ret := _m.Called(ctx, req) + if len(ret) == 0 { + panic("no return value specified for Upload") + } + var r0 *metadata.UploadResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, metadata.UploadRequest) (*metadata.UploadResponse, error)); ok { @@ -298,13 +706,41 @@ func (_m *Storage) Upload(ctx context.Context, req metadata.UploadRequest) (*met return r0, r1 } -type mockConstructorTestingTNewStorage interface { - mock.TestingT - Cleanup(func()) +// Storage_Upload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Upload' +type Storage_Upload_Call struct { + *mock.Call +} + +// Upload is a helper method to define mock.On call +// - ctx context.Context +// - req metadata.UploadRequest +func (_e *Storage_Expecter) Upload(ctx interface{}, req interface{}) *Storage_Upload_Call { + return &Storage_Upload_Call{Call: _e.mock.On("Upload", ctx, req)} +} + +func (_c *Storage_Upload_Call) Run(run func(ctx context.Context, req metadata.UploadRequest)) *Storage_Upload_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(metadata.UploadRequest)) + }) + return _c +} + +func (_c *Storage_Upload_Call) Return(_a0 *metadata.UploadResponse, _a1 error) *Storage_Upload_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Storage_Upload_Call) RunAndReturn(run func(context.Context, metadata.UploadRequest) (*metadata.UploadResponse, error)) *Storage_Upload_Call { + _c.Call.Return(run) + return _c } // NewStorage creates a new instance of Storage. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewStorage(t mockConstructorTestingTNewStorage) *Storage { +// The first argument is typically a *testing.T value. +func NewStorage(t interface { + mock.TestingT + Cleanup(func()) +}) *Storage { mock := &Storage{} mock.Mock.Test(t) diff --git a/pkg/storage/utils/metadata/storage.go b/pkg/storage/utils/metadata/storage.go index 24e74f4a9f..5757674dee 100644 --- a/pkg/storage/utils/metadata/storage.go +++ b/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/tests/cs3mocks/cs3.go b/tests/cs3mocks/cs3.go index 20168e5f6e..bfd656f408 100644 --- a/tests/cs3mocks/cs3.go +++ b/tests/cs3mocks/cs3.go @@ -23,9 +23,6 @@ import ( collaboration "github.com/cs3org/go-cs3apis/cs3/sharing/collaboration/v1beta1" ) -//go:generate make --no-print-directory -C ../.. mockery NAME=GatewayAPIClient -//go:generate make --no-print-directory -C ../.. mockery NAME=CollaborationAPIClient - // GatewayAPIClient provides the mocks for the gateway.GatewayAPIClient type GatewayAPIClient interface { gateway.GatewayAPIClient diff --git a/tests/cs3mocks/mocks/CollaborationAPIClient.go b/tests/cs3mocks/mocks/CollaborationAPIClient.go index acb6873382..93cc14d377 100644 --- a/tests/cs3mocks/mocks/CollaborationAPIClient.go +++ b/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/tests/cs3mocks/mocks/GatewayAPIClient.go b/tests/cs3mocks/mocks/GatewayAPIClient.go index a256382a15..b2fa6783f4 100644 --- a/tests/cs3mocks/mocks/GatewayAPIClient.go +++ b/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)