123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
- // versions:
- // - protoc-gen-go-grpc v1.2.0
- // - protoc v4.22.2
- // source: pb/environ/v1/env.proto
- package environ
- import (
- context "context"
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
- )
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the grpc package it is being compiled against.
- // Requires gRPC-Go v1.32.0 or later.
- const _ = grpc.SupportPackageIsVersion7
- // EnvironmentSvcClient is the client API for EnvironmentSvc 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 EnvironmentSvcClient interface {
- GetEnvironment(ctx context.Context, in *Void, opts ...grpc.CallOption) (*Environment, error)
- }
- type environmentSvcClient struct {
- cc grpc.ClientConnInterface
- }
- func NewEnvironmentSvcClient(cc grpc.ClientConnInterface) EnvironmentSvcClient {
- return &environmentSvcClient{cc}
- }
- func (c *environmentSvcClient) GetEnvironment(ctx context.Context, in *Void, opts ...grpc.CallOption) (*Environment, error) {
- out := new(Environment)
- err := c.cc.Invoke(ctx, "/environ.v1.EnvironmentSvc/GetEnvironment", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // EnvironmentSvcServer is the server API for EnvironmentSvc service.
- // All implementations must embed UnimplementedEnvironmentSvcServer
- // for forward compatibility
- type EnvironmentSvcServer interface {
- GetEnvironment(context.Context, *Void) (*Environment, error)
- mustEmbedUnimplementedEnvironmentSvcServer()
- }
- // UnimplementedEnvironmentSvcServer must be embedded to have forward compatible implementations.
- type UnimplementedEnvironmentSvcServer struct {
- }
- func (UnimplementedEnvironmentSvcServer) GetEnvironment(context.Context, *Void) (*Environment, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetEnvironment not implemented")
- }
- func (UnimplementedEnvironmentSvcServer) mustEmbedUnimplementedEnvironmentSvcServer() {}
- // UnsafeEnvironmentSvcServer may be embedded to opt out of forward compatibility for this service.
- // Use of this interface is not recommended, as added methods to EnvironmentSvcServer will
- // result in compilation errors.
- type UnsafeEnvironmentSvcServer interface {
- mustEmbedUnimplementedEnvironmentSvcServer()
- }
- func RegisterEnvironmentSvcServer(s grpc.ServiceRegistrar, srv EnvironmentSvcServer) {
- s.RegisterService(&EnvironmentSvc_ServiceDesc, srv)
- }
- func _EnvironmentSvc_GetEnvironment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(Void)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(EnvironmentSvcServer).GetEnvironment(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/environ.v1.EnvironmentSvc/GetEnvironment",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(EnvironmentSvcServer).GetEnvironment(ctx, req.(*Void))
- }
- return interceptor(ctx, in, info, handler)
- }
- // EnvironmentSvc_ServiceDesc is the grpc.ServiceDesc for EnvironmentSvc service.
- // It's only intended for direct use with grpc.RegisterService,
- // and not to be introspected or modified (even as a copy)
- var EnvironmentSvc_ServiceDesc = grpc.ServiceDesc{
- ServiceName: "environ.v1.EnvironmentSvc",
- HandlerType: (*EnvironmentSvcServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "GetEnvironment",
- Handler: _EnvironmentSvc_GetEnvironment_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "pb/environ/v1/env.proto",
- }
|