mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 20:09:57 +08:00
69c0b2fb49
Signed-off-by: SimFG <bang.fu@zilliz.com> Signed-off-by: SimFG <bang.fu@zilliz.com>
31 lines
911 B
Go
31 lines
911 B
Go
package dbmodel
|
|
|
|
import "context"
|
|
|
|
//go:generate mockery --name=IMetaDomain
|
|
type IMetaDomain interface {
|
|
CollectionDb(ctx context.Context) ICollectionDb
|
|
FieldDb(ctx context.Context) IFieldDb
|
|
CollChannelDb(ctx context.Context) ICollChannelDb
|
|
CollAliasDb(ctx context.Context) ICollAliasDb
|
|
PartitionDb(ctx context.Context) IPartitionDb
|
|
IndexDb(ctx context.Context) IIndexDb
|
|
SegmentIndexDb(ctx context.Context) ISegmentIndexDb
|
|
UserDb(ctx context.Context) IUserDb
|
|
RoleDb(ctx context.Context) IRoleDb
|
|
UserRoleDb(ctx context.Context) IUserRoleDb
|
|
GrantDb(ctx context.Context) IGrantDb
|
|
GrantIDDb(ctx context.Context) IGrantIDDb
|
|
}
|
|
|
|
type ITransaction interface {
|
|
Transaction(ctx context.Context, fn func(txCtx context.Context) error) error
|
|
}
|
|
|
|
func GetCommonCondition(tenant string, isDelete bool) map[string]interface{} {
|
|
return map[string]interface{}{
|
|
"tenant_id": tenant,
|
|
"is_deleted": isDelete,
|
|
}
|
|
}
|