github.com/google/syzkaller@v0.0.0-20251211124644-a066d2bc4b02/pkg/gcs/mocks/Client.go (about)

     1  // Code generated by mockery; DO NOT EDIT.
     2  // github.com/vektra/mockery
     3  // template: testify
     4  
     5  package mocks
     6  
     7  import (
     8  	"io"
     9  
    10  	"github.com/google/syzkaller/pkg/gcs"
    11  	mock "github.com/stretchr/testify/mock"
    12  )
    13  
    14  // 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.
    15  // The first argument is typically a *testing.T value.
    16  func NewClient(t interface {
    17  	mock.TestingT
    18  	Cleanup(func())
    19  }) *Client {
    20  	mock := &Client{}
    21  	mock.Mock.Test(t)
    22  
    23  	t.Cleanup(func() { mock.AssertExpectations(t) })
    24  
    25  	return mock
    26  }
    27  
    28  // Client is an autogenerated mock type for the Client type
    29  type Client struct {
    30  	mock.Mock
    31  }
    32  
    33  type Client_Expecter struct {
    34  	mock *mock.Mock
    35  }
    36  
    37  func (_m *Client) EXPECT() *Client_Expecter {
    38  	return &Client_Expecter{mock: &_m.Mock}
    39  }
    40  
    41  // Close provides a mock function for the type Client
    42  func (_mock *Client) Close() error {
    43  	ret := _mock.Called()
    44  
    45  	if len(ret) == 0 {
    46  		panic("no return value specified for Close")
    47  	}
    48  
    49  	var r0 error
    50  	if returnFunc, ok := ret.Get(0).(func() error); ok {
    51  		r0 = returnFunc()
    52  	} else {
    53  		r0 = ret.Error(0)
    54  	}
    55  	return r0
    56  }
    57  
    58  // Client_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
    59  type Client_Close_Call struct {
    60  	*mock.Call
    61  }
    62  
    63  // Close is a helper method to define mock.On call
    64  func (_e *Client_Expecter) Close() *Client_Close_Call {
    65  	return &Client_Close_Call{Call: _e.mock.On("Close")}
    66  }
    67  
    68  func (_c *Client_Close_Call) Run(run func()) *Client_Close_Call {
    69  	_c.Call.Run(func(args mock.Arguments) {
    70  		run()
    71  	})
    72  	return _c
    73  }
    74  
    75  func (_c *Client_Close_Call) Return(err error) *Client_Close_Call {
    76  	_c.Call.Return(err)
    77  	return _c
    78  }
    79  
    80  func (_c *Client_Close_Call) RunAndReturn(run func() error) *Client_Close_Call {
    81  	_c.Call.Return(run)
    82  	return _c
    83  }
    84  
    85  // DeleteFile provides a mock function for the type Client
    86  func (_mock *Client) DeleteFile(path string) error {
    87  	ret := _mock.Called(path)
    88  
    89  	if len(ret) == 0 {
    90  		panic("no return value specified for DeleteFile")
    91  	}
    92  
    93  	var r0 error
    94  	if returnFunc, ok := ret.Get(0).(func(string) error); ok {
    95  		r0 = returnFunc(path)
    96  	} else {
    97  		r0 = ret.Error(0)
    98  	}
    99  	return r0
   100  }
   101  
   102  // Client_DeleteFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteFile'
   103  type Client_DeleteFile_Call struct {
   104  	*mock.Call
   105  }
   106  
   107  // DeleteFile is a helper method to define mock.On call
   108  //   - path string
   109  func (_e *Client_Expecter) DeleteFile(path interface{}) *Client_DeleteFile_Call {
   110  	return &Client_DeleteFile_Call{Call: _e.mock.On("DeleteFile", path)}
   111  }
   112  
   113  func (_c *Client_DeleteFile_Call) Run(run func(path string)) *Client_DeleteFile_Call {
   114  	_c.Call.Run(func(args mock.Arguments) {
   115  		var arg0 string
   116  		if args[0] != nil {
   117  			arg0 = args[0].(string)
   118  		}
   119  		run(
   120  			arg0,
   121  		)
   122  	})
   123  	return _c
   124  }
   125  
   126  func (_c *Client_DeleteFile_Call) Return(err error) *Client_DeleteFile_Call {
   127  	_c.Call.Return(err)
   128  	return _c
   129  }
   130  
   131  func (_c *Client_DeleteFile_Call) RunAndReturn(run func(path string) error) *Client_DeleteFile_Call {
   132  	_c.Call.Return(run)
   133  	return _c
   134  }
   135  
   136  // FileExists provides a mock function for the type Client
   137  func (_mock *Client) FileExists(path string) (bool, error) {
   138  	ret := _mock.Called(path)
   139  
   140  	if len(ret) == 0 {
   141  		panic("no return value specified for FileExists")
   142  	}
   143  
   144  	var r0 bool
   145  	var r1 error
   146  	if returnFunc, ok := ret.Get(0).(func(string) (bool, error)); ok {
   147  		return returnFunc(path)
   148  	}
   149  	if returnFunc, ok := ret.Get(0).(func(string) bool); ok {
   150  		r0 = returnFunc(path)
   151  	} else {
   152  		r0 = ret.Get(0).(bool)
   153  	}
   154  	if returnFunc, ok := ret.Get(1).(func(string) error); ok {
   155  		r1 = returnFunc(path)
   156  	} else {
   157  		r1 = ret.Error(1)
   158  	}
   159  	return r0, r1
   160  }
   161  
   162  // Client_FileExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FileExists'
   163  type Client_FileExists_Call struct {
   164  	*mock.Call
   165  }
   166  
   167  // FileExists is a helper method to define mock.On call
   168  //   - path string
   169  func (_e *Client_Expecter) FileExists(path interface{}) *Client_FileExists_Call {
   170  	return &Client_FileExists_Call{Call: _e.mock.On("FileExists", path)}
   171  }
   172  
   173  func (_c *Client_FileExists_Call) Run(run func(path string)) *Client_FileExists_Call {
   174  	_c.Call.Run(func(args mock.Arguments) {
   175  		var arg0 string
   176  		if args[0] != nil {
   177  			arg0 = args[0].(string)
   178  		}
   179  		run(
   180  			arg0,
   181  		)
   182  	})
   183  	return _c
   184  }
   185  
   186  func (_c *Client_FileExists_Call) Return(b bool, err error) *Client_FileExists_Call {
   187  	_c.Call.Return(b, err)
   188  	return _c
   189  }
   190  
   191  func (_c *Client_FileExists_Call) RunAndReturn(run func(path string) (bool, error)) *Client_FileExists_Call {
   192  	_c.Call.Return(run)
   193  	return _c
   194  }
   195  
   196  // FileReader provides a mock function for the type Client
   197  func (_mock *Client) FileReader(path string) (io.ReadCloser, error) {
   198  	ret := _mock.Called(path)
   199  
   200  	if len(ret) == 0 {
   201  		panic("no return value specified for FileReader")
   202  	}
   203  
   204  	var r0 io.ReadCloser
   205  	var r1 error
   206  	if returnFunc, ok := ret.Get(0).(func(string) (io.ReadCloser, error)); ok {
   207  		return returnFunc(path)
   208  	}
   209  	if returnFunc, ok := ret.Get(0).(func(string) io.ReadCloser); ok {
   210  		r0 = returnFunc(path)
   211  	} else {
   212  		if ret.Get(0) != nil {
   213  			r0 = ret.Get(0).(io.ReadCloser)
   214  		}
   215  	}
   216  	if returnFunc, ok := ret.Get(1).(func(string) error); ok {
   217  		r1 = returnFunc(path)
   218  	} else {
   219  		r1 = ret.Error(1)
   220  	}
   221  	return r0, r1
   222  }
   223  
   224  // Client_FileReader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FileReader'
   225  type Client_FileReader_Call struct {
   226  	*mock.Call
   227  }
   228  
   229  // FileReader is a helper method to define mock.On call
   230  //   - path string
   231  func (_e *Client_Expecter) FileReader(path interface{}) *Client_FileReader_Call {
   232  	return &Client_FileReader_Call{Call: _e.mock.On("FileReader", path)}
   233  }
   234  
   235  func (_c *Client_FileReader_Call) Run(run func(path string)) *Client_FileReader_Call {
   236  	_c.Call.Run(func(args mock.Arguments) {
   237  		var arg0 string
   238  		if args[0] != nil {
   239  			arg0 = args[0].(string)
   240  		}
   241  		run(
   242  			arg0,
   243  		)
   244  	})
   245  	return _c
   246  }
   247  
   248  func (_c *Client_FileReader_Call) Return(readCloser io.ReadCloser, err error) *Client_FileReader_Call {
   249  	_c.Call.Return(readCloser, err)
   250  	return _c
   251  }
   252  
   253  func (_c *Client_FileReader_Call) RunAndReturn(run func(path string) (io.ReadCloser, error)) *Client_FileReader_Call {
   254  	_c.Call.Return(run)
   255  	return _c
   256  }
   257  
   258  // FileWriter provides a mock function for the type Client
   259  func (_mock *Client) FileWriter(path string, contentType string, contentEncoding string) (io.WriteCloser, error) {
   260  	ret := _mock.Called(path, contentType, contentEncoding)
   261  
   262  	if len(ret) == 0 {
   263  		panic("no return value specified for FileWriter")
   264  	}
   265  
   266  	var r0 io.WriteCloser
   267  	var r1 error
   268  	if returnFunc, ok := ret.Get(0).(func(string, string, string) (io.WriteCloser, error)); ok {
   269  		return returnFunc(path, contentType, contentEncoding)
   270  	}
   271  	if returnFunc, ok := ret.Get(0).(func(string, string, string) io.WriteCloser); ok {
   272  		r0 = returnFunc(path, contentType, contentEncoding)
   273  	} else {
   274  		if ret.Get(0) != nil {
   275  			r0 = ret.Get(0).(io.WriteCloser)
   276  		}
   277  	}
   278  	if returnFunc, ok := ret.Get(1).(func(string, string, string) error); ok {
   279  		r1 = returnFunc(path, contentType, contentEncoding)
   280  	} else {
   281  		r1 = ret.Error(1)
   282  	}
   283  	return r0, r1
   284  }
   285  
   286  // Client_FileWriter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FileWriter'
   287  type Client_FileWriter_Call struct {
   288  	*mock.Call
   289  }
   290  
   291  // FileWriter is a helper method to define mock.On call
   292  //   - path string
   293  //   - contentType string
   294  //   - contentEncoding string
   295  func (_e *Client_Expecter) FileWriter(path interface{}, contentType interface{}, contentEncoding interface{}) *Client_FileWriter_Call {
   296  	return &Client_FileWriter_Call{Call: _e.mock.On("FileWriter", path, contentType, contentEncoding)}
   297  }
   298  
   299  func (_c *Client_FileWriter_Call) Run(run func(path string, contentType string, contentEncoding string)) *Client_FileWriter_Call {
   300  	_c.Call.Run(func(args mock.Arguments) {
   301  		var arg0 string
   302  		if args[0] != nil {
   303  			arg0 = args[0].(string)
   304  		}
   305  		var arg1 string
   306  		if args[1] != nil {
   307  			arg1 = args[1].(string)
   308  		}
   309  		var arg2 string
   310  		if args[2] != nil {
   311  			arg2 = args[2].(string)
   312  		}
   313  		run(
   314  			arg0,
   315  			arg1,
   316  			arg2,
   317  		)
   318  	})
   319  	return _c
   320  }
   321  
   322  func (_c *Client_FileWriter_Call) Return(writeCloser io.WriteCloser, err error) *Client_FileWriter_Call {
   323  	_c.Call.Return(writeCloser, err)
   324  	return _c
   325  }
   326  
   327  func (_c *Client_FileWriter_Call) RunAndReturn(run func(path string, contentType string, contentEncoding string) (io.WriteCloser, error)) *Client_FileWriter_Call {
   328  	_c.Call.Return(run)
   329  	return _c
   330  }
   331  
   332  // ListObjects provides a mock function for the type Client
   333  func (_mock *Client) ListObjects(path string) ([]*gcs.Object, error) {
   334  	ret := _mock.Called(path)
   335  
   336  	if len(ret) == 0 {
   337  		panic("no return value specified for ListObjects")
   338  	}
   339  
   340  	var r0 []*gcs.Object
   341  	var r1 error
   342  	if returnFunc, ok := ret.Get(0).(func(string) ([]*gcs.Object, error)); ok {
   343  		return returnFunc(path)
   344  	}
   345  	if returnFunc, ok := ret.Get(0).(func(string) []*gcs.Object); ok {
   346  		r0 = returnFunc(path)
   347  	} else {
   348  		if ret.Get(0) != nil {
   349  			r0 = ret.Get(0).([]*gcs.Object)
   350  		}
   351  	}
   352  	if returnFunc, ok := ret.Get(1).(func(string) error); ok {
   353  		r1 = returnFunc(path)
   354  	} else {
   355  		r1 = ret.Error(1)
   356  	}
   357  	return r0, r1
   358  }
   359  
   360  // Client_ListObjects_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListObjects'
   361  type Client_ListObjects_Call struct {
   362  	*mock.Call
   363  }
   364  
   365  // ListObjects is a helper method to define mock.On call
   366  //   - path string
   367  func (_e *Client_Expecter) ListObjects(path interface{}) *Client_ListObjects_Call {
   368  	return &Client_ListObjects_Call{Call: _e.mock.On("ListObjects", path)}
   369  }
   370  
   371  func (_c *Client_ListObjects_Call) Run(run func(path string)) *Client_ListObjects_Call {
   372  	_c.Call.Run(func(args mock.Arguments) {
   373  		var arg0 string
   374  		if args[0] != nil {
   375  			arg0 = args[0].(string)
   376  		}
   377  		run(
   378  			arg0,
   379  		)
   380  	})
   381  	return _c
   382  }
   383  
   384  func (_c *Client_ListObjects_Call) Return(objects []*gcs.Object, err error) *Client_ListObjects_Call {
   385  	_c.Call.Return(objects, err)
   386  	return _c
   387  }
   388  
   389  func (_c *Client_ListObjects_Call) RunAndReturn(run func(path string) ([]*gcs.Object, error)) *Client_ListObjects_Call {
   390  	_c.Call.Return(run)
   391  	return _c
   392  }
   393  
   394  // Publish provides a mock function for the type Client
   395  func (_mock *Client) Publish(path string) error {
   396  	ret := _mock.Called(path)
   397  
   398  	if len(ret) == 0 {
   399  		panic("no return value specified for Publish")
   400  	}
   401  
   402  	var r0 error
   403  	if returnFunc, ok := ret.Get(0).(func(string) error); ok {
   404  		r0 = returnFunc(path)
   405  	} else {
   406  		r0 = ret.Error(0)
   407  	}
   408  	return r0
   409  }
   410  
   411  // Client_Publish_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Publish'
   412  type Client_Publish_Call struct {
   413  	*mock.Call
   414  }
   415  
   416  // Publish is a helper method to define mock.On call
   417  //   - path string
   418  func (_e *Client_Expecter) Publish(path interface{}) *Client_Publish_Call {
   419  	return &Client_Publish_Call{Call: _e.mock.On("Publish", path)}
   420  }
   421  
   422  func (_c *Client_Publish_Call) Run(run func(path string)) *Client_Publish_Call {
   423  	_c.Call.Run(func(args mock.Arguments) {
   424  		var arg0 string
   425  		if args[0] != nil {
   426  			arg0 = args[0].(string)
   427  		}
   428  		run(
   429  			arg0,
   430  		)
   431  	})
   432  	return _c
   433  }
   434  
   435  func (_c *Client_Publish_Call) Return(err error) *Client_Publish_Call {
   436  	_c.Call.Return(err)
   437  	return _c
   438  }
   439  
   440  func (_c *Client_Publish_Call) RunAndReturn(run func(path string) error) *Client_Publish_Call {
   441  	_c.Call.Return(run)
   442  	return _c
   443  }