Debian Codegraph @

internal/proto/v2/s2a_go_proto/s2a_grpc.pb.go

raw
1 // Copyright 2022 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // https://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
16 // versions:
17 // - protoc-gen-go-grpc v1.4.0
18 // - protoc v3.21.12
19 // source: internal/proto/v2/s2a/s2a.proto
20
21 package s2a_go_proto
22
23 import (
24 context "context"
25 grpc "google.golang.org/grpc"
26 codes "google.golang.org/grpc/codes"
27 status "google.golang.org/grpc/status"
28 )
29
30 // This is a compile-time assertion to ensure that this generated file
31 // is compatible with the grpc package it is being compiled against.
32 // Requires gRPC-Go v1.62.0 or later.
33 const _ = grpc.SupportPackageIsVersion8
34
35 const (
36 S2AService_SetUpSession_FullMethodName = "/s2a.proto.v2.S2AService/SetUpSession"
37 )
38
39 // S2AServiceClient is the client API for S2AService service.
40 //
41 // 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.
42 type S2AServiceClient interface {
43 // SetUpSession is a bidirectional stream used by applications to offload
44 // operations from the TLS handshake.
45 SetUpSession(ctx context.Context, opts ...grpc.CallOption) (S2AService_SetUpSessionClient, error)
46 }
47
48 type s2AServiceClient struct {
49 cc grpc.ClientConnInterface
50 }
51
52 func NewS2AServiceClient(cc grpc.ClientConnInterface) S2AServiceClient {
53 return &s2AServiceClient{cc}
54 }
55
56 func (c *s2AServiceClient) SetUpSession(ctx context.Context, opts ...grpc.CallOption) (S2AService_SetUpSessionClient, error) {
57 cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
58 stream, err := c.cc.NewStream(ctx, &S2AService_ServiceDesc.Streams[0], S2AService_SetUpSession_FullMethodName, cOpts...)
59 if err != nil {
60 return nil, err
61 }
62 x := &s2AServiceSetUpSessionClient{ClientStream: stream}
63 return x, nil
64 }
65
66 type S2AService_SetUpSessionClient interface {
67 Send(*SessionReq) error
68 Recv() (*SessionResp, error)
69 grpc.ClientStream
70 }
71
72 type s2AServiceSetUpSessionClient struct {
73 grpc.ClientStream
74 }
75
76 func (x *s2AServiceSetUpSessionClient) Send(m *SessionReq) error {
77 return x.ClientStream.SendMsg(m)
78 }
79
80 func (x *s2AServiceSetUpSessionClient) Recv() (*SessionResp, error) {
81 m := new(SessionResp)
82 if err := x.ClientStream.RecvMsg(m); err != nil {
83 return nil, err
84 }
85 return m, nil
86 }
87
88 // S2AServiceServer is the server API for S2AService service.
89 // All implementations must embed UnimplementedS2AServiceServer
90 // for forward compatibility
91 type S2AServiceServer interface {
92 // SetUpSession is a bidirectional stream used by applications to offload
93 // operations from the TLS handshake.
94 SetUpSession(S2AService_SetUpSessionServer) error
95 mustEmbedUnimplementedS2AServiceServer()
96 }
97
98 // UnimplementedS2AServiceServer must be embedded to have forward compatible implementations.
99 type UnimplementedS2AServiceServer struct {
100 }
101
102 func (UnimplementedS2AServiceServer) SetUpSession(S2AService_SetUpSessionServer) error {
103 return status.Errorf(codes.Unimplemented, "method SetUpSession not implemented")
104 }
105 func (UnimplementedS2AServiceServer) mustEmbedUnimplementedS2AServiceServer() {}
106
107 // UnsafeS2AServiceServer may be embedded to opt out of forward compatibility for this service.
108 // Use of this interface is not recommended, as added methods to S2AServiceServer will
109 // result in compilation errors.
110 type UnsafeS2AServiceServer interface {
111 mustEmbedUnimplementedS2AServiceServer()
112 }
113
114 func RegisterS2AServiceServer(s grpc.ServiceRegistrar, srv S2AServiceServer) {
115 s.RegisterService(&S2AService_ServiceDesc, srv)
116 }
117
118 func _S2AService_SetUpSession_Handler(srv interface{}, stream grpc.ServerStream) error {
119 return srv.(S2AServiceServer).SetUpSession(&s2AServiceSetUpSessionServer{ServerStream: stream})
120 }
121
122 type S2AService_SetUpSessionServer interface {
123 Send(*SessionResp) error
124 Recv() (*SessionReq, error)
125 grpc.ServerStream
126 }
127
128 type s2AServiceSetUpSessionServer struct {
129 grpc.ServerStream
130 }
131
132 func (x *s2AServiceSetUpSessionServer) Send(m *SessionResp) error {
133 return x.ServerStream.SendMsg(m)
134 }
135
136 func (x *s2AServiceSetUpSessionServer) Recv() (*SessionReq, error) {
137 m := new(SessionReq)
138 if err := x.ServerStream.RecvMsg(m); err != nil {
139 return nil, err
140 }
141 return m, nil
142 }
143
144 // S2AService_ServiceDesc is the grpc.ServiceDesc for S2AService service.
145 // It's only intended for direct use with grpc.RegisterService,
146 // and not to be introspected or modified (even as a copy)
147 var S2AService_ServiceDesc = grpc.ServiceDesc{
148 ServiceName: "s2a.proto.v2.S2AService",
149 HandlerType: (*S2AServiceServer)(nil),
150 Methods: []grpc.MethodDesc{},
151 Streams: []grpc.StreamDesc{
152 {
153 StreamName: "SetUpSession",
154 Handler: _S2AService_SetUpSession_Handler,
155 ServerStreams: true,
156 ClientStreams: true,
157 },
158 },
159 Metadata: "internal/proto/v2/s2a/s2a.proto",
160 }