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

pace / bricks / 12827718001

17 Jan 2025 10:57AM UTC coverage: 56.909% (-0.3%) from 57.237%
12827718001

Pull #384

github

monstermunchkin
Satisfy linters
Pull Request #384: Extend linting

478 of 946 new or added lines in 109 files covered. (50.53%)

133 existing lines in 53 files now uncovered.

5667 of 9958 relevant lines covered (56.91%)

21.51 hits per line

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

0.0
/tools/testserver/math/math_grpc.pb.go
1
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2
// versions:
3
// - protoc-gen-go-grpc v1.5.1
4
// - protoc             v5.29.3
5
// source: tools/testserver/math/math.proto
6

7
package math
8

9
import (
10
        context "context"
11
        grpc "google.golang.org/grpc"
12
        codes "google.golang.org/grpc/codes"
13
        status "google.golang.org/grpc/status"
14
)
15

16
// This is a compile-time assertion to ensure that this generated file
17
// is compatible with the grpc package it is being compiled against.
18
// Requires gRPC-Go v1.64.0 or later.
19
const _ = grpc.SupportPackageIsVersion9
20

21
const (
22
        MathService_Add_FullMethodName      = "/Math.MathService/Add"
23
        MathService_Subtract_FullMethodName = "/Math.MathService/Subtract"
24
)
25

26
// MathServiceClient is the client API for MathService service.
27
//
28
// 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.
29
type MathServiceClient interface {
30
        Add(ctx context.Context, in *Input, opts ...grpc.CallOption) (*Output, error)
31
        Subtract(ctx context.Context, in *Input, opts ...grpc.CallOption) (*Output, error)
32
}
33

34
type mathServiceClient struct {
35
        cc grpc.ClientConnInterface
36
}
37

38
func NewMathServiceClient(cc grpc.ClientConnInterface) MathServiceClient {
×
39
        return &mathServiceClient{cc}
×
40
}
×
41

42
func (c *mathServiceClient) Add(ctx context.Context, in *Input, opts ...grpc.CallOption) (*Output, error) {
×
NEW
43
        cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
×
44
        out := new(Output)
×
NEW
45
        err := c.cc.Invoke(ctx, MathService_Add_FullMethodName, in, out, cOpts...)
×
46
        if err != nil {
×
47
                return nil, err
×
48
        }
×
49
        return out, nil
×
50
}
51

NEW
52
func (c *mathServiceClient) Subtract(ctx context.Context, in *Input, opts ...grpc.CallOption) (*Output, error) {
×
NEW
53
        cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
×
54
        out := new(Output)
×
NEW
55
        err := c.cc.Invoke(ctx, MathService_Subtract_FullMethodName, in, out, cOpts...)
×
56
        if err != nil {
×
57
                return nil, err
×
58
        }
×
59
        return out, nil
×
60
}
61

62
// MathServiceServer is the server API for MathService service.
63
// All implementations must embed UnimplementedMathServiceServer
64
// for forward compatibility.
65
type MathServiceServer interface {
66
        Add(context.Context, *Input) (*Output, error)
67
        Subtract(context.Context, *Input) (*Output, error)
68
        mustEmbedUnimplementedMathServiceServer()
69
}
70

71
// UnimplementedMathServiceServer must be embedded to have
72
// forward compatible implementations.
73
//
74
// NOTE: this should be embedded by value instead of pointer to avoid a nil
75
// pointer dereference when methods are called.
76
type UnimplementedMathServiceServer struct{}
77

78
func (UnimplementedMathServiceServer) Add(context.Context, *Input) (*Output, error) {
×
79
        return nil, status.Errorf(codes.Unimplemented, "method Add not implemented")
×
80
}
×
NEW
81
func (UnimplementedMathServiceServer) Subtract(context.Context, *Input) (*Output, error) {
×
NEW
82
        return nil, status.Errorf(codes.Unimplemented, "method Subtract not implemented")
×
83
}
×
84
func (UnimplementedMathServiceServer) mustEmbedUnimplementedMathServiceServer() {}
×
NEW
85
func (UnimplementedMathServiceServer) testEmbeddedByValue()                     {}
×
86

87
// UnsafeMathServiceServer may be embedded to opt out of forward compatibility for this service.
88
// Use of this interface is not recommended, as added methods to MathServiceServer will
89
// result in compilation errors.
90
type UnsafeMathServiceServer interface {
91
        mustEmbedUnimplementedMathServiceServer()
92
}
93

94
func RegisterMathServiceServer(s grpc.ServiceRegistrar, srv MathServiceServer) {
×
NEW
95
        // If the following call pancis, it indicates UnimplementedMathServiceServer was
×
NEW
96
        // embedded by pointer and is nil.  This will cause panics if an
×
NEW
97
        // unimplemented method is ever invoked, so we test this at initialization
×
NEW
98
        // time to prevent it from happening at runtime later due to I/O.
×
NEW
99
        if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
×
NEW
100
                t.testEmbeddedByValue()
×
NEW
101
        }
×
102
        s.RegisterService(&MathService_ServiceDesc, srv)
×
103
}
104

105
func _MathService_Add_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
×
106
        in := new(Input)
×
107
        if err := dec(in); err != nil {
×
108
                return nil, err
×
109
        }
×
110
        if interceptor == nil {
×
111
                return srv.(MathServiceServer).Add(ctx, in)
×
112
        }
×
113
        info := &grpc.UnaryServerInfo{
×
114
                Server:     srv,
×
NEW
115
                FullMethod: MathService_Add_FullMethodName,
×
116
        }
×
117
        handler := func(ctx context.Context, req interface{}) (interface{}, error) {
×
118
                return srv.(MathServiceServer).Add(ctx, req.(*Input))
×
119
        }
×
120
        return interceptor(ctx, in, info, handler)
×
121
}
122

NEW
123
func _MathService_Subtract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
×
124
        in := new(Input)
×
125
        if err := dec(in); err != nil {
×
126
                return nil, err
×
127
        }
×
128
        if interceptor == nil {
×
NEW
129
                return srv.(MathServiceServer).Subtract(ctx, in)
×
130
        }
×
131
        info := &grpc.UnaryServerInfo{
×
132
                Server:     srv,
×
NEW
133
                FullMethod: MathService_Subtract_FullMethodName,
×
134
        }
×
135
        handler := func(ctx context.Context, req interface{}) (interface{}, error) {
×
NEW
136
                return srv.(MathServiceServer).Subtract(ctx, req.(*Input))
×
137
        }
×
138
        return interceptor(ctx, in, info, handler)
×
139
}
140

141
// MathService_ServiceDesc is the grpc.ServiceDesc for MathService service.
142
// It's only intended for direct use with grpc.RegisterService,
143
// and not to be introspected or modified (even as a copy)
144
var MathService_ServiceDesc = grpc.ServiceDesc{
145
        ServiceName: "Math.MathService",
146
        HandlerType: (*MathServiceServer)(nil),
147
        Methods: []grpc.MethodDesc{
148
                {
149
                        MethodName: "Add",
150
                        Handler:    _MathService_Add_Handler,
151
                },
152
                {
153
                        MethodName: "Subtract",
154
                        Handler:    _MathService_Subtract_Handler,
155
                },
156
        },
157
        Streams:  []grpc.StreamDesc{},
158
        Metadata: "tools/testserver/math/math.proto",
159
}
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

© 2026 Coveralls, Inc