2023-03-22 08:16:16 +00:00
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
// versions:
// - protoc-gen-go-triple v1.0.8
// - protoc v3.21.8
// source: statement.proto
package statement
import (
context "context"
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
grpc_go "github.com/dubbogo/grpc-go"
codes "github.com/dubbogo/grpc-go/codes"
metadata "github.com/dubbogo/grpc-go/metadata"
status "github.com/dubbogo/grpc-go/status"
common "github.com/dubbogo/triple/pkg/common"
constant "github.com/dubbogo/triple/pkg/common/constant"
triple "github.com/dubbogo/triple/pkg/triple"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc_go . SupportPackageIsVersion7
// StatementClient is the client API for Statement service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type StatementClient interface {
StatementList ( ctx context . Context , in * StatementListRequest , opts ... grpc_go . CallOption ) ( * StatementListRespond , common . ErrorWithAttachment )
2023-03-23 09:17:29 +00:00
CreateTxContract ( ctx context . Context , in * CreateTxContractRequest , opts ... grpc_go . CallOption ) ( * CreateTxContractRespond , common . ErrorWithAttachment )
GetTxInfoByBatchUid ( ctx context . Context , in * GetTxInfoByBatchUidRequest , opts ... grpc_go . CallOption ) ( * GetTxInfoByBatchUidRespond , common . ErrorWithAttachment )
2023-03-22 08:16:16 +00:00
}
type statementClient struct {
cc * triple . TripleConn
}
type StatementClientImpl struct {
2023-03-23 09:17:29 +00:00
StatementList func ( ctx context . Context , in * StatementListRequest ) ( * StatementListRespond , error )
CreateTxContract func ( ctx context . Context , in * CreateTxContractRequest ) ( * CreateTxContractRespond , error )
GetTxInfoByBatchUid func ( ctx context . Context , in * GetTxInfoByBatchUidRequest ) ( * GetTxInfoByBatchUidRespond , error )
2023-03-22 08:16:16 +00:00
}
func ( c * StatementClientImpl ) GetDubboStub ( cc * triple . TripleConn ) StatementClient {
return NewStatementClient ( cc )
}
func ( c * StatementClientImpl ) XXX_InterfaceName ( ) string {
return "statement.Statement"
}
func NewStatementClient ( cc * triple . TripleConn ) StatementClient {
return & statementClient { cc }
}
func ( c * statementClient ) StatementList ( ctx context . Context , in * StatementListRequest , opts ... grpc_go . CallOption ) ( * StatementListRespond , common . ErrorWithAttachment ) {
out := new ( StatementListRespond )
interfaceKey := ctx . Value ( constant . InterfaceKey ) . ( string )
return out , c . cc . Invoke ( ctx , "/" + interfaceKey + "/StatementList" , in , out )
}
2023-03-23 09:17:29 +00:00
func ( c * statementClient ) CreateTxContract ( ctx context . Context , in * CreateTxContractRequest , opts ... grpc_go . CallOption ) ( * CreateTxContractRespond , common . ErrorWithAttachment ) {
out := new ( CreateTxContractRespond )
interfaceKey := ctx . Value ( constant . InterfaceKey ) . ( string )
return out , c . cc . Invoke ( ctx , "/" + interfaceKey + "/CreateTxContract" , in , out )
}
func ( c * statementClient ) GetTxInfoByBatchUid ( ctx context . Context , in * GetTxInfoByBatchUidRequest , opts ... grpc_go . CallOption ) ( * GetTxInfoByBatchUidRespond , common . ErrorWithAttachment ) {
out := new ( GetTxInfoByBatchUidRespond )
interfaceKey := ctx . Value ( constant . InterfaceKey ) . ( string )
return out , c . cc . Invoke ( ctx , "/" + interfaceKey + "/GetTxInfoByBatchUid" , in , out )
}
2023-03-22 08:16:16 +00:00
// StatementServer is the server API for Statement service.
// All implementations must embed UnimplementedStatementServer
// for forward compatibility
type StatementServer interface {
StatementList ( context . Context , * StatementListRequest ) ( * StatementListRespond , error )
2023-03-23 09:17:29 +00:00
CreateTxContract ( context . Context , * CreateTxContractRequest ) ( * CreateTxContractRespond , error )
GetTxInfoByBatchUid ( context . Context , * GetTxInfoByBatchUidRequest ) ( * GetTxInfoByBatchUidRespond , error )
2023-03-22 08:16:16 +00:00
mustEmbedUnimplementedStatementServer ( )
}
// UnimplementedStatementServer must be embedded to have forward compatible implementations.
type UnimplementedStatementServer struct {
proxyImpl protocol . Invoker
}
func ( UnimplementedStatementServer ) StatementList ( context . Context , * StatementListRequest ) ( * StatementListRespond , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method StatementList not implemented" )
}
2023-03-23 09:17:29 +00:00
func ( UnimplementedStatementServer ) CreateTxContract ( context . Context , * CreateTxContractRequest ) ( * CreateTxContractRespond , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method CreateTxContract not implemented" )
}
func ( UnimplementedStatementServer ) GetTxInfoByBatchUid ( context . Context , * GetTxInfoByBatchUidRequest ) ( * GetTxInfoByBatchUidRespond , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method GetTxInfoByBatchUid not implemented" )
}
2023-03-22 08:16:16 +00:00
func ( s * UnimplementedStatementServer ) XXX_SetProxyImpl ( impl protocol . Invoker ) {
s . proxyImpl = impl
}
func ( s * UnimplementedStatementServer ) XXX_GetProxyImpl ( ) protocol . Invoker {
return s . proxyImpl
}
func ( s * UnimplementedStatementServer ) XXX_ServiceDesc ( ) * grpc_go . ServiceDesc {
return & Statement_ServiceDesc
}
func ( s * UnimplementedStatementServer ) XXX_InterfaceName ( ) string {
return "statement.Statement"
}
func ( UnimplementedStatementServer ) mustEmbedUnimplementedStatementServer ( ) { }
// UnsafeStatementServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to StatementServer will
// result in compilation errors.
type UnsafeStatementServer interface {
mustEmbedUnimplementedStatementServer ( )
}
func RegisterStatementServer ( s grpc_go . ServiceRegistrar , srv StatementServer ) {
s . RegisterService ( & Statement_ServiceDesc , srv )
}
func _Statement_StatementList_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc_go . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( StatementListRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
base := srv . ( dubbo3 . Dubbo3GrpcService )
args := [ ] interface { } { }
args = append ( args , in )
md , _ := metadata . FromIncomingContext ( ctx )
invAttachment := make ( map [ string ] interface { } , len ( md ) )
for k , v := range md {
invAttachment [ k ] = v
}
invo := invocation . NewRPCInvocation ( "StatementList" , args , invAttachment )
if interceptor == nil {
result := base . XXX_GetProxyImpl ( ) . Invoke ( ctx , invo )
return result , result . Error ( )
}
info := & grpc_go . UnaryServerInfo {
Server : srv ,
FullMethod : ctx . Value ( "XXX_TRIPLE_GO_INTERFACE_NAME" ) . ( string ) ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
result := base . XXX_GetProxyImpl ( ) . Invoke ( ctx , invo )
return result , result . Error ( )
}
return interceptor ( ctx , in , info , handler )
}
2023-03-23 09:17:29 +00:00
func _Statement_CreateTxContract_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc_go . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( CreateTxContractRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
base := srv . ( dubbo3 . Dubbo3GrpcService )
args := [ ] interface { } { }
args = append ( args , in )
md , _ := metadata . FromIncomingContext ( ctx )
invAttachment := make ( map [ string ] interface { } , len ( md ) )
for k , v := range md {
invAttachment [ k ] = v
}
invo := invocation . NewRPCInvocation ( "CreateTxContract" , args , invAttachment )
if interceptor == nil {
result := base . XXX_GetProxyImpl ( ) . Invoke ( ctx , invo )
return result , result . Error ( )
}
info := & grpc_go . UnaryServerInfo {
Server : srv ,
FullMethod : ctx . Value ( "XXX_TRIPLE_GO_INTERFACE_NAME" ) . ( string ) ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
result := base . XXX_GetProxyImpl ( ) . Invoke ( ctx , invo )
return result , result . Error ( )
}
return interceptor ( ctx , in , info , handler )
}
func _Statement_GetTxInfoByBatchUid_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc_go . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( GetTxInfoByBatchUidRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
base := srv . ( dubbo3 . Dubbo3GrpcService )
args := [ ] interface { } { }
args = append ( args , in )
md , _ := metadata . FromIncomingContext ( ctx )
invAttachment := make ( map [ string ] interface { } , len ( md ) )
for k , v := range md {
invAttachment [ k ] = v
}
invo := invocation . NewRPCInvocation ( "GetTxInfoByBatchUid" , args , invAttachment )
if interceptor == nil {
result := base . XXX_GetProxyImpl ( ) . Invoke ( ctx , invo )
return result , result . Error ( )
}
info := & grpc_go . UnaryServerInfo {
Server : srv ,
FullMethod : ctx . Value ( "XXX_TRIPLE_GO_INTERFACE_NAME" ) . ( string ) ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
result := base . XXX_GetProxyImpl ( ) . Invoke ( ctx , invo )
return result , result . Error ( )
}
return interceptor ( ctx , in , info , handler )
}
2023-03-22 08:16:16 +00:00
// Statement_ServiceDesc is the grpc_go.ServiceDesc for Statement service.
// It's only intended for direct use with grpc_go.RegisterService,
// and not to be introspected or modified (even as a copy)
var Statement_ServiceDesc = grpc_go . ServiceDesc {
ServiceName : "statement.Statement" ,
HandlerType : ( * StatementServer ) ( nil ) ,
Methods : [ ] grpc_go . MethodDesc {
{
MethodName : "StatementList" ,
Handler : _Statement_StatementList_Handler ,
} ,
2023-03-23 09:17:29 +00:00
{
MethodName : "CreateTxContract" ,
Handler : _Statement_CreateTxContract_Handler ,
} ,
{
MethodName : "GetTxInfoByBatchUid" ,
Handler : _Statement_GetTxInfoByBatchUid_Handler ,
} ,
2023-03-22 08:16:16 +00:00
} ,
Streams : [ ] grpc_go . StreamDesc { } ,
Metadata : "statement.proto" ,
}