messages_grpc.pb.go 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. // versions:
  3. // - protoc-gen-go-grpc v1.3.0
  4. // - protoc v4.25.3
  5. // source: protos/customcost/messages.proto
  6. package pb
  7. import (
  8. context "context"
  9. grpc "google.golang.org/grpc"
  10. codes "google.golang.org/grpc/codes"
  11. status "google.golang.org/grpc/status"
  12. )
  13. // This is a compile-time assertion to ensure that this generated file
  14. // is compatible with the grpc package it is being compiled against.
  15. // Requires gRPC-Go v1.32.0 or later.
  16. const _ = grpc.SupportPackageIsVersion7
  17. const (
  18. CustomCostsSource_GetCustomCosts_FullMethodName = "/customcost.messages.CustomCostsSource/GetCustomCosts"
  19. )
  20. // CustomCostsSourceClient is the client API for CustomCostsSource service.
  21. //
  22. // 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.
  23. type CustomCostsSourceClient interface {
  24. GetCustomCosts(ctx context.Context, in *CustomCostRequest, opts ...grpc.CallOption) (*CustomCostResponseSet, error)
  25. }
  26. type customCostsSourceClient struct {
  27. cc grpc.ClientConnInterface
  28. }
  29. func NewCustomCostsSourceClient(cc grpc.ClientConnInterface) CustomCostsSourceClient {
  30. return &customCostsSourceClient{cc}
  31. }
  32. func (c *customCostsSourceClient) GetCustomCosts(ctx context.Context, in *CustomCostRequest, opts ...grpc.CallOption) (*CustomCostResponseSet, error) {
  33. out := new(CustomCostResponseSet)
  34. err := c.cc.Invoke(ctx, CustomCostsSource_GetCustomCosts_FullMethodName, in, out, opts...)
  35. if err != nil {
  36. return nil, err
  37. }
  38. return out, nil
  39. }
  40. // CustomCostsSourceServer is the server API for CustomCostsSource service.
  41. // All implementations must embed UnimplementedCustomCostsSourceServer
  42. // for forward compatibility
  43. type CustomCostsSourceServer interface {
  44. GetCustomCosts(context.Context, *CustomCostRequest) (*CustomCostResponseSet, error)
  45. mustEmbedUnimplementedCustomCostsSourceServer()
  46. }
  47. // UnimplementedCustomCostsSourceServer must be embedded to have forward compatible implementations.
  48. type UnimplementedCustomCostsSourceServer struct {
  49. }
  50. func (UnimplementedCustomCostsSourceServer) GetCustomCosts(context.Context, *CustomCostRequest) (*CustomCostResponseSet, error) {
  51. return nil, status.Errorf(codes.Unimplemented, "method GetCustomCosts not implemented")
  52. }
  53. func (UnimplementedCustomCostsSourceServer) mustEmbedUnimplementedCustomCostsSourceServer() {}
  54. // UnsafeCustomCostsSourceServer may be embedded to opt out of forward compatibility for this service.
  55. // Use of this interface is not recommended, as added methods to CustomCostsSourceServer will
  56. // result in compilation errors.
  57. type UnsafeCustomCostsSourceServer interface {
  58. mustEmbedUnimplementedCustomCostsSourceServer()
  59. }
  60. func RegisterCustomCostsSourceServer(s grpc.ServiceRegistrar, srv CustomCostsSourceServer) {
  61. s.RegisterService(&CustomCostsSource_ServiceDesc, srv)
  62. }
  63. func _CustomCostsSource_GetCustomCosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  64. in := new(CustomCostRequest)
  65. if err := dec(in); err != nil {
  66. return nil, err
  67. }
  68. if interceptor == nil {
  69. return srv.(CustomCostsSourceServer).GetCustomCosts(ctx, in)
  70. }
  71. info := &grpc.UnaryServerInfo{
  72. Server: srv,
  73. FullMethod: CustomCostsSource_GetCustomCosts_FullMethodName,
  74. }
  75. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  76. return srv.(CustomCostsSourceServer).GetCustomCosts(ctx, req.(*CustomCostRequest))
  77. }
  78. return interceptor(ctx, in, info, handler)
  79. }
  80. // CustomCostsSource_ServiceDesc is the grpc.ServiceDesc for CustomCostsSource service.
  81. // It's only intended for direct use with grpc.RegisterService,
  82. // and not to be introspected or modified (even as a copy)
  83. var CustomCostsSource_ServiceDesc = grpc.ServiceDesc{
  84. ServiceName: "customcost.messages.CustomCostsSource",
  85. HandlerType: (*CustomCostsSourceServer)(nil),
  86. Methods: []grpc.MethodDesc{
  87. {
  88. MethodName: "GetCustomCosts",
  89. Handler: _CustomCostsSource_GetCustomCosts_Handler,
  90. },
  91. },
  92. Streams: []grpc.StreamDesc{},
  93. Metadata: "protos/customcost/messages.proto",
  94. }