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

     1  package wrap
     2  
     3  import (
     4  	"github.com/ydb-platform/ydb-go-genproto/protos/Ydb"
     5  	"github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Issue"
     6  )
     7  
     8  // StreamOperationResponse is an interface that provides access to the
     9  // API-specific response fields.
    10  //
    11  // NOTE: YDB API currently does not provide generic response wrapper as it does
    12  // with RPC API. Thus wee need to generalize it by the hand using this interface.
    13  //
    14  // This generalization is needed for checking status codes and issues in one place.
    15  type StreamOperationResponse interface {
    16  	GetStatus() Ydb.StatusIds_StatusCode
    17  	GetIssues() []*Ydb_Issue.IssueMessage
    18  }