mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-28 14:35:27 +08:00
issue: #43897 also for issue: #46166 add ack_sync_up flag into broadcast message header, which indicates that whether the broadcast operation is need to be synced up between the streaming node and the coordinator. If the ack_sync_up is false, the broadcast operation will be acked once the recovery storage see the message at current vchannel, the fast ack operation can be applied to speed up the broadcast operation. If the ack_sync_up is true, the broadcast operation will be acked after the checkpoint of current vchannel reach current message. The fast ack operation can not be applied to speed up the broadcast operation, because the ack operation need to be synced up with streaming node. e.g. if truncate collection operation want to call ack once callback after the all segment are flushed at current vchannel, it should set the ack_sync_up to be true. TODO: current implementation doesn't promise the ack sync up semantic, it only promise FastAck operation will not be applied, wait for 3.0 to implement the ack sync up semantic. only for truncate api now. --------- Signed-off-by: chyezh <chyezh@outlook.com>
3674 lines
128 KiB
Go
3674 lines
128 KiB
Go
// Code generated by mockery v2.53.3. DO NOT EDIT.
|
|
|
|
package mockrootcoord
|
|
|
|
import (
|
|
context "context"
|
|
|
|
internalpb "github.com/milvus-io/milvus/pkg/v2/proto/internalpb"
|
|
message "github.com/milvus-io/milvus/pkg/v2/streaming/util/message"
|
|
|
|
messagespb "github.com/milvus-io/milvus/pkg/v2/proto/messagespb"
|
|
|
|
milvuspb "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
|
|
|
mock "github.com/stretchr/testify/mock"
|
|
|
|
model "github.com/milvus-io/milvus/internal/metastore/model"
|
|
|
|
rootcoordpb "github.com/milvus-io/milvus/pkg/v2/proto/rootcoordpb"
|
|
)
|
|
|
|
// IMetaTable is an autogenerated mock type for the IMetaTable type
|
|
type IMetaTable struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type IMetaTable_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *IMetaTable) EXPECT() *IMetaTable_Expecter {
|
|
return &IMetaTable_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// AddCollection provides a mock function with given fields: ctx, coll
|
|
func (_m *IMetaTable) AddCollection(ctx context.Context, coll *model.Collection) error {
|
|
ret := _m.Called(ctx, coll)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for AddCollection")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *model.Collection) error); ok {
|
|
r0 = rf(ctx, coll)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_AddCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddCollection'
|
|
type IMetaTable_AddCollection_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// AddCollection is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - coll *model.Collection
|
|
func (_e *IMetaTable_Expecter) AddCollection(ctx interface{}, coll interface{}) *IMetaTable_AddCollection_Call {
|
|
return &IMetaTable_AddCollection_Call{Call: _e.mock.On("AddCollection", ctx, coll)}
|
|
}
|
|
|
|
func (_c *IMetaTable_AddCollection_Call) Run(run func(ctx context.Context, coll *model.Collection)) *IMetaTable_AddCollection_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*model.Collection))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_AddCollection_Call) Return(_a0 error) *IMetaTable_AddCollection_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_AddCollection_Call) RunAndReturn(run func(context.Context, *model.Collection) error) *IMetaTable_AddCollection_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// AddPartition provides a mock function with given fields: ctx, partition
|
|
func (_m *IMetaTable) AddPartition(ctx context.Context, partition *model.Partition) error {
|
|
ret := _m.Called(ctx, partition)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for AddPartition")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *model.Partition) error); ok {
|
|
r0 = rf(ctx, partition)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_AddPartition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddPartition'
|
|
type IMetaTable_AddPartition_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// AddPartition is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - partition *model.Partition
|
|
func (_e *IMetaTable_Expecter) AddPartition(ctx interface{}, partition interface{}) *IMetaTable_AddPartition_Call {
|
|
return &IMetaTable_AddPartition_Call{Call: _e.mock.On("AddPartition", ctx, partition)}
|
|
}
|
|
|
|
func (_c *IMetaTable_AddPartition_Call) Run(run func(ctx context.Context, partition *model.Partition)) *IMetaTable_AddPartition_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*model.Partition))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_AddPartition_Call) Return(_a0 error) *IMetaTable_AddPartition_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_AddPartition_Call) RunAndReturn(run func(context.Context, *model.Partition) error) *IMetaTable_AddPartition_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// AlterAlias provides a mock function with given fields: ctx, result
|
|
func (_m *IMetaTable) AlterAlias(ctx context.Context, result message.BroadcastResult[*messagespb.AlterAliasMessageHeader, *messagespb.AlterAliasMessageBody]) error {
|
|
ret := _m.Called(ctx, result)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for AlterAlias")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, message.BroadcastResult[*messagespb.AlterAliasMessageHeader, *messagespb.AlterAliasMessageBody]) error); ok {
|
|
r0 = rf(ctx, result)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_AlterAlias_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AlterAlias'
|
|
type IMetaTable_AlterAlias_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// AlterAlias is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - result message.BroadcastResult[*messagespb.AlterAliasMessageHeader,*messagespb.AlterAliasMessageBody]
|
|
func (_e *IMetaTable_Expecter) AlterAlias(ctx interface{}, result interface{}) *IMetaTable_AlterAlias_Call {
|
|
return &IMetaTable_AlterAlias_Call{Call: _e.mock.On("AlterAlias", ctx, result)}
|
|
}
|
|
|
|
func (_c *IMetaTable_AlterAlias_Call) Run(run func(ctx context.Context, result message.BroadcastResult[*messagespb.AlterAliasMessageHeader, *messagespb.AlterAliasMessageBody])) *IMetaTable_AlterAlias_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(message.BroadcastResult[*messagespb.AlterAliasMessageHeader, *messagespb.AlterAliasMessageBody]))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_AlterAlias_Call) Return(_a0 error) *IMetaTable_AlterAlias_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_AlterAlias_Call) RunAndReturn(run func(context.Context, message.BroadcastResult[*messagespb.AlterAliasMessageHeader, *messagespb.AlterAliasMessageBody]) error) *IMetaTable_AlterAlias_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// AlterCollection provides a mock function with given fields: ctx, result
|
|
func (_m *IMetaTable) AlterCollection(ctx context.Context, result message.BroadcastResult[*messagespb.AlterCollectionMessageHeader, *messagespb.AlterCollectionMessageBody]) error {
|
|
ret := _m.Called(ctx, result)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for AlterCollection")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, message.BroadcastResult[*messagespb.AlterCollectionMessageHeader, *messagespb.AlterCollectionMessageBody]) error); ok {
|
|
r0 = rf(ctx, result)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_AlterCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AlterCollection'
|
|
type IMetaTable_AlterCollection_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// AlterCollection is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - result message.BroadcastResult[*messagespb.AlterCollectionMessageHeader,*messagespb.AlterCollectionMessageBody]
|
|
func (_e *IMetaTable_Expecter) AlterCollection(ctx interface{}, result interface{}) *IMetaTable_AlterCollection_Call {
|
|
return &IMetaTable_AlterCollection_Call{Call: _e.mock.On("AlterCollection", ctx, result)}
|
|
}
|
|
|
|
func (_c *IMetaTable_AlterCollection_Call) Run(run func(ctx context.Context, result message.BroadcastResult[*messagespb.AlterCollectionMessageHeader, *messagespb.AlterCollectionMessageBody])) *IMetaTable_AlterCollection_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(message.BroadcastResult[*messagespb.AlterCollectionMessageHeader, *messagespb.AlterCollectionMessageBody]))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_AlterCollection_Call) Return(_a0 error) *IMetaTable_AlterCollection_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_AlterCollection_Call) RunAndReturn(run func(context.Context, message.BroadcastResult[*messagespb.AlterCollectionMessageHeader, *messagespb.AlterCollectionMessageBody]) error) *IMetaTable_AlterCollection_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// AlterCredential provides a mock function with given fields: ctx, result
|
|
func (_m *IMetaTable) AlterCredential(ctx context.Context, result message.BroadcastResult[*messagespb.AlterUserMessageHeader, *messagespb.AlterUserMessageBody]) error {
|
|
ret := _m.Called(ctx, result)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for AlterCredential")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, message.BroadcastResult[*messagespb.AlterUserMessageHeader, *messagespb.AlterUserMessageBody]) error); ok {
|
|
r0 = rf(ctx, result)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_AlterCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AlterCredential'
|
|
type IMetaTable_AlterCredential_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// AlterCredential is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - result message.BroadcastResult[*messagespb.AlterUserMessageHeader,*messagespb.AlterUserMessageBody]
|
|
func (_e *IMetaTable_Expecter) AlterCredential(ctx interface{}, result interface{}) *IMetaTable_AlterCredential_Call {
|
|
return &IMetaTable_AlterCredential_Call{Call: _e.mock.On("AlterCredential", ctx, result)}
|
|
}
|
|
|
|
func (_c *IMetaTable_AlterCredential_Call) Run(run func(ctx context.Context, result message.BroadcastResult[*messagespb.AlterUserMessageHeader, *messagespb.AlterUserMessageBody])) *IMetaTable_AlterCredential_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(message.BroadcastResult[*messagespb.AlterUserMessageHeader, *messagespb.AlterUserMessageBody]))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_AlterCredential_Call) Return(_a0 error) *IMetaTable_AlterCredential_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_AlterCredential_Call) RunAndReturn(run func(context.Context, message.BroadcastResult[*messagespb.AlterUserMessageHeader, *messagespb.AlterUserMessageBody]) error) *IMetaTable_AlterCredential_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// AlterDatabase provides a mock function with given fields: ctx, newDB, ts
|
|
func (_m *IMetaTable) AlterDatabase(ctx context.Context, newDB *model.Database, ts uint64) error {
|
|
ret := _m.Called(ctx, newDB, ts)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for AlterDatabase")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *model.Database, uint64) error); ok {
|
|
r0 = rf(ctx, newDB, ts)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_AlterDatabase_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AlterDatabase'
|
|
type IMetaTable_AlterDatabase_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// AlterDatabase is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - newDB *model.Database
|
|
// - ts uint64
|
|
func (_e *IMetaTable_Expecter) AlterDatabase(ctx interface{}, newDB interface{}, ts interface{}) *IMetaTable_AlterDatabase_Call {
|
|
return &IMetaTable_AlterDatabase_Call{Call: _e.mock.On("AlterDatabase", ctx, newDB, ts)}
|
|
}
|
|
|
|
func (_c *IMetaTable_AlterDatabase_Call) Run(run func(ctx context.Context, newDB *model.Database, ts uint64)) *IMetaTable_AlterDatabase_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*model.Database), args[2].(uint64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_AlterDatabase_Call) Return(_a0 error) *IMetaTable_AlterDatabase_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_AlterDatabase_Call) RunAndReturn(run func(context.Context, *model.Database, uint64) error) *IMetaTable_AlterDatabase_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// BackupRBAC provides a mock function with given fields: ctx, tenant
|
|
func (_m *IMetaTable) BackupRBAC(ctx context.Context, tenant string) (*milvuspb.RBACMeta, error) {
|
|
ret := _m.Called(ctx, tenant)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for BackupRBAC")
|
|
}
|
|
|
|
var r0 *milvuspb.RBACMeta
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) (*milvuspb.RBACMeta, error)); ok {
|
|
return rf(ctx, tenant)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) *milvuspb.RBACMeta); ok {
|
|
r0 = rf(ctx, tenant)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*milvuspb.RBACMeta)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
r1 = rf(ctx, tenant)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// IMetaTable_BackupRBAC_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BackupRBAC'
|
|
type IMetaTable_BackupRBAC_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// BackupRBAC is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - tenant string
|
|
func (_e *IMetaTable_Expecter) BackupRBAC(ctx interface{}, tenant interface{}) *IMetaTable_BackupRBAC_Call {
|
|
return &IMetaTable_BackupRBAC_Call{Call: _e.mock.On("BackupRBAC", ctx, tenant)}
|
|
}
|
|
|
|
func (_c *IMetaTable_BackupRBAC_Call) Run(run func(ctx context.Context, tenant string)) *IMetaTable_BackupRBAC_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_BackupRBAC_Call) Return(_a0 *milvuspb.RBACMeta, _a1 error) *IMetaTable_BackupRBAC_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_BackupRBAC_Call) RunAndReturn(run func(context.Context, string) (*milvuspb.RBACMeta, error)) *IMetaTable_BackupRBAC_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// BeginTruncateCollection provides a mock function with given fields: ctx, collectionID
|
|
func (_m *IMetaTable) BeginTruncateCollection(ctx context.Context, collectionID int64) error {
|
|
ret := _m.Called(ctx, collectionID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for BeginTruncateCollection")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
|
r0 = rf(ctx, collectionID)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_BeginTruncateCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeginTruncateCollection'
|
|
type IMetaTable_BeginTruncateCollection_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// BeginTruncateCollection is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - collectionID int64
|
|
func (_e *IMetaTable_Expecter) BeginTruncateCollection(ctx interface{}, collectionID interface{}) *IMetaTable_BeginTruncateCollection_Call {
|
|
return &IMetaTable_BeginTruncateCollection_Call{Call: _e.mock.On("BeginTruncateCollection", ctx, collectionID)}
|
|
}
|
|
|
|
func (_c *IMetaTable_BeginTruncateCollection_Call) Run(run func(ctx context.Context, collectionID int64)) *IMetaTable_BeginTruncateCollection_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_BeginTruncateCollection_Call) Return(_a0 error) *IMetaTable_BeginTruncateCollection_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_BeginTruncateCollection_Call) RunAndReturn(run func(context.Context, int64) error) *IMetaTable_BeginTruncateCollection_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CheckIfAddCredential provides a mock function with given fields: ctx, req
|
|
func (_m *IMetaTable) CheckIfAddCredential(ctx context.Context, req *internalpb.CredentialInfo) error {
|
|
ret := _m.Called(ctx, req)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CheckIfAddCredential")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *internalpb.CredentialInfo) error); ok {
|
|
r0 = rf(ctx, req)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_CheckIfAddCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckIfAddCredential'
|
|
type IMetaTable_CheckIfAddCredential_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CheckIfAddCredential is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - req *internalpb.CredentialInfo
|
|
func (_e *IMetaTable_Expecter) CheckIfAddCredential(ctx interface{}, req interface{}) *IMetaTable_CheckIfAddCredential_Call {
|
|
return &IMetaTable_CheckIfAddCredential_Call{Call: _e.mock.On("CheckIfAddCredential", ctx, req)}
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfAddCredential_Call) Run(run func(ctx context.Context, req *internalpb.CredentialInfo)) *IMetaTable_CheckIfAddCredential_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*internalpb.CredentialInfo))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfAddCredential_Call) Return(_a0 error) *IMetaTable_CheckIfAddCredential_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfAddCredential_Call) RunAndReturn(run func(context.Context, *internalpb.CredentialInfo) error) *IMetaTable_CheckIfAddCredential_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CheckIfAliasAlterable provides a mock function with given fields: ctx, dbName, alias, collectionName
|
|
func (_m *IMetaTable) CheckIfAliasAlterable(ctx context.Context, dbName string, alias string, collectionName string) error {
|
|
ret := _m.Called(ctx, dbName, alias, collectionName)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CheckIfAliasAlterable")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) error); ok {
|
|
r0 = rf(ctx, dbName, alias, collectionName)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_CheckIfAliasAlterable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckIfAliasAlterable'
|
|
type IMetaTable_CheckIfAliasAlterable_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CheckIfAliasAlterable is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - dbName string
|
|
// - alias string
|
|
// - collectionName string
|
|
func (_e *IMetaTable_Expecter) CheckIfAliasAlterable(ctx interface{}, dbName interface{}, alias interface{}, collectionName interface{}) *IMetaTable_CheckIfAliasAlterable_Call {
|
|
return &IMetaTable_CheckIfAliasAlterable_Call{Call: _e.mock.On("CheckIfAliasAlterable", ctx, dbName, alias, collectionName)}
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfAliasAlterable_Call) Run(run func(ctx context.Context, dbName string, alias string, collectionName string)) *IMetaTable_CheckIfAliasAlterable_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 *IMetaTable_CheckIfAliasAlterable_Call) Return(_a0 error) *IMetaTable_CheckIfAliasAlterable_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfAliasAlterable_Call) RunAndReturn(run func(context.Context, string, string, string) error) *IMetaTable_CheckIfAliasAlterable_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CheckIfAliasCreatable provides a mock function with given fields: ctx, dbName, alias, collectionName
|
|
func (_m *IMetaTable) CheckIfAliasCreatable(ctx context.Context, dbName string, alias string, collectionName string) error {
|
|
ret := _m.Called(ctx, dbName, alias, collectionName)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CheckIfAliasCreatable")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) error); ok {
|
|
r0 = rf(ctx, dbName, alias, collectionName)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_CheckIfAliasCreatable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckIfAliasCreatable'
|
|
type IMetaTable_CheckIfAliasCreatable_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CheckIfAliasCreatable is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - dbName string
|
|
// - alias string
|
|
// - collectionName string
|
|
func (_e *IMetaTable_Expecter) CheckIfAliasCreatable(ctx interface{}, dbName interface{}, alias interface{}, collectionName interface{}) *IMetaTable_CheckIfAliasCreatable_Call {
|
|
return &IMetaTable_CheckIfAliasCreatable_Call{Call: _e.mock.On("CheckIfAliasCreatable", ctx, dbName, alias, collectionName)}
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfAliasCreatable_Call) Run(run func(ctx context.Context, dbName string, alias string, collectionName string)) *IMetaTable_CheckIfAliasCreatable_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 *IMetaTable_CheckIfAliasCreatable_Call) Return(_a0 error) *IMetaTable_CheckIfAliasCreatable_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfAliasCreatable_Call) RunAndReturn(run func(context.Context, string, string, string) error) *IMetaTable_CheckIfAliasCreatable_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CheckIfAliasDroppable provides a mock function with given fields: ctx, dbName, alias
|
|
func (_m *IMetaTable) CheckIfAliasDroppable(ctx context.Context, dbName string, alias string) error {
|
|
ret := _m.Called(ctx, dbName, alias)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CheckIfAliasDroppable")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
|
|
r0 = rf(ctx, dbName, alias)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_CheckIfAliasDroppable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckIfAliasDroppable'
|
|
type IMetaTable_CheckIfAliasDroppable_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CheckIfAliasDroppable is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - dbName string
|
|
// - alias string
|
|
func (_e *IMetaTable_Expecter) CheckIfAliasDroppable(ctx interface{}, dbName interface{}, alias interface{}) *IMetaTable_CheckIfAliasDroppable_Call {
|
|
return &IMetaTable_CheckIfAliasDroppable_Call{Call: _e.mock.On("CheckIfAliasDroppable", ctx, dbName, alias)}
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfAliasDroppable_Call) Run(run func(ctx context.Context, dbName string, alias string)) *IMetaTable_CheckIfAliasDroppable_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfAliasDroppable_Call) Return(_a0 error) *IMetaTable_CheckIfAliasDroppable_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfAliasDroppable_Call) RunAndReturn(run func(context.Context, string, string) error) *IMetaTable_CheckIfAliasDroppable_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CheckIfCollectionRenamable provides a mock function with given fields: ctx, dbName, oldName, newDBName, newName
|
|
func (_m *IMetaTable) CheckIfCollectionRenamable(ctx context.Context, dbName string, oldName string, newDBName string, newName string) error {
|
|
ret := _m.Called(ctx, dbName, oldName, newDBName, newName)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CheckIfCollectionRenamable")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) error); ok {
|
|
r0 = rf(ctx, dbName, oldName, newDBName, newName)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_CheckIfCollectionRenamable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckIfCollectionRenamable'
|
|
type IMetaTable_CheckIfCollectionRenamable_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CheckIfCollectionRenamable is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - dbName string
|
|
// - oldName string
|
|
// - newDBName string
|
|
// - newName string
|
|
func (_e *IMetaTable_Expecter) CheckIfCollectionRenamable(ctx interface{}, dbName interface{}, oldName interface{}, newDBName interface{}, newName interface{}) *IMetaTable_CheckIfCollectionRenamable_Call {
|
|
return &IMetaTable_CheckIfCollectionRenamable_Call{Call: _e.mock.On("CheckIfCollectionRenamable", ctx, dbName, oldName, newDBName, newName)}
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfCollectionRenamable_Call) Run(run func(ctx context.Context, dbName string, oldName string, newDBName string, newName string)) *IMetaTable_CheckIfCollectionRenamable_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfCollectionRenamable_Call) Return(_a0 error) *IMetaTable_CheckIfCollectionRenamable_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfCollectionRenamable_Call) RunAndReturn(run func(context.Context, string, string, string, string) error) *IMetaTable_CheckIfCollectionRenamable_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CheckIfCreateRole provides a mock function with given fields: ctx, req
|
|
func (_m *IMetaTable) CheckIfCreateRole(ctx context.Context, req *milvuspb.CreateRoleRequest) error {
|
|
ret := _m.Called(ctx, req)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CheckIfCreateRole")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateRoleRequest) error); ok {
|
|
r0 = rf(ctx, req)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_CheckIfCreateRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckIfCreateRole'
|
|
type IMetaTable_CheckIfCreateRole_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CheckIfCreateRole is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - req *milvuspb.CreateRoleRequest
|
|
func (_e *IMetaTable_Expecter) CheckIfCreateRole(ctx interface{}, req interface{}) *IMetaTable_CheckIfCreateRole_Call {
|
|
return &IMetaTable_CheckIfCreateRole_Call{Call: _e.mock.On("CheckIfCreateRole", ctx, req)}
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfCreateRole_Call) Run(run func(ctx context.Context, req *milvuspb.CreateRoleRequest)) *IMetaTable_CheckIfCreateRole_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*milvuspb.CreateRoleRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfCreateRole_Call) Return(_a0 error) *IMetaTable_CheckIfCreateRole_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfCreateRole_Call) RunAndReturn(run func(context.Context, *milvuspb.CreateRoleRequest) error) *IMetaTable_CheckIfCreateRole_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CheckIfDatabaseCreatable provides a mock function with given fields: ctx, req
|
|
func (_m *IMetaTable) CheckIfDatabaseCreatable(ctx context.Context, req *milvuspb.CreateDatabaseRequest) error {
|
|
ret := _m.Called(ctx, req)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CheckIfDatabaseCreatable")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateDatabaseRequest) error); ok {
|
|
r0 = rf(ctx, req)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_CheckIfDatabaseCreatable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckIfDatabaseCreatable'
|
|
type IMetaTable_CheckIfDatabaseCreatable_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CheckIfDatabaseCreatable is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - req *milvuspb.CreateDatabaseRequest
|
|
func (_e *IMetaTable_Expecter) CheckIfDatabaseCreatable(ctx interface{}, req interface{}) *IMetaTable_CheckIfDatabaseCreatable_Call {
|
|
return &IMetaTable_CheckIfDatabaseCreatable_Call{Call: _e.mock.On("CheckIfDatabaseCreatable", ctx, req)}
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfDatabaseCreatable_Call) Run(run func(ctx context.Context, req *milvuspb.CreateDatabaseRequest)) *IMetaTable_CheckIfDatabaseCreatable_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*milvuspb.CreateDatabaseRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfDatabaseCreatable_Call) Return(_a0 error) *IMetaTable_CheckIfDatabaseCreatable_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfDatabaseCreatable_Call) RunAndReturn(run func(context.Context, *milvuspb.CreateDatabaseRequest) error) *IMetaTable_CheckIfDatabaseCreatable_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CheckIfDatabaseDroppable provides a mock function with given fields: ctx, req
|
|
func (_m *IMetaTable) CheckIfDatabaseDroppable(ctx context.Context, req *milvuspb.DropDatabaseRequest) error {
|
|
ret := _m.Called(ctx, req)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CheckIfDatabaseDroppable")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropDatabaseRequest) error); ok {
|
|
r0 = rf(ctx, req)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_CheckIfDatabaseDroppable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckIfDatabaseDroppable'
|
|
type IMetaTable_CheckIfDatabaseDroppable_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CheckIfDatabaseDroppable is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - req *milvuspb.DropDatabaseRequest
|
|
func (_e *IMetaTable_Expecter) CheckIfDatabaseDroppable(ctx interface{}, req interface{}) *IMetaTable_CheckIfDatabaseDroppable_Call {
|
|
return &IMetaTable_CheckIfDatabaseDroppable_Call{Call: _e.mock.On("CheckIfDatabaseDroppable", ctx, req)}
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfDatabaseDroppable_Call) Run(run func(ctx context.Context, req *milvuspb.DropDatabaseRequest)) *IMetaTable_CheckIfDatabaseDroppable_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*milvuspb.DropDatabaseRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfDatabaseDroppable_Call) Return(_a0 error) *IMetaTable_CheckIfDatabaseDroppable_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfDatabaseDroppable_Call) RunAndReturn(run func(context.Context, *milvuspb.DropDatabaseRequest) error) *IMetaTable_CheckIfDatabaseDroppable_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CheckIfDeleteCredential provides a mock function with given fields: ctx, req
|
|
func (_m *IMetaTable) CheckIfDeleteCredential(ctx context.Context, req *milvuspb.DeleteCredentialRequest) error {
|
|
ret := _m.Called(ctx, req)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CheckIfDeleteCredential")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DeleteCredentialRequest) error); ok {
|
|
r0 = rf(ctx, req)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_CheckIfDeleteCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckIfDeleteCredential'
|
|
type IMetaTable_CheckIfDeleteCredential_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CheckIfDeleteCredential is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - req *milvuspb.DeleteCredentialRequest
|
|
func (_e *IMetaTable_Expecter) CheckIfDeleteCredential(ctx interface{}, req interface{}) *IMetaTable_CheckIfDeleteCredential_Call {
|
|
return &IMetaTable_CheckIfDeleteCredential_Call{Call: _e.mock.On("CheckIfDeleteCredential", ctx, req)}
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfDeleteCredential_Call) Run(run func(ctx context.Context, req *milvuspb.DeleteCredentialRequest)) *IMetaTable_CheckIfDeleteCredential_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*milvuspb.DeleteCredentialRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfDeleteCredential_Call) Return(_a0 error) *IMetaTable_CheckIfDeleteCredential_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfDeleteCredential_Call) RunAndReturn(run func(context.Context, *milvuspb.DeleteCredentialRequest) error) *IMetaTable_CheckIfDeleteCredential_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CheckIfDropRole provides a mock function with given fields: ctx, in
|
|
func (_m *IMetaTable) CheckIfDropRole(ctx context.Context, in *milvuspb.DropRoleRequest) error {
|
|
ret := _m.Called(ctx, in)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CheckIfDropRole")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropRoleRequest) error); ok {
|
|
r0 = rf(ctx, in)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_CheckIfDropRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckIfDropRole'
|
|
type IMetaTable_CheckIfDropRole_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CheckIfDropRole is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *milvuspb.DropRoleRequest
|
|
func (_e *IMetaTable_Expecter) CheckIfDropRole(ctx interface{}, in interface{}) *IMetaTable_CheckIfDropRole_Call {
|
|
return &IMetaTable_CheckIfDropRole_Call{Call: _e.mock.On("CheckIfDropRole", ctx, in)}
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfDropRole_Call) Run(run func(ctx context.Context, in *milvuspb.DropRoleRequest)) *IMetaTable_CheckIfDropRole_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*milvuspb.DropRoleRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfDropRole_Call) Return(_a0 error) *IMetaTable_CheckIfDropRole_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfDropRole_Call) RunAndReturn(run func(context.Context, *milvuspb.DropRoleRequest) error) *IMetaTable_CheckIfDropRole_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CheckIfOperateUserRole provides a mock function with given fields: ctx, req
|
|
func (_m *IMetaTable) CheckIfOperateUserRole(ctx context.Context, req *milvuspb.OperateUserRoleRequest) error {
|
|
ret := _m.Called(ctx, req)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CheckIfOperateUserRole")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.OperateUserRoleRequest) error); ok {
|
|
r0 = rf(ctx, req)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_CheckIfOperateUserRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckIfOperateUserRole'
|
|
type IMetaTable_CheckIfOperateUserRole_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CheckIfOperateUserRole is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - req *milvuspb.OperateUserRoleRequest
|
|
func (_e *IMetaTable_Expecter) CheckIfOperateUserRole(ctx interface{}, req interface{}) *IMetaTable_CheckIfOperateUserRole_Call {
|
|
return &IMetaTable_CheckIfOperateUserRole_Call{Call: _e.mock.On("CheckIfOperateUserRole", ctx, req)}
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfOperateUserRole_Call) Run(run func(ctx context.Context, req *milvuspb.OperateUserRoleRequest)) *IMetaTable_CheckIfOperateUserRole_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*milvuspb.OperateUserRoleRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfOperateUserRole_Call) Return(_a0 error) *IMetaTable_CheckIfOperateUserRole_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfOperateUserRole_Call) RunAndReturn(run func(context.Context, *milvuspb.OperateUserRoleRequest) error) *IMetaTable_CheckIfOperateUserRole_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CheckIfPrivilegeGroupAlterable provides a mock function with given fields: ctx, req
|
|
func (_m *IMetaTable) CheckIfPrivilegeGroupAlterable(ctx context.Context, req *milvuspb.OperatePrivilegeGroupRequest) error {
|
|
ret := _m.Called(ctx, req)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CheckIfPrivilegeGroupAlterable")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.OperatePrivilegeGroupRequest) error); ok {
|
|
r0 = rf(ctx, req)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_CheckIfPrivilegeGroupAlterable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckIfPrivilegeGroupAlterable'
|
|
type IMetaTable_CheckIfPrivilegeGroupAlterable_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CheckIfPrivilegeGroupAlterable is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - req *milvuspb.OperatePrivilegeGroupRequest
|
|
func (_e *IMetaTable_Expecter) CheckIfPrivilegeGroupAlterable(ctx interface{}, req interface{}) *IMetaTable_CheckIfPrivilegeGroupAlterable_Call {
|
|
return &IMetaTable_CheckIfPrivilegeGroupAlterable_Call{Call: _e.mock.On("CheckIfPrivilegeGroupAlterable", ctx, req)}
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfPrivilegeGroupAlterable_Call) Run(run func(ctx context.Context, req *milvuspb.OperatePrivilegeGroupRequest)) *IMetaTable_CheckIfPrivilegeGroupAlterable_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*milvuspb.OperatePrivilegeGroupRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfPrivilegeGroupAlterable_Call) Return(_a0 error) *IMetaTable_CheckIfPrivilegeGroupAlterable_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfPrivilegeGroupAlterable_Call) RunAndReturn(run func(context.Context, *milvuspb.OperatePrivilegeGroupRequest) error) *IMetaTable_CheckIfPrivilegeGroupAlterable_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CheckIfPrivilegeGroupCreatable provides a mock function with given fields: ctx, req
|
|
func (_m *IMetaTable) CheckIfPrivilegeGroupCreatable(ctx context.Context, req *milvuspb.CreatePrivilegeGroupRequest) error {
|
|
ret := _m.Called(ctx, req)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CheckIfPrivilegeGroupCreatable")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreatePrivilegeGroupRequest) error); ok {
|
|
r0 = rf(ctx, req)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_CheckIfPrivilegeGroupCreatable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckIfPrivilegeGroupCreatable'
|
|
type IMetaTable_CheckIfPrivilegeGroupCreatable_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CheckIfPrivilegeGroupCreatable is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - req *milvuspb.CreatePrivilegeGroupRequest
|
|
func (_e *IMetaTable_Expecter) CheckIfPrivilegeGroupCreatable(ctx interface{}, req interface{}) *IMetaTable_CheckIfPrivilegeGroupCreatable_Call {
|
|
return &IMetaTable_CheckIfPrivilegeGroupCreatable_Call{Call: _e.mock.On("CheckIfPrivilegeGroupCreatable", ctx, req)}
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfPrivilegeGroupCreatable_Call) Run(run func(ctx context.Context, req *milvuspb.CreatePrivilegeGroupRequest)) *IMetaTable_CheckIfPrivilegeGroupCreatable_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*milvuspb.CreatePrivilegeGroupRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfPrivilegeGroupCreatable_Call) Return(_a0 error) *IMetaTable_CheckIfPrivilegeGroupCreatable_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfPrivilegeGroupCreatable_Call) RunAndReturn(run func(context.Context, *milvuspb.CreatePrivilegeGroupRequest) error) *IMetaTable_CheckIfPrivilegeGroupCreatable_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CheckIfPrivilegeGroupDropable provides a mock function with given fields: ctx, req
|
|
func (_m *IMetaTable) CheckIfPrivilegeGroupDropable(ctx context.Context, req *milvuspb.DropPrivilegeGroupRequest) error {
|
|
ret := _m.Called(ctx, req)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CheckIfPrivilegeGroupDropable")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropPrivilegeGroupRequest) error); ok {
|
|
r0 = rf(ctx, req)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_CheckIfPrivilegeGroupDropable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckIfPrivilegeGroupDropable'
|
|
type IMetaTable_CheckIfPrivilegeGroupDropable_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CheckIfPrivilegeGroupDropable is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - req *milvuspb.DropPrivilegeGroupRequest
|
|
func (_e *IMetaTable_Expecter) CheckIfPrivilegeGroupDropable(ctx interface{}, req interface{}) *IMetaTable_CheckIfPrivilegeGroupDropable_Call {
|
|
return &IMetaTable_CheckIfPrivilegeGroupDropable_Call{Call: _e.mock.On("CheckIfPrivilegeGroupDropable", ctx, req)}
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfPrivilegeGroupDropable_Call) Run(run func(ctx context.Context, req *milvuspb.DropPrivilegeGroupRequest)) *IMetaTable_CheckIfPrivilegeGroupDropable_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*milvuspb.DropPrivilegeGroupRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfPrivilegeGroupDropable_Call) Return(_a0 error) *IMetaTable_CheckIfPrivilegeGroupDropable_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfPrivilegeGroupDropable_Call) RunAndReturn(run func(context.Context, *milvuspb.DropPrivilegeGroupRequest) error) *IMetaTable_CheckIfPrivilegeGroupDropable_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CheckIfRBACRestorable provides a mock function with given fields: ctx, req
|
|
func (_m *IMetaTable) CheckIfRBACRestorable(ctx context.Context, req *milvuspb.RestoreRBACMetaRequest) error {
|
|
ret := _m.Called(ctx, req)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CheckIfRBACRestorable")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.RestoreRBACMetaRequest) error); ok {
|
|
r0 = rf(ctx, req)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_CheckIfRBACRestorable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckIfRBACRestorable'
|
|
type IMetaTable_CheckIfRBACRestorable_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CheckIfRBACRestorable is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - req *milvuspb.RestoreRBACMetaRequest
|
|
func (_e *IMetaTable_Expecter) CheckIfRBACRestorable(ctx interface{}, req interface{}) *IMetaTable_CheckIfRBACRestorable_Call {
|
|
return &IMetaTable_CheckIfRBACRestorable_Call{Call: _e.mock.On("CheckIfRBACRestorable", ctx, req)}
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfRBACRestorable_Call) Run(run func(ctx context.Context, req *milvuspb.RestoreRBACMetaRequest)) *IMetaTable_CheckIfRBACRestorable_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*milvuspb.RestoreRBACMetaRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfRBACRestorable_Call) Return(_a0 error) *IMetaTable_CheckIfRBACRestorable_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfRBACRestorable_Call) RunAndReturn(run func(context.Context, *milvuspb.RestoreRBACMetaRequest) error) *IMetaTable_CheckIfRBACRestorable_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CheckIfUpdateCredential provides a mock function with given fields: ctx, req
|
|
func (_m *IMetaTable) CheckIfUpdateCredential(ctx context.Context, req *internalpb.CredentialInfo) error {
|
|
ret := _m.Called(ctx, req)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CheckIfUpdateCredential")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *internalpb.CredentialInfo) error); ok {
|
|
r0 = rf(ctx, req)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_CheckIfUpdateCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckIfUpdateCredential'
|
|
type IMetaTable_CheckIfUpdateCredential_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CheckIfUpdateCredential is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - req *internalpb.CredentialInfo
|
|
func (_e *IMetaTable_Expecter) CheckIfUpdateCredential(ctx interface{}, req interface{}) *IMetaTable_CheckIfUpdateCredential_Call {
|
|
return &IMetaTable_CheckIfUpdateCredential_Call{Call: _e.mock.On("CheckIfUpdateCredential", ctx, req)}
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfUpdateCredential_Call) Run(run func(ctx context.Context, req *internalpb.CredentialInfo)) *IMetaTable_CheckIfUpdateCredential_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*internalpb.CredentialInfo))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfUpdateCredential_Call) Return(_a0 error) *IMetaTable_CheckIfUpdateCredential_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CheckIfUpdateCredential_Call) RunAndReturn(run func(context.Context, *internalpb.CredentialInfo) error) *IMetaTable_CheckIfUpdateCredential_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CreateDatabase provides a mock function with given fields: ctx, db, ts
|
|
func (_m *IMetaTable) CreateDatabase(ctx context.Context, db *model.Database, ts uint64) error {
|
|
ret := _m.Called(ctx, db, ts)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CreateDatabase")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *model.Database, uint64) error); ok {
|
|
r0 = rf(ctx, db, ts)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_CreateDatabase_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateDatabase'
|
|
type IMetaTable_CreateDatabase_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CreateDatabase is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - db *model.Database
|
|
// - ts uint64
|
|
func (_e *IMetaTable_Expecter) CreateDatabase(ctx interface{}, db interface{}, ts interface{}) *IMetaTable_CreateDatabase_Call {
|
|
return &IMetaTable_CreateDatabase_Call{Call: _e.mock.On("CreateDatabase", ctx, db, ts)}
|
|
}
|
|
|
|
func (_c *IMetaTable_CreateDatabase_Call) Run(run func(ctx context.Context, db *model.Database, ts uint64)) *IMetaTable_CreateDatabase_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*model.Database), args[2].(uint64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CreateDatabase_Call) Return(_a0 error) *IMetaTable_CreateDatabase_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CreateDatabase_Call) RunAndReturn(run func(context.Context, *model.Database, uint64) error) *IMetaTable_CreateDatabase_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CreatePrivilegeGroup provides a mock function with given fields: ctx, groupName
|
|
func (_m *IMetaTable) CreatePrivilegeGroup(ctx context.Context, groupName string) error {
|
|
ret := _m.Called(ctx, groupName)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CreatePrivilegeGroup")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
|
r0 = rf(ctx, groupName)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_CreatePrivilegeGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePrivilegeGroup'
|
|
type IMetaTable_CreatePrivilegeGroup_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CreatePrivilegeGroup is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - groupName string
|
|
func (_e *IMetaTable_Expecter) CreatePrivilegeGroup(ctx interface{}, groupName interface{}) *IMetaTable_CreatePrivilegeGroup_Call {
|
|
return &IMetaTable_CreatePrivilegeGroup_Call{Call: _e.mock.On("CreatePrivilegeGroup", ctx, groupName)}
|
|
}
|
|
|
|
func (_c *IMetaTable_CreatePrivilegeGroup_Call) Run(run func(ctx context.Context, groupName string)) *IMetaTable_CreatePrivilegeGroup_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CreatePrivilegeGroup_Call) Return(_a0 error) *IMetaTable_CreatePrivilegeGroup_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CreatePrivilegeGroup_Call) RunAndReturn(run func(context.Context, string) error) *IMetaTable_CreatePrivilegeGroup_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CreateRole provides a mock function with given fields: ctx, tenant, entity
|
|
func (_m *IMetaTable) CreateRole(ctx context.Context, tenant string, entity *milvuspb.RoleEntity) error {
|
|
ret := _m.Called(ctx, tenant, entity)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CreateRole")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, *milvuspb.RoleEntity) error); ok {
|
|
r0 = rf(ctx, tenant, entity)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_CreateRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRole'
|
|
type IMetaTable_CreateRole_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CreateRole is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - tenant string
|
|
// - entity *milvuspb.RoleEntity
|
|
func (_e *IMetaTable_Expecter) CreateRole(ctx interface{}, tenant interface{}, entity interface{}) *IMetaTable_CreateRole_Call {
|
|
return &IMetaTable_CreateRole_Call{Call: _e.mock.On("CreateRole", ctx, tenant, entity)}
|
|
}
|
|
|
|
func (_c *IMetaTable_CreateRole_Call) Run(run func(ctx context.Context, tenant string, entity *milvuspb.RoleEntity)) *IMetaTable_CreateRole_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(*milvuspb.RoleEntity))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CreateRole_Call) Return(_a0 error) *IMetaTable_CreateRole_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_CreateRole_Call) RunAndReturn(run func(context.Context, string, *milvuspb.RoleEntity) error) *IMetaTable_CreateRole_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DeleteCredential provides a mock function with given fields: ctx, result
|
|
func (_m *IMetaTable) DeleteCredential(ctx context.Context, result message.BroadcastResult[*messagespb.DropUserMessageHeader, *messagespb.DropUserMessageBody]) error {
|
|
ret := _m.Called(ctx, result)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DeleteCredential")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, message.BroadcastResult[*messagespb.DropUserMessageHeader, *messagespb.DropUserMessageBody]) error); ok {
|
|
r0 = rf(ctx, result)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_DeleteCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteCredential'
|
|
type IMetaTable_DeleteCredential_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DeleteCredential is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - result message.BroadcastResult[*messagespb.DropUserMessageHeader,*messagespb.DropUserMessageBody]
|
|
func (_e *IMetaTable_Expecter) DeleteCredential(ctx interface{}, result interface{}) *IMetaTable_DeleteCredential_Call {
|
|
return &IMetaTable_DeleteCredential_Call{Call: _e.mock.On("DeleteCredential", ctx, result)}
|
|
}
|
|
|
|
func (_c *IMetaTable_DeleteCredential_Call) Run(run func(ctx context.Context, result message.BroadcastResult[*messagespb.DropUserMessageHeader, *messagespb.DropUserMessageBody])) *IMetaTable_DeleteCredential_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(message.BroadcastResult[*messagespb.DropUserMessageHeader, *messagespb.DropUserMessageBody]))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_DeleteCredential_Call) Return(_a0 error) *IMetaTable_DeleteCredential_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_DeleteCredential_Call) RunAndReturn(run func(context.Context, message.BroadcastResult[*messagespb.DropUserMessageHeader, *messagespb.DropUserMessageBody]) error) *IMetaTable_DeleteCredential_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DescribeAlias provides a mock function with given fields: ctx, dbName, alias, ts
|
|
func (_m *IMetaTable) DescribeAlias(ctx context.Context, dbName string, alias string, ts uint64) (string, error) {
|
|
ret := _m.Called(ctx, dbName, alias, ts)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DescribeAlias")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, uint64) (string, error)); ok {
|
|
return rf(ctx, dbName, alias, ts)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, uint64) string); ok {
|
|
r0 = rf(ctx, dbName, alias, ts)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string, string, uint64) error); ok {
|
|
r1 = rf(ctx, dbName, alias, ts)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// IMetaTable_DescribeAlias_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeAlias'
|
|
type IMetaTable_DescribeAlias_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DescribeAlias is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - dbName string
|
|
// - alias string
|
|
// - ts uint64
|
|
func (_e *IMetaTable_Expecter) DescribeAlias(ctx interface{}, dbName interface{}, alias interface{}, ts interface{}) *IMetaTable_DescribeAlias_Call {
|
|
return &IMetaTable_DescribeAlias_Call{Call: _e.mock.On("DescribeAlias", ctx, dbName, alias, ts)}
|
|
}
|
|
|
|
func (_c *IMetaTable_DescribeAlias_Call) Run(run func(ctx context.Context, dbName string, alias string, ts uint64)) *IMetaTable_DescribeAlias_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(uint64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_DescribeAlias_Call) Return(_a0 string, _a1 error) *IMetaTable_DescribeAlias_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_DescribeAlias_Call) RunAndReturn(run func(context.Context, string, string, uint64) (string, error)) *IMetaTable_DescribeAlias_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DropAlias provides a mock function with given fields: ctx, result
|
|
func (_m *IMetaTable) DropAlias(ctx context.Context, result message.BroadcastResult[*messagespb.DropAliasMessageHeader, *messagespb.DropAliasMessageBody]) error {
|
|
ret := _m.Called(ctx, result)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DropAlias")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, message.BroadcastResult[*messagespb.DropAliasMessageHeader, *messagespb.DropAliasMessageBody]) error); ok {
|
|
r0 = rf(ctx, result)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_DropAlias_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropAlias'
|
|
type IMetaTable_DropAlias_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DropAlias is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - result message.BroadcastResult[*messagespb.DropAliasMessageHeader,*messagespb.DropAliasMessageBody]
|
|
func (_e *IMetaTable_Expecter) DropAlias(ctx interface{}, result interface{}) *IMetaTable_DropAlias_Call {
|
|
return &IMetaTable_DropAlias_Call{Call: _e.mock.On("DropAlias", ctx, result)}
|
|
}
|
|
|
|
func (_c *IMetaTable_DropAlias_Call) Run(run func(ctx context.Context, result message.BroadcastResult[*messagespb.DropAliasMessageHeader, *messagespb.DropAliasMessageBody])) *IMetaTable_DropAlias_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(message.BroadcastResult[*messagespb.DropAliasMessageHeader, *messagespb.DropAliasMessageBody]))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_DropAlias_Call) Return(_a0 error) *IMetaTable_DropAlias_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_DropAlias_Call) RunAndReturn(run func(context.Context, message.BroadcastResult[*messagespb.DropAliasMessageHeader, *messagespb.DropAliasMessageBody]) error) *IMetaTable_DropAlias_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DropCollection provides a mock function with given fields: ctx, collectionID, ts
|
|
func (_m *IMetaTable) DropCollection(ctx context.Context, collectionID int64, ts uint64) error {
|
|
ret := _m.Called(ctx, collectionID, ts)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DropCollection")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, uint64) error); ok {
|
|
r0 = rf(ctx, collectionID, ts)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_DropCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropCollection'
|
|
type IMetaTable_DropCollection_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DropCollection is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - collectionID int64
|
|
// - ts uint64
|
|
func (_e *IMetaTable_Expecter) DropCollection(ctx interface{}, collectionID interface{}, ts interface{}) *IMetaTable_DropCollection_Call {
|
|
return &IMetaTable_DropCollection_Call{Call: _e.mock.On("DropCollection", ctx, collectionID, ts)}
|
|
}
|
|
|
|
func (_c *IMetaTable_DropCollection_Call) Run(run func(ctx context.Context, collectionID int64, ts uint64)) *IMetaTable_DropCollection_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64), args[2].(uint64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_DropCollection_Call) Return(_a0 error) *IMetaTable_DropCollection_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_DropCollection_Call) RunAndReturn(run func(context.Context, int64, uint64) error) *IMetaTable_DropCollection_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DropDatabase provides a mock function with given fields: ctx, dbName, ts
|
|
func (_m *IMetaTable) DropDatabase(ctx context.Context, dbName string, ts uint64) error {
|
|
ret := _m.Called(ctx, dbName, ts)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DropDatabase")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, uint64) error); ok {
|
|
r0 = rf(ctx, dbName, ts)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_DropDatabase_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropDatabase'
|
|
type IMetaTable_DropDatabase_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DropDatabase is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - dbName string
|
|
// - ts uint64
|
|
func (_e *IMetaTable_Expecter) DropDatabase(ctx interface{}, dbName interface{}, ts interface{}) *IMetaTable_DropDatabase_Call {
|
|
return &IMetaTable_DropDatabase_Call{Call: _e.mock.On("DropDatabase", ctx, dbName, ts)}
|
|
}
|
|
|
|
func (_c *IMetaTable_DropDatabase_Call) Run(run func(ctx context.Context, dbName string, ts uint64)) *IMetaTable_DropDatabase_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(uint64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_DropDatabase_Call) Return(_a0 error) *IMetaTable_DropDatabase_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_DropDatabase_Call) RunAndReturn(run func(context.Context, string, uint64) error) *IMetaTable_DropDatabase_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DropGrant provides a mock function with given fields: ctx, tenant, role
|
|
func (_m *IMetaTable) DropGrant(ctx context.Context, tenant string, role *milvuspb.RoleEntity) error {
|
|
ret := _m.Called(ctx, tenant, role)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DropGrant")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, *milvuspb.RoleEntity) error); ok {
|
|
r0 = rf(ctx, tenant, role)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_DropGrant_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropGrant'
|
|
type IMetaTable_DropGrant_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DropGrant is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - tenant string
|
|
// - role *milvuspb.RoleEntity
|
|
func (_e *IMetaTable_Expecter) DropGrant(ctx interface{}, tenant interface{}, role interface{}) *IMetaTable_DropGrant_Call {
|
|
return &IMetaTable_DropGrant_Call{Call: _e.mock.On("DropGrant", ctx, tenant, role)}
|
|
}
|
|
|
|
func (_c *IMetaTable_DropGrant_Call) Run(run func(ctx context.Context, tenant string, role *milvuspb.RoleEntity)) *IMetaTable_DropGrant_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(*milvuspb.RoleEntity))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_DropGrant_Call) Return(_a0 error) *IMetaTable_DropGrant_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_DropGrant_Call) RunAndReturn(run func(context.Context, string, *milvuspb.RoleEntity) error) *IMetaTable_DropGrant_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DropPartition provides a mock function with given fields: ctx, collectionID, partitionID, ts
|
|
func (_m *IMetaTable) DropPartition(ctx context.Context, collectionID int64, partitionID int64, ts uint64) error {
|
|
ret := _m.Called(ctx, collectionID, partitionID, ts)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DropPartition")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, int64, uint64) error); ok {
|
|
r0 = rf(ctx, collectionID, partitionID, ts)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_DropPartition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropPartition'
|
|
type IMetaTable_DropPartition_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DropPartition is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - collectionID int64
|
|
// - partitionID int64
|
|
// - ts uint64
|
|
func (_e *IMetaTable_Expecter) DropPartition(ctx interface{}, collectionID interface{}, partitionID interface{}, ts interface{}) *IMetaTable_DropPartition_Call {
|
|
return &IMetaTable_DropPartition_Call{Call: _e.mock.On("DropPartition", ctx, collectionID, partitionID, ts)}
|
|
}
|
|
|
|
func (_c *IMetaTable_DropPartition_Call) Run(run func(ctx context.Context, collectionID int64, partitionID int64, ts uint64)) *IMetaTable_DropPartition_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64), args[2].(int64), args[3].(uint64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_DropPartition_Call) Return(_a0 error) *IMetaTable_DropPartition_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_DropPartition_Call) RunAndReturn(run func(context.Context, int64, int64, uint64) error) *IMetaTable_DropPartition_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DropPrivilegeGroup provides a mock function with given fields: ctx, groupName
|
|
func (_m *IMetaTable) DropPrivilegeGroup(ctx context.Context, groupName string) error {
|
|
ret := _m.Called(ctx, groupName)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DropPrivilegeGroup")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
|
r0 = rf(ctx, groupName)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_DropPrivilegeGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropPrivilegeGroup'
|
|
type IMetaTable_DropPrivilegeGroup_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DropPrivilegeGroup is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - groupName string
|
|
func (_e *IMetaTable_Expecter) DropPrivilegeGroup(ctx interface{}, groupName interface{}) *IMetaTable_DropPrivilegeGroup_Call {
|
|
return &IMetaTable_DropPrivilegeGroup_Call{Call: _e.mock.On("DropPrivilegeGroup", ctx, groupName)}
|
|
}
|
|
|
|
func (_c *IMetaTable_DropPrivilegeGroup_Call) Run(run func(ctx context.Context, groupName string)) *IMetaTable_DropPrivilegeGroup_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_DropPrivilegeGroup_Call) Return(_a0 error) *IMetaTable_DropPrivilegeGroup_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_DropPrivilegeGroup_Call) RunAndReturn(run func(context.Context, string) error) *IMetaTable_DropPrivilegeGroup_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DropRole provides a mock function with given fields: ctx, tenant, roleName
|
|
func (_m *IMetaTable) DropRole(ctx context.Context, tenant string, roleName string) error {
|
|
ret := _m.Called(ctx, tenant, roleName)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DropRole")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
|
|
r0 = rf(ctx, tenant, roleName)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_DropRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropRole'
|
|
type IMetaTable_DropRole_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DropRole is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - tenant string
|
|
// - roleName string
|
|
func (_e *IMetaTable_Expecter) DropRole(ctx interface{}, tenant interface{}, roleName interface{}) *IMetaTable_DropRole_Call {
|
|
return &IMetaTable_DropRole_Call{Call: _e.mock.On("DropRole", ctx, tenant, roleName)}
|
|
}
|
|
|
|
func (_c *IMetaTable_DropRole_Call) Run(run func(ctx context.Context, tenant string, roleName string)) *IMetaTable_DropRole_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_DropRole_Call) Return(_a0 error) *IMetaTable_DropRole_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_DropRole_Call) RunAndReturn(run func(context.Context, string, string) error) *IMetaTable_DropRole_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetCollectionByID provides a mock function with given fields: ctx, dbName, collectionID, ts, allowUnavailable
|
|
func (_m *IMetaTable) GetCollectionByID(ctx context.Context, dbName string, collectionID int64, ts uint64, allowUnavailable bool) (*model.Collection, error) {
|
|
ret := _m.Called(ctx, dbName, collectionID, ts, allowUnavailable)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetCollectionByID")
|
|
}
|
|
|
|
var r0 *model.Collection
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, int64, uint64, bool) (*model.Collection, error)); ok {
|
|
return rf(ctx, dbName, collectionID, ts, allowUnavailable)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, int64, uint64, bool) *model.Collection); ok {
|
|
r0 = rf(ctx, dbName, collectionID, ts, allowUnavailable)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.Collection)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string, int64, uint64, bool) error); ok {
|
|
r1 = rf(ctx, dbName, collectionID, ts, allowUnavailable)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// IMetaTable_GetCollectionByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCollectionByID'
|
|
type IMetaTable_GetCollectionByID_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetCollectionByID is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - dbName string
|
|
// - collectionID int64
|
|
// - ts uint64
|
|
// - allowUnavailable bool
|
|
func (_e *IMetaTable_Expecter) GetCollectionByID(ctx interface{}, dbName interface{}, collectionID interface{}, ts interface{}, allowUnavailable interface{}) *IMetaTable_GetCollectionByID_Call {
|
|
return &IMetaTable_GetCollectionByID_Call{Call: _e.mock.On("GetCollectionByID", ctx, dbName, collectionID, ts, allowUnavailable)}
|
|
}
|
|
|
|
func (_c *IMetaTable_GetCollectionByID_Call) Run(run func(ctx context.Context, dbName string, collectionID int64, ts uint64, allowUnavailable bool)) *IMetaTable_GetCollectionByID_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(int64), args[3].(uint64), args[4].(bool))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_GetCollectionByID_Call) Return(_a0 *model.Collection, _a1 error) *IMetaTable_GetCollectionByID_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_GetCollectionByID_Call) RunAndReturn(run func(context.Context, string, int64, uint64, bool) (*model.Collection, error)) *IMetaTable_GetCollectionByID_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetCollectionByIDWithMaxTs provides a mock function with given fields: ctx, collectionID
|
|
func (_m *IMetaTable) GetCollectionByIDWithMaxTs(ctx context.Context, collectionID int64) (*model.Collection, error) {
|
|
ret := _m.Called(ctx, collectionID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetCollectionByIDWithMaxTs")
|
|
}
|
|
|
|
var r0 *model.Collection
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Collection, error)); ok {
|
|
return rf(ctx, collectionID)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Collection); ok {
|
|
r0 = rf(ctx, collectionID)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.Collection)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
|
|
r1 = rf(ctx, collectionID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// IMetaTable_GetCollectionByIDWithMaxTs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCollectionByIDWithMaxTs'
|
|
type IMetaTable_GetCollectionByIDWithMaxTs_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetCollectionByIDWithMaxTs is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - collectionID int64
|
|
func (_e *IMetaTable_Expecter) GetCollectionByIDWithMaxTs(ctx interface{}, collectionID interface{}) *IMetaTable_GetCollectionByIDWithMaxTs_Call {
|
|
return &IMetaTable_GetCollectionByIDWithMaxTs_Call{Call: _e.mock.On("GetCollectionByIDWithMaxTs", ctx, collectionID)}
|
|
}
|
|
|
|
func (_c *IMetaTable_GetCollectionByIDWithMaxTs_Call) Run(run func(ctx context.Context, collectionID int64)) *IMetaTable_GetCollectionByIDWithMaxTs_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_GetCollectionByIDWithMaxTs_Call) Return(_a0 *model.Collection, _a1 error) *IMetaTable_GetCollectionByIDWithMaxTs_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_GetCollectionByIDWithMaxTs_Call) RunAndReturn(run func(context.Context, int64) (*model.Collection, error)) *IMetaTable_GetCollectionByIDWithMaxTs_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetCollectionByName provides a mock function with given fields: ctx, dbName, collectionName, ts
|
|
func (_m *IMetaTable) GetCollectionByName(ctx context.Context, dbName string, collectionName string, ts uint64) (*model.Collection, error) {
|
|
ret := _m.Called(ctx, dbName, collectionName, ts)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetCollectionByName")
|
|
}
|
|
|
|
var r0 *model.Collection
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, uint64) (*model.Collection, error)); ok {
|
|
return rf(ctx, dbName, collectionName, ts)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, uint64) *model.Collection); ok {
|
|
r0 = rf(ctx, dbName, collectionName, ts)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.Collection)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string, string, uint64) error); ok {
|
|
r1 = rf(ctx, dbName, collectionName, ts)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// IMetaTable_GetCollectionByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCollectionByName'
|
|
type IMetaTable_GetCollectionByName_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetCollectionByName is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - dbName string
|
|
// - collectionName string
|
|
// - ts uint64
|
|
func (_e *IMetaTable_Expecter) GetCollectionByName(ctx interface{}, dbName interface{}, collectionName interface{}, ts interface{}) *IMetaTable_GetCollectionByName_Call {
|
|
return &IMetaTable_GetCollectionByName_Call{Call: _e.mock.On("GetCollectionByName", ctx, dbName, collectionName, ts)}
|
|
}
|
|
|
|
func (_c *IMetaTable_GetCollectionByName_Call) Run(run func(ctx context.Context, dbName string, collectionName string, ts uint64)) *IMetaTable_GetCollectionByName_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(uint64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_GetCollectionByName_Call) Return(_a0 *model.Collection, _a1 error) *IMetaTable_GetCollectionByName_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_GetCollectionByName_Call) RunAndReturn(run func(context.Context, string, string, uint64) (*model.Collection, error)) *IMetaTable_GetCollectionByName_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetCollectionID provides a mock function with given fields: ctx, dbName, collectionName
|
|
func (_m *IMetaTable) GetCollectionID(ctx context.Context, dbName string, collectionName string) int64 {
|
|
ret := _m.Called(ctx, dbName, collectionName)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetCollectionID")
|
|
}
|
|
|
|
var r0 int64
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string) int64); ok {
|
|
r0 = rf(ctx, dbName, collectionName)
|
|
} else {
|
|
r0 = ret.Get(0).(int64)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_GetCollectionID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCollectionID'
|
|
type IMetaTable_GetCollectionID_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetCollectionID is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - dbName string
|
|
// - collectionName string
|
|
func (_e *IMetaTable_Expecter) GetCollectionID(ctx interface{}, dbName interface{}, collectionName interface{}) *IMetaTable_GetCollectionID_Call {
|
|
return &IMetaTable_GetCollectionID_Call{Call: _e.mock.On("GetCollectionID", ctx, dbName, collectionName)}
|
|
}
|
|
|
|
func (_c *IMetaTable_GetCollectionID_Call) Run(run func(ctx context.Context, dbName string, collectionName string)) *IMetaTable_GetCollectionID_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_GetCollectionID_Call) Return(_a0 int64) *IMetaTable_GetCollectionID_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_GetCollectionID_Call) RunAndReturn(run func(context.Context, string, string) int64) *IMetaTable_GetCollectionID_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetCollectionVirtualChannels provides a mock function with given fields: ctx, colID
|
|
func (_m *IMetaTable) GetCollectionVirtualChannels(ctx context.Context, colID int64) []string {
|
|
ret := _m.Called(ctx, colID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetCollectionVirtualChannels")
|
|
}
|
|
|
|
var r0 []string
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64) []string); ok {
|
|
r0 = rf(ctx, colID)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_GetCollectionVirtualChannels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCollectionVirtualChannels'
|
|
type IMetaTable_GetCollectionVirtualChannels_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetCollectionVirtualChannels is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - colID int64
|
|
func (_e *IMetaTable_Expecter) GetCollectionVirtualChannels(ctx interface{}, colID interface{}) *IMetaTable_GetCollectionVirtualChannels_Call {
|
|
return &IMetaTable_GetCollectionVirtualChannels_Call{Call: _e.mock.On("GetCollectionVirtualChannels", ctx, colID)}
|
|
}
|
|
|
|
func (_c *IMetaTable_GetCollectionVirtualChannels_Call) Run(run func(ctx context.Context, colID int64)) *IMetaTable_GetCollectionVirtualChannels_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_GetCollectionVirtualChannels_Call) Return(_a0 []string) *IMetaTable_GetCollectionVirtualChannels_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_GetCollectionVirtualChannels_Call) RunAndReturn(run func(context.Context, int64) []string) *IMetaTable_GetCollectionVirtualChannels_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetCredential provides a mock function with given fields: ctx, username
|
|
func (_m *IMetaTable) GetCredential(ctx context.Context, username string) (*internalpb.CredentialInfo, error) {
|
|
ret := _m.Called(ctx, username)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetCredential")
|
|
}
|
|
|
|
var r0 *internalpb.CredentialInfo
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) (*internalpb.CredentialInfo, error)); ok {
|
|
return rf(ctx, username)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) *internalpb.CredentialInfo); ok {
|
|
r0 = rf(ctx, username)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*internalpb.CredentialInfo)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
r1 = rf(ctx, username)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// IMetaTable_GetCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCredential'
|
|
type IMetaTable_GetCredential_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetCredential is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - username string
|
|
func (_e *IMetaTable_Expecter) GetCredential(ctx interface{}, username interface{}) *IMetaTable_GetCredential_Call {
|
|
return &IMetaTable_GetCredential_Call{Call: _e.mock.On("GetCredential", ctx, username)}
|
|
}
|
|
|
|
func (_c *IMetaTable_GetCredential_Call) Run(run func(ctx context.Context, username string)) *IMetaTable_GetCredential_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_GetCredential_Call) Return(_a0 *internalpb.CredentialInfo, _a1 error) *IMetaTable_GetCredential_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_GetCredential_Call) RunAndReturn(run func(context.Context, string) (*internalpb.CredentialInfo, error)) *IMetaTable_GetCredential_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetDatabaseByID provides a mock function with given fields: ctx, dbID, ts
|
|
func (_m *IMetaTable) GetDatabaseByID(ctx context.Context, dbID int64, ts uint64) (*model.Database, error) {
|
|
ret := _m.Called(ctx, dbID, ts)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetDatabaseByID")
|
|
}
|
|
|
|
var r0 *model.Database
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, uint64) (*model.Database, error)); ok {
|
|
return rf(ctx, dbID, ts)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, uint64) *model.Database); ok {
|
|
r0 = rf(ctx, dbID, ts)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.Database)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int64, uint64) error); ok {
|
|
r1 = rf(ctx, dbID, ts)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// IMetaTable_GetDatabaseByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDatabaseByID'
|
|
type IMetaTable_GetDatabaseByID_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetDatabaseByID is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - dbID int64
|
|
// - ts uint64
|
|
func (_e *IMetaTable_Expecter) GetDatabaseByID(ctx interface{}, dbID interface{}, ts interface{}) *IMetaTable_GetDatabaseByID_Call {
|
|
return &IMetaTable_GetDatabaseByID_Call{Call: _e.mock.On("GetDatabaseByID", ctx, dbID, ts)}
|
|
}
|
|
|
|
func (_c *IMetaTable_GetDatabaseByID_Call) Run(run func(ctx context.Context, dbID int64, ts uint64)) *IMetaTable_GetDatabaseByID_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64), args[2].(uint64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_GetDatabaseByID_Call) Return(_a0 *model.Database, _a1 error) *IMetaTable_GetDatabaseByID_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_GetDatabaseByID_Call) RunAndReturn(run func(context.Context, int64, uint64) (*model.Database, error)) *IMetaTable_GetDatabaseByID_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetDatabaseByName provides a mock function with given fields: ctx, dbName, ts
|
|
func (_m *IMetaTable) GetDatabaseByName(ctx context.Context, dbName string, ts uint64) (*model.Database, error) {
|
|
ret := _m.Called(ctx, dbName, ts)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetDatabaseByName")
|
|
}
|
|
|
|
var r0 *model.Database
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, uint64) (*model.Database, error)); ok {
|
|
return rf(ctx, dbName, ts)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, uint64) *model.Database); ok {
|
|
r0 = rf(ctx, dbName, ts)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.Database)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string, uint64) error); ok {
|
|
r1 = rf(ctx, dbName, ts)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// IMetaTable_GetDatabaseByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDatabaseByName'
|
|
type IMetaTable_GetDatabaseByName_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetDatabaseByName is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - dbName string
|
|
// - ts uint64
|
|
func (_e *IMetaTable_Expecter) GetDatabaseByName(ctx interface{}, dbName interface{}, ts interface{}) *IMetaTable_GetDatabaseByName_Call {
|
|
return &IMetaTable_GetDatabaseByName_Call{Call: _e.mock.On("GetDatabaseByName", ctx, dbName, ts)}
|
|
}
|
|
|
|
func (_c *IMetaTable_GetDatabaseByName_Call) Run(run func(ctx context.Context, dbName string, ts uint64)) *IMetaTable_GetDatabaseByName_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(uint64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_GetDatabaseByName_Call) Return(_a0 *model.Database, _a1 error) *IMetaTable_GetDatabaseByName_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_GetDatabaseByName_Call) RunAndReturn(run func(context.Context, string, uint64) (*model.Database, error)) *IMetaTable_GetDatabaseByName_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetGeneralCount provides a mock function with given fields: ctx
|
|
func (_m *IMetaTable) GetGeneralCount(ctx context.Context) int {
|
|
ret := _m.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetGeneralCount")
|
|
}
|
|
|
|
var r0 int
|
|
if rf, ok := ret.Get(0).(func(context.Context) int); ok {
|
|
r0 = rf(ctx)
|
|
} else {
|
|
r0 = ret.Get(0).(int)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_GetGeneralCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGeneralCount'
|
|
type IMetaTable_GetGeneralCount_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetGeneralCount is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *IMetaTable_Expecter) GetGeneralCount(ctx interface{}) *IMetaTable_GetGeneralCount_Call {
|
|
return &IMetaTable_GetGeneralCount_Call{Call: _e.mock.On("GetGeneralCount", ctx)}
|
|
}
|
|
|
|
func (_c *IMetaTable_GetGeneralCount_Call) Run(run func(ctx context.Context)) *IMetaTable_GetGeneralCount_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_GetGeneralCount_Call) Return(_a0 int) *IMetaTable_GetGeneralCount_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_GetGeneralCount_Call) RunAndReturn(run func(context.Context) int) *IMetaTable_GetGeneralCount_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetPChannelInfo provides a mock function with given fields: ctx, pchannel
|
|
func (_m *IMetaTable) GetPChannelInfo(ctx context.Context, pchannel string) *rootcoordpb.GetPChannelInfoResponse {
|
|
ret := _m.Called(ctx, pchannel)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetPChannelInfo")
|
|
}
|
|
|
|
var r0 *rootcoordpb.GetPChannelInfoResponse
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) *rootcoordpb.GetPChannelInfoResponse); ok {
|
|
r0 = rf(ctx, pchannel)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*rootcoordpb.GetPChannelInfoResponse)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_GetPChannelInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPChannelInfo'
|
|
type IMetaTable_GetPChannelInfo_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetPChannelInfo is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - pchannel string
|
|
func (_e *IMetaTable_Expecter) GetPChannelInfo(ctx interface{}, pchannel interface{}) *IMetaTable_GetPChannelInfo_Call {
|
|
return &IMetaTable_GetPChannelInfo_Call{Call: _e.mock.On("GetPChannelInfo", ctx, pchannel)}
|
|
}
|
|
|
|
func (_c *IMetaTable_GetPChannelInfo_Call) Run(run func(ctx context.Context, pchannel string)) *IMetaTable_GetPChannelInfo_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_GetPChannelInfo_Call) Return(_a0 *rootcoordpb.GetPChannelInfoResponse) *IMetaTable_GetPChannelInfo_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_GetPChannelInfo_Call) RunAndReturn(run func(context.Context, string) *rootcoordpb.GetPChannelInfoResponse) *IMetaTable_GetPChannelInfo_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetPrivilegeGroupRoles provides a mock function with given fields: ctx, groupName
|
|
func (_m *IMetaTable) GetPrivilegeGroupRoles(ctx context.Context, groupName string) ([]*milvuspb.RoleEntity, error) {
|
|
ret := _m.Called(ctx, groupName)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetPrivilegeGroupRoles")
|
|
}
|
|
|
|
var r0 []*milvuspb.RoleEntity
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) ([]*milvuspb.RoleEntity, error)); ok {
|
|
return rf(ctx, groupName)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) []*milvuspb.RoleEntity); ok {
|
|
r0 = rf(ctx, groupName)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*milvuspb.RoleEntity)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
r1 = rf(ctx, groupName)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// IMetaTable_GetPrivilegeGroupRoles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPrivilegeGroupRoles'
|
|
type IMetaTable_GetPrivilegeGroupRoles_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetPrivilegeGroupRoles is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - groupName string
|
|
func (_e *IMetaTable_Expecter) GetPrivilegeGroupRoles(ctx interface{}, groupName interface{}) *IMetaTable_GetPrivilegeGroupRoles_Call {
|
|
return &IMetaTable_GetPrivilegeGroupRoles_Call{Call: _e.mock.On("GetPrivilegeGroupRoles", ctx, groupName)}
|
|
}
|
|
|
|
func (_c *IMetaTable_GetPrivilegeGroupRoles_Call) Run(run func(ctx context.Context, groupName string)) *IMetaTable_GetPrivilegeGroupRoles_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_GetPrivilegeGroupRoles_Call) Return(_a0 []*milvuspb.RoleEntity, _a1 error) *IMetaTable_GetPrivilegeGroupRoles_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_GetPrivilegeGroupRoles_Call) RunAndReturn(run func(context.Context, string) ([]*milvuspb.RoleEntity, error)) *IMetaTable_GetPrivilegeGroupRoles_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// InitCredential provides a mock function with given fields: ctx
|
|
func (_m *IMetaTable) InitCredential(ctx context.Context) error {
|
|
ret := _m.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for InitCredential")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context) error); ok {
|
|
r0 = rf(ctx)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_InitCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InitCredential'
|
|
type IMetaTable_InitCredential_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// InitCredential is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *IMetaTable_Expecter) InitCredential(ctx interface{}) *IMetaTable_InitCredential_Call {
|
|
return &IMetaTable_InitCredential_Call{Call: _e.mock.On("InitCredential", ctx)}
|
|
}
|
|
|
|
func (_c *IMetaTable_InitCredential_Call) Run(run func(ctx context.Context)) *IMetaTable_InitCredential_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_InitCredential_Call) Return(_a0 error) *IMetaTable_InitCredential_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_InitCredential_Call) RunAndReturn(run func(context.Context) error) *IMetaTable_InitCredential_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// IsAlias provides a mock function with given fields: ctx, db, name
|
|
func (_m *IMetaTable) IsAlias(ctx context.Context, db string, name string) bool {
|
|
ret := _m.Called(ctx, db, name)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for IsAlias")
|
|
}
|
|
|
|
var r0 bool
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string) bool); ok {
|
|
r0 = rf(ctx, db, name)
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_IsAlias_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsAlias'
|
|
type IMetaTable_IsAlias_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// IsAlias is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - db string
|
|
// - name string
|
|
func (_e *IMetaTable_Expecter) IsAlias(ctx interface{}, db interface{}, name interface{}) *IMetaTable_IsAlias_Call {
|
|
return &IMetaTable_IsAlias_Call{Call: _e.mock.On("IsAlias", ctx, db, name)}
|
|
}
|
|
|
|
func (_c *IMetaTable_IsAlias_Call) Run(run func(ctx context.Context, db string, name string)) *IMetaTable_IsAlias_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_IsAlias_Call) Return(_a0 bool) *IMetaTable_IsAlias_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_IsAlias_Call) RunAndReturn(run func(context.Context, string, string) bool) *IMetaTable_IsAlias_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// IsCustomPrivilegeGroup provides a mock function with given fields: ctx, groupName
|
|
func (_m *IMetaTable) IsCustomPrivilegeGroup(ctx context.Context, groupName string) (bool, error) {
|
|
ret := _m.Called(ctx, groupName)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for IsCustomPrivilegeGroup")
|
|
}
|
|
|
|
var r0 bool
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
|
|
return rf(ctx, groupName)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok {
|
|
r0 = rf(ctx, groupName)
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
r1 = rf(ctx, groupName)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// IMetaTable_IsCustomPrivilegeGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsCustomPrivilegeGroup'
|
|
type IMetaTable_IsCustomPrivilegeGroup_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// IsCustomPrivilegeGroup is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - groupName string
|
|
func (_e *IMetaTable_Expecter) IsCustomPrivilegeGroup(ctx interface{}, groupName interface{}) *IMetaTable_IsCustomPrivilegeGroup_Call {
|
|
return &IMetaTable_IsCustomPrivilegeGroup_Call{Call: _e.mock.On("IsCustomPrivilegeGroup", ctx, groupName)}
|
|
}
|
|
|
|
func (_c *IMetaTable_IsCustomPrivilegeGroup_Call) Run(run func(ctx context.Context, groupName string)) *IMetaTable_IsCustomPrivilegeGroup_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_IsCustomPrivilegeGroup_Call) Return(_a0 bool, _a1 error) *IMetaTable_IsCustomPrivilegeGroup_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_IsCustomPrivilegeGroup_Call) RunAndReturn(run func(context.Context, string) (bool, error)) *IMetaTable_IsCustomPrivilegeGroup_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListAliases provides a mock function with given fields: ctx, dbName, collectionName, ts
|
|
func (_m *IMetaTable) ListAliases(ctx context.Context, dbName string, collectionName string, ts uint64) ([]string, error) {
|
|
ret := _m.Called(ctx, dbName, collectionName, ts)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListAliases")
|
|
}
|
|
|
|
var r0 []string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, uint64) ([]string, error)); ok {
|
|
return rf(ctx, dbName, collectionName, ts)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, uint64) []string); ok {
|
|
r0 = rf(ctx, dbName, collectionName, ts)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string, string, uint64) error); ok {
|
|
r1 = rf(ctx, dbName, collectionName, ts)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// IMetaTable_ListAliases_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAliases'
|
|
type IMetaTable_ListAliases_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListAliases is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - dbName string
|
|
// - collectionName string
|
|
// - ts uint64
|
|
func (_e *IMetaTable_Expecter) ListAliases(ctx interface{}, dbName interface{}, collectionName interface{}, ts interface{}) *IMetaTable_ListAliases_Call {
|
|
return &IMetaTable_ListAliases_Call{Call: _e.mock.On("ListAliases", ctx, dbName, collectionName, ts)}
|
|
}
|
|
|
|
func (_c *IMetaTable_ListAliases_Call) Run(run func(ctx context.Context, dbName string, collectionName string, ts uint64)) *IMetaTable_ListAliases_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(uint64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_ListAliases_Call) Return(_a0 []string, _a1 error) *IMetaTable_ListAliases_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_ListAliases_Call) RunAndReturn(run func(context.Context, string, string, uint64) ([]string, error)) *IMetaTable_ListAliases_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListAliasesByID provides a mock function with given fields: ctx, collID
|
|
func (_m *IMetaTable) ListAliasesByID(ctx context.Context, collID int64) []string {
|
|
ret := _m.Called(ctx, collID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListAliasesByID")
|
|
}
|
|
|
|
var r0 []string
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64) []string); ok {
|
|
r0 = rf(ctx, collID)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_ListAliasesByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAliasesByID'
|
|
type IMetaTable_ListAliasesByID_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListAliasesByID is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - collID int64
|
|
func (_e *IMetaTable_Expecter) ListAliasesByID(ctx interface{}, collID interface{}) *IMetaTable_ListAliasesByID_Call {
|
|
return &IMetaTable_ListAliasesByID_Call{Call: _e.mock.On("ListAliasesByID", ctx, collID)}
|
|
}
|
|
|
|
func (_c *IMetaTable_ListAliasesByID_Call) Run(run func(ctx context.Context, collID int64)) *IMetaTable_ListAliasesByID_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_ListAliasesByID_Call) Return(_a0 []string) *IMetaTable_ListAliasesByID_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_ListAliasesByID_Call) RunAndReturn(run func(context.Context, int64) []string) *IMetaTable_ListAliasesByID_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListAllAvailCollections provides a mock function with given fields: ctx
|
|
func (_m *IMetaTable) ListAllAvailCollections(ctx context.Context) map[int64][]int64 {
|
|
ret := _m.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListAllAvailCollections")
|
|
}
|
|
|
|
var r0 map[int64][]int64
|
|
if rf, ok := ret.Get(0).(func(context.Context) map[int64][]int64); ok {
|
|
r0 = rf(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(map[int64][]int64)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_ListAllAvailCollections_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAllAvailCollections'
|
|
type IMetaTable_ListAllAvailCollections_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListAllAvailCollections is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *IMetaTable_Expecter) ListAllAvailCollections(ctx interface{}) *IMetaTable_ListAllAvailCollections_Call {
|
|
return &IMetaTable_ListAllAvailCollections_Call{Call: _e.mock.On("ListAllAvailCollections", ctx)}
|
|
}
|
|
|
|
func (_c *IMetaTable_ListAllAvailCollections_Call) Run(run func(ctx context.Context)) *IMetaTable_ListAllAvailCollections_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_ListAllAvailCollections_Call) Return(_a0 map[int64][]int64) *IMetaTable_ListAllAvailCollections_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_ListAllAvailCollections_Call) RunAndReturn(run func(context.Context) map[int64][]int64) *IMetaTable_ListAllAvailCollections_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListAllAvailPartitions provides a mock function with given fields: ctx
|
|
func (_m *IMetaTable) ListAllAvailPartitions(ctx context.Context) map[int64]map[int64][]int64 {
|
|
ret := _m.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListAllAvailPartitions")
|
|
}
|
|
|
|
var r0 map[int64]map[int64][]int64
|
|
if rf, ok := ret.Get(0).(func(context.Context) map[int64]map[int64][]int64); ok {
|
|
r0 = rf(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(map[int64]map[int64][]int64)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_ListAllAvailPartitions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAllAvailPartitions'
|
|
type IMetaTable_ListAllAvailPartitions_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListAllAvailPartitions is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *IMetaTable_Expecter) ListAllAvailPartitions(ctx interface{}) *IMetaTable_ListAllAvailPartitions_Call {
|
|
return &IMetaTable_ListAllAvailPartitions_Call{Call: _e.mock.On("ListAllAvailPartitions", ctx)}
|
|
}
|
|
|
|
func (_c *IMetaTable_ListAllAvailPartitions_Call) Run(run func(ctx context.Context)) *IMetaTable_ListAllAvailPartitions_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_ListAllAvailPartitions_Call) Return(_a0 map[int64]map[int64][]int64) *IMetaTable_ListAllAvailPartitions_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_ListAllAvailPartitions_Call) RunAndReturn(run func(context.Context) map[int64]map[int64][]int64) *IMetaTable_ListAllAvailPartitions_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListCollectionPhysicalChannels provides a mock function with given fields: ctx
|
|
func (_m *IMetaTable) ListCollectionPhysicalChannels(ctx context.Context) map[int64][]string {
|
|
ret := _m.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListCollectionPhysicalChannels")
|
|
}
|
|
|
|
var r0 map[int64][]string
|
|
if rf, ok := ret.Get(0).(func(context.Context) map[int64][]string); ok {
|
|
r0 = rf(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(map[int64][]string)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_ListCollectionPhysicalChannels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListCollectionPhysicalChannels'
|
|
type IMetaTable_ListCollectionPhysicalChannels_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListCollectionPhysicalChannels is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *IMetaTable_Expecter) ListCollectionPhysicalChannels(ctx interface{}) *IMetaTable_ListCollectionPhysicalChannels_Call {
|
|
return &IMetaTable_ListCollectionPhysicalChannels_Call{Call: _e.mock.On("ListCollectionPhysicalChannels", ctx)}
|
|
}
|
|
|
|
func (_c *IMetaTable_ListCollectionPhysicalChannels_Call) Run(run func(ctx context.Context)) *IMetaTable_ListCollectionPhysicalChannels_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_ListCollectionPhysicalChannels_Call) Return(_a0 map[int64][]string) *IMetaTable_ListCollectionPhysicalChannels_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_ListCollectionPhysicalChannels_Call) RunAndReturn(run func(context.Context) map[int64][]string) *IMetaTable_ListCollectionPhysicalChannels_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListCollections provides a mock function with given fields: ctx, dbName, ts, onlyAvail
|
|
func (_m *IMetaTable) ListCollections(ctx context.Context, dbName string, ts uint64, onlyAvail bool) ([]*model.Collection, error) {
|
|
ret := _m.Called(ctx, dbName, ts, onlyAvail)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListCollections")
|
|
}
|
|
|
|
var r0 []*model.Collection
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, uint64, bool) ([]*model.Collection, error)); ok {
|
|
return rf(ctx, dbName, ts, onlyAvail)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, uint64, bool) []*model.Collection); ok {
|
|
r0 = rf(ctx, dbName, ts, onlyAvail)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*model.Collection)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string, uint64, bool) error); ok {
|
|
r1 = rf(ctx, dbName, ts, onlyAvail)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// IMetaTable_ListCollections_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListCollections'
|
|
type IMetaTable_ListCollections_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListCollections is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - dbName string
|
|
// - ts uint64
|
|
// - onlyAvail bool
|
|
func (_e *IMetaTable_Expecter) ListCollections(ctx interface{}, dbName interface{}, ts interface{}, onlyAvail interface{}) *IMetaTable_ListCollections_Call {
|
|
return &IMetaTable_ListCollections_Call{Call: _e.mock.On("ListCollections", ctx, dbName, ts, onlyAvail)}
|
|
}
|
|
|
|
func (_c *IMetaTable_ListCollections_Call) Run(run func(ctx context.Context, dbName string, ts uint64, onlyAvail bool)) *IMetaTable_ListCollections_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(uint64), args[3].(bool))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_ListCollections_Call) Return(_a0 []*model.Collection, _a1 error) *IMetaTable_ListCollections_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_ListCollections_Call) RunAndReturn(run func(context.Context, string, uint64, bool) ([]*model.Collection, error)) *IMetaTable_ListCollections_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListCredentialUsernames provides a mock function with given fields: ctx
|
|
func (_m *IMetaTable) ListCredentialUsernames(ctx context.Context) (*milvuspb.ListCredUsersResponse, error) {
|
|
ret := _m.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListCredentialUsernames")
|
|
}
|
|
|
|
var r0 *milvuspb.ListCredUsersResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context) (*milvuspb.ListCredUsersResponse, error)); ok {
|
|
return rf(ctx)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context) *milvuspb.ListCredUsersResponse); ok {
|
|
r0 = rf(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*milvuspb.ListCredUsersResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = rf(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// IMetaTable_ListCredentialUsernames_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListCredentialUsernames'
|
|
type IMetaTable_ListCredentialUsernames_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListCredentialUsernames is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *IMetaTable_Expecter) ListCredentialUsernames(ctx interface{}) *IMetaTable_ListCredentialUsernames_Call {
|
|
return &IMetaTable_ListCredentialUsernames_Call{Call: _e.mock.On("ListCredentialUsernames", ctx)}
|
|
}
|
|
|
|
func (_c *IMetaTable_ListCredentialUsernames_Call) Run(run func(ctx context.Context)) *IMetaTable_ListCredentialUsernames_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_ListCredentialUsernames_Call) Return(_a0 *milvuspb.ListCredUsersResponse, _a1 error) *IMetaTable_ListCredentialUsernames_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_ListCredentialUsernames_Call) RunAndReturn(run func(context.Context) (*milvuspb.ListCredUsersResponse, error)) *IMetaTable_ListCredentialUsernames_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListDatabases provides a mock function with given fields: ctx, ts
|
|
func (_m *IMetaTable) ListDatabases(ctx context.Context, ts uint64) ([]*model.Database, error) {
|
|
ret := _m.Called(ctx, ts)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListDatabases")
|
|
}
|
|
|
|
var r0 []*model.Database
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, uint64) ([]*model.Database, error)); ok {
|
|
return rf(ctx, ts)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, uint64) []*model.Database); ok {
|
|
r0 = rf(ctx, ts)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*model.Database)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, uint64) error); ok {
|
|
r1 = rf(ctx, ts)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// IMetaTable_ListDatabases_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListDatabases'
|
|
type IMetaTable_ListDatabases_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListDatabases is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - ts uint64
|
|
func (_e *IMetaTable_Expecter) ListDatabases(ctx interface{}, ts interface{}) *IMetaTable_ListDatabases_Call {
|
|
return &IMetaTable_ListDatabases_Call{Call: _e.mock.On("ListDatabases", ctx, ts)}
|
|
}
|
|
|
|
func (_c *IMetaTable_ListDatabases_Call) Run(run func(ctx context.Context, ts uint64)) *IMetaTable_ListDatabases_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(uint64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_ListDatabases_Call) Return(_a0 []*model.Database, _a1 error) *IMetaTable_ListDatabases_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_ListDatabases_Call) RunAndReturn(run func(context.Context, uint64) ([]*model.Database, error)) *IMetaTable_ListDatabases_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListPolicy provides a mock function with given fields: ctx, tenant
|
|
func (_m *IMetaTable) ListPolicy(ctx context.Context, tenant string) ([]*milvuspb.GrantEntity, error) {
|
|
ret := _m.Called(ctx, tenant)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListPolicy")
|
|
}
|
|
|
|
var r0 []*milvuspb.GrantEntity
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) ([]*milvuspb.GrantEntity, error)); ok {
|
|
return rf(ctx, tenant)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) []*milvuspb.GrantEntity); ok {
|
|
r0 = rf(ctx, tenant)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*milvuspb.GrantEntity)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
r1 = rf(ctx, tenant)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// IMetaTable_ListPolicy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPolicy'
|
|
type IMetaTable_ListPolicy_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListPolicy is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - tenant string
|
|
func (_e *IMetaTable_Expecter) ListPolicy(ctx interface{}, tenant interface{}) *IMetaTable_ListPolicy_Call {
|
|
return &IMetaTable_ListPolicy_Call{Call: _e.mock.On("ListPolicy", ctx, tenant)}
|
|
}
|
|
|
|
func (_c *IMetaTable_ListPolicy_Call) Run(run func(ctx context.Context, tenant string)) *IMetaTable_ListPolicy_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_ListPolicy_Call) Return(_a0 []*milvuspb.GrantEntity, _a1 error) *IMetaTable_ListPolicy_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_ListPolicy_Call) RunAndReturn(run func(context.Context, string) ([]*milvuspb.GrantEntity, error)) *IMetaTable_ListPolicy_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListPrivilegeGroups provides a mock function with given fields: ctx
|
|
func (_m *IMetaTable) ListPrivilegeGroups(ctx context.Context) ([]*milvuspb.PrivilegeGroupInfo, error) {
|
|
ret := _m.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListPrivilegeGroups")
|
|
}
|
|
|
|
var r0 []*milvuspb.PrivilegeGroupInfo
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context) ([]*milvuspb.PrivilegeGroupInfo, error)); ok {
|
|
return rf(ctx)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context) []*milvuspb.PrivilegeGroupInfo); ok {
|
|
r0 = rf(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*milvuspb.PrivilegeGroupInfo)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = rf(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// IMetaTable_ListPrivilegeGroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPrivilegeGroups'
|
|
type IMetaTable_ListPrivilegeGroups_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListPrivilegeGroups is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *IMetaTable_Expecter) ListPrivilegeGroups(ctx interface{}) *IMetaTable_ListPrivilegeGroups_Call {
|
|
return &IMetaTable_ListPrivilegeGroups_Call{Call: _e.mock.On("ListPrivilegeGroups", ctx)}
|
|
}
|
|
|
|
func (_c *IMetaTable_ListPrivilegeGroups_Call) Run(run func(ctx context.Context)) *IMetaTable_ListPrivilegeGroups_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_ListPrivilegeGroups_Call) Return(_a0 []*milvuspb.PrivilegeGroupInfo, _a1 error) *IMetaTable_ListPrivilegeGroups_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_ListPrivilegeGroups_Call) RunAndReturn(run func(context.Context) ([]*milvuspb.PrivilegeGroupInfo, error)) *IMetaTable_ListPrivilegeGroups_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListUserRole provides a mock function with given fields: ctx, tenant
|
|
func (_m *IMetaTable) ListUserRole(ctx context.Context, tenant string) ([]string, error) {
|
|
ret := _m.Called(ctx, tenant)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListUserRole")
|
|
}
|
|
|
|
var r0 []string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) ([]string, error)); ok {
|
|
return rf(ctx, tenant)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) []string); ok {
|
|
r0 = rf(ctx, tenant)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
r1 = rf(ctx, tenant)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// IMetaTable_ListUserRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListUserRole'
|
|
type IMetaTable_ListUserRole_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListUserRole is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - tenant string
|
|
func (_e *IMetaTable_Expecter) ListUserRole(ctx interface{}, tenant interface{}) *IMetaTable_ListUserRole_Call {
|
|
return &IMetaTable_ListUserRole_Call{Call: _e.mock.On("ListUserRole", ctx, tenant)}
|
|
}
|
|
|
|
func (_c *IMetaTable_ListUserRole_Call) Run(run func(ctx context.Context, tenant string)) *IMetaTable_ListUserRole_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_ListUserRole_Call) Return(_a0 []string, _a1 error) *IMetaTable_ListUserRole_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_ListUserRole_Call) RunAndReturn(run func(context.Context, string) ([]string, error)) *IMetaTable_ListUserRole_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// OperatePrivilege provides a mock function with given fields: ctx, tenant, entity, operateType
|
|
func (_m *IMetaTable) OperatePrivilege(ctx context.Context, tenant string, entity *milvuspb.GrantEntity, operateType milvuspb.OperatePrivilegeType) error {
|
|
ret := _m.Called(ctx, tenant, entity, operateType)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for OperatePrivilege")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, *milvuspb.GrantEntity, milvuspb.OperatePrivilegeType) error); ok {
|
|
r0 = rf(ctx, tenant, entity, operateType)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_OperatePrivilege_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OperatePrivilege'
|
|
type IMetaTable_OperatePrivilege_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// OperatePrivilege is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - tenant string
|
|
// - entity *milvuspb.GrantEntity
|
|
// - operateType milvuspb.OperatePrivilegeType
|
|
func (_e *IMetaTable_Expecter) OperatePrivilege(ctx interface{}, tenant interface{}, entity interface{}, operateType interface{}) *IMetaTable_OperatePrivilege_Call {
|
|
return &IMetaTable_OperatePrivilege_Call{Call: _e.mock.On("OperatePrivilege", ctx, tenant, entity, operateType)}
|
|
}
|
|
|
|
func (_c *IMetaTable_OperatePrivilege_Call) Run(run func(ctx context.Context, tenant string, entity *milvuspb.GrantEntity, operateType milvuspb.OperatePrivilegeType)) *IMetaTable_OperatePrivilege_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(*milvuspb.GrantEntity), args[3].(milvuspb.OperatePrivilegeType))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_OperatePrivilege_Call) Return(_a0 error) *IMetaTable_OperatePrivilege_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_OperatePrivilege_Call) RunAndReturn(run func(context.Context, string, *milvuspb.GrantEntity, milvuspb.OperatePrivilegeType) error) *IMetaTable_OperatePrivilege_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// OperatePrivilegeGroup provides a mock function with given fields: ctx, groupName, privileges, operateType
|
|
func (_m *IMetaTable) OperatePrivilegeGroup(ctx context.Context, groupName string, privileges []*milvuspb.PrivilegeEntity, operateType milvuspb.OperatePrivilegeGroupType) error {
|
|
ret := _m.Called(ctx, groupName, privileges, operateType)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for OperatePrivilegeGroup")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, []*milvuspb.PrivilegeEntity, milvuspb.OperatePrivilegeGroupType) error); ok {
|
|
r0 = rf(ctx, groupName, privileges, operateType)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_OperatePrivilegeGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OperatePrivilegeGroup'
|
|
type IMetaTable_OperatePrivilegeGroup_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// OperatePrivilegeGroup is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - groupName string
|
|
// - privileges []*milvuspb.PrivilegeEntity
|
|
// - operateType milvuspb.OperatePrivilegeGroupType
|
|
func (_e *IMetaTable_Expecter) OperatePrivilegeGroup(ctx interface{}, groupName interface{}, privileges interface{}, operateType interface{}) *IMetaTable_OperatePrivilegeGroup_Call {
|
|
return &IMetaTable_OperatePrivilegeGroup_Call{Call: _e.mock.On("OperatePrivilegeGroup", ctx, groupName, privileges, operateType)}
|
|
}
|
|
|
|
func (_c *IMetaTable_OperatePrivilegeGroup_Call) Run(run func(ctx context.Context, groupName string, privileges []*milvuspb.PrivilegeEntity, operateType milvuspb.OperatePrivilegeGroupType)) *IMetaTable_OperatePrivilegeGroup_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].([]*milvuspb.PrivilegeEntity), args[3].(milvuspb.OperatePrivilegeGroupType))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_OperatePrivilegeGroup_Call) Return(_a0 error) *IMetaTable_OperatePrivilegeGroup_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_OperatePrivilegeGroup_Call) RunAndReturn(run func(context.Context, string, []*milvuspb.PrivilegeEntity, milvuspb.OperatePrivilegeGroupType) error) *IMetaTable_OperatePrivilegeGroup_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// OperateUserRole provides a mock function with given fields: ctx, tenant, userEntity, roleEntity, operateType
|
|
func (_m *IMetaTable) OperateUserRole(ctx context.Context, tenant string, userEntity *milvuspb.UserEntity, roleEntity *milvuspb.RoleEntity, operateType milvuspb.OperateUserRoleType) error {
|
|
ret := _m.Called(ctx, tenant, userEntity, roleEntity, operateType)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for OperateUserRole")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, *milvuspb.UserEntity, *milvuspb.RoleEntity, milvuspb.OperateUserRoleType) error); ok {
|
|
r0 = rf(ctx, tenant, userEntity, roleEntity, operateType)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_OperateUserRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OperateUserRole'
|
|
type IMetaTable_OperateUserRole_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// OperateUserRole is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - tenant string
|
|
// - userEntity *milvuspb.UserEntity
|
|
// - roleEntity *milvuspb.RoleEntity
|
|
// - operateType milvuspb.OperateUserRoleType
|
|
func (_e *IMetaTable_Expecter) OperateUserRole(ctx interface{}, tenant interface{}, userEntity interface{}, roleEntity interface{}, operateType interface{}) *IMetaTable_OperateUserRole_Call {
|
|
return &IMetaTable_OperateUserRole_Call{Call: _e.mock.On("OperateUserRole", ctx, tenant, userEntity, roleEntity, operateType)}
|
|
}
|
|
|
|
func (_c *IMetaTable_OperateUserRole_Call) Run(run func(ctx context.Context, tenant string, userEntity *milvuspb.UserEntity, roleEntity *milvuspb.RoleEntity, operateType milvuspb.OperateUserRoleType)) *IMetaTable_OperateUserRole_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(*milvuspb.UserEntity), args[3].(*milvuspb.RoleEntity), args[4].(milvuspb.OperateUserRoleType))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_OperateUserRole_Call) Return(_a0 error) *IMetaTable_OperateUserRole_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_OperateUserRole_Call) RunAndReturn(run func(context.Context, string, *milvuspb.UserEntity, *milvuspb.RoleEntity, milvuspb.OperateUserRoleType) error) *IMetaTable_OperateUserRole_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// RemoveCollection provides a mock function with given fields: ctx, collectionID, ts
|
|
func (_m *IMetaTable) RemoveCollection(ctx context.Context, collectionID int64, ts uint64) error {
|
|
ret := _m.Called(ctx, collectionID, ts)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for RemoveCollection")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, uint64) error); ok {
|
|
r0 = rf(ctx, collectionID, ts)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_RemoveCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveCollection'
|
|
type IMetaTable_RemoveCollection_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// RemoveCollection is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - collectionID int64
|
|
// - ts uint64
|
|
func (_e *IMetaTable_Expecter) RemoveCollection(ctx interface{}, collectionID interface{}, ts interface{}) *IMetaTable_RemoveCollection_Call {
|
|
return &IMetaTable_RemoveCollection_Call{Call: _e.mock.On("RemoveCollection", ctx, collectionID, ts)}
|
|
}
|
|
|
|
func (_c *IMetaTable_RemoveCollection_Call) Run(run func(ctx context.Context, collectionID int64, ts uint64)) *IMetaTable_RemoveCollection_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64), args[2].(uint64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_RemoveCollection_Call) Return(_a0 error) *IMetaTable_RemoveCollection_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_RemoveCollection_Call) RunAndReturn(run func(context.Context, int64, uint64) error) *IMetaTable_RemoveCollection_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// RemovePartition provides a mock function with given fields: ctx, collectionID, partitionID, ts
|
|
func (_m *IMetaTable) RemovePartition(ctx context.Context, collectionID int64, partitionID int64, ts uint64) error {
|
|
ret := _m.Called(ctx, collectionID, partitionID, ts)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for RemovePartition")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, int64, uint64) error); ok {
|
|
r0 = rf(ctx, collectionID, partitionID, ts)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_RemovePartition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemovePartition'
|
|
type IMetaTable_RemovePartition_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// RemovePartition is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - collectionID int64
|
|
// - partitionID int64
|
|
// - ts uint64
|
|
func (_e *IMetaTable_Expecter) RemovePartition(ctx interface{}, collectionID interface{}, partitionID interface{}, ts interface{}) *IMetaTable_RemovePartition_Call {
|
|
return &IMetaTable_RemovePartition_Call{Call: _e.mock.On("RemovePartition", ctx, collectionID, partitionID, ts)}
|
|
}
|
|
|
|
func (_c *IMetaTable_RemovePartition_Call) Run(run func(ctx context.Context, collectionID int64, partitionID int64, ts uint64)) *IMetaTable_RemovePartition_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64), args[2].(int64), args[3].(uint64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_RemovePartition_Call) Return(_a0 error) *IMetaTable_RemovePartition_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_RemovePartition_Call) RunAndReturn(run func(context.Context, int64, int64, uint64) error) *IMetaTable_RemovePartition_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// RestoreRBAC provides a mock function with given fields: ctx, tenant, meta
|
|
func (_m *IMetaTable) RestoreRBAC(ctx context.Context, tenant string, meta *milvuspb.RBACMeta) error {
|
|
ret := _m.Called(ctx, tenant, meta)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for RestoreRBAC")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, *milvuspb.RBACMeta) error); ok {
|
|
r0 = rf(ctx, tenant, meta)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_RestoreRBAC_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RestoreRBAC'
|
|
type IMetaTable_RestoreRBAC_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// RestoreRBAC is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - tenant string
|
|
// - meta *milvuspb.RBACMeta
|
|
func (_e *IMetaTable_Expecter) RestoreRBAC(ctx interface{}, tenant interface{}, meta interface{}) *IMetaTable_RestoreRBAC_Call {
|
|
return &IMetaTable_RestoreRBAC_Call{Call: _e.mock.On("RestoreRBAC", ctx, tenant, meta)}
|
|
}
|
|
|
|
func (_c *IMetaTable_RestoreRBAC_Call) Run(run func(ctx context.Context, tenant string, meta *milvuspb.RBACMeta)) *IMetaTable_RestoreRBAC_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(*milvuspb.RBACMeta))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_RestoreRBAC_Call) Return(_a0 error) *IMetaTable_RestoreRBAC_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_RestoreRBAC_Call) RunAndReturn(run func(context.Context, string, *milvuspb.RBACMeta) error) *IMetaTable_RestoreRBAC_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SelectGrant provides a mock function with given fields: ctx, tenant, entity
|
|
func (_m *IMetaTable) SelectGrant(ctx context.Context, tenant string, entity *milvuspb.GrantEntity) ([]*milvuspb.GrantEntity, error) {
|
|
ret := _m.Called(ctx, tenant, entity)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SelectGrant")
|
|
}
|
|
|
|
var r0 []*milvuspb.GrantEntity
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, *milvuspb.GrantEntity) ([]*milvuspb.GrantEntity, error)); ok {
|
|
return rf(ctx, tenant, entity)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, *milvuspb.GrantEntity) []*milvuspb.GrantEntity); ok {
|
|
r0 = rf(ctx, tenant, entity)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*milvuspb.GrantEntity)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string, *milvuspb.GrantEntity) error); ok {
|
|
r1 = rf(ctx, tenant, entity)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// IMetaTable_SelectGrant_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelectGrant'
|
|
type IMetaTable_SelectGrant_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SelectGrant is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - tenant string
|
|
// - entity *milvuspb.GrantEntity
|
|
func (_e *IMetaTable_Expecter) SelectGrant(ctx interface{}, tenant interface{}, entity interface{}) *IMetaTable_SelectGrant_Call {
|
|
return &IMetaTable_SelectGrant_Call{Call: _e.mock.On("SelectGrant", ctx, tenant, entity)}
|
|
}
|
|
|
|
func (_c *IMetaTable_SelectGrant_Call) Run(run func(ctx context.Context, tenant string, entity *milvuspb.GrantEntity)) *IMetaTable_SelectGrant_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(*milvuspb.GrantEntity))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_SelectGrant_Call) Return(_a0 []*milvuspb.GrantEntity, _a1 error) *IMetaTable_SelectGrant_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_SelectGrant_Call) RunAndReturn(run func(context.Context, string, *milvuspb.GrantEntity) ([]*milvuspb.GrantEntity, error)) *IMetaTable_SelectGrant_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SelectRole provides a mock function with given fields: ctx, tenant, entity, includeUserInfo
|
|
func (_m *IMetaTable) SelectRole(ctx context.Context, tenant string, entity *milvuspb.RoleEntity, includeUserInfo bool) ([]*milvuspb.RoleResult, error) {
|
|
ret := _m.Called(ctx, tenant, entity, includeUserInfo)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SelectRole")
|
|
}
|
|
|
|
var r0 []*milvuspb.RoleResult
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, *milvuspb.RoleEntity, bool) ([]*milvuspb.RoleResult, error)); ok {
|
|
return rf(ctx, tenant, entity, includeUserInfo)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, *milvuspb.RoleEntity, bool) []*milvuspb.RoleResult); ok {
|
|
r0 = rf(ctx, tenant, entity, includeUserInfo)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*milvuspb.RoleResult)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string, *milvuspb.RoleEntity, bool) error); ok {
|
|
r1 = rf(ctx, tenant, entity, includeUserInfo)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// IMetaTable_SelectRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelectRole'
|
|
type IMetaTable_SelectRole_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SelectRole is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - tenant string
|
|
// - entity *milvuspb.RoleEntity
|
|
// - includeUserInfo bool
|
|
func (_e *IMetaTable_Expecter) SelectRole(ctx interface{}, tenant interface{}, entity interface{}, includeUserInfo interface{}) *IMetaTable_SelectRole_Call {
|
|
return &IMetaTable_SelectRole_Call{Call: _e.mock.On("SelectRole", ctx, tenant, entity, includeUserInfo)}
|
|
}
|
|
|
|
func (_c *IMetaTable_SelectRole_Call) Run(run func(ctx context.Context, tenant string, entity *milvuspb.RoleEntity, includeUserInfo bool)) *IMetaTable_SelectRole_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(*milvuspb.RoleEntity), args[3].(bool))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_SelectRole_Call) Return(_a0 []*milvuspb.RoleResult, _a1 error) *IMetaTable_SelectRole_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_SelectRole_Call) RunAndReturn(run func(context.Context, string, *milvuspb.RoleEntity, bool) ([]*milvuspb.RoleResult, error)) *IMetaTable_SelectRole_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SelectUser provides a mock function with given fields: ctx, tenant, entity, includeRoleInfo
|
|
func (_m *IMetaTable) SelectUser(ctx context.Context, tenant string, entity *milvuspb.UserEntity, includeRoleInfo bool) ([]*milvuspb.UserResult, error) {
|
|
ret := _m.Called(ctx, tenant, entity, includeRoleInfo)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SelectUser")
|
|
}
|
|
|
|
var r0 []*milvuspb.UserResult
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, *milvuspb.UserEntity, bool) ([]*milvuspb.UserResult, error)); ok {
|
|
return rf(ctx, tenant, entity, includeRoleInfo)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, *milvuspb.UserEntity, bool) []*milvuspb.UserResult); ok {
|
|
r0 = rf(ctx, tenant, entity, includeRoleInfo)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*milvuspb.UserResult)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string, *milvuspb.UserEntity, bool) error); ok {
|
|
r1 = rf(ctx, tenant, entity, includeRoleInfo)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// IMetaTable_SelectUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelectUser'
|
|
type IMetaTable_SelectUser_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SelectUser is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - tenant string
|
|
// - entity *milvuspb.UserEntity
|
|
// - includeRoleInfo bool
|
|
func (_e *IMetaTable_Expecter) SelectUser(ctx interface{}, tenant interface{}, entity interface{}, includeRoleInfo interface{}) *IMetaTable_SelectUser_Call {
|
|
return &IMetaTable_SelectUser_Call{Call: _e.mock.On("SelectUser", ctx, tenant, entity, includeRoleInfo)}
|
|
}
|
|
|
|
func (_c *IMetaTable_SelectUser_Call) Run(run func(ctx context.Context, tenant string, entity *milvuspb.UserEntity, includeRoleInfo bool)) *IMetaTable_SelectUser_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(*milvuspb.UserEntity), args[3].(bool))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_SelectUser_Call) Return(_a0 []*milvuspb.UserResult, _a1 error) *IMetaTable_SelectUser_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_SelectUser_Call) RunAndReturn(run func(context.Context, string, *milvuspb.UserEntity, bool) ([]*milvuspb.UserResult, error)) *IMetaTable_SelectUser_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// TruncateCollection provides a mock function with given fields: ctx, result
|
|
func (_m *IMetaTable) TruncateCollection(ctx context.Context, result message.BroadcastResult[*messagespb.TruncateCollectionMessageHeader, *messagespb.TruncateCollectionMessageBody]) error {
|
|
ret := _m.Called(ctx, result)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for TruncateCollection")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, message.BroadcastResult[*messagespb.TruncateCollectionMessageHeader, *messagespb.TruncateCollectionMessageBody]) error); ok {
|
|
r0 = rf(ctx, result)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IMetaTable_TruncateCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TruncateCollection'
|
|
type IMetaTable_TruncateCollection_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// TruncateCollection is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - result message.BroadcastResult[*messagespb.TruncateCollectionMessageHeader,*messagespb.TruncateCollectionMessageBody]
|
|
func (_e *IMetaTable_Expecter) TruncateCollection(ctx interface{}, result interface{}) *IMetaTable_TruncateCollection_Call {
|
|
return &IMetaTable_TruncateCollection_Call{Call: _e.mock.On("TruncateCollection", ctx, result)}
|
|
}
|
|
|
|
func (_c *IMetaTable_TruncateCollection_Call) Run(run func(ctx context.Context, result message.BroadcastResult[*messagespb.TruncateCollectionMessageHeader, *messagespb.TruncateCollectionMessageBody])) *IMetaTable_TruncateCollection_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(message.BroadcastResult[*messagespb.TruncateCollectionMessageHeader, *messagespb.TruncateCollectionMessageBody]))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_TruncateCollection_Call) Return(_a0 error) *IMetaTable_TruncateCollection_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *IMetaTable_TruncateCollection_Call) RunAndReturn(run func(context.Context, message.BroadcastResult[*messagespb.TruncateCollectionMessageHeader, *messagespb.TruncateCollectionMessageBody]) error) *IMetaTable_TruncateCollection_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// NewIMetaTable creates a new instance of IMetaTable. 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 NewIMetaTable(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *IMetaTable {
|
|
mock := &IMetaTable{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|