2023-01-18 09:03:15 +00:00
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
// versions:
2023-03-03 08:18:00 +00:00
// - protoc-gen-go-triple v1.0.8
// - protoc v3.21.8
// source: contract.proto
2023-01-18 09:03:15 +00:00
package contract
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
// ContractClient is the client API for Contract 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 ContractClient interface {
2023-03-03 08:18:00 +00:00
CreateContract ( ctx context . Context , in * CreateContractRequest , opts ... grpc_go . CallOption ) ( * CreateContractRespond , common . ErrorWithAttachment )
2023-03-10 09:58:13 +00:00
ContractListMgmt ( ctx context . Context , in * ContractListMgmtRequest , opts ... grpc_go . CallOption ) ( * ContractListMgmtRespond , common . ErrorWithAttachment )
2023-01-18 09:03:15 +00:00
ContractList ( ctx context . Context , in * ContractListRequest , opts ... grpc_go . CallOption ) ( * ContractListRespond , common . ErrorWithAttachment )
2023-03-10 09:58:13 +00:00
SignContract ( ctx context . Context , in * SignContractRequest , opts ... grpc_go . CallOption ) ( * SignContractRespond , common . ErrorWithAttachment )
FinishContract ( ctx context . Context , in * FinishContractRequest , opts ... grpc_go . CallOption ) ( * FinishContractRespond , common . ErrorWithAttachment )
2023-01-18 09:03:15 +00:00
ContractTxList ( ctx context . Context , in * ContractTxListRequest , opts ... grpc_go . CallOption ) ( * ContractTxListRespond , common . ErrorWithAttachment )
}
type contractClient struct {
cc * triple . TripleConn
}
type ContractClientImpl struct {
2023-03-03 08:18:00 +00:00
CreateContract func ( ctx context . Context , in * CreateContractRequest ) ( * CreateContractRespond , error )
2023-03-10 09:58:13 +00:00
ContractListMgmt func ( ctx context . Context , in * ContractListMgmtRequest ) ( * ContractListMgmtRespond , error )
2023-01-18 09:03:15 +00:00
ContractList func ( ctx context . Context , in * ContractListRequest ) ( * ContractListRespond , error )
2023-03-10 09:58:13 +00:00
SignContract func ( ctx context . Context , in * SignContractRequest ) ( * SignContractRespond , error )
FinishContract func ( ctx context . Context , in * FinishContractRequest ) ( * FinishContractRespond , error )
2023-01-18 09:03:15 +00:00
ContractTxList func ( ctx context . Context , in * ContractTxListRequest ) ( * ContractTxListRespond , error )
}
func ( c * ContractClientImpl ) GetDubboStub ( cc * triple . TripleConn ) ContractClient {
return NewContractClient ( cc )
}
func ( c * ContractClientImpl ) XXX_InterfaceName ( ) string {
2023-03-14 02:35:56 +00:00
return "contract.Contract"
2023-01-18 09:03:15 +00:00
}
func NewContractClient ( cc * triple . TripleConn ) ContractClient {
return & contractClient { cc }
}
2023-03-03 08:18:00 +00:00
func ( c * contractClient ) CreateContract ( ctx context . Context , in * CreateContractRequest , opts ... grpc_go . CallOption ) ( * CreateContractRespond , common . ErrorWithAttachment ) {
out := new ( CreateContractRespond )
interfaceKey := ctx . Value ( constant . InterfaceKey ) . ( string )
return out , c . cc . Invoke ( ctx , "/" + interfaceKey + "/CreateContract" , in , out )
}
2023-03-10 09:58:13 +00:00
func ( c * contractClient ) ContractListMgmt ( ctx context . Context , in * ContractListMgmtRequest , opts ... grpc_go . CallOption ) ( * ContractListMgmtRespond , common . ErrorWithAttachment ) {
out := new ( ContractListMgmtRespond )
2023-01-18 09:03:15 +00:00
interfaceKey := ctx . Value ( constant . InterfaceKey ) . ( string )
2023-03-10 09:58:13 +00:00
return out , c . cc . Invoke ( ctx , "/" + interfaceKey + "/ContractListMgmt" , in , out )
2023-01-18 09:03:15 +00:00
}
func ( c * contractClient ) ContractList ( ctx context . Context , in * ContractListRequest , opts ... grpc_go . CallOption ) ( * ContractListRespond , common . ErrorWithAttachment ) {
out := new ( ContractListRespond )
interfaceKey := ctx . Value ( constant . InterfaceKey ) . ( string )
return out , c . cc . Invoke ( ctx , "/" + interfaceKey + "/ContractList" , in , out )
}
2023-03-10 09:58:13 +00:00
func ( c * contractClient ) SignContract ( ctx context . Context , in * SignContractRequest , opts ... grpc_go . CallOption ) ( * SignContractRespond , common . ErrorWithAttachment ) {
out := new ( SignContractRespond )
interfaceKey := ctx . Value ( constant . InterfaceKey ) . ( string )
return out , c . cc . Invoke ( ctx , "/" + interfaceKey + "/SignContract" , in , out )
}
func ( c * contractClient ) FinishContract ( ctx context . Context , in * FinishContractRequest , opts ... grpc_go . CallOption ) ( * FinishContractRespond , common . ErrorWithAttachment ) {
out := new ( FinishContractRespond )
interfaceKey := ctx . Value ( constant . InterfaceKey ) . ( string )
return out , c . cc . Invoke ( ctx , "/" + interfaceKey + "/FinishContract" , in , out )
}
2023-01-18 09:03:15 +00:00
func ( c * contractClient ) ContractTxList ( ctx context . Context , in * ContractTxListRequest , opts ... grpc_go . CallOption ) ( * ContractTxListRespond , common . ErrorWithAttachment ) {
out := new ( ContractTxListRespond )
interfaceKey := ctx . Value ( constant . InterfaceKey ) . ( string )
return out , c . cc . Invoke ( ctx , "/" + interfaceKey + "/ContractTxList" , in , out )
}
// ContractServer is the server API for Contract service.
// All implementations must embed UnimplementedContractServer
// for forward compatibility
type ContractServer interface {
2023-03-03 08:18:00 +00:00
CreateContract ( context . Context , * CreateContractRequest ) ( * CreateContractRespond , error )
2023-03-10 09:58:13 +00:00
ContractListMgmt ( context . Context , * ContractListMgmtRequest ) ( * ContractListMgmtRespond , error )
2023-01-18 09:03:15 +00:00
ContractList ( context . Context , * ContractListRequest ) ( * ContractListRespond , error )
2023-03-10 09:58:13 +00:00
SignContract ( context . Context , * SignContractRequest ) ( * SignContractRespond , error )
FinishContract ( context . Context , * FinishContractRequest ) ( * FinishContractRespond , error )
2023-01-18 09:03:15 +00:00
ContractTxList ( context . Context , * ContractTxListRequest ) ( * ContractTxListRespond , error )
mustEmbedUnimplementedContractServer ( )
}
// UnimplementedContractServer must be embedded to have forward compatible implementations.
type UnimplementedContractServer struct {
proxyImpl protocol . Invoker
}
2023-03-03 08:18:00 +00:00
func ( UnimplementedContractServer ) CreateContract ( context . Context , * CreateContractRequest ) ( * CreateContractRespond , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method CreateContract not implemented" )
}
2023-03-10 09:58:13 +00:00
func ( UnimplementedContractServer ) ContractListMgmt ( context . Context , * ContractListMgmtRequest ) ( * ContractListMgmtRespond , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method ContractListMgmt not implemented" )
2023-01-18 09:03:15 +00:00
}
func ( UnimplementedContractServer ) ContractList ( context . Context , * ContractListRequest ) ( * ContractListRespond , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method ContractList not implemented" )
}
2023-03-10 09:58:13 +00:00
func ( UnimplementedContractServer ) SignContract ( context . Context , * SignContractRequest ) ( * SignContractRespond , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method SignContract not implemented" )
}
func ( UnimplementedContractServer ) FinishContract ( context . Context , * FinishContractRequest ) ( * FinishContractRespond , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method FinishContract not implemented" )
}
2023-01-18 09:03:15 +00:00
func ( UnimplementedContractServer ) ContractTxList ( context . Context , * ContractTxListRequest ) ( * ContractTxListRespond , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method ContractTxList not implemented" )
}
func ( s * UnimplementedContractServer ) XXX_SetProxyImpl ( impl protocol . Invoker ) {
s . proxyImpl = impl
}
func ( s * UnimplementedContractServer ) XXX_GetProxyImpl ( ) protocol . Invoker {
return s . proxyImpl
}
func ( s * UnimplementedContractServer ) XXX_ServiceDesc ( ) * grpc_go . ServiceDesc {
return & Contract_ServiceDesc
}
func ( s * UnimplementedContractServer ) XXX_InterfaceName ( ) string {
2023-03-14 02:35:56 +00:00
return "contract.Contract"
2023-01-18 09:03:15 +00:00
}
func ( UnimplementedContractServer ) mustEmbedUnimplementedContractServer ( ) { }
// UnsafeContractServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ContractServer will
// result in compilation errors.
type UnsafeContractServer interface {
mustEmbedUnimplementedContractServer ( )
}
func RegisterContractServer ( s grpc_go . ServiceRegistrar , srv ContractServer ) {
s . RegisterService ( & Contract_ServiceDesc , srv )
}
2023-03-03 08:18:00 +00:00
func _Contract_CreateContract_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc_go . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( CreateContractRequest )
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 ( "CreateContract" , 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-10 09:58:13 +00:00
func _Contract_ContractListMgmt_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc_go . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( ContractListMgmtRequest )
2023-01-18 09:03:15 +00:00
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
}
2023-03-10 09:58:13 +00:00
invo := invocation . NewRPCInvocation ( "ContractListMgmt" , args , invAttachment )
2023-01-18 09:03:15 +00:00
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 _Contract_ContractList_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc_go . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( ContractListRequest )
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 ( "ContractList" , 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-10 09:58:13 +00:00
func _Contract_SignContract_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc_go . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( SignContractRequest )
2023-01-18 09:03:15 +00:00
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
}
2023-03-10 09:58:13 +00:00
invo := invocation . NewRPCInvocation ( "SignContract" , args , invAttachment )
2023-01-18 09:03:15 +00:00
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-10 09:58:13 +00:00
func _Contract_FinishContract_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc_go . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( FinishContractRequest )
2023-01-18 09:03:15 +00:00
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
}
2023-03-10 09:58:13 +00:00
invo := invocation . NewRPCInvocation ( "FinishContract" , args , invAttachment )
2023-01-18 09:03:15 +00:00
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-10 09:58:13 +00:00
func _Contract_ContractTxList_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc_go . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( ContractTxListRequest )
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 ( "ContractTxList" , args , invAttachment )
2023-01-18 09:03:15 +00:00
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 )
}
// Contract_ServiceDesc is the grpc_go.ServiceDesc for Contract service.
// It's only intended for direct use with grpc_go.RegisterService,
// and not to be introspected or modified (even as a copy)
var Contract_ServiceDesc = grpc_go . ServiceDesc {
2023-03-14 02:35:56 +00:00
ServiceName : "contract.Contract" ,
2023-01-18 09:03:15 +00:00
HandlerType : ( * ContractServer ) ( nil ) ,
Methods : [ ] grpc_go . MethodDesc {
2023-03-03 08:18:00 +00:00
{
MethodName : "CreateContract" ,
Handler : _Contract_CreateContract_Handler ,
} ,
2023-01-18 09:03:15 +00:00
{
2023-03-10 09:58:13 +00:00
MethodName : "ContractListMgmt" ,
Handler : _Contract_ContractListMgmt_Handler ,
2023-01-18 09:03:15 +00:00
} ,
{
MethodName : "ContractList" ,
Handler : _Contract_ContractList_Handler ,
} ,
2023-03-10 09:58:13 +00:00
{
MethodName : "SignContract" ,
Handler : _Contract_SignContract_Handler ,
} ,
{
MethodName : "FinishContract" ,
Handler : _Contract_FinishContract_Handler ,
} ,
2023-01-18 09:03:15 +00:00
{
MethodName : "ContractTxList" ,
Handler : _Contract_ContractTxList_Handler ,
} ,
} ,
Streams : [ ] grpc_go . StreamDesc { } ,
2023-03-03 08:18:00 +00:00
Metadata : "contract.proto" ,
2023-01-18 09:03:15 +00:00
}