Debian Codegraph @

oslogin/apiv1beta/osloginpb/oslogin_grpc.pb.go

raw
1 // Copyright 2025 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 // http://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.3.0
18 // - protoc v4.25.7
19 // source: google/cloud/oslogin/v1beta/oslogin.proto
20
21 package osloginpb
22
23 import (
24 commonpb "cloud.google.com/go/oslogin/common/commonpb"
25 context "context"
26 grpc "google.golang.org/grpc"
27 codes "google.golang.org/grpc/codes"
28 status "google.golang.org/grpc/status"
29 emptypb "google.golang.org/protobuf/types/known/emptypb"
30 )
31
32 // This is a compile-time assertion to ensure that this generated file
33 // is compatible with the grpc package it is being compiled against.
34 // Requires gRPC-Go v1.32.0 or later.
35 const _ = grpc.SupportPackageIsVersion7
36
37 const (
38 OsLoginService_CreateSshPublicKey_FullMethodName = "/google.cloud.oslogin.v1beta.OsLoginService/CreateSshPublicKey"
39 OsLoginService_DeletePosixAccount_FullMethodName = "/google.cloud.oslogin.v1beta.OsLoginService/DeletePosixAccount"
40 OsLoginService_DeleteSshPublicKey_FullMethodName = "/google.cloud.oslogin.v1beta.OsLoginService/DeleteSshPublicKey"
41 OsLoginService_GetLoginProfile_FullMethodName = "/google.cloud.oslogin.v1beta.OsLoginService/GetLoginProfile"
42 OsLoginService_GetSshPublicKey_FullMethodName = "/google.cloud.oslogin.v1beta.OsLoginService/GetSshPublicKey"
43 OsLoginService_ImportSshPublicKey_FullMethodName = "/google.cloud.oslogin.v1beta.OsLoginService/ImportSshPublicKey"
44 OsLoginService_UpdateSshPublicKey_FullMethodName = "/google.cloud.oslogin.v1beta.OsLoginService/UpdateSshPublicKey"
45 OsLoginService_SignSshPublicKey_FullMethodName = "/google.cloud.oslogin.v1beta.OsLoginService/SignSshPublicKey"
46 )
47
48 // OsLoginServiceClient is the client API for OsLoginService service.
49 //
50 // 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.
51 type OsLoginServiceClient interface {
52 // Create an SSH public key
53 CreateSshPublicKey(ctx context.Context, in *CreateSshPublicKeyRequest, opts ...grpc.CallOption) (*commonpb.SshPublicKey, error)
54 // Deletes a POSIX account.
55 DeletePosixAccount(ctx context.Context, in *DeletePosixAccountRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
56 // Deletes an SSH public key.
57 DeleteSshPublicKey(ctx context.Context, in *DeleteSshPublicKeyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
58 // Retrieves the profile information used for logging in to a virtual machine
59 // on Google Compute Engine.
60 GetLoginProfile(ctx context.Context, in *GetLoginProfileRequest, opts ...grpc.CallOption) (*LoginProfile, error)
61 // Retrieves an SSH public key.
62 GetSshPublicKey(ctx context.Context, in *GetSshPublicKeyRequest, opts ...grpc.CallOption) (*commonpb.SshPublicKey, error)
63 // Adds an SSH public key and returns the profile information. Default POSIX
64 // account information is set when no username and UID exist as part of the
65 // login profile.
66 ImportSshPublicKey(ctx context.Context, in *ImportSshPublicKeyRequest, opts ...grpc.CallOption) (*ImportSshPublicKeyResponse, error)
67 // Updates an SSH public key and returns the profile information. This method
68 // supports patch semantics.
69 UpdateSshPublicKey(ctx context.Context, in *UpdateSshPublicKeyRequest, opts ...grpc.CallOption) (*commonpb.SshPublicKey, error)
70 // Signs an SSH public key for a user to authenticate to an instance.
71 SignSshPublicKey(ctx context.Context, in *SignSshPublicKeyRequest, opts ...grpc.CallOption) (*SignSshPublicKeyResponse, error)
72 }
73
74 type osLoginServiceClient struct {
75 cc grpc.ClientConnInterface
76 }
77
78 func NewOsLoginServiceClient(cc grpc.ClientConnInterface) OsLoginServiceClient {
79 return &osLoginServiceClient{cc}
80 }
81
82 func (c *osLoginServiceClient) CreateSshPublicKey(ctx context.Context, in *CreateSshPublicKeyRequest, opts ...grpc.CallOption) (*commonpb.SshPublicKey, error) {
83 out := new(commonpb.SshPublicKey)
84 err := c.cc.Invoke(ctx, OsLoginService_CreateSshPublicKey_FullMethodName, in, out, opts...)
85 if err != nil {
86 return nil, err
87 }
88 return out, nil
89 }
90
91 func (c *osLoginServiceClient) DeletePosixAccount(ctx context.Context, in *DeletePosixAccountRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
92 out := new(emptypb.Empty)
93 err := c.cc.Invoke(ctx, OsLoginService_DeletePosixAccount_FullMethodName, in, out, opts...)
94 if err != nil {
95 return nil, err
96 }
97 return out, nil
98 }
99
100 func (c *osLoginServiceClient) DeleteSshPublicKey(ctx context.Context, in *DeleteSshPublicKeyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
101 out := new(emptypb.Empty)
102 err := c.cc.Invoke(ctx, OsLoginService_DeleteSshPublicKey_FullMethodName, in, out, opts...)
103 if err != nil {
104 return nil, err
105 }
106 return out, nil
107 }
108
109 func (c *osLoginServiceClient) GetLoginProfile(ctx context.Context, in *GetLoginProfileRequest, opts ...grpc.CallOption) (*LoginProfile, error) {
110 out := new(LoginProfile)
111 err := c.cc.Invoke(ctx, OsLoginService_GetLoginProfile_FullMethodName, in, out, opts...)
112 if err != nil {
113 return nil, err
114 }
115 return out, nil
116 }
117
118 func (c *osLoginServiceClient) GetSshPublicKey(ctx context.Context, in *GetSshPublicKeyRequest, opts ...grpc.CallOption) (*commonpb.SshPublicKey, error) {
119 out := new(commonpb.SshPublicKey)
120 err := c.cc.Invoke(ctx, OsLoginService_GetSshPublicKey_FullMethodName, in, out, opts...)
121 if err != nil {
122 return nil, err
123 }
124 return out, nil
125 }
126
127 func (c *osLoginServiceClient) ImportSshPublicKey(ctx context.Context, in *ImportSshPublicKeyRequest, opts ...grpc.CallOption) (*ImportSshPublicKeyResponse, error) {
128 out := new(ImportSshPublicKeyResponse)
129 err := c.cc.Invoke(ctx, OsLoginService_ImportSshPublicKey_FullMethodName, in, out, opts...)
130 if err != nil {
131 return nil, err
132 }
133 return out, nil
134 }
135
136 func (c *osLoginServiceClient) UpdateSshPublicKey(ctx context.Context, in *UpdateSshPublicKeyRequest, opts ...grpc.CallOption) (*commonpb.SshPublicKey, error) {
137 out := new(commonpb.SshPublicKey)
138 err := c.cc.Invoke(ctx, OsLoginService_UpdateSshPublicKey_FullMethodName, in, out, opts...)
139 if err != nil {
140 return nil, err
141 }
142 return out, nil
143 }
144
145 func (c *osLoginServiceClient) SignSshPublicKey(ctx context.Context, in *SignSshPublicKeyRequest, opts ...grpc.CallOption) (*SignSshPublicKeyResponse, error) {
146 out := new(SignSshPublicKeyResponse)
147 err := c.cc.Invoke(ctx, OsLoginService_SignSshPublicKey_FullMethodName, in, out, opts...)
148 if err != nil {
149 return nil, err
150 }
151 return out, nil
152 }
153
154 // OsLoginServiceServer is the server API for OsLoginService service.
155 // All implementations should embed UnimplementedOsLoginServiceServer
156 // for forward compatibility
157 type OsLoginServiceServer interface {
158 // Create an SSH public key
159 CreateSshPublicKey(context.Context, *CreateSshPublicKeyRequest) (*commonpb.SshPublicKey, error)
160 // Deletes a POSIX account.
161 DeletePosixAccount(context.Context, *DeletePosixAccountRequest) (*emptypb.Empty, error)
162 // Deletes an SSH public key.
163 DeleteSshPublicKey(context.Context, *DeleteSshPublicKeyRequest) (*emptypb.Empty, error)
164 // Retrieves the profile information used for logging in to a virtual machine
165 // on Google Compute Engine.
166 GetLoginProfile(context.Context, *GetLoginProfileRequest) (*LoginProfile, error)
167 // Retrieves an SSH public key.
168 GetSshPublicKey(context.Context, *GetSshPublicKeyRequest) (*commonpb.SshPublicKey, error)
169 // Adds an SSH public key and returns the profile information. Default POSIX
170 // account information is set when no username and UID exist as part of the
171 // login profile.
172 ImportSshPublicKey(context.Context, *ImportSshPublicKeyRequest) (*ImportSshPublicKeyResponse, error)
173 // Updates an SSH public key and returns the profile information. This method
174 // supports patch semantics.
175 UpdateSshPublicKey(context.Context, *UpdateSshPublicKeyRequest) (*commonpb.SshPublicKey, error)
176 // Signs an SSH public key for a user to authenticate to an instance.
177 SignSshPublicKey(context.Context, *SignSshPublicKeyRequest) (*SignSshPublicKeyResponse, error)
178 }
179
180 // UnimplementedOsLoginServiceServer should be embedded to have forward compatible implementations.
181 type UnimplementedOsLoginServiceServer struct {
182 }
183
184 func (UnimplementedOsLoginServiceServer) CreateSshPublicKey(context.Context, *CreateSshPublicKeyRequest) (*commonpb.SshPublicKey, error) {
185 return nil, status.Errorf(codes.Unimplemented, "method CreateSshPublicKey not implemented")
186 }
187 func (UnimplementedOsLoginServiceServer) DeletePosixAccount(context.Context, *DeletePosixAccountRequest) (*emptypb.Empty, error) {
188 return nil, status.Errorf(codes.Unimplemented, "method DeletePosixAccount not implemented")
189 }
190 func (UnimplementedOsLoginServiceServer) DeleteSshPublicKey(context.Context, *DeleteSshPublicKeyRequest) (*emptypb.Empty, error) {
191 return nil, status.Errorf(codes.Unimplemented, "method DeleteSshPublicKey not implemented")
192 }
193 func (UnimplementedOsLoginServiceServer) GetLoginProfile(context.Context, *GetLoginProfileRequest) (*LoginProfile, error) {
194 return nil, status.Errorf(codes.Unimplemented, "method GetLoginProfile not implemented")
195 }
196 func (UnimplementedOsLoginServiceServer) GetSshPublicKey(context.Context, *GetSshPublicKeyRequest) (*commonpb.SshPublicKey, error) {
197 return nil, status.Errorf(codes.Unimplemented, "method GetSshPublicKey not implemented")
198 }
199 func (UnimplementedOsLoginServiceServer) ImportSshPublicKey(context.Context, *ImportSshPublicKeyRequest) (*ImportSshPublicKeyResponse, error) {
200 return nil, status.Errorf(codes.Unimplemented, "method ImportSshPublicKey not implemented")
201 }
202 func (UnimplementedOsLoginServiceServer) UpdateSshPublicKey(context.Context, *UpdateSshPublicKeyRequest) (*commonpb.SshPublicKey, error) {
203 return nil, status.Errorf(codes.Unimplemented, "method UpdateSshPublicKey not implemented")
204 }
205 func (UnimplementedOsLoginServiceServer) SignSshPublicKey(context.Context, *SignSshPublicKeyRequest) (*SignSshPublicKeyResponse, error) {
206 return nil, status.Errorf(codes.Unimplemented, "method SignSshPublicKey not implemented")
207 }
208
209 // UnsafeOsLoginServiceServer may be embedded to opt out of forward compatibility for this service.
210 // Use of this interface is not recommended, as added methods to OsLoginServiceServer will
211 // result in compilation errors.
212 type UnsafeOsLoginServiceServer interface {
213 mustEmbedUnimplementedOsLoginServiceServer()
214 }
215
216 func RegisterOsLoginServiceServer(s grpc.ServiceRegistrar, srv OsLoginServiceServer) {
217 s.RegisterService(&OsLoginService_ServiceDesc, srv)
218 }
219
220 func _OsLoginService_CreateSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
221 in := new(CreateSshPublicKeyRequest)
222 if err := dec(in); err != nil {
223 return nil, err
224 }
225 if interceptor == nil {
226 return srv.(OsLoginServiceServer).CreateSshPublicKey(ctx, in)
227 }
228 info := &grpc.UnaryServerInfo{
229 Server: srv,
230 FullMethod: OsLoginService_CreateSshPublicKey_FullMethodName,
231 }
232 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
233 return srv.(OsLoginServiceServer).CreateSshPublicKey(ctx, req.(*CreateSshPublicKeyRequest))
234 }
235 return interceptor(ctx, in, info, handler)
236 }
237
238 func _OsLoginService_DeletePosixAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
239 in := new(DeletePosixAccountRequest)
240 if err := dec(in); err != nil {
241 return nil, err
242 }
243 if interceptor == nil {
244 return srv.(OsLoginServiceServer).DeletePosixAccount(ctx, in)
245 }
246 info := &grpc.UnaryServerInfo{
247 Server: srv,
248 FullMethod: OsLoginService_DeletePosixAccount_FullMethodName,
249 }
250 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
251 return srv.(OsLoginServiceServer).DeletePosixAccount(ctx, req.(*DeletePosixAccountRequest))
252 }
253 return interceptor(ctx, in, info, handler)
254 }
255
256 func _OsLoginService_DeleteSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
257 in := new(DeleteSshPublicKeyRequest)
258 if err := dec(in); err != nil {
259 return nil, err
260 }
261 if interceptor == nil {
262 return srv.(OsLoginServiceServer).DeleteSshPublicKey(ctx, in)
263 }
264 info := &grpc.UnaryServerInfo{
265 Server: srv,
266 FullMethod: OsLoginService_DeleteSshPublicKey_FullMethodName,
267 }
268 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
269 return srv.(OsLoginServiceServer).DeleteSshPublicKey(ctx, req.(*DeleteSshPublicKeyRequest))
270 }
271 return interceptor(ctx, in, info, handler)
272 }
273
274 func _OsLoginService_GetLoginProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
275 in := new(GetLoginProfileRequest)
276 if err := dec(in); err != nil {
277 return nil, err
278 }
279 if interceptor == nil {
280 return srv.(OsLoginServiceServer).GetLoginProfile(ctx, in)
281 }
282 info := &grpc.UnaryServerInfo{
283 Server: srv,
284 FullMethod: OsLoginService_GetLoginProfile_FullMethodName,
285 }
286 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
287 return srv.(OsLoginServiceServer).GetLoginProfile(ctx, req.(*GetLoginProfileRequest))
288 }
289 return interceptor(ctx, in, info, handler)
290 }
291
292 func _OsLoginService_GetSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
293 in := new(GetSshPublicKeyRequest)
294 if err := dec(in); err != nil {
295 return nil, err
296 }
297 if interceptor == nil {
298 return srv.(OsLoginServiceServer).GetSshPublicKey(ctx, in)
299 }
300 info := &grpc.UnaryServerInfo{
301 Server: srv,
302 FullMethod: OsLoginService_GetSshPublicKey_FullMethodName,
303 }
304 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
305 return srv.(OsLoginServiceServer).GetSshPublicKey(ctx, req.(*GetSshPublicKeyRequest))
306 }
307 return interceptor(ctx, in, info, handler)
308 }
309
310 func _OsLoginService_ImportSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
311 in := new(ImportSshPublicKeyRequest)
312 if err := dec(in); err != nil {
313 return nil, err
314 }
315 if interceptor == nil {
316 return srv.(OsLoginServiceServer).ImportSshPublicKey(ctx, in)
317 }
318 info := &grpc.UnaryServerInfo{
319 Server: srv,
320 FullMethod: OsLoginService_ImportSshPublicKey_FullMethodName,
321 }
322 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
323 return srv.(OsLoginServiceServer).ImportSshPublicKey(ctx, req.(*ImportSshPublicKeyRequest))
324 }
325 return interceptor(ctx, in, info, handler)
326 }
327
328 func _OsLoginService_UpdateSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
329 in := new(UpdateSshPublicKeyRequest)
330 if err := dec(in); err != nil {
331 return nil, err
332 }
333 if interceptor == nil {
334 return srv.(OsLoginServiceServer).UpdateSshPublicKey(ctx, in)
335 }
336 info := &grpc.UnaryServerInfo{
337 Server: srv,
338 FullMethod: OsLoginService_UpdateSshPublicKey_FullMethodName,
339 }
340 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
341 return srv.(OsLoginServiceServer).UpdateSshPublicKey(ctx, req.(*UpdateSshPublicKeyRequest))
342 }
343 return interceptor(ctx, in, info, handler)
344 }
345
346 func _OsLoginService_SignSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
347 in := new(SignSshPublicKeyRequest)
348 if err := dec(in); err != nil {
349 return nil, err
350 }
351 if interceptor == nil {
352 return srv.(OsLoginServiceServer).SignSshPublicKey(ctx, in)
353 }
354 info := &grpc.UnaryServerInfo{
355 Server: srv,
356 FullMethod: OsLoginService_SignSshPublicKey_FullMethodName,
357 }
358 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
359 return srv.(OsLoginServiceServer).SignSshPublicKey(ctx, req.(*SignSshPublicKeyRequest))
360 }
361 return interceptor(ctx, in, info, handler)
362 }
363
364 // OsLoginService_ServiceDesc is the grpc.ServiceDesc for OsLoginService service.
365 // It's only intended for direct use with grpc.RegisterService,
366 // and not to be introspected or modified (even as a copy)
367 var OsLoginService_ServiceDesc = grpc.ServiceDesc{
368 ServiceName: "google.cloud.oslogin.v1beta.OsLoginService",
369 HandlerType: (*OsLoginServiceServer)(nil),
370 Methods: []grpc.MethodDesc{
371 {
372 MethodName: "CreateSshPublicKey",
373 Handler: _OsLoginService_CreateSshPublicKey_Handler,
374 },
375 {
376 MethodName: "DeletePosixAccount",
377 Handler: _OsLoginService_DeletePosixAccount_Handler,
378 },
379 {
380 MethodName: "DeleteSshPublicKey",
381 Handler: _OsLoginService_DeleteSshPublicKey_Handler,
382 },
383 {
384 MethodName: "GetLoginProfile",
385 Handler: _OsLoginService_GetLoginProfile_Handler,
386 },
387 {
388 MethodName: "GetSshPublicKey",
389 Handler: _OsLoginService_GetSshPublicKey_Handler,
390 },
391 {
392 MethodName: "ImportSshPublicKey",
393 Handler: _OsLoginService_ImportSshPublicKey_Handler,
394 },
395 {
396 MethodName: "UpdateSshPublicKey",
397 Handler: _OsLoginService_UpdateSshPublicKey_Handler,
398 },
399 {
400 MethodName: "SignSshPublicKey",
401 Handler: _OsLoginService_SignSshPublicKey_Handler,
402 },
403 },
404 Streams: []grpc.StreamDesc{},
405 Metadata: "google/cloud/oslogin/v1beta/oslogin.proto",
406 }