Files
search-go/mocks/meilisearch_key_manager_mock.go

698 lines
23 KiB
Go

// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify
package mocks
import (
"context"
"github.com/hanzoai/search-go"
mock "github.com/stretchr/testify/mock"
)
// NewMockmeilisearchKeyManager creates a new instance of MockmeilisearchKeyManager. 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 NewMockmeilisearchKeyManager(t interface {
mock.TestingT
Cleanup(func())
}) *MockmeilisearchKeyManager {
mock := &MockmeilisearchKeyManager{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}
// MockmeilisearchKeyManager is an autogenerated mock type for the KeyManager type
type MockmeilisearchKeyManager struct {
mock.Mock
}
type MockmeilisearchKeyManager_Expecter struct {
mock *mock.Mock
}
func (_m *MockmeilisearchKeyManager) EXPECT() *MockmeilisearchKeyManager_Expecter {
return &MockmeilisearchKeyManager_Expecter{mock: &_m.Mock}
}
// CreateKey provides a mock function for the type MockmeilisearchKeyManager
func (_mock *MockmeilisearchKeyManager) CreateKey(request *meilisearch.Key) (*meilisearch.Key, error) {
ret := _mock.Called(request)
if len(ret) == 0 {
panic("no return value specified for CreateKey")
}
var r0 *meilisearch.Key
var r1 error
if returnFunc, ok := ret.Get(0).(func(*meilisearch.Key) (*meilisearch.Key, error)); ok {
return returnFunc(request)
}
if returnFunc, ok := ret.Get(0).(func(*meilisearch.Key) *meilisearch.Key); ok {
r0 = returnFunc(request)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*meilisearch.Key)
}
}
if returnFunc, ok := ret.Get(1).(func(*meilisearch.Key) error); ok {
r1 = returnFunc(request)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockmeilisearchKeyManager_CreateKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateKey'
type MockmeilisearchKeyManager_CreateKey_Call struct {
*mock.Call
}
// CreateKey is a helper method to define mock.On call
// - request *meilisearch.Key
func (_e *MockmeilisearchKeyManager_Expecter) CreateKey(request interface{}) *MockmeilisearchKeyManager_CreateKey_Call {
return &MockmeilisearchKeyManager_CreateKey_Call{Call: _e.mock.On("CreateKey", request)}
}
func (_c *MockmeilisearchKeyManager_CreateKey_Call) Run(run func(request *meilisearch.Key)) *MockmeilisearchKeyManager_CreateKey_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 *meilisearch.Key
if args[0] != nil {
arg0 = args[0].(*meilisearch.Key)
}
run(
arg0,
)
})
return _c
}
func (_c *MockmeilisearchKeyManager_CreateKey_Call) Return(key *meilisearch.Key, err error) *MockmeilisearchKeyManager_CreateKey_Call {
_c.Call.Return(key, err)
return _c
}
func (_c *MockmeilisearchKeyManager_CreateKey_Call) RunAndReturn(run func(request *meilisearch.Key) (*meilisearch.Key, error)) *MockmeilisearchKeyManager_CreateKey_Call {
_c.Call.Return(run)
return _c
}
// CreateKeyWithContext provides a mock function for the type MockmeilisearchKeyManager
func (_mock *MockmeilisearchKeyManager) CreateKeyWithContext(ctx context.Context, request *meilisearch.Key) (*meilisearch.Key, error) {
ret := _mock.Called(ctx, request)
if len(ret) == 0 {
panic("no return value specified for CreateKeyWithContext")
}
var r0 *meilisearch.Key
var r1 error
if returnFunc, ok := ret.Get(0).(func(context.Context, *meilisearch.Key) (*meilisearch.Key, error)); ok {
return returnFunc(ctx, request)
}
if returnFunc, ok := ret.Get(0).(func(context.Context, *meilisearch.Key) *meilisearch.Key); ok {
r0 = returnFunc(ctx, request)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*meilisearch.Key)
}
}
if returnFunc, ok := ret.Get(1).(func(context.Context, *meilisearch.Key) error); ok {
r1 = returnFunc(ctx, request)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockmeilisearchKeyManager_CreateKeyWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateKeyWithContext'
type MockmeilisearchKeyManager_CreateKeyWithContext_Call struct {
*mock.Call
}
// CreateKeyWithContext is a helper method to define mock.On call
// - ctx context.Context
// - request *meilisearch.Key
func (_e *MockmeilisearchKeyManager_Expecter) CreateKeyWithContext(ctx interface{}, request interface{}) *MockmeilisearchKeyManager_CreateKeyWithContext_Call {
return &MockmeilisearchKeyManager_CreateKeyWithContext_Call{Call: _e.mock.On("CreateKeyWithContext", ctx, request)}
}
func (_c *MockmeilisearchKeyManager_CreateKeyWithContext_Call) Run(run func(ctx context.Context, request *meilisearch.Key)) *MockmeilisearchKeyManager_CreateKeyWithContext_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 *meilisearch.Key
if args[1] != nil {
arg1 = args[1].(*meilisearch.Key)
}
run(
arg0,
arg1,
)
})
return _c
}
func (_c *MockmeilisearchKeyManager_CreateKeyWithContext_Call) Return(key *meilisearch.Key, err error) *MockmeilisearchKeyManager_CreateKeyWithContext_Call {
_c.Call.Return(key, err)
return _c
}
func (_c *MockmeilisearchKeyManager_CreateKeyWithContext_Call) RunAndReturn(run func(ctx context.Context, request *meilisearch.Key) (*meilisearch.Key, error)) *MockmeilisearchKeyManager_CreateKeyWithContext_Call {
_c.Call.Return(run)
return _c
}
// DeleteKey provides a mock function for the type MockmeilisearchKeyManager
func (_mock *MockmeilisearchKeyManager) DeleteKey(keyOrUID string) (bool, error) {
ret := _mock.Called(keyOrUID)
if len(ret) == 0 {
panic("no return value specified for DeleteKey")
}
var r0 bool
var r1 error
if returnFunc, ok := ret.Get(0).(func(string) (bool, error)); ok {
return returnFunc(keyOrUID)
}
if returnFunc, ok := ret.Get(0).(func(string) bool); ok {
r0 = returnFunc(keyOrUID)
} else {
r0 = ret.Get(0).(bool)
}
if returnFunc, ok := ret.Get(1).(func(string) error); ok {
r1 = returnFunc(keyOrUID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockmeilisearchKeyManager_DeleteKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteKey'
type MockmeilisearchKeyManager_DeleteKey_Call struct {
*mock.Call
}
// DeleteKey is a helper method to define mock.On call
// - keyOrUID string
func (_e *MockmeilisearchKeyManager_Expecter) DeleteKey(keyOrUID interface{}) *MockmeilisearchKeyManager_DeleteKey_Call {
return &MockmeilisearchKeyManager_DeleteKey_Call{Call: _e.mock.On("DeleteKey", keyOrUID)}
}
func (_c *MockmeilisearchKeyManager_DeleteKey_Call) Run(run func(keyOrUID string)) *MockmeilisearchKeyManager_DeleteKey_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
run(
arg0,
)
})
return _c
}
func (_c *MockmeilisearchKeyManager_DeleteKey_Call) Return(b bool, err error) *MockmeilisearchKeyManager_DeleteKey_Call {
_c.Call.Return(b, err)
return _c
}
func (_c *MockmeilisearchKeyManager_DeleteKey_Call) RunAndReturn(run func(keyOrUID string) (bool, error)) *MockmeilisearchKeyManager_DeleteKey_Call {
_c.Call.Return(run)
return _c
}
// DeleteKeyWithContext provides a mock function for the type MockmeilisearchKeyManager
func (_mock *MockmeilisearchKeyManager) DeleteKeyWithContext(ctx context.Context, keyOrUID string) (bool, error) {
ret := _mock.Called(ctx, keyOrUID)
if len(ret) == 0 {
panic("no return value specified for DeleteKeyWithContext")
}
var r0 bool
var r1 error
if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
return returnFunc(ctx, keyOrUID)
}
if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok {
r0 = returnFunc(ctx, keyOrUID)
} else {
r0 = ret.Get(0).(bool)
}
if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = returnFunc(ctx, keyOrUID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockmeilisearchKeyManager_DeleteKeyWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteKeyWithContext'
type MockmeilisearchKeyManager_DeleteKeyWithContext_Call struct {
*mock.Call
}
// DeleteKeyWithContext is a helper method to define mock.On call
// - ctx context.Context
// - keyOrUID string
func (_e *MockmeilisearchKeyManager_Expecter) DeleteKeyWithContext(ctx interface{}, keyOrUID interface{}) *MockmeilisearchKeyManager_DeleteKeyWithContext_Call {
return &MockmeilisearchKeyManager_DeleteKeyWithContext_Call{Call: _e.mock.On("DeleteKeyWithContext", ctx, keyOrUID)}
}
func (_c *MockmeilisearchKeyManager_DeleteKeyWithContext_Call) Run(run func(ctx context.Context, keyOrUID string)) *MockmeilisearchKeyManager_DeleteKeyWithContext_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 string
if args[1] != nil {
arg1 = args[1].(string)
}
run(
arg0,
arg1,
)
})
return _c
}
func (_c *MockmeilisearchKeyManager_DeleteKeyWithContext_Call) Return(b bool, err error) *MockmeilisearchKeyManager_DeleteKeyWithContext_Call {
_c.Call.Return(b, err)
return _c
}
func (_c *MockmeilisearchKeyManager_DeleteKeyWithContext_Call) RunAndReturn(run func(ctx context.Context, keyOrUID string) (bool, error)) *MockmeilisearchKeyManager_DeleteKeyWithContext_Call {
_c.Call.Return(run)
return _c
}
// GetKey provides a mock function for the type MockmeilisearchKeyManager
func (_mock *MockmeilisearchKeyManager) GetKey(identifier string) (*meilisearch.Key, error) {
ret := _mock.Called(identifier)
if len(ret) == 0 {
panic("no return value specified for GetKey")
}
var r0 *meilisearch.Key
var r1 error
if returnFunc, ok := ret.Get(0).(func(string) (*meilisearch.Key, error)); ok {
return returnFunc(identifier)
}
if returnFunc, ok := ret.Get(0).(func(string) *meilisearch.Key); ok {
r0 = returnFunc(identifier)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*meilisearch.Key)
}
}
if returnFunc, ok := ret.Get(1).(func(string) error); ok {
r1 = returnFunc(identifier)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockmeilisearchKeyManager_GetKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetKey'
type MockmeilisearchKeyManager_GetKey_Call struct {
*mock.Call
}
// GetKey is a helper method to define mock.On call
// - identifier string
func (_e *MockmeilisearchKeyManager_Expecter) GetKey(identifier interface{}) *MockmeilisearchKeyManager_GetKey_Call {
return &MockmeilisearchKeyManager_GetKey_Call{Call: _e.mock.On("GetKey", identifier)}
}
func (_c *MockmeilisearchKeyManager_GetKey_Call) Run(run func(identifier string)) *MockmeilisearchKeyManager_GetKey_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
run(
arg0,
)
})
return _c
}
func (_c *MockmeilisearchKeyManager_GetKey_Call) Return(key *meilisearch.Key, err error) *MockmeilisearchKeyManager_GetKey_Call {
_c.Call.Return(key, err)
return _c
}
func (_c *MockmeilisearchKeyManager_GetKey_Call) RunAndReturn(run func(identifier string) (*meilisearch.Key, error)) *MockmeilisearchKeyManager_GetKey_Call {
_c.Call.Return(run)
return _c
}
// GetKeyWithContext provides a mock function for the type MockmeilisearchKeyManager
func (_mock *MockmeilisearchKeyManager) GetKeyWithContext(ctx context.Context, identifier string) (*meilisearch.Key, error) {
ret := _mock.Called(ctx, identifier)
if len(ret) == 0 {
panic("no return value specified for GetKeyWithContext")
}
var r0 *meilisearch.Key
var r1 error
if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*meilisearch.Key, error)); ok {
return returnFunc(ctx, identifier)
}
if returnFunc, ok := ret.Get(0).(func(context.Context, string) *meilisearch.Key); ok {
r0 = returnFunc(ctx, identifier)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*meilisearch.Key)
}
}
if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = returnFunc(ctx, identifier)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockmeilisearchKeyManager_GetKeyWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetKeyWithContext'
type MockmeilisearchKeyManager_GetKeyWithContext_Call struct {
*mock.Call
}
// GetKeyWithContext is a helper method to define mock.On call
// - ctx context.Context
// - identifier string
func (_e *MockmeilisearchKeyManager_Expecter) GetKeyWithContext(ctx interface{}, identifier interface{}) *MockmeilisearchKeyManager_GetKeyWithContext_Call {
return &MockmeilisearchKeyManager_GetKeyWithContext_Call{Call: _e.mock.On("GetKeyWithContext", ctx, identifier)}
}
func (_c *MockmeilisearchKeyManager_GetKeyWithContext_Call) Run(run func(ctx context.Context, identifier string)) *MockmeilisearchKeyManager_GetKeyWithContext_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 string
if args[1] != nil {
arg1 = args[1].(string)
}
run(
arg0,
arg1,
)
})
return _c
}
func (_c *MockmeilisearchKeyManager_GetKeyWithContext_Call) Return(key *meilisearch.Key, err error) *MockmeilisearchKeyManager_GetKeyWithContext_Call {
_c.Call.Return(key, err)
return _c
}
func (_c *MockmeilisearchKeyManager_GetKeyWithContext_Call) RunAndReturn(run func(ctx context.Context, identifier string) (*meilisearch.Key, error)) *MockmeilisearchKeyManager_GetKeyWithContext_Call {
_c.Call.Return(run)
return _c
}
// GetKeys provides a mock function for the type MockmeilisearchKeyManager
func (_mock *MockmeilisearchKeyManager) GetKeys(param *meilisearch.KeysQuery) (*meilisearch.KeysResults, error) {
ret := _mock.Called(param)
if len(ret) == 0 {
panic("no return value specified for GetKeys")
}
var r0 *meilisearch.KeysResults
var r1 error
if returnFunc, ok := ret.Get(0).(func(*meilisearch.KeysQuery) (*meilisearch.KeysResults, error)); ok {
return returnFunc(param)
}
if returnFunc, ok := ret.Get(0).(func(*meilisearch.KeysQuery) *meilisearch.KeysResults); ok {
r0 = returnFunc(param)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*meilisearch.KeysResults)
}
}
if returnFunc, ok := ret.Get(1).(func(*meilisearch.KeysQuery) error); ok {
r1 = returnFunc(param)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockmeilisearchKeyManager_GetKeys_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetKeys'
type MockmeilisearchKeyManager_GetKeys_Call struct {
*mock.Call
}
// GetKeys is a helper method to define mock.On call
// - param *meilisearch.KeysQuery
func (_e *MockmeilisearchKeyManager_Expecter) GetKeys(param interface{}) *MockmeilisearchKeyManager_GetKeys_Call {
return &MockmeilisearchKeyManager_GetKeys_Call{Call: _e.mock.On("GetKeys", param)}
}
func (_c *MockmeilisearchKeyManager_GetKeys_Call) Run(run func(param *meilisearch.KeysQuery)) *MockmeilisearchKeyManager_GetKeys_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 *meilisearch.KeysQuery
if args[0] != nil {
arg0 = args[0].(*meilisearch.KeysQuery)
}
run(
arg0,
)
})
return _c
}
func (_c *MockmeilisearchKeyManager_GetKeys_Call) Return(keysResults *meilisearch.KeysResults, err error) *MockmeilisearchKeyManager_GetKeys_Call {
_c.Call.Return(keysResults, err)
return _c
}
func (_c *MockmeilisearchKeyManager_GetKeys_Call) RunAndReturn(run func(param *meilisearch.KeysQuery) (*meilisearch.KeysResults, error)) *MockmeilisearchKeyManager_GetKeys_Call {
_c.Call.Return(run)
return _c
}
// GetKeysWithContext provides a mock function for the type MockmeilisearchKeyManager
func (_mock *MockmeilisearchKeyManager) GetKeysWithContext(ctx context.Context, param *meilisearch.KeysQuery) (*meilisearch.KeysResults, error) {
ret := _mock.Called(ctx, param)
if len(ret) == 0 {
panic("no return value specified for GetKeysWithContext")
}
var r0 *meilisearch.KeysResults
var r1 error
if returnFunc, ok := ret.Get(0).(func(context.Context, *meilisearch.KeysQuery) (*meilisearch.KeysResults, error)); ok {
return returnFunc(ctx, param)
}
if returnFunc, ok := ret.Get(0).(func(context.Context, *meilisearch.KeysQuery) *meilisearch.KeysResults); ok {
r0 = returnFunc(ctx, param)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*meilisearch.KeysResults)
}
}
if returnFunc, ok := ret.Get(1).(func(context.Context, *meilisearch.KeysQuery) error); ok {
r1 = returnFunc(ctx, param)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockmeilisearchKeyManager_GetKeysWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetKeysWithContext'
type MockmeilisearchKeyManager_GetKeysWithContext_Call struct {
*mock.Call
}
// GetKeysWithContext is a helper method to define mock.On call
// - ctx context.Context
// - param *meilisearch.KeysQuery
func (_e *MockmeilisearchKeyManager_Expecter) GetKeysWithContext(ctx interface{}, param interface{}) *MockmeilisearchKeyManager_GetKeysWithContext_Call {
return &MockmeilisearchKeyManager_GetKeysWithContext_Call{Call: _e.mock.On("GetKeysWithContext", ctx, param)}
}
func (_c *MockmeilisearchKeyManager_GetKeysWithContext_Call) Run(run func(ctx context.Context, param *meilisearch.KeysQuery)) *MockmeilisearchKeyManager_GetKeysWithContext_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 *meilisearch.KeysQuery
if args[1] != nil {
arg1 = args[1].(*meilisearch.KeysQuery)
}
run(
arg0,
arg1,
)
})
return _c
}
func (_c *MockmeilisearchKeyManager_GetKeysWithContext_Call) Return(keysResults *meilisearch.KeysResults, err error) *MockmeilisearchKeyManager_GetKeysWithContext_Call {
_c.Call.Return(keysResults, err)
return _c
}
func (_c *MockmeilisearchKeyManager_GetKeysWithContext_Call) RunAndReturn(run func(ctx context.Context, param *meilisearch.KeysQuery) (*meilisearch.KeysResults, error)) *MockmeilisearchKeyManager_GetKeysWithContext_Call {
_c.Call.Return(run)
return _c
}
// UpdateKey provides a mock function for the type MockmeilisearchKeyManager
func (_mock *MockmeilisearchKeyManager) UpdateKey(keyOrUID string, request *meilisearch.Key) (*meilisearch.Key, error) {
ret := _mock.Called(keyOrUID, request)
if len(ret) == 0 {
panic("no return value specified for UpdateKey")
}
var r0 *meilisearch.Key
var r1 error
if returnFunc, ok := ret.Get(0).(func(string, *meilisearch.Key) (*meilisearch.Key, error)); ok {
return returnFunc(keyOrUID, request)
}
if returnFunc, ok := ret.Get(0).(func(string, *meilisearch.Key) *meilisearch.Key); ok {
r0 = returnFunc(keyOrUID, request)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*meilisearch.Key)
}
}
if returnFunc, ok := ret.Get(1).(func(string, *meilisearch.Key) error); ok {
r1 = returnFunc(keyOrUID, request)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockmeilisearchKeyManager_UpdateKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateKey'
type MockmeilisearchKeyManager_UpdateKey_Call struct {
*mock.Call
}
// UpdateKey is a helper method to define mock.On call
// - keyOrUID string
// - request *meilisearch.Key
func (_e *MockmeilisearchKeyManager_Expecter) UpdateKey(keyOrUID interface{}, request interface{}) *MockmeilisearchKeyManager_UpdateKey_Call {
return &MockmeilisearchKeyManager_UpdateKey_Call{Call: _e.mock.On("UpdateKey", keyOrUID, request)}
}
func (_c *MockmeilisearchKeyManager_UpdateKey_Call) Run(run func(keyOrUID string, request *meilisearch.Key)) *MockmeilisearchKeyManager_UpdateKey_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
var arg1 *meilisearch.Key
if args[1] != nil {
arg1 = args[1].(*meilisearch.Key)
}
run(
arg0,
arg1,
)
})
return _c
}
func (_c *MockmeilisearchKeyManager_UpdateKey_Call) Return(key *meilisearch.Key, err error) *MockmeilisearchKeyManager_UpdateKey_Call {
_c.Call.Return(key, err)
return _c
}
func (_c *MockmeilisearchKeyManager_UpdateKey_Call) RunAndReturn(run func(keyOrUID string, request *meilisearch.Key) (*meilisearch.Key, error)) *MockmeilisearchKeyManager_UpdateKey_Call {
_c.Call.Return(run)
return _c
}
// UpdateKeyWithContext provides a mock function for the type MockmeilisearchKeyManager
func (_mock *MockmeilisearchKeyManager) UpdateKeyWithContext(ctx context.Context, keyOrUID string, request *meilisearch.Key) (*meilisearch.Key, error) {
ret := _mock.Called(ctx, keyOrUID, request)
if len(ret) == 0 {
panic("no return value specified for UpdateKeyWithContext")
}
var r0 *meilisearch.Key
var r1 error
if returnFunc, ok := ret.Get(0).(func(context.Context, string, *meilisearch.Key) (*meilisearch.Key, error)); ok {
return returnFunc(ctx, keyOrUID, request)
}
if returnFunc, ok := ret.Get(0).(func(context.Context, string, *meilisearch.Key) *meilisearch.Key); ok {
r0 = returnFunc(ctx, keyOrUID, request)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*meilisearch.Key)
}
}
if returnFunc, ok := ret.Get(1).(func(context.Context, string, *meilisearch.Key) error); ok {
r1 = returnFunc(ctx, keyOrUID, request)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockmeilisearchKeyManager_UpdateKeyWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateKeyWithContext'
type MockmeilisearchKeyManager_UpdateKeyWithContext_Call struct {
*mock.Call
}
// UpdateKeyWithContext is a helper method to define mock.On call
// - ctx context.Context
// - keyOrUID string
// - request *meilisearch.Key
func (_e *MockmeilisearchKeyManager_Expecter) UpdateKeyWithContext(ctx interface{}, keyOrUID interface{}, request interface{}) *MockmeilisearchKeyManager_UpdateKeyWithContext_Call {
return &MockmeilisearchKeyManager_UpdateKeyWithContext_Call{Call: _e.mock.On("UpdateKeyWithContext", ctx, keyOrUID, request)}
}
func (_c *MockmeilisearchKeyManager_UpdateKeyWithContext_Call) Run(run func(ctx context.Context, keyOrUID string, request *meilisearch.Key)) *MockmeilisearchKeyManager_UpdateKeyWithContext_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 string
if args[1] != nil {
arg1 = args[1].(string)
}
var arg2 *meilisearch.Key
if args[2] != nil {
arg2 = args[2].(*meilisearch.Key)
}
run(
arg0,
arg1,
arg2,
)
})
return _c
}
func (_c *MockmeilisearchKeyManager_UpdateKeyWithContext_Call) Return(key *meilisearch.Key, err error) *MockmeilisearchKeyManager_UpdateKeyWithContext_Call {
_c.Call.Return(key, err)
return _c
}
func (_c *MockmeilisearchKeyManager_UpdateKeyWithContext_Call) RunAndReturn(run func(ctx context.Context, keyOrUID string, request *meilisearch.Key) (*meilisearch.Key, error)) *MockmeilisearchKeyManager_UpdateKeyWithContext_Call {
_c.Call.Return(run)
return _c
}