github.com/milvus-io/milvus-sdk-go/v2@v2.4.1/client/options_msg_base.go (about)

     1  package client
     2  
     3  import (
     4  	"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
     5  	"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
     6  )
     7  
     8  func WithCreateCollectionMsgBase(msgBase *commonpb.MsgBase) CreateCollectionOption {
     9  	return func(opt *createCollOpt) {
    10  		opt.MsgBase = msgBase
    11  	}
    12  }
    13  
    14  func WithDropCollectionMsgBase(msgBase *commonpb.MsgBase) DropCollectionOption {
    15  	return func(req *milvuspb.DropCollectionRequest) {
    16  		req.Base = msgBase
    17  	}
    18  }
    19  
    20  func WithLoadCollectionMsgBase(msgBase *commonpb.MsgBase) LoadCollectionOption {
    21  	return func(req *milvuspb.LoadCollectionRequest) {
    22  		req.Base = msgBase
    23  	}
    24  }
    25  
    26  func WithReleaseCollectionMsgBase(msgBase *commonpb.MsgBase) ReleaseCollectionOption {
    27  	return func(req *milvuspb.ReleaseCollectionRequest) {
    28  		req.Base = msgBase
    29  	}
    30  }
    31  
    32  func WithFlushMsgBase(msgBase *commonpb.MsgBase) FlushOption {
    33  	return func(req *milvuspb.FlushRequest) {
    34  		req.Base = msgBase
    35  	}
    36  }
    37  
    38  func WithCreateDatabaseMsgBase(msgBase *commonpb.MsgBase) CreateDatabaseOption {
    39  	return func(req *milvuspb.CreateDatabaseRequest) {
    40  		req.Base = msgBase
    41  	}
    42  }
    43  
    44  func WithDropDatabaseMsgBase(msgBase *commonpb.MsgBase) DropDatabaseOption {
    45  	return func(req *milvuspb.DropDatabaseRequest) {
    46  		req.Base = msgBase
    47  	}
    48  }
    49  
    50  func WithReplicateMessageMsgBase(msgBase *commonpb.MsgBase) ReplicateMessageOption {
    51  	return func(req *milvuspb.ReplicateMessageRequest) {
    52  		req.Base = msgBase
    53  	}
    54  }
    55  
    56  func WithCreatePartitionMsgBase(msgBase *commonpb.MsgBase) CreatePartitionOption {
    57  	return func(req *milvuspb.CreatePartitionRequest) {
    58  		req.Base = msgBase
    59  	}
    60  }
    61  
    62  func WithDropPartitionMsgBase(msgBase *commonpb.MsgBase) DropPartitionOption {
    63  	return func(req *milvuspb.DropPartitionRequest) {
    64  		req.Base = msgBase
    65  	}
    66  }
    67  
    68  func WithLoadPartitionsMsgBase(msgBase *commonpb.MsgBase) LoadPartitionsOption {
    69  	return func(req *milvuspb.LoadPartitionsRequest) {
    70  		req.Base = msgBase
    71  	}
    72  }
    73  
    74  // Deprecated: use WithReleaseCollectionMsgBase instead
    75  func WithReleasePartitionMsgBase(msgBase *commonpb.MsgBase) ReleasePartitionsOption {
    76  	return WithReleasePartitionsMsgBase(msgBase)
    77  }
    78  
    79  func WithReleasePartitionsMsgBase(msgBase *commonpb.MsgBase) ReleasePartitionsOption {
    80  	return func(req *milvuspb.ReleasePartitionsRequest) {
    81  		req.Base = msgBase
    82  	}
    83  }