github.com/ydb-platform/ydb-go-sdk/v3@v3.57.0/internal/grpcwrapper/rawtopic/drop_topic.go (about)

     1  package rawtopic
     2  
     3  import (
     4  	"github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Topic"
     5  
     6  	"github.com/ydb-platform/ydb-go-sdk/v3/internal/grpcwrapper/rawydb"
     7  )
     8  
     9  type DropTopicRequest struct {
    10  	OperationParams rawydb.OperationParams
    11  	Path            string
    12  }
    13  
    14  func (req *DropTopicRequest) ToProto() *Ydb_Topic.DropTopicRequest {
    15  	return &Ydb_Topic.DropTopicRequest{
    16  		OperationParams: req.OperationParams.ToProto(),
    17  		Path:            req.Path,
    18  	}
    19  }
    20  
    21  type DropTopicResult struct {
    22  	Operation rawydb.Operation
    23  }
    24  
    25  func (r *DropTopicResult) FromProto(proto *Ydb_Topic.DropTopicResponse) error {
    26  	return r.Operation.FromProtoWithStatusCheck(proto.GetOperation())
    27  }