update
All checks were successful
/ Make image (push) Successful in 59s

This commit is contained in:
nquidox 2026-04-05 17:59:47 +03:00
parent b2222e956a
commit cf1d8ac531
3 changed files with 169 additions and 9 deletions

View file

@ -11,6 +11,7 @@ import (
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
@ -20,6 +21,7 @@ const _ = grpc.SupportPackageIsVersion9
const (
ExternalRegistration_AuthenticateOrRegister_FullMethodName = "/auth.registration.ExternalRegistration/AuthenticateOrRegister"
ExternalRegistration_Update_FullMethodName = "/auth.registration.ExternalRegistration/Update"
)
// ExternalRegistrationClient is the client API for ExternalRegistration service.
@ -27,6 +29,7 @@ const (
// 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 ExternalRegistrationClient interface {
AuthenticateOrRegister(ctx context.Context, in *RegistrationRequest, opts ...grpc.CallOption) (*RegistrationResponse, error)
Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type externalRegistrationClient struct {
@ -47,11 +50,22 @@ func (c *externalRegistrationClient) AuthenticateOrRegister(ctx context.Context,
return out, nil
}
func (c *externalRegistrationClient) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, ExternalRegistration_Update_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// ExternalRegistrationServer is the server API for ExternalRegistration service.
// All implementations must embed UnimplementedExternalRegistrationServer
// for forward compatibility.
type ExternalRegistrationServer interface {
AuthenticateOrRegister(context.Context, *RegistrationRequest) (*RegistrationResponse, error)
Update(context.Context, *UpdateRequest) (*emptypb.Empty, error)
mustEmbedUnimplementedExternalRegistrationServer()
}
@ -65,6 +79,9 @@ type UnimplementedExternalRegistrationServer struct{}
func (UnimplementedExternalRegistrationServer) AuthenticateOrRegister(context.Context, *RegistrationRequest) (*RegistrationResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AuthenticateOrRegister not implemented")
}
func (UnimplementedExternalRegistrationServer) Update(context.Context, *UpdateRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedExternalRegistrationServer) mustEmbedUnimplementedExternalRegistrationServer() {}
func (UnimplementedExternalRegistrationServer) testEmbeddedByValue() {}
@ -104,6 +121,24 @@ func _ExternalRegistration_AuthenticateOrRegister_Handler(srv interface{}, ctx c
return interceptor(ctx, in, info, handler)
}
func _ExternalRegistration_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ExternalRegistrationServer).Update(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ExternalRegistration_Update_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ExternalRegistrationServer).Update(ctx, req.(*UpdateRequest))
}
return interceptor(ctx, in, info, handler)
}
// ExternalRegistration_ServiceDesc is the grpc.ServiceDesc for ExternalRegistration service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@ -115,6 +150,10 @@ var ExternalRegistration_ServiceDesc = grpc.ServiceDesc{
MethodName: "AuthenticateOrRegister",
Handler: _ExternalRegistration_AuthenticateOrRegister_Handler,
},
{
MethodName: "Update",
Handler: _ExternalRegistration_Update_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "proto/serviceRegistration.proto",