// Code generated by protoc-gen-go-triple. DO NOT EDIT. // versions: // - protoc-gen-go-triple v1.0.5 // - protoc v3.21.2 // source: api/approval/approval.proto package approval 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 // ApprovalClient is the client API for Approval 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 ApprovalClient interface { Create(ctx context.Context, in *ApprovalRequest, opts ...grpc_go.CallOption) (*ApprovalResponse, common.ErrorWithAttachment) Detail(ctx context.Context, in *ApprovalDetail, opts ...grpc_go.CallOption) (*ApprovalRequest, common.ErrorWithAttachment) Update(ctx context.Context, in *ApprovalRequest, opts ...grpc_go.CallOption) (*ApprovalResponse, common.ErrorWithAttachment) Remove(ctx context.Context, in *ApprovalDetail, opts ...grpc_go.CallOption) (*ApprovalRemove, common.ErrorWithAttachment) List(ctx context.Context, in *ApprovalListRequest, opts ...grpc_go.CallOption) (*ApprovalListResponse, common.ErrorWithAttachment) Information(ctx context.Context, in *InformationRequest, opts ...grpc_go.CallOption) (*InformationResponse, common.ErrorWithAttachment) Viewed(ctx context.Context, in *ViewedRequest, opts ...grpc_go.CallOption) (*ApprovalResponse, common.ErrorWithAttachment) DetailSetting(ctx context.Context, in *DetailSettingRequest, opts ...grpc_go.CallOption) (*SettingRequest, common.ErrorWithAttachment) UpdateSetting(ctx context.Context, in *SettingRequest, opts ...grpc_go.CallOption) (*SettingResponse, common.ErrorWithAttachment) } type approvalClient struct { cc *triple.TripleConn } type ApprovalClientImpl struct { Create func(ctx context.Context, in *ApprovalRequest) (*ApprovalResponse, error) Detail func(ctx context.Context, in *ApprovalDetail) (*ApprovalRequest, error) Update func(ctx context.Context, in *ApprovalRequest) (*ApprovalResponse, error) Remove func(ctx context.Context, in *ApprovalDetail) (*ApprovalRemove, error) List func(ctx context.Context, in *ApprovalListRequest) (*ApprovalListResponse, error) Information func(ctx context.Context, in *InformationRequest) (*InformationResponse, error) Viewed func(ctx context.Context, in *ViewedRequest) (*ApprovalResponse, error) DetailSetting func(ctx context.Context, in *DetailSettingRequest) (*SettingRequest, error) UpdateSetting func(ctx context.Context, in *SettingRequest) (*SettingResponse, error) } func (c *ApprovalClientImpl) GetDubboStub(cc *triple.TripleConn) ApprovalClient { return NewApprovalClient(cc) } func (c *ApprovalClientImpl) XXX_InterfaceName() string { return "approval.Approval" } func NewApprovalClient(cc *triple.TripleConn) ApprovalClient { return &approvalClient{cc} } func (c *approvalClient) Create(ctx context.Context, in *ApprovalRequest, opts ...grpc_go.CallOption) (*ApprovalResponse, common.ErrorWithAttachment) { out := new(ApprovalResponse) interfaceKey := ctx.Value(constant.InterfaceKey).(string) return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Create", in, out) } func (c *approvalClient) Detail(ctx context.Context, in *ApprovalDetail, opts ...grpc_go.CallOption) (*ApprovalRequest, common.ErrorWithAttachment) { out := new(ApprovalRequest) interfaceKey := ctx.Value(constant.InterfaceKey).(string) return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Detail", in, out) } func (c *approvalClient) Update(ctx context.Context, in *ApprovalRequest, opts ...grpc_go.CallOption) (*ApprovalResponse, common.ErrorWithAttachment) { out := new(ApprovalResponse) interfaceKey := ctx.Value(constant.InterfaceKey).(string) return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Update", in, out) } func (c *approvalClient) Remove(ctx context.Context, in *ApprovalDetail, opts ...grpc_go.CallOption) (*ApprovalRemove, common.ErrorWithAttachment) { out := new(ApprovalRemove) interfaceKey := ctx.Value(constant.InterfaceKey).(string) return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Remove", in, out) } func (c *approvalClient) List(ctx context.Context, in *ApprovalListRequest, opts ...grpc_go.CallOption) (*ApprovalListResponse, common.ErrorWithAttachment) { out := new(ApprovalListResponse) interfaceKey := ctx.Value(constant.InterfaceKey).(string) return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/List", in, out) } func (c *approvalClient) Information(ctx context.Context, in *InformationRequest, opts ...grpc_go.CallOption) (*InformationResponse, common.ErrorWithAttachment) { out := new(InformationResponse) interfaceKey := ctx.Value(constant.InterfaceKey).(string) return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Information", in, out) } func (c *approvalClient) Viewed(ctx context.Context, in *ViewedRequest, opts ...grpc_go.CallOption) (*ApprovalResponse, common.ErrorWithAttachment) { out := new(ApprovalResponse) interfaceKey := ctx.Value(constant.InterfaceKey).(string) return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Viewed", in, out) } func (c *approvalClient) DetailSetting(ctx context.Context, in *DetailSettingRequest, opts ...grpc_go.CallOption) (*SettingRequest, common.ErrorWithAttachment) { out := new(SettingRequest) interfaceKey := ctx.Value(constant.InterfaceKey).(string) return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DetailSetting", in, out) } func (c *approvalClient) UpdateSetting(ctx context.Context, in *SettingRequest, opts ...grpc_go.CallOption) (*SettingResponse, common.ErrorWithAttachment) { out := new(SettingResponse) interfaceKey := ctx.Value(constant.InterfaceKey).(string) return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateSetting", in, out) } // ApprovalServer is the server API for Approval service. // All implementations must embed UnimplementedApprovalServer // for forward compatibility type ApprovalServer interface { Create(context.Context, *ApprovalRequest) (*ApprovalResponse, error) Detail(context.Context, *ApprovalDetail) (*ApprovalRequest, error) Update(context.Context, *ApprovalRequest) (*ApprovalResponse, error) Remove(context.Context, *ApprovalDetail) (*ApprovalRemove, error) List(context.Context, *ApprovalListRequest) (*ApprovalListResponse, error) Information(context.Context, *InformationRequest) (*InformationResponse, error) Viewed(context.Context, *ViewedRequest) (*ApprovalResponse, error) DetailSetting(context.Context, *DetailSettingRequest) (*SettingRequest, error) UpdateSetting(context.Context, *SettingRequest) (*SettingResponse, error) mustEmbedUnimplementedApprovalServer() } // UnimplementedApprovalServer must be embedded to have forward compatible implementations. type UnimplementedApprovalServer struct { proxyImpl protocol.Invoker } func (UnimplementedApprovalServer) Create(context.Context, *ApprovalRequest) (*ApprovalResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") } func (UnimplementedApprovalServer) Detail(context.Context, *ApprovalDetail) (*ApprovalRequest, error) { return nil, status.Errorf(codes.Unimplemented, "method Detail not implemented") } func (UnimplementedApprovalServer) Update(context.Context, *ApprovalRequest) (*ApprovalResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") } func (UnimplementedApprovalServer) Remove(context.Context, *ApprovalDetail) (*ApprovalRemove, error) { return nil, status.Errorf(codes.Unimplemented, "method Remove not implemented") } func (UnimplementedApprovalServer) List(context.Context, *ApprovalListRequest) (*ApprovalListResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method List not implemented") } func (UnimplementedApprovalServer) Information(context.Context, *InformationRequest) (*InformationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Information not implemented") } func (UnimplementedApprovalServer) Viewed(context.Context, *ViewedRequest) (*ApprovalResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Viewed not implemented") } func (UnimplementedApprovalServer) DetailSetting(context.Context, *DetailSettingRequest) (*SettingRequest, error) { return nil, status.Errorf(codes.Unimplemented, "method DetailSetting not implemented") } func (UnimplementedApprovalServer) UpdateSetting(context.Context, *SettingRequest) (*SettingResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateSetting not implemented") } func (s *UnimplementedApprovalServer) XXX_SetProxyImpl(impl protocol.Invoker) { s.proxyImpl = impl } func (s *UnimplementedApprovalServer) XXX_GetProxyImpl() protocol.Invoker { return s.proxyImpl } func (s *UnimplementedApprovalServer) XXX_ServiceDesc() *grpc_go.ServiceDesc { return &Approval_ServiceDesc } func (s *UnimplementedApprovalServer) XXX_InterfaceName() string { return "approval.Approval" } func (UnimplementedApprovalServer) mustEmbedUnimplementedApprovalServer() {} // UnsafeApprovalServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ApprovalServer will // result in compilation errors. type UnsafeApprovalServer interface { mustEmbedUnimplementedApprovalServer() } func RegisterApprovalServer(s grpc_go.ServiceRegistrar, srv ApprovalServer) { s.RegisterService(&Approval_ServiceDesc, srv) } func _Approval_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { in := new(ApprovalRequest) 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("Create", 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 _Approval_Detail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { in := new(ApprovalDetail) 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("Detail", 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 _Approval_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { in := new(ApprovalRequest) 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("Update", 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 _Approval_Remove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { in := new(ApprovalDetail) 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("Remove", 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 _Approval_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { in := new(ApprovalListRequest) 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("List", 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 _Approval_Information_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { in := new(InformationRequest) 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("Information", 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 _Approval_Viewed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { in := new(ViewedRequest) 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("Viewed", 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 _Approval_DetailSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { in := new(DetailSettingRequest) 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("DetailSetting", 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 _Approval_UpdateSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { in := new(SettingRequest) 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("UpdateSetting", 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) } // Approval_ServiceDesc is the grpc_go.ServiceDesc for Approval service. // It's only intended for direct use with grpc_go.RegisterService, // and not to be introspected or modified (even as a copy) var Approval_ServiceDesc = grpc_go.ServiceDesc{ ServiceName: "approval.Approval", HandlerType: (*ApprovalServer)(nil), Methods: []grpc_go.MethodDesc{ { MethodName: "Create", Handler: _Approval_Create_Handler, }, { MethodName: "Detail", Handler: _Approval_Detail_Handler, }, { MethodName: "Update", Handler: _Approval_Update_Handler, }, { MethodName: "Remove", Handler: _Approval_Remove_Handler, }, { MethodName: "List", Handler: _Approval_List_Handler, }, { MethodName: "Information", Handler: _Approval_Information_Handler, }, { MethodName: "Viewed", Handler: _Approval_Viewed_Handler, }, { MethodName: "DetailSetting", Handler: _Approval_DetailSetting_Handler, }, { MethodName: "UpdateSetting", Handler: _Approval_UpdateSetting_Handler, }, }, Streams: []grpc_go.StreamDesc{}, Metadata: "api/approval/approval.proto", }