merch-api/pkg/externalRegistration/v1/serviceRegistration_grpc.pb.go

161 lines
6.6 KiB
Go
Raw Normal View History

2026-03-20 13:44:37 +03:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc v6.33.1
// source: proto/serviceRegistration.proto
package externalRegV1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
2026-04-05 17:59:47 +03:00
emptypb "google.golang.org/protobuf/types/known/emptypb"
2026-03-20 13:44:37 +03:00
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
ExternalRegistration_AuthenticateOrRegister_FullMethodName = "/auth.registration.ExternalRegistration/AuthenticateOrRegister"
2026-04-05 17:59:47 +03:00
ExternalRegistration_Update_FullMethodName = "/auth.registration.ExternalRegistration/Update"
2026-03-20 13:44:37 +03:00
)
// ExternalRegistrationClient is the client API for ExternalRegistration service.
//
// 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)
2026-04-05 17:59:47 +03:00
Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
2026-03-20 13:44:37 +03:00
}
type externalRegistrationClient struct {
cc grpc.ClientConnInterface
}
func NewExternalRegistrationClient(cc grpc.ClientConnInterface) ExternalRegistrationClient {
return &externalRegistrationClient{cc}
}
func (c *externalRegistrationClient) AuthenticateOrRegister(ctx context.Context, in *RegistrationRequest, opts ...grpc.CallOption) (*RegistrationResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RegistrationResponse)
err := c.cc.Invoke(ctx, ExternalRegistration_AuthenticateOrRegister_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
2026-04-05 17:59:47 +03:00
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
}
2026-03-20 13:44:37 +03:00
// 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)
2026-04-05 17:59:47 +03:00
Update(context.Context, *UpdateRequest) (*emptypb.Empty, error)
2026-03-20 13:44:37 +03:00
mustEmbedUnimplementedExternalRegistrationServer()
}
// UnimplementedExternalRegistrationServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedExternalRegistrationServer struct{}
func (UnimplementedExternalRegistrationServer) AuthenticateOrRegister(context.Context, *RegistrationRequest) (*RegistrationResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AuthenticateOrRegister not implemented")
}
2026-04-05 17:59:47 +03:00
func (UnimplementedExternalRegistrationServer) Update(context.Context, *UpdateRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
2026-03-20 13:44:37 +03:00
func (UnimplementedExternalRegistrationServer) mustEmbedUnimplementedExternalRegistrationServer() {}
func (UnimplementedExternalRegistrationServer) testEmbeddedByValue() {}
// UnsafeExternalRegistrationServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ExternalRegistrationServer will
// result in compilation errors.
type UnsafeExternalRegistrationServer interface {
mustEmbedUnimplementedExternalRegistrationServer()
}
func RegisterExternalRegistrationServer(s grpc.ServiceRegistrar, srv ExternalRegistrationServer) {
// If the following call pancis, it indicates UnimplementedExternalRegistrationServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&ExternalRegistration_ServiceDesc, srv)
}
func _ExternalRegistration_AuthenticateOrRegister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RegistrationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ExternalRegistrationServer).AuthenticateOrRegister(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ExternalRegistration_AuthenticateOrRegister_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ExternalRegistrationServer).AuthenticateOrRegister(ctx, req.(*RegistrationRequest))
}
return interceptor(ctx, in, info, handler)
}
2026-04-05 17:59:47 +03:00
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)
}
2026-03-20 13:44:37 +03:00
// 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)
var ExternalRegistration_ServiceDesc = grpc.ServiceDesc{
ServiceName: "auth.registration.ExternalRegistration",
HandlerType: (*ExternalRegistrationServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "AuthenticateOrRegister",
Handler: _ExternalRegistration_AuthenticateOrRegister_Handler,
},
2026-04-05 17:59:47 +03:00
{
MethodName: "Update",
Handler: _ExternalRegistration_Update_Handler,
},
2026-03-20 13:44:37 +03:00
},
Streams: []grpc.StreamDesc{},
Metadata: "proto/serviceRegistration.proto",
}