mirror of
https://github.com/bolkedebruin/rdpgw.git
synced 2025-08-14 04:49:18 +02:00
103 lines
3.5 KiB
Go
103 lines
3.5 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.2.0
|
|
// - protoc v3.21.5
|
|
// source: auth.proto
|
|
|
|
package auth
|
|
|
|
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.32.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion7
|
|
|
|
// AuthenticateClient is the client API for Authenticate 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 AuthenticateClient interface {
|
|
Authenticate(ctx context.Context, in *UserPass, opts ...grpc.CallOption) (*AuthResponse, error)
|
|
}
|
|
|
|
type authenticateClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewAuthenticateClient(cc grpc.ClientConnInterface) AuthenticateClient {
|
|
return &authenticateClient{cc}
|
|
}
|
|
|
|
func (c *authenticateClient) Authenticate(ctx context.Context, in *UserPass, opts ...grpc.CallOption) (*AuthResponse, error) {
|
|
out := new(AuthResponse)
|
|
err := c.cc.Invoke(ctx, "/auth.Authenticate/Authenticate", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// AuthenticateServer is the server API for Authenticate service.
|
|
// All implementations should embed UnimplementedAuthenticateServer
|
|
// for forward compatibility
|
|
type AuthenticateServer interface {
|
|
Authenticate(context.Context, *UserPass) (*AuthResponse, error)
|
|
}
|
|
|
|
// UnimplementedAuthenticateServer should be embedded to have forward compatible implementations.
|
|
type UnimplementedAuthenticateServer struct {
|
|
}
|
|
|
|
func (UnimplementedAuthenticateServer) Authenticate(context.Context, *UserPass) (*AuthResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Authenticate not implemented")
|
|
}
|
|
|
|
// UnsafeAuthenticateServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to AuthenticateServer will
|
|
// result in compilation errors.
|
|
type UnsafeAuthenticateServer interface {
|
|
mustEmbedUnimplementedAuthenticateServer()
|
|
}
|
|
|
|
func RegisterAuthenticateServer(s grpc.ServiceRegistrar, srv AuthenticateServer) {
|
|
s.RegisterService(&Authenticate_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Authenticate_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UserPass)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthenticateServer).Authenticate(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/auth.Authenticate/Authenticate",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthenticateServer).Authenticate(ctx, req.(*UserPass))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Authenticate_ServiceDesc is the grpc.ServiceDesc for Authenticate service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Authenticate_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "auth.Authenticate",
|
|
HandlerType: (*AuthenticateServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Authenticate",
|
|
Handler: _Authenticate_Authenticate_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "auth.proto",
|
|
}
|