env_grpc.pb.go 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. // versions:
  3. // - protoc-gen-go-grpc v1.2.0
  4. // - protoc v4.22.2
  5. // source: pb/environ/v1/env.proto
  6. package environ
  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. // EnvironmentSvcClient is the client API for EnvironmentSvc service.
  18. //
  19. // 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.
  20. type EnvironmentSvcClient interface {
  21. GetEnvironment(ctx context.Context, in *Void, opts ...grpc.CallOption) (*Environment, error)
  22. }
  23. type environmentSvcClient struct {
  24. cc grpc.ClientConnInterface
  25. }
  26. func NewEnvironmentSvcClient(cc grpc.ClientConnInterface) EnvironmentSvcClient {
  27. return &environmentSvcClient{cc}
  28. }
  29. func (c *environmentSvcClient) GetEnvironment(ctx context.Context, in *Void, opts ...grpc.CallOption) (*Environment, error) {
  30. out := new(Environment)
  31. err := c.cc.Invoke(ctx, "/environ.v1.EnvironmentSvc/GetEnvironment", in, out, opts...)
  32. if err != nil {
  33. return nil, err
  34. }
  35. return out, nil
  36. }
  37. // EnvironmentSvcServer is the server API for EnvironmentSvc service.
  38. // All implementations must embed UnimplementedEnvironmentSvcServer
  39. // for forward compatibility
  40. type EnvironmentSvcServer interface {
  41. GetEnvironment(context.Context, *Void) (*Environment, error)
  42. mustEmbedUnimplementedEnvironmentSvcServer()
  43. }
  44. // UnimplementedEnvironmentSvcServer must be embedded to have forward compatible implementations.
  45. type UnimplementedEnvironmentSvcServer struct {
  46. }
  47. func (UnimplementedEnvironmentSvcServer) GetEnvironment(context.Context, *Void) (*Environment, error) {
  48. return nil, status.Errorf(codes.Unimplemented, "method GetEnvironment not implemented")
  49. }
  50. func (UnimplementedEnvironmentSvcServer) mustEmbedUnimplementedEnvironmentSvcServer() {}
  51. // UnsafeEnvironmentSvcServer may be embedded to opt out of forward compatibility for this service.
  52. // Use of this interface is not recommended, as added methods to EnvironmentSvcServer will
  53. // result in compilation errors.
  54. type UnsafeEnvironmentSvcServer interface {
  55. mustEmbedUnimplementedEnvironmentSvcServer()
  56. }
  57. func RegisterEnvironmentSvcServer(s grpc.ServiceRegistrar, srv EnvironmentSvcServer) {
  58. s.RegisterService(&EnvironmentSvc_ServiceDesc, srv)
  59. }
  60. func _EnvironmentSvc_GetEnvironment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  61. in := new(Void)
  62. if err := dec(in); err != nil {
  63. return nil, err
  64. }
  65. if interceptor == nil {
  66. return srv.(EnvironmentSvcServer).GetEnvironment(ctx, in)
  67. }
  68. info := &grpc.UnaryServerInfo{
  69. Server: srv,
  70. FullMethod: "/environ.v1.EnvironmentSvc/GetEnvironment",
  71. }
  72. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  73. return srv.(EnvironmentSvcServer).GetEnvironment(ctx, req.(*Void))
  74. }
  75. return interceptor(ctx, in, info, handler)
  76. }
  77. // EnvironmentSvc_ServiceDesc is the grpc.ServiceDesc for EnvironmentSvc service.
  78. // It's only intended for direct use with grpc.RegisterService,
  79. // and not to be introspected or modified (even as a copy)
  80. var EnvironmentSvc_ServiceDesc = grpc.ServiceDesc{
  81. ServiceName: "environ.v1.EnvironmentSvc",
  82. HandlerType: (*EnvironmentSvcServer)(nil),
  83. Methods: []grpc.MethodDesc{
  84. {
  85. MethodName: "GetEnvironment",
  86. Handler: _EnvironmentSvc_GetEnvironment_Handler,
  87. },
  88. },
  89. Streams: []grpc.StreamDesc{},
  90. Metadata: "pb/environ/v1/env.proto",
  91. }