aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/gcs/mocks/Client.go
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2025-04-02 14:08:08 +0200
committerTaras Madan <tarasmadan@google.com>2025-04-02 15:59:20 +0000
commitfe048bb3c75adb6fef7300aad81e18aabce4a075 (patch)
treecb57f090c5685b34a5746f7c85be2ecf3e776a3b /pkg/gcs/mocks/Client.go
parent6c9acf7b44179e7c4c1549f1965a814199cb16a2 (diff)
pkg/gcs: simplify interface, remove proxy type
Diffstat (limited to 'pkg/gcs/mocks/Client.go')
-rw-r--r--pkg/gcs/mocks/Client.go116
1 files changed, 58 insertions, 58 deletions
diff --git a/pkg/gcs/mocks/Client.go b/pkg/gcs/mocks/Client.go
index fff5dddd7..d422b9c41 100644
--- a/pkg/gcs/mocks/Client.go
+++ b/pkg/gcs/mocks/Client.go
@@ -170,6 +170,64 @@ func (_c *Client_FileExists_Call) RunAndReturn(run func(string) (bool, error)) *
return _c
}
+// FileReader provides a mock function with given fields: path
+func (_m *Client) FileReader(path string) (io.ReadCloser, error) {
+ ret := _m.Called(path)
+
+ if len(ret) == 0 {
+ panic("no return value specified for FileReader")
+ }
+
+ var r0 io.ReadCloser
+ var r1 error
+ if rf, ok := ret.Get(0).(func(string) (io.ReadCloser, error)); ok {
+ return rf(path)
+ }
+ if rf, ok := ret.Get(0).(func(string) io.ReadCloser); ok {
+ r0 = rf(path)
+ } else {
+ if ret.Get(0) != nil {
+ r0 = ret.Get(0).(io.ReadCloser)
+ }
+ }
+
+ if rf, ok := ret.Get(1).(func(string) error); ok {
+ r1 = rf(path)
+ } else {
+ r1 = ret.Error(1)
+ }
+
+ return r0, r1
+}
+
+// Client_FileReader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FileReader'
+type Client_FileReader_Call struct {
+ *mock.Call
+}
+
+// FileReader is a helper method to define mock.On call
+// - path string
+func (_e *Client_Expecter) FileReader(path interface{}) *Client_FileReader_Call {
+ return &Client_FileReader_Call{Call: _e.mock.On("FileReader", path)}
+}
+
+func (_c *Client_FileReader_Call) Run(run func(path string)) *Client_FileReader_Call {
+ _c.Call.Run(func(args mock.Arguments) {
+ run(args[0].(string))
+ })
+ return _c
+}
+
+func (_c *Client_FileReader_Call) Return(_a0 io.ReadCloser, _a1 error) *Client_FileReader_Call {
+ _c.Call.Return(_a0, _a1)
+ return _c
+}
+
+func (_c *Client_FileReader_Call) RunAndReturn(run func(string) (io.ReadCloser, error)) *Client_FileReader_Call {
+ _c.Call.Return(run)
+ return _c
+}
+
// FileWriter provides a mock function with given fields: path, contentType, contentEncoding
func (_m *Client) FileWriter(path string, contentType string, contentEncoding string) (io.WriteCloser, error) {
ret := _m.Called(path, contentType, contentEncoding)
@@ -334,64 +392,6 @@ func (_c *Client_Publish_Call) RunAndReturn(run func(string) error) *Client_Publ
return _c
}
-// Read provides a mock function with given fields: path
-func (_m *Client) Read(path string) (*gcs.File, error) {
- ret := _m.Called(path)
-
- if len(ret) == 0 {
- panic("no return value specified for Read")
- }
-
- var r0 *gcs.File
- var r1 error
- if rf, ok := ret.Get(0).(func(string) (*gcs.File, error)); ok {
- return rf(path)
- }
- if rf, ok := ret.Get(0).(func(string) *gcs.File); ok {
- r0 = rf(path)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*gcs.File)
- }
- }
-
- if rf, ok := ret.Get(1).(func(string) error); ok {
- r1 = rf(path)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-// Client_Read_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Read'
-type Client_Read_Call struct {
- *mock.Call
-}
-
-// Read is a helper method to define mock.On call
-// - path string
-func (_e *Client_Expecter) Read(path interface{}) *Client_Read_Call {
- return &Client_Read_Call{Call: _e.mock.On("Read", path)}
-}
-
-func (_c *Client_Read_Call) Run(run func(path string)) *Client_Read_Call {
- _c.Call.Run(func(args mock.Arguments) {
- run(args[0].(string))
- })
- return _c
-}
-
-func (_c *Client_Read_Call) Return(_a0 *gcs.File, _a1 error) *Client_Read_Call {
- _c.Call.Return(_a0, _a1)
- return _c
-}
-
-func (_c *Client_Read_Call) RunAndReturn(run func(string) (*gcs.File, error)) *Client_Read_Call {
- _c.Call.Return(run)
- return _c
-}
-
// NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewClient(t interface {