373 lines
		
	
	
		
			14 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			373 lines
		
	
	
		
			14 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
| // Code generated by protoc-gen-go-triple. DO NOT EDIT.
 | |
| // versions:
 | |
| // - protoc-gen-go-triple v1.0.8
 | |
| // - protoc             v3.20.3
 | |
| // source: press_releases.proto
 | |
| 
 | |
| package pressreleases
 | |
| 
 | |
| 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
 | |
| 
 | |
| // PressReleasesClient is the client API for PressReleases 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 PressReleasesClient interface {
 | |
| 	List(ctx context.Context, in *ListReq, opts ...grpc_go.CallOption) (*ListResp, common.ErrorWithAttachment)
 | |
| 	Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment)
 | |
| 	Edit(ctx context.Context, in *EditReq, opts ...grpc_go.CallOption) (*EditResp, common.ErrorWithAttachment)
 | |
| 	Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment)
 | |
| 	Delete(ctx context.Context, in *DeleteReq, opts ...grpc_go.CallOption) (*DeleteResp, common.ErrorWithAttachment)
 | |
| 	Get(ctx context.Context, in *GetReq, opts ...grpc_go.CallOption) (*GetResp, common.ErrorWithAttachment)
 | |
| }
 | |
| 
 | |
| type pressReleasesClient struct {
 | |
| 	cc *triple.TripleConn
 | |
| }
 | |
| 
 | |
| type PressReleasesClientImpl struct {
 | |
| 	List    func(ctx context.Context, in *ListReq) (*ListResp, error)
 | |
| 	Display func(ctx context.Context, in *DisplayReq) (*DisplayResp, error)
 | |
| 	Edit    func(ctx context.Context, in *EditReq) (*EditResp, error)
 | |
| 	Create  func(ctx context.Context, in *CreateReq) (*CreateResp, error)
 | |
| 	Delete  func(ctx context.Context, in *DeleteReq) (*DeleteResp, error)
 | |
| 	Get     func(ctx context.Context, in *GetReq) (*GetResp, error)
 | |
| }
 | |
| 
 | |
| func (c *PressReleasesClientImpl) GetDubboStub(cc *triple.TripleConn) PressReleasesClient {
 | |
| 	return NewPressReleasesClient(cc)
 | |
| }
 | |
| 
 | |
| func (c *PressReleasesClientImpl) XXX_InterfaceName() string {
 | |
| 	return "pressreleases.PressReleases"
 | |
| }
 | |
| 
 | |
| func NewPressReleasesClient(cc *triple.TripleConn) PressReleasesClient {
 | |
| 	return &pressReleasesClient{cc}
 | |
| }
 | |
| 
 | |
| func (c *pressReleasesClient) List(ctx context.Context, in *ListReq, opts ...grpc_go.CallOption) (*ListResp, common.ErrorWithAttachment) {
 | |
| 	out := new(ListResp)
 | |
| 	interfaceKey := ctx.Value(constant.InterfaceKey).(string)
 | |
| 	return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/List", in, out)
 | |
| }
 | |
| 
 | |
| func (c *pressReleasesClient) Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment) {
 | |
| 	out := new(DisplayResp)
 | |
| 	interfaceKey := ctx.Value(constant.InterfaceKey).(string)
 | |
| 	return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Display", in, out)
 | |
| }
 | |
| 
 | |
| func (c *pressReleasesClient) Edit(ctx context.Context, in *EditReq, opts ...grpc_go.CallOption) (*EditResp, common.ErrorWithAttachment) {
 | |
| 	out := new(EditResp)
 | |
| 	interfaceKey := ctx.Value(constant.InterfaceKey).(string)
 | |
| 	return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Edit", in, out)
 | |
| }
 | |
| 
 | |
| func (c *pressReleasesClient) Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment) {
 | |
| 	out := new(CreateResp)
 | |
| 	interfaceKey := ctx.Value(constant.InterfaceKey).(string)
 | |
| 	return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Create", in, out)
 | |
| }
 | |
| 
 | |
| func (c *pressReleasesClient) Delete(ctx context.Context, in *DeleteReq, opts ...grpc_go.CallOption) (*DeleteResp, common.ErrorWithAttachment) {
 | |
| 	out := new(DeleteResp)
 | |
| 	interfaceKey := ctx.Value(constant.InterfaceKey).(string)
 | |
| 	return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Delete", in, out)
 | |
| }
 | |
| 
 | |
| func (c *pressReleasesClient) Get(ctx context.Context, in *GetReq, opts ...grpc_go.CallOption) (*GetResp, common.ErrorWithAttachment) {
 | |
| 	out := new(GetResp)
 | |
| 	interfaceKey := ctx.Value(constant.InterfaceKey).(string)
 | |
| 	return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Get", in, out)
 | |
| }
 | |
| 
 | |
| // PressReleasesServer is the server API for PressReleases service.
 | |
| // All implementations must embed UnimplementedPressReleasesServer
 | |
| // for forward compatibility
 | |
| type PressReleasesServer interface {
 | |
| 	List(context.Context, *ListReq) (*ListResp, error)
 | |
| 	Display(context.Context, *DisplayReq) (*DisplayResp, error)
 | |
| 	Edit(context.Context, *EditReq) (*EditResp, error)
 | |
| 	Create(context.Context, *CreateReq) (*CreateResp, error)
 | |
| 	Delete(context.Context, *DeleteReq) (*DeleteResp, error)
 | |
| 	Get(context.Context, *GetReq) (*GetResp, error)
 | |
| 	mustEmbedUnimplementedPressReleasesServer()
 | |
| }
 | |
| 
 | |
| // UnimplementedPressReleasesServer must be embedded to have forward compatible implementations.
 | |
| type UnimplementedPressReleasesServer struct {
 | |
| 	proxyImpl protocol.Invoker
 | |
| }
 | |
| 
 | |
| func (UnimplementedPressReleasesServer) List(context.Context, *ListReq) (*ListResp, error) {
 | |
| 	return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
 | |
| }
 | |
| func (UnimplementedPressReleasesServer) Display(context.Context, *DisplayReq) (*DisplayResp, error) {
 | |
| 	return nil, status.Errorf(codes.Unimplemented, "method Display not implemented")
 | |
| }
 | |
| func (UnimplementedPressReleasesServer) Edit(context.Context, *EditReq) (*EditResp, error) {
 | |
| 	return nil, status.Errorf(codes.Unimplemented, "method Edit not implemented")
 | |
| }
 | |
| func (UnimplementedPressReleasesServer) Create(context.Context, *CreateReq) (*CreateResp, error) {
 | |
| 	return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
 | |
| }
 | |
| func (UnimplementedPressReleasesServer) Delete(context.Context, *DeleteReq) (*DeleteResp, error) {
 | |
| 	return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
 | |
| }
 | |
| func (UnimplementedPressReleasesServer) Get(context.Context, *GetReq) (*GetResp, error) {
 | |
| 	return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
 | |
| }
 | |
| func (s *UnimplementedPressReleasesServer) XXX_SetProxyImpl(impl protocol.Invoker) {
 | |
| 	s.proxyImpl = impl
 | |
| }
 | |
| 
 | |
| func (s *UnimplementedPressReleasesServer) XXX_GetProxyImpl() protocol.Invoker {
 | |
| 	return s.proxyImpl
 | |
| }
 | |
| 
 | |
| func (s *UnimplementedPressReleasesServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
 | |
| 	return &PressReleases_ServiceDesc
 | |
| }
 | |
| func (s *UnimplementedPressReleasesServer) XXX_InterfaceName() string {
 | |
| 	return "pressreleases.PressReleases"
 | |
| }
 | |
| 
 | |
| func (UnimplementedPressReleasesServer) mustEmbedUnimplementedPressReleasesServer() {}
 | |
| 
 | |
| // UnsafePressReleasesServer may be embedded to opt out of forward compatibility for this service.
 | |
| // Use of this interface is not recommended, as added methods to PressReleasesServer will
 | |
| // result in compilation errors.
 | |
| type UnsafePressReleasesServer interface {
 | |
| 	mustEmbedUnimplementedPressReleasesServer()
 | |
| }
 | |
| 
 | |
| func RegisterPressReleasesServer(s grpc_go.ServiceRegistrar, srv PressReleasesServer) {
 | |
| 	s.RegisterService(&PressReleases_ServiceDesc, srv)
 | |
| }
 | |
| 
 | |
| func _PressReleases_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
 | |
| 	in := new(ListReq)
 | |
| 	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 _PressReleases_Display_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
 | |
| 	in := new(DisplayReq)
 | |
| 	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("Display", 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 _PressReleases_Edit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
 | |
| 	in := new(EditReq)
 | |
| 	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("Edit", 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 _PressReleases_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
 | |
| 	in := new(CreateReq)
 | |
| 	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 _PressReleases_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
 | |
| 	in := new(DeleteReq)
 | |
| 	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("Delete", 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 _PressReleases_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
 | |
| 	in := new(GetReq)
 | |
| 	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("Get", 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)
 | |
| }
 | |
| 
 | |
| // PressReleases_ServiceDesc is the grpc_go.ServiceDesc for PressReleases service.
 | |
| // It's only intended for direct use with grpc_go.RegisterService,
 | |
| // and not to be introspected or modified (even as a copy)
 | |
| var PressReleases_ServiceDesc = grpc_go.ServiceDesc{
 | |
| 	ServiceName: "pressreleases.PressReleases",
 | |
| 	HandlerType: (*PressReleasesServer)(nil),
 | |
| 	Methods: []grpc_go.MethodDesc{
 | |
| 		{
 | |
| 			MethodName: "List",
 | |
| 			Handler:    _PressReleases_List_Handler,
 | |
| 		},
 | |
| 		{
 | |
| 			MethodName: "Display",
 | |
| 			Handler:    _PressReleases_Display_Handler,
 | |
| 		},
 | |
| 		{
 | |
| 			MethodName: "Edit",
 | |
| 			Handler:    _PressReleases_Edit_Handler,
 | |
| 		},
 | |
| 		{
 | |
| 			MethodName: "Create",
 | |
| 			Handler:    _PressReleases_Create_Handler,
 | |
| 		},
 | |
| 		{
 | |
| 			MethodName: "Delete",
 | |
| 			Handler:    _PressReleases_Delete_Handler,
 | |
| 		},
 | |
| 		{
 | |
| 			MethodName: "Get",
 | |
| 			Handler:    _PressReleases_Get_Handler,
 | |
| 		},
 | |
| 	},
 | |
| 	Streams:  []grpc_go.StreamDesc{},
 | |
| 	Metadata: "press_releases.proto",
 | |
| }
 |