diff --git a/client/Makefile b/client/Makefile index a8ca3a1de382d..71af63269c696 100644 --- a/client/Makefile +++ b/client/Makefile @@ -30,4 +30,4 @@ unittest: generate-mockery: @echo "Generating mockery Milvus service server" - @../bin/mockery --srcpkg=github.com/milvus-io/milvus-proto/go-api/v2/milvuspb --name=MilvusServiceServer --filename=mock_milvus_server_test.go --output=. --outpkg=client --with-expecter + @../bin/mockery --srcpkg=github.com/milvus-io/milvus-proto/go-api/v2/milvuspb --name=MilvusServiceServer --filename=mock_milvus_server_test.go --output=milvusclient --outpkg=milvusclient --with-expecter diff --git a/client/milvusclient/mock_milvus_server_test.go b/client/milvusclient/mock_milvus_server_test.go index e8fa1f4cf97c2..6e0b4da8e6856 100644 --- a/client/milvusclient/mock_milvus_server_test.go +++ b/client/milvusclient/mock_milvus_server_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.46.0. DO NOT EDIT. package milvusclient @@ -31,6 +31,10 @@ func (_m *MilvusServiceServer) EXPECT() *MilvusServiceServer_Expecter { func (_m *MilvusServiceServer) AllocTimestamp(_a0 context.Context, _a1 *milvuspb.AllocTimestampRequest) (*milvuspb.AllocTimestampResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for AllocTimestamp") + } + var r0 *milvuspb.AllocTimestampResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.AllocTimestampRequest) (*milvuspb.AllocTimestampResponse, error)); ok { @@ -86,6 +90,10 @@ func (_c *MilvusServiceServer_AllocTimestamp_Call) RunAndReturn(run func(context func (_m *MilvusServiceServer) AlterAlias(_a0 context.Context, _a1 *milvuspb.AlterAliasRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for AlterAlias") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.AlterAliasRequest) (*commonpb.Status, error)); ok { @@ -141,6 +149,10 @@ func (_c *MilvusServiceServer_AlterAlias_Call) RunAndReturn(run func(context.Con func (_m *MilvusServiceServer) AlterCollection(_a0 context.Context, _a1 *milvuspb.AlterCollectionRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for AlterCollection") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.AlterCollectionRequest) (*commonpb.Status, error)); ok { @@ -192,10 +204,73 @@ func (_c *MilvusServiceServer_AlterCollection_Call) RunAndReturn(run func(contex return _c } +// AlterCollectionField provides a mock function with given fields: _a0, _a1 +func (_m *MilvusServiceServer) AlterCollectionField(_a0 context.Context, _a1 *milvuspb.AlterCollectionFieldRequest) (*commonpb.Status, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for AlterCollectionField") + } + + var r0 *commonpb.Status + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.AlterCollectionFieldRequest) (*commonpb.Status, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.AlterCollectionFieldRequest) *commonpb.Status); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*commonpb.Status) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.AlterCollectionFieldRequest) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MilvusServiceServer_AlterCollectionField_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AlterCollectionField' +type MilvusServiceServer_AlterCollectionField_Call struct { + *mock.Call +} + +// AlterCollectionField is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *milvuspb.AlterCollectionFieldRequest +func (_e *MilvusServiceServer_Expecter) AlterCollectionField(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_AlterCollectionField_Call { + return &MilvusServiceServer_AlterCollectionField_Call{Call: _e.mock.On("AlterCollectionField", _a0, _a1)} +} + +func (_c *MilvusServiceServer_AlterCollectionField_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.AlterCollectionFieldRequest)) *MilvusServiceServer_AlterCollectionField_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*milvuspb.AlterCollectionFieldRequest)) + }) + return _c +} + +func (_c *MilvusServiceServer_AlterCollectionField_Call) Return(_a0 *commonpb.Status, _a1 error) *MilvusServiceServer_AlterCollectionField_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MilvusServiceServer_AlterCollectionField_Call) RunAndReturn(run func(context.Context, *milvuspb.AlterCollectionFieldRequest) (*commonpb.Status, error)) *MilvusServiceServer_AlterCollectionField_Call { + _c.Call.Return(run) + return _c +} + // AlterDatabase provides a mock function with given fields: _a0, _a1 func (_m *MilvusServiceServer) AlterDatabase(_a0 context.Context, _a1 *milvuspb.AlterDatabaseRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for AlterDatabase") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.AlterDatabaseRequest) (*commonpb.Status, error)); ok { @@ -251,6 +326,10 @@ func (_c *MilvusServiceServer_AlterDatabase_Call) RunAndReturn(run func(context. func (_m *MilvusServiceServer) AlterIndex(_a0 context.Context, _a1 *milvuspb.AlterIndexRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for AlterIndex") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.AlterIndexRequest) (*commonpb.Status, error)); ok { @@ -306,6 +385,10 @@ func (_c *MilvusServiceServer_AlterIndex_Call) RunAndReturn(run func(context.Con func (_m *MilvusServiceServer) BackupRBAC(_a0 context.Context, _a1 *milvuspb.BackupRBACMetaRequest) (*milvuspb.BackupRBACMetaResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BackupRBAC") + } + var r0 *milvuspb.BackupRBACMetaResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.BackupRBACMetaRequest) (*milvuspb.BackupRBACMetaResponse, error)); ok { @@ -361,6 +444,10 @@ func (_c *MilvusServiceServer_BackupRBAC_Call) RunAndReturn(run func(context.Con func (_m *MilvusServiceServer) CalcDistance(_a0 context.Context, _a1 *milvuspb.CalcDistanceRequest) (*milvuspb.CalcDistanceResults, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CalcDistance") + } + var r0 *milvuspb.CalcDistanceResults var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CalcDistanceRequest) (*milvuspb.CalcDistanceResults, error)); ok { @@ -416,6 +503,10 @@ func (_c *MilvusServiceServer_CalcDistance_Call) RunAndReturn(run func(context.C func (_m *MilvusServiceServer) CheckHealth(_a0 context.Context, _a1 *milvuspb.CheckHealthRequest) (*milvuspb.CheckHealthResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CheckHealth") + } + var r0 *milvuspb.CheckHealthResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CheckHealthRequest) (*milvuspb.CheckHealthResponse, error)); ok { @@ -471,6 +562,10 @@ func (_c *MilvusServiceServer_CheckHealth_Call) RunAndReturn(run func(context.Co func (_m *MilvusServiceServer) Connect(_a0 context.Context, _a1 *milvuspb.ConnectRequest) (*milvuspb.ConnectResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Connect") + } + var r0 *milvuspb.ConnectResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ConnectRequest) (*milvuspb.ConnectResponse, error)); ok { @@ -526,6 +621,10 @@ func (_c *MilvusServiceServer_Connect_Call) RunAndReturn(run func(context.Contex func (_m *MilvusServiceServer) CreateAlias(_a0 context.Context, _a1 *milvuspb.CreateAliasRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CreateAlias") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateAliasRequest) (*commonpb.Status, error)); ok { @@ -581,6 +680,10 @@ func (_c *MilvusServiceServer_CreateAlias_Call) RunAndReturn(run func(context.Co func (_m *MilvusServiceServer) CreateCollection(_a0 context.Context, _a1 *milvuspb.CreateCollectionRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CreateCollection") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateCollectionRequest) (*commonpb.Status, error)); ok { @@ -636,6 +739,10 @@ func (_c *MilvusServiceServer_CreateCollection_Call) RunAndReturn(run func(conte func (_m *MilvusServiceServer) CreateCredential(_a0 context.Context, _a1 *milvuspb.CreateCredentialRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CreateCredential") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateCredentialRequest) (*commonpb.Status, error)); ok { @@ -691,6 +798,10 @@ func (_c *MilvusServiceServer_CreateCredential_Call) RunAndReturn(run func(conte func (_m *MilvusServiceServer) CreateDatabase(_a0 context.Context, _a1 *milvuspb.CreateDatabaseRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CreateDatabase") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateDatabaseRequest) (*commonpb.Status, error)); ok { @@ -746,6 +857,10 @@ func (_c *MilvusServiceServer_CreateDatabase_Call) RunAndReturn(run func(context func (_m *MilvusServiceServer) CreateIndex(_a0 context.Context, _a1 *milvuspb.CreateIndexRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CreateIndex") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateIndexRequest) (*commonpb.Status, error)); ok { @@ -801,6 +916,10 @@ func (_c *MilvusServiceServer_CreateIndex_Call) RunAndReturn(run func(context.Co func (_m *MilvusServiceServer) CreatePartition(_a0 context.Context, _a1 *milvuspb.CreatePartitionRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CreatePartition") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreatePartitionRequest) (*commonpb.Status, error)); ok { @@ -852,10 +971,73 @@ func (_c *MilvusServiceServer_CreatePartition_Call) RunAndReturn(run func(contex return _c } +// CreatePrivilegeGroup provides a mock function with given fields: _a0, _a1 +func (_m *MilvusServiceServer) CreatePrivilegeGroup(_a0 context.Context, _a1 *milvuspb.CreatePrivilegeGroupRequest) (*commonpb.Status, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for CreatePrivilegeGroup") + } + + var r0 *commonpb.Status + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreatePrivilegeGroupRequest) (*commonpb.Status, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreatePrivilegeGroupRequest) *commonpb.Status); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*commonpb.Status) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.CreatePrivilegeGroupRequest) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MilvusServiceServer_CreatePrivilegeGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePrivilegeGroup' +type MilvusServiceServer_CreatePrivilegeGroup_Call struct { + *mock.Call +} + +// CreatePrivilegeGroup is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *milvuspb.CreatePrivilegeGroupRequest +func (_e *MilvusServiceServer_Expecter) CreatePrivilegeGroup(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreatePrivilegeGroup_Call { + return &MilvusServiceServer_CreatePrivilegeGroup_Call{Call: _e.mock.On("CreatePrivilegeGroup", _a0, _a1)} +} + +func (_c *MilvusServiceServer_CreatePrivilegeGroup_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.CreatePrivilegeGroupRequest)) *MilvusServiceServer_CreatePrivilegeGroup_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*milvuspb.CreatePrivilegeGroupRequest)) + }) + return _c +} + +func (_c *MilvusServiceServer_CreatePrivilegeGroup_Call) Return(_a0 *commonpb.Status, _a1 error) *MilvusServiceServer_CreatePrivilegeGroup_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MilvusServiceServer_CreatePrivilegeGroup_Call) RunAndReturn(run func(context.Context, *milvuspb.CreatePrivilegeGroupRequest) (*commonpb.Status, error)) *MilvusServiceServer_CreatePrivilegeGroup_Call { + _c.Call.Return(run) + return _c +} + // CreateResourceGroup provides a mock function with given fields: _a0, _a1 func (_m *MilvusServiceServer) CreateResourceGroup(_a0 context.Context, _a1 *milvuspb.CreateResourceGroupRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CreateResourceGroup") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateResourceGroupRequest) (*commonpb.Status, error)); ok { @@ -911,6 +1093,10 @@ func (_c *MilvusServiceServer_CreateResourceGroup_Call) RunAndReturn(run func(co func (_m *MilvusServiceServer) CreateRole(_a0 context.Context, _a1 *milvuspb.CreateRoleRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CreateRole") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateRoleRequest) (*commonpb.Status, error)); ok { @@ -966,6 +1152,10 @@ func (_c *MilvusServiceServer_CreateRole_Call) RunAndReturn(run func(context.Con func (_m *MilvusServiceServer) Delete(_a0 context.Context, _a1 *milvuspb.DeleteRequest) (*milvuspb.MutationResult, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 *milvuspb.MutationResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DeleteRequest) (*milvuspb.MutationResult, error)); ok { @@ -1021,6 +1211,10 @@ func (_c *MilvusServiceServer_Delete_Call) RunAndReturn(run func(context.Context func (_m *MilvusServiceServer) DeleteCredential(_a0 context.Context, _a1 *milvuspb.DeleteCredentialRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for DeleteCredential") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DeleteCredentialRequest) (*commonpb.Status, error)); ok { @@ -1076,6 +1270,10 @@ func (_c *MilvusServiceServer_DeleteCredential_Call) RunAndReturn(run func(conte func (_m *MilvusServiceServer) DescribeAlias(_a0 context.Context, _a1 *milvuspb.DescribeAliasRequest) (*milvuspb.DescribeAliasResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for DescribeAlias") + } + var r0 *milvuspb.DescribeAliasResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DescribeAliasRequest) (*milvuspb.DescribeAliasResponse, error)); ok { @@ -1131,6 +1329,10 @@ func (_c *MilvusServiceServer_DescribeAlias_Call) RunAndReturn(run func(context. func (_m *MilvusServiceServer) DescribeCollection(_a0 context.Context, _a1 *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for DescribeCollection") + } + var r0 *milvuspb.DescribeCollectionResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error)); ok { @@ -1186,6 +1388,10 @@ func (_c *MilvusServiceServer_DescribeCollection_Call) RunAndReturn(run func(con func (_m *MilvusServiceServer) DescribeDatabase(_a0 context.Context, _a1 *milvuspb.DescribeDatabaseRequest) (*milvuspb.DescribeDatabaseResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for DescribeDatabase") + } + var r0 *milvuspb.DescribeDatabaseResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DescribeDatabaseRequest) (*milvuspb.DescribeDatabaseResponse, error)); ok { @@ -1241,6 +1447,10 @@ func (_c *MilvusServiceServer_DescribeDatabase_Call) RunAndReturn(run func(conte func (_m *MilvusServiceServer) DescribeIndex(_a0 context.Context, _a1 *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for DescribeIndex") + } + var r0 *milvuspb.DescribeIndexResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error)); ok { @@ -1296,6 +1506,10 @@ func (_c *MilvusServiceServer_DescribeIndex_Call) RunAndReturn(run func(context. func (_m *MilvusServiceServer) DescribeResourceGroup(_a0 context.Context, _a1 *milvuspb.DescribeResourceGroupRequest) (*milvuspb.DescribeResourceGroupResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for DescribeResourceGroup") + } + var r0 *milvuspb.DescribeResourceGroupResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DescribeResourceGroupRequest) (*milvuspb.DescribeResourceGroupResponse, error)); ok { @@ -1351,6 +1565,10 @@ func (_c *MilvusServiceServer_DescribeResourceGroup_Call) RunAndReturn(run func( func (_m *MilvusServiceServer) DescribeSegmentIndexData(_a0 context.Context, _a1 *federpb.DescribeSegmentIndexDataRequest) (*federpb.DescribeSegmentIndexDataResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for DescribeSegmentIndexData") + } + var r0 *federpb.DescribeSegmentIndexDataResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *federpb.DescribeSegmentIndexDataRequest) (*federpb.DescribeSegmentIndexDataResponse, error)); ok { @@ -1406,6 +1624,10 @@ func (_c *MilvusServiceServer_DescribeSegmentIndexData_Call) RunAndReturn(run fu func (_m *MilvusServiceServer) DropAlias(_a0 context.Context, _a1 *milvuspb.DropAliasRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for DropAlias") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropAliasRequest) (*commonpb.Status, error)); ok { @@ -1461,6 +1683,10 @@ func (_c *MilvusServiceServer_DropAlias_Call) RunAndReturn(run func(context.Cont func (_m *MilvusServiceServer) DropCollection(_a0 context.Context, _a1 *milvuspb.DropCollectionRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for DropCollection") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropCollectionRequest) (*commonpb.Status, error)); ok { @@ -1516,6 +1742,10 @@ func (_c *MilvusServiceServer_DropCollection_Call) RunAndReturn(run func(context func (_m *MilvusServiceServer) DropDatabase(_a0 context.Context, _a1 *milvuspb.DropDatabaseRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for DropDatabase") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropDatabaseRequest) (*commonpb.Status, error)); ok { @@ -1571,6 +1801,10 @@ func (_c *MilvusServiceServer_DropDatabase_Call) RunAndReturn(run func(context.C func (_m *MilvusServiceServer) DropIndex(_a0 context.Context, _a1 *milvuspb.DropIndexRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for DropIndex") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropIndexRequest) (*commonpb.Status, error)); ok { @@ -1626,6 +1860,10 @@ func (_c *MilvusServiceServer_DropIndex_Call) RunAndReturn(run func(context.Cont func (_m *MilvusServiceServer) DropPartition(_a0 context.Context, _a1 *milvuspb.DropPartitionRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for DropPartition") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropPartitionRequest) (*commonpb.Status, error)); ok { @@ -1677,10 +1915,73 @@ func (_c *MilvusServiceServer_DropPartition_Call) RunAndReturn(run func(context. return _c } +// DropPrivilegeGroup provides a mock function with given fields: _a0, _a1 +func (_m *MilvusServiceServer) DropPrivilegeGroup(_a0 context.Context, _a1 *milvuspb.DropPrivilegeGroupRequest) (*commonpb.Status, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for DropPrivilegeGroup") + } + + var r0 *commonpb.Status + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropPrivilegeGroupRequest) (*commonpb.Status, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropPrivilegeGroupRequest) *commonpb.Status); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*commonpb.Status) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DropPrivilegeGroupRequest) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MilvusServiceServer_DropPrivilegeGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropPrivilegeGroup' +type MilvusServiceServer_DropPrivilegeGroup_Call struct { + *mock.Call +} + +// DropPrivilegeGroup is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *milvuspb.DropPrivilegeGroupRequest +func (_e *MilvusServiceServer_Expecter) DropPrivilegeGroup(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropPrivilegeGroup_Call { + return &MilvusServiceServer_DropPrivilegeGroup_Call{Call: _e.mock.On("DropPrivilegeGroup", _a0, _a1)} +} + +func (_c *MilvusServiceServer_DropPrivilegeGroup_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DropPrivilegeGroupRequest)) *MilvusServiceServer_DropPrivilegeGroup_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*milvuspb.DropPrivilegeGroupRequest)) + }) + return _c +} + +func (_c *MilvusServiceServer_DropPrivilegeGroup_Call) Return(_a0 *commonpb.Status, _a1 error) *MilvusServiceServer_DropPrivilegeGroup_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MilvusServiceServer_DropPrivilegeGroup_Call) RunAndReturn(run func(context.Context, *milvuspb.DropPrivilegeGroupRequest) (*commonpb.Status, error)) *MilvusServiceServer_DropPrivilegeGroup_Call { + _c.Call.Return(run) + return _c +} + // DropResourceGroup provides a mock function with given fields: _a0, _a1 func (_m *MilvusServiceServer) DropResourceGroup(_a0 context.Context, _a1 *milvuspb.DropResourceGroupRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for DropResourceGroup") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropResourceGroupRequest) (*commonpb.Status, error)); ok { @@ -1736,6 +2037,10 @@ func (_c *MilvusServiceServer_DropResourceGroup_Call) RunAndReturn(run func(cont func (_m *MilvusServiceServer) DropRole(_a0 context.Context, _a1 *milvuspb.DropRoleRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for DropRole") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropRoleRequest) (*commonpb.Status, error)); ok { @@ -1791,6 +2096,10 @@ func (_c *MilvusServiceServer_DropRole_Call) RunAndReturn(run func(context.Conte func (_m *MilvusServiceServer) Dummy(_a0 context.Context, _a1 *milvuspb.DummyRequest) (*milvuspb.DummyResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Dummy") + } + var r0 *milvuspb.DummyResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DummyRequest) (*milvuspb.DummyResponse, error)); ok { @@ -1846,6 +2155,10 @@ func (_c *MilvusServiceServer_Dummy_Call) RunAndReturn(run func(context.Context, func (_m *MilvusServiceServer) Flush(_a0 context.Context, _a1 *milvuspb.FlushRequest) (*milvuspb.FlushResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Flush") + } + var r0 *milvuspb.FlushResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.FlushRequest) (*milvuspb.FlushResponse, error)); ok { @@ -1901,6 +2214,10 @@ func (_c *MilvusServiceServer_Flush_Call) RunAndReturn(run func(context.Context, func (_m *MilvusServiceServer) FlushAll(_a0 context.Context, _a1 *milvuspb.FlushAllRequest) (*milvuspb.FlushAllResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for FlushAll") + } + var r0 *milvuspb.FlushAllResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.FlushAllRequest) (*milvuspb.FlushAllResponse, error)); ok { @@ -1956,6 +2273,10 @@ func (_c *MilvusServiceServer_FlushAll_Call) RunAndReturn(run func(context.Conte func (_m *MilvusServiceServer) GetCollectionStatistics(_a0 context.Context, _a1 *milvuspb.GetCollectionStatisticsRequest) (*milvuspb.GetCollectionStatisticsResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetCollectionStatistics") + } + var r0 *milvuspb.GetCollectionStatisticsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetCollectionStatisticsRequest) (*milvuspb.GetCollectionStatisticsResponse, error)); ok { @@ -2011,6 +2332,10 @@ func (_c *MilvusServiceServer_GetCollectionStatistics_Call) RunAndReturn(run fun func (_m *MilvusServiceServer) GetCompactionState(_a0 context.Context, _a1 *milvuspb.GetCompactionStateRequest) (*milvuspb.GetCompactionStateResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetCompactionState") + } + var r0 *milvuspb.GetCompactionStateResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetCompactionStateRequest) (*milvuspb.GetCompactionStateResponse, error)); ok { @@ -2066,6 +2391,10 @@ func (_c *MilvusServiceServer_GetCompactionState_Call) RunAndReturn(run func(con func (_m *MilvusServiceServer) GetCompactionStateWithPlans(_a0 context.Context, _a1 *milvuspb.GetCompactionPlansRequest) (*milvuspb.GetCompactionPlansResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetCompactionStateWithPlans") + } + var r0 *milvuspb.GetCompactionPlansResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetCompactionPlansRequest) (*milvuspb.GetCompactionPlansResponse, error)); ok { @@ -2121,6 +2450,10 @@ func (_c *MilvusServiceServer_GetCompactionStateWithPlans_Call) RunAndReturn(run func (_m *MilvusServiceServer) GetComponentStates(_a0 context.Context, _a1 *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetComponentStates") + } + var r0 *milvuspb.ComponentStates var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error)); ok { @@ -2176,6 +2509,10 @@ func (_c *MilvusServiceServer_GetComponentStates_Call) RunAndReturn(run func(con func (_m *MilvusServiceServer) GetFlushAllState(_a0 context.Context, _a1 *milvuspb.GetFlushAllStateRequest) (*milvuspb.GetFlushAllStateResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetFlushAllState") + } + var r0 *milvuspb.GetFlushAllStateResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetFlushAllStateRequest) (*milvuspb.GetFlushAllStateResponse, error)); ok { @@ -2231,6 +2568,10 @@ func (_c *MilvusServiceServer_GetFlushAllState_Call) RunAndReturn(run func(conte func (_m *MilvusServiceServer) GetFlushState(_a0 context.Context, _a1 *milvuspb.GetFlushStateRequest) (*milvuspb.GetFlushStateResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetFlushState") + } + var r0 *milvuspb.GetFlushStateResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetFlushStateRequest) (*milvuspb.GetFlushStateResponse, error)); ok { @@ -2286,6 +2627,10 @@ func (_c *MilvusServiceServer_GetFlushState_Call) RunAndReturn(run func(context. func (_m *MilvusServiceServer) GetImportState(_a0 context.Context, _a1 *milvuspb.GetImportStateRequest) (*milvuspb.GetImportStateResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetImportState") + } + var r0 *milvuspb.GetImportStateResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetImportStateRequest) (*milvuspb.GetImportStateResponse, error)); ok { @@ -2341,6 +2686,10 @@ func (_c *MilvusServiceServer_GetImportState_Call) RunAndReturn(run func(context func (_m *MilvusServiceServer) GetIndexBuildProgress(_a0 context.Context, _a1 *milvuspb.GetIndexBuildProgressRequest) (*milvuspb.GetIndexBuildProgressResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetIndexBuildProgress") + } + var r0 *milvuspb.GetIndexBuildProgressResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetIndexBuildProgressRequest) (*milvuspb.GetIndexBuildProgressResponse, error)); ok { @@ -2396,6 +2745,10 @@ func (_c *MilvusServiceServer_GetIndexBuildProgress_Call) RunAndReturn(run func( func (_m *MilvusServiceServer) GetIndexState(_a0 context.Context, _a1 *milvuspb.GetIndexStateRequest) (*milvuspb.GetIndexStateResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetIndexState") + } + var r0 *milvuspb.GetIndexStateResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetIndexStateRequest) (*milvuspb.GetIndexStateResponse, error)); ok { @@ -2451,6 +2804,10 @@ func (_c *MilvusServiceServer_GetIndexState_Call) RunAndReturn(run func(context. func (_m *MilvusServiceServer) GetIndexStatistics(_a0 context.Context, _a1 *milvuspb.GetIndexStatisticsRequest) (*milvuspb.GetIndexStatisticsResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetIndexStatistics") + } + var r0 *milvuspb.GetIndexStatisticsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetIndexStatisticsRequest) (*milvuspb.GetIndexStatisticsResponse, error)); ok { @@ -2506,6 +2863,10 @@ func (_c *MilvusServiceServer_GetIndexStatistics_Call) RunAndReturn(run func(con func (_m *MilvusServiceServer) GetLoadState(_a0 context.Context, _a1 *milvuspb.GetLoadStateRequest) (*milvuspb.GetLoadStateResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetLoadState") + } + var r0 *milvuspb.GetLoadStateResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetLoadStateRequest) (*milvuspb.GetLoadStateResponse, error)); ok { @@ -2561,6 +2922,10 @@ func (_c *MilvusServiceServer_GetLoadState_Call) RunAndReturn(run func(context.C func (_m *MilvusServiceServer) GetLoadingProgress(_a0 context.Context, _a1 *milvuspb.GetLoadingProgressRequest) (*milvuspb.GetLoadingProgressResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetLoadingProgress") + } + var r0 *milvuspb.GetLoadingProgressResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetLoadingProgressRequest) (*milvuspb.GetLoadingProgressResponse, error)); ok { @@ -2616,6 +2981,10 @@ func (_c *MilvusServiceServer_GetLoadingProgress_Call) RunAndReturn(run func(con func (_m *MilvusServiceServer) GetMetrics(_a0 context.Context, _a1 *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetMetrics") + } + var r0 *milvuspb.GetMetricsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)); ok { @@ -2671,6 +3040,10 @@ func (_c *MilvusServiceServer_GetMetrics_Call) RunAndReturn(run func(context.Con func (_m *MilvusServiceServer) GetPartitionStatistics(_a0 context.Context, _a1 *milvuspb.GetPartitionStatisticsRequest) (*milvuspb.GetPartitionStatisticsResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetPartitionStatistics") + } + var r0 *milvuspb.GetPartitionStatisticsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetPartitionStatisticsRequest) (*milvuspb.GetPartitionStatisticsResponse, error)); ok { @@ -2726,6 +3099,10 @@ func (_c *MilvusServiceServer_GetPartitionStatistics_Call) RunAndReturn(run func func (_m *MilvusServiceServer) GetPersistentSegmentInfo(_a0 context.Context, _a1 *milvuspb.GetPersistentSegmentInfoRequest) (*milvuspb.GetPersistentSegmentInfoResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetPersistentSegmentInfo") + } + var r0 *milvuspb.GetPersistentSegmentInfoResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetPersistentSegmentInfoRequest) (*milvuspb.GetPersistentSegmentInfoResponse, error)); ok { @@ -2781,6 +3158,10 @@ func (_c *MilvusServiceServer_GetPersistentSegmentInfo_Call) RunAndReturn(run fu func (_m *MilvusServiceServer) GetQuerySegmentInfo(_a0 context.Context, _a1 *milvuspb.GetQuerySegmentInfoRequest) (*milvuspb.GetQuerySegmentInfoResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetQuerySegmentInfo") + } + var r0 *milvuspb.GetQuerySegmentInfoResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetQuerySegmentInfoRequest) (*milvuspb.GetQuerySegmentInfoResponse, error)); ok { @@ -2836,6 +3217,10 @@ func (_c *MilvusServiceServer_GetQuerySegmentInfo_Call) RunAndReturn(run func(co func (_m *MilvusServiceServer) GetReplicas(_a0 context.Context, _a1 *milvuspb.GetReplicasRequest) (*milvuspb.GetReplicasResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetReplicas") + } + var r0 *milvuspb.GetReplicasResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetReplicasRequest) (*milvuspb.GetReplicasResponse, error)); ok { @@ -2891,6 +3276,10 @@ func (_c *MilvusServiceServer_GetReplicas_Call) RunAndReturn(run func(context.Co func (_m *MilvusServiceServer) GetVersion(_a0 context.Context, _a1 *milvuspb.GetVersionRequest) (*milvuspb.GetVersionResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetVersion") + } + var r0 *milvuspb.GetVersionResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetVersionRequest) (*milvuspb.GetVersionResponse, error)); ok { @@ -2946,6 +3335,10 @@ func (_c *MilvusServiceServer_GetVersion_Call) RunAndReturn(run func(context.Con func (_m *MilvusServiceServer) HasCollection(_a0 context.Context, _a1 *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for HasCollection") + } + var r0 *milvuspb.BoolResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error)); ok { @@ -3001,6 +3394,10 @@ func (_c *MilvusServiceServer_HasCollection_Call) RunAndReturn(run func(context. func (_m *MilvusServiceServer) HasPartition(_a0 context.Context, _a1 *milvuspb.HasPartitionRequest) (*milvuspb.BoolResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for HasPartition") + } + var r0 *milvuspb.BoolResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.HasPartitionRequest) (*milvuspb.BoolResponse, error)); ok { @@ -3056,6 +3453,10 @@ func (_c *MilvusServiceServer_HasPartition_Call) RunAndReturn(run func(context.C func (_m *MilvusServiceServer) HybridSearch(_a0 context.Context, _a1 *milvuspb.HybridSearchRequest) (*milvuspb.SearchResults, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for HybridSearch") + } + var r0 *milvuspb.SearchResults var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.HybridSearchRequest) (*milvuspb.SearchResults, error)); ok { @@ -3111,6 +3512,10 @@ func (_c *MilvusServiceServer_HybridSearch_Call) RunAndReturn(run func(context.C func (_m *MilvusServiceServer) Import(_a0 context.Context, _a1 *milvuspb.ImportRequest) (*milvuspb.ImportResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Import") + } + var r0 *milvuspb.ImportResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ImportRequest) (*milvuspb.ImportResponse, error)); ok { @@ -3166,6 +3571,10 @@ func (_c *MilvusServiceServer_Import_Call) RunAndReturn(run func(context.Context func (_m *MilvusServiceServer) Insert(_a0 context.Context, _a1 *milvuspb.InsertRequest) (*milvuspb.MutationResult, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Insert") + } + var r0 *milvuspb.MutationResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.InsertRequest) (*milvuspb.MutationResult, error)); ok { @@ -3221,6 +3630,10 @@ func (_c *MilvusServiceServer_Insert_Call) RunAndReturn(run func(context.Context func (_m *MilvusServiceServer) ListAliases(_a0 context.Context, _a1 *milvuspb.ListAliasesRequest) (*milvuspb.ListAliasesResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ListAliases") + } + var r0 *milvuspb.ListAliasesResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListAliasesRequest) (*milvuspb.ListAliasesResponse, error)); ok { @@ -3276,6 +3689,10 @@ func (_c *MilvusServiceServer_ListAliases_Call) RunAndReturn(run func(context.Co func (_m *MilvusServiceServer) ListCredUsers(_a0 context.Context, _a1 *milvuspb.ListCredUsersRequest) (*milvuspb.ListCredUsersResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ListCredUsers") + } + var r0 *milvuspb.ListCredUsersResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListCredUsersRequest) (*milvuspb.ListCredUsersResponse, error)); ok { @@ -3331,6 +3748,10 @@ func (_c *MilvusServiceServer_ListCredUsers_Call) RunAndReturn(run func(context. func (_m *MilvusServiceServer) ListDatabases(_a0 context.Context, _a1 *milvuspb.ListDatabasesRequest) (*milvuspb.ListDatabasesResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ListDatabases") + } + var r0 *milvuspb.ListDatabasesResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListDatabasesRequest) (*milvuspb.ListDatabasesResponse, error)); ok { @@ -3386,6 +3807,10 @@ func (_c *MilvusServiceServer_ListDatabases_Call) RunAndReturn(run func(context. func (_m *MilvusServiceServer) ListImportTasks(_a0 context.Context, _a1 *milvuspb.ListImportTasksRequest) (*milvuspb.ListImportTasksResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ListImportTasks") + } + var r0 *milvuspb.ListImportTasksResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListImportTasksRequest) (*milvuspb.ListImportTasksResponse, error)); ok { @@ -3441,6 +3866,10 @@ func (_c *MilvusServiceServer_ListImportTasks_Call) RunAndReturn(run func(contex func (_m *MilvusServiceServer) ListIndexedSegment(_a0 context.Context, _a1 *federpb.ListIndexedSegmentRequest) (*federpb.ListIndexedSegmentResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ListIndexedSegment") + } + var r0 *federpb.ListIndexedSegmentResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *federpb.ListIndexedSegmentRequest) (*federpb.ListIndexedSegmentResponse, error)); ok { @@ -3492,10 +3921,73 @@ func (_c *MilvusServiceServer_ListIndexedSegment_Call) RunAndReturn(run func(con return _c } +// ListPrivilegeGroups provides a mock function with given fields: _a0, _a1 +func (_m *MilvusServiceServer) ListPrivilegeGroups(_a0 context.Context, _a1 *milvuspb.ListPrivilegeGroupsRequest) (*milvuspb.ListPrivilegeGroupsResponse, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for ListPrivilegeGroups") + } + + var r0 *milvuspb.ListPrivilegeGroupsResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListPrivilegeGroupsRequest) (*milvuspb.ListPrivilegeGroupsResponse, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListPrivilegeGroupsRequest) *milvuspb.ListPrivilegeGroupsResponse); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*milvuspb.ListPrivilegeGroupsResponse) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ListPrivilegeGroupsRequest) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MilvusServiceServer_ListPrivilegeGroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPrivilegeGroups' +type MilvusServiceServer_ListPrivilegeGroups_Call struct { + *mock.Call +} + +// ListPrivilegeGroups is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *milvuspb.ListPrivilegeGroupsRequest +func (_e *MilvusServiceServer_Expecter) ListPrivilegeGroups(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ListPrivilegeGroups_Call { + return &MilvusServiceServer_ListPrivilegeGroups_Call{Call: _e.mock.On("ListPrivilegeGroups", _a0, _a1)} +} + +func (_c *MilvusServiceServer_ListPrivilegeGroups_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.ListPrivilegeGroupsRequest)) *MilvusServiceServer_ListPrivilegeGroups_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*milvuspb.ListPrivilegeGroupsRequest)) + }) + return _c +} + +func (_c *MilvusServiceServer_ListPrivilegeGroups_Call) Return(_a0 *milvuspb.ListPrivilegeGroupsResponse, _a1 error) *MilvusServiceServer_ListPrivilegeGroups_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MilvusServiceServer_ListPrivilegeGroups_Call) RunAndReturn(run func(context.Context, *milvuspb.ListPrivilegeGroupsRequest) (*milvuspb.ListPrivilegeGroupsResponse, error)) *MilvusServiceServer_ListPrivilegeGroups_Call { + _c.Call.Return(run) + return _c +} + // ListResourceGroups provides a mock function with given fields: _a0, _a1 func (_m *MilvusServiceServer) ListResourceGroups(_a0 context.Context, _a1 *milvuspb.ListResourceGroupsRequest) (*milvuspb.ListResourceGroupsResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ListResourceGroups") + } + var r0 *milvuspb.ListResourceGroupsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListResourceGroupsRequest) (*milvuspb.ListResourceGroupsResponse, error)); ok { @@ -3551,6 +4043,10 @@ func (_c *MilvusServiceServer_ListResourceGroups_Call) RunAndReturn(run func(con func (_m *MilvusServiceServer) LoadBalance(_a0 context.Context, _a1 *milvuspb.LoadBalanceRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for LoadBalance") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.LoadBalanceRequest) (*commonpb.Status, error)); ok { @@ -3606,6 +4102,10 @@ func (_c *MilvusServiceServer_LoadBalance_Call) RunAndReturn(run func(context.Co func (_m *MilvusServiceServer) LoadCollection(_a0 context.Context, _a1 *milvuspb.LoadCollectionRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for LoadCollection") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.LoadCollectionRequest) (*commonpb.Status, error)); ok { @@ -3661,6 +4161,10 @@ func (_c *MilvusServiceServer_LoadCollection_Call) RunAndReturn(run func(context func (_m *MilvusServiceServer) LoadPartitions(_a0 context.Context, _a1 *milvuspb.LoadPartitionsRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for LoadPartitions") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.LoadPartitionsRequest) (*commonpb.Status, error)); ok { @@ -3716,6 +4220,10 @@ func (_c *MilvusServiceServer_LoadPartitions_Call) RunAndReturn(run func(context func (_m *MilvusServiceServer) ManualCompaction(_a0 context.Context, _a1 *milvuspb.ManualCompactionRequest) (*milvuspb.ManualCompactionResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ManualCompaction") + } + var r0 *milvuspb.ManualCompactionResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ManualCompactionRequest) (*milvuspb.ManualCompactionResponse, error)); ok { @@ -3771,6 +4279,10 @@ func (_c *MilvusServiceServer_ManualCompaction_Call) RunAndReturn(run func(conte func (_m *MilvusServiceServer) OperatePrivilege(_a0 context.Context, _a1 *milvuspb.OperatePrivilegeRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for OperatePrivilege") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.OperatePrivilegeRequest) (*commonpb.Status, error)); ok { @@ -3822,10 +4334,73 @@ func (_c *MilvusServiceServer_OperatePrivilege_Call) RunAndReturn(run func(conte return _c } +// OperatePrivilegeGroup provides a mock function with given fields: _a0, _a1 +func (_m *MilvusServiceServer) OperatePrivilegeGroup(_a0 context.Context, _a1 *milvuspb.OperatePrivilegeGroupRequest) (*commonpb.Status, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for OperatePrivilegeGroup") + } + + var r0 *commonpb.Status + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.OperatePrivilegeGroupRequest) (*commonpb.Status, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.OperatePrivilegeGroupRequest) *commonpb.Status); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*commonpb.Status) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.OperatePrivilegeGroupRequest) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MilvusServiceServer_OperatePrivilegeGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OperatePrivilegeGroup' +type MilvusServiceServer_OperatePrivilegeGroup_Call struct { + *mock.Call +} + +// OperatePrivilegeGroup is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *milvuspb.OperatePrivilegeGroupRequest +func (_e *MilvusServiceServer_Expecter) OperatePrivilegeGroup(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_OperatePrivilegeGroup_Call { + return &MilvusServiceServer_OperatePrivilegeGroup_Call{Call: _e.mock.On("OperatePrivilegeGroup", _a0, _a1)} +} + +func (_c *MilvusServiceServer_OperatePrivilegeGroup_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.OperatePrivilegeGroupRequest)) *MilvusServiceServer_OperatePrivilegeGroup_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*milvuspb.OperatePrivilegeGroupRequest)) + }) + return _c +} + +func (_c *MilvusServiceServer_OperatePrivilegeGroup_Call) Return(_a0 *commonpb.Status, _a1 error) *MilvusServiceServer_OperatePrivilegeGroup_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MilvusServiceServer_OperatePrivilegeGroup_Call) RunAndReturn(run func(context.Context, *milvuspb.OperatePrivilegeGroupRequest) (*commonpb.Status, error)) *MilvusServiceServer_OperatePrivilegeGroup_Call { + _c.Call.Return(run) + return _c +} + // OperateUserRole provides a mock function with given fields: _a0, _a1 func (_m *MilvusServiceServer) OperateUserRole(_a0 context.Context, _a1 *milvuspb.OperateUserRoleRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for OperateUserRole") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.OperateUserRoleRequest) (*commonpb.Status, error)); ok { @@ -3881,6 +4456,10 @@ func (_c *MilvusServiceServer_OperateUserRole_Call) RunAndReturn(run func(contex func (_m *MilvusServiceServer) Query(_a0 context.Context, _a1 *milvuspb.QueryRequest) (*milvuspb.QueryResults, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Query") + } + var r0 *milvuspb.QueryResults var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.QueryRequest) (*milvuspb.QueryResults, error)); ok { @@ -3936,6 +4515,10 @@ func (_c *MilvusServiceServer_Query_Call) RunAndReturn(run func(context.Context, func (_m *MilvusServiceServer) RegisterLink(_a0 context.Context, _a1 *milvuspb.RegisterLinkRequest) (*milvuspb.RegisterLinkResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for RegisterLink") + } + var r0 *milvuspb.RegisterLinkResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.RegisterLinkRequest) (*milvuspb.RegisterLinkResponse, error)); ok { @@ -3991,6 +4574,10 @@ func (_c *MilvusServiceServer_RegisterLink_Call) RunAndReturn(run func(context.C func (_m *MilvusServiceServer) ReleaseCollection(_a0 context.Context, _a1 *milvuspb.ReleaseCollectionRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ReleaseCollection") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ReleaseCollectionRequest) (*commonpb.Status, error)); ok { @@ -4046,6 +4633,10 @@ func (_c *MilvusServiceServer_ReleaseCollection_Call) RunAndReturn(run func(cont func (_m *MilvusServiceServer) ReleasePartitions(_a0 context.Context, _a1 *milvuspb.ReleasePartitionsRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ReleasePartitions") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ReleasePartitionsRequest) (*commonpb.Status, error)); ok { @@ -4101,6 +4692,10 @@ func (_c *MilvusServiceServer_ReleasePartitions_Call) RunAndReturn(run func(cont func (_m *MilvusServiceServer) RenameCollection(_a0 context.Context, _a1 *milvuspb.RenameCollectionRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for RenameCollection") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.RenameCollectionRequest) (*commonpb.Status, error)); ok { @@ -4156,6 +4751,10 @@ func (_c *MilvusServiceServer_RenameCollection_Call) RunAndReturn(run func(conte func (_m *MilvusServiceServer) ReplicateMessage(_a0 context.Context, _a1 *milvuspb.ReplicateMessageRequest) (*milvuspb.ReplicateMessageResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ReplicateMessage") + } + var r0 *milvuspb.ReplicateMessageResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ReplicateMessageRequest) (*milvuspb.ReplicateMessageResponse, error)); ok { @@ -4211,6 +4810,10 @@ func (_c *MilvusServiceServer_ReplicateMessage_Call) RunAndReturn(run func(conte func (_m *MilvusServiceServer) RestoreRBAC(_a0 context.Context, _a1 *milvuspb.RestoreRBACMetaRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for RestoreRBAC") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.RestoreRBACMetaRequest) (*commonpb.Status, error)); ok { @@ -4266,6 +4869,10 @@ func (_c *MilvusServiceServer_RestoreRBAC_Call) RunAndReturn(run func(context.Co func (_m *MilvusServiceServer) Search(_a0 context.Context, _a1 *milvuspb.SearchRequest) (*milvuspb.SearchResults, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Search") + } + var r0 *milvuspb.SearchResults var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.SearchRequest) (*milvuspb.SearchResults, error)); ok { @@ -4321,6 +4928,10 @@ func (_c *MilvusServiceServer_Search_Call) RunAndReturn(run func(context.Context func (_m *MilvusServiceServer) SelectGrant(_a0 context.Context, _a1 *milvuspb.SelectGrantRequest) (*milvuspb.SelectGrantResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SelectGrant") + } + var r0 *milvuspb.SelectGrantResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.SelectGrantRequest) (*milvuspb.SelectGrantResponse, error)); ok { @@ -4376,6 +4987,10 @@ func (_c *MilvusServiceServer_SelectGrant_Call) RunAndReturn(run func(context.Co func (_m *MilvusServiceServer) SelectRole(_a0 context.Context, _a1 *milvuspb.SelectRoleRequest) (*milvuspb.SelectRoleResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SelectRole") + } + var r0 *milvuspb.SelectRoleResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.SelectRoleRequest) (*milvuspb.SelectRoleResponse, error)); ok { @@ -4431,6 +5046,10 @@ func (_c *MilvusServiceServer_SelectRole_Call) RunAndReturn(run func(context.Con func (_m *MilvusServiceServer) SelectUser(_a0 context.Context, _a1 *milvuspb.SelectUserRequest) (*milvuspb.SelectUserResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SelectUser") + } + var r0 *milvuspb.SelectUserResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.SelectUserRequest) (*milvuspb.SelectUserResponse, error)); ok { @@ -4486,6 +5105,10 @@ func (_c *MilvusServiceServer_SelectUser_Call) RunAndReturn(run func(context.Con func (_m *MilvusServiceServer) ShowCollections(_a0 context.Context, _a1 *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ShowCollections") + } + var r0 *milvuspb.ShowCollectionsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error)); ok { @@ -4541,6 +5164,10 @@ func (_c *MilvusServiceServer_ShowCollections_Call) RunAndReturn(run func(contex func (_m *MilvusServiceServer) ShowPartitions(_a0 context.Context, _a1 *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ShowPartitions") + } + var r0 *milvuspb.ShowPartitionsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error)); ok { @@ -4596,6 +5223,10 @@ func (_c *MilvusServiceServer_ShowPartitions_Call) RunAndReturn(run func(context func (_m *MilvusServiceServer) TransferNode(_a0 context.Context, _a1 *milvuspb.TransferNodeRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for TransferNode") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TransferNodeRequest) (*commonpb.Status, error)); ok { @@ -4651,6 +5282,10 @@ func (_c *MilvusServiceServer_TransferNode_Call) RunAndReturn(run func(context.C func (_m *MilvusServiceServer) TransferReplica(_a0 context.Context, _a1 *milvuspb.TransferReplicaRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for TransferReplica") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TransferReplicaRequest) (*commonpb.Status, error)); ok { @@ -4706,6 +5341,10 @@ func (_c *MilvusServiceServer_TransferReplica_Call) RunAndReturn(run func(contex func (_m *MilvusServiceServer) UpdateCredential(_a0 context.Context, _a1 *milvuspb.UpdateCredentialRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for UpdateCredential") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.UpdateCredentialRequest) (*commonpb.Status, error)); ok { @@ -4761,6 +5400,10 @@ func (_c *MilvusServiceServer_UpdateCredential_Call) RunAndReturn(run func(conte func (_m *MilvusServiceServer) UpdateResourceGroups(_a0 context.Context, _a1 *milvuspb.UpdateResourceGroupsRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for UpdateResourceGroups") + } + var r0 *commonpb.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.UpdateResourceGroupsRequest) (*commonpb.Status, error)); ok { @@ -4816,6 +5459,10 @@ func (_c *MilvusServiceServer_UpdateResourceGroups_Call) RunAndReturn(run func(c func (_m *MilvusServiceServer) Upsert(_a0 context.Context, _a1 *milvuspb.UpsertRequest) (*milvuspb.MutationResult, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Upsert") + } + var r0 *milvuspb.MutationResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.UpsertRequest) (*milvuspb.MutationResult, error)); ok {