Files
contracts/gen/go/ldap-auth_grpc.pb.go
2026-04-02 17:28:51 +00:00

122 lines
4.5 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc v3.21.12
// source: ldap-auth.proto
package pb
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// 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 (
LdapAuthService_VerifyUser_FullMethodName = "/ldap_auth.v1.LdapAuthService/VerifyUser"
)
// LdapAuthServiceClient is the client API for LdapAuthService 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 LdapAuthServiceClient interface {
VerifyUser(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*VerifyResponse, error)
}
type ldapAuthServiceClient struct {
cc grpc.ClientConnInterface
}
func NewLdapAuthServiceClient(cc grpc.ClientConnInterface) LdapAuthServiceClient {
return &ldapAuthServiceClient{cc}
}
func (c *ldapAuthServiceClient) VerifyUser(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*VerifyResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(VerifyResponse)
err := c.cc.Invoke(ctx, LdapAuthService_VerifyUser_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// LdapAuthServiceServer is the server API for LdapAuthService service.
// All implementations must embed UnimplementedLdapAuthServiceServer
// for forward compatibility.
type LdapAuthServiceServer interface {
VerifyUser(context.Context, *VerifyRequest) (*VerifyResponse, error)
mustEmbedUnimplementedLdapAuthServiceServer()
}
// UnimplementedLdapAuthServiceServer 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 UnimplementedLdapAuthServiceServer struct{}
func (UnimplementedLdapAuthServiceServer) VerifyUser(context.Context, *VerifyRequest) (*VerifyResponse, error) {
return nil, status.Error(codes.Unimplemented, "method VerifyUser not implemented")
}
func (UnimplementedLdapAuthServiceServer) mustEmbedUnimplementedLdapAuthServiceServer() {}
func (UnimplementedLdapAuthServiceServer) testEmbeddedByValue() {}
// UnsafeLdapAuthServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to LdapAuthServiceServer will
// result in compilation errors.
type UnsafeLdapAuthServiceServer interface {
mustEmbedUnimplementedLdapAuthServiceServer()
}
func RegisterLdapAuthServiceServer(s grpc.ServiceRegistrar, srv LdapAuthServiceServer) {
// If the following call panics, it indicates UnimplementedLdapAuthServiceServer 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(&LdapAuthService_ServiceDesc, srv)
}
func _LdapAuthService_VerifyUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(VerifyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LdapAuthServiceServer).VerifyUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: LdapAuthService_VerifyUser_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LdapAuthServiceServer).VerifyUser(ctx, req.(*VerifyRequest))
}
return interceptor(ctx, in, info, handler)
}
// LdapAuthService_ServiceDesc is the grpc.ServiceDesc for LdapAuthService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var LdapAuthService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "ldap_auth.v1.LdapAuthService",
HandlerType: (*LdapAuthServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "VerifyUser",
Handler: _LdapAuthService_VerifyUser_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "ldap-auth.proto",
}