• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ory / herodot / 13921307943

18 Mar 2025 10:46AM UTC coverage: 58.298% (-6.8%) from 65.13%
13921307943

push

github

web-flow
chore: copy helloworld proto service definitions to avoid import problems (#131)

0 of 122 new or added lines in 2 files covered. (0.0%)

678 of 1163 relevant lines covered (58.3%)

0.67 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/internal/helloworld_grpc.pb.go
1
// Copyright © 2025 Ory Corp
2
// SPDX-License-Identifier: Apache-2.0
3

4
package internal
5

6
// Copy from https://github.com/grpc/grpc-go/blob/1703656ba59e9ceeaa79d03b06ec171ae0e2f33f/examples/helloworld/helloworld/helloworld_grpc.pb.go to fix import issues
7

8
// Copyright 2015 gRPC authors.
9
//
10
// Licensed under the Apache License, Version 2.0 (the "License");
11
// you may not use this file except in compliance with the License.
12
// You may obtain a copy of the License at
13
//
14
//     http://www.apache.org/licenses/LICENSE-2.0
15
//
16
// Unless required by applicable law or agreed to in writing, software
17
// distributed under the License is distributed on an "AS IS" BASIS,
18
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
// See the License for the specific language governing permissions and
20
// limitations under the License.
21

22
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
23
// versions:
24
// - protoc-gen-go-grpc v1.5.1
25
// - protoc             v5.27.1
26
// source: examples/helloworld/helloworld/helloworld.proto
27

28
import (
29
        context "context"
30

31
        grpc "google.golang.org/grpc"
32
        codes "google.golang.org/grpc/codes"
33
        status "google.golang.org/grpc/status"
34
)
35

36
// This is a compile-time assertion to ensure that this generated file
37
// is compatible with the grpc package it is being compiled against.
38
// Requires gRPC-Go v1.64.0 or later.
39
const _ = grpc.SupportPackageIsVersion9
40

41
const (
42
        Greeter_SayHello_FullMethodName = "/helloworld.Greeter/SayHello"
43
)
44

45
// GreeterClient is the client API for Greeter service.
46
//
47
// 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.
48
//
49
// The greeting service definition.
50
type GreeterClient interface {
51
        // Sends a greeting
52
        SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error)
53
}
54

55
type greeterClient struct {
56
        cc grpc.ClientConnInterface
57
}
58

NEW
59
func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient {
×
NEW
60
        return &greeterClient{cc}
×
NEW
61
}
×
62

NEW
63
func (c *greeterClient) SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) {
×
NEW
64
        cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
×
NEW
65
        out := new(HelloReply)
×
NEW
66
        err := c.cc.Invoke(ctx, Greeter_SayHello_FullMethodName, in, out, cOpts...)
×
NEW
67
        if err != nil {
×
NEW
68
                return nil, err
×
NEW
69
        }
×
NEW
70
        return out, nil
×
71
}
72

73
// GreeterServer is the server API for Greeter service.
74
// All implementations must embed UnimplementedGreeterServer
75
// for forward compatibility.
76
//
77
// The greeting service definition.
78
type GreeterServer interface {
79
        // Sends a greeting
80
        SayHello(context.Context, *HelloRequest) (*HelloReply, error)
81
        mustEmbedUnimplementedGreeterServer()
82
}
83

84
// UnimplementedGreeterServer must be embedded to have
85
// forward compatible implementations.
86
//
87
// NOTE: this should be embedded by value instead of pointer to avoid a nil
88
// pointer dereference when methods are called.
89
type UnimplementedGreeterServer struct{}
90

NEW
91
func (UnimplementedGreeterServer) SayHello(context.Context, *HelloRequest) (*HelloReply, error) {
×
NEW
92
        return nil, status.Errorf(codes.Unimplemented, "method SayHello not implemented")
×
NEW
93
}
×
NEW
94
func (UnimplementedGreeterServer) mustEmbedUnimplementedGreeterServer() {}
×
NEW
95
func (UnimplementedGreeterServer) testEmbeddedByValue()                 {}
×
96

97
// UnsafeGreeterServer may be embedded to opt out of forward compatibility for this service.
98
// Use of this interface is not recommended, as added methods to GreeterServer will
99
// result in compilation errors.
100
type UnsafeGreeterServer interface {
101
        mustEmbedUnimplementedGreeterServer()
102
}
103

NEW
104
func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer) {
×
NEW
105
        // If the following call panics, it indicates UnimplementedGreeterServer was
×
NEW
106
        // embedded by pointer and is nil.  This will cause panics if an
×
NEW
107
        // unimplemented method is ever invoked, so we test this at initialization
×
NEW
108
        // time to prevent it from happening at runtime later due to I/O.
×
NEW
109
        if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
×
NEW
110
                t.testEmbeddedByValue()
×
NEW
111
        }
×
NEW
112
        s.RegisterService(&Greeter_ServiceDesc, srv)
×
113
}
114

NEW
115
func _Greeter_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
×
NEW
116
        in := new(HelloRequest)
×
NEW
117
        if err := dec(in); err != nil {
×
NEW
118
                return nil, err
×
NEW
119
        }
×
NEW
120
        if interceptor == nil {
×
NEW
121
                return srv.(GreeterServer).SayHello(ctx, in)
×
NEW
122
        }
×
NEW
123
        info := &grpc.UnaryServerInfo{
×
NEW
124
                Server:     srv,
×
NEW
125
                FullMethod: Greeter_SayHello_FullMethodName,
×
NEW
126
        }
×
NEW
127
        handler := func(ctx context.Context, req interface{}) (interface{}, error) {
×
NEW
128
                return srv.(GreeterServer).SayHello(ctx, req.(*HelloRequest))
×
NEW
129
        }
×
NEW
130
        return interceptor(ctx, in, info, handler)
×
131
}
132

133
// Greeter_ServiceDesc is the grpc.ServiceDesc for Greeter service.
134
// It's only intended for direct use with grpc.RegisterService,
135
// and not to be introspected or modified (even as a copy)
136
var Greeter_ServiceDesc = grpc.ServiceDesc{
137
        ServiceName: "helloworld.Greeter",
138
        HandlerType: (*GreeterServer)(nil),
139
        Methods: []grpc.MethodDesc{
140
                {
141
                        MethodName: "SayHello",
142
                        Handler:    _Greeter_SayHello_Handler,
143
                },
144
        },
145
        Streams:  []grpc.StreamDesc{},
146
        Metadata: "examples/helloworld/helloworld/helloworld.proto",
147
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc