You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
177 lines
6.1 KiB
177 lines
6.1 KiB
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.2.0
|
|
// - protoc v3.6.1
|
|
// source: auth.proto
|
|
|
|
package __
|
|
|
|
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
|
|
|
|
// AuthDBClient is the client API for AuthDB 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 AuthDBClient interface {
|
|
Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
|
|
Registration(ctx context.Context, in *RegistrationRequest, opts ...grpc.CallOption) (*RegistrationResponse, error)
|
|
Confirmation(ctx context.Context, in *ConfirmationRequest, opts ...grpc.CallOption) (*ConfirmationResponse, error)
|
|
}
|
|
|
|
type authDBClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewAuthDBClient(cc grpc.ClientConnInterface) AuthDBClient {
|
|
return &authDBClient{cc}
|
|
}
|
|
|
|
func (c *authDBClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) {
|
|
out := new(LoginResponse)
|
|
err := c.cc.Invoke(ctx, "/auth.AuthDB/Login", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *authDBClient) Registration(ctx context.Context, in *RegistrationRequest, opts ...grpc.CallOption) (*RegistrationResponse, error) {
|
|
out := new(RegistrationResponse)
|
|
err := c.cc.Invoke(ctx, "/auth.AuthDB/Registration", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *authDBClient) Confirmation(ctx context.Context, in *ConfirmationRequest, opts ...grpc.CallOption) (*ConfirmationResponse, error) {
|
|
out := new(ConfirmationResponse)
|
|
err := c.cc.Invoke(ctx, "/auth.AuthDB/Confirmation", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// AuthDBServer is the server API for AuthDB service.
|
|
// All implementations must embed UnimplementedAuthDBServer
|
|
// for forward compatibility
|
|
type AuthDBServer interface {
|
|
Login(context.Context, *LoginRequest) (*LoginResponse, error)
|
|
Registration(context.Context, *RegistrationRequest) (*RegistrationResponse, error)
|
|
Confirmation(context.Context, *ConfirmationRequest) (*ConfirmationResponse, error)
|
|
mustEmbedUnimplementedAuthDBServer()
|
|
}
|
|
|
|
// UnimplementedAuthDBServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedAuthDBServer struct {
|
|
}
|
|
|
|
func (UnimplementedAuthDBServer) Login(context.Context, *LoginRequest) (*LoginResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Login not implemented")
|
|
}
|
|
func (UnimplementedAuthDBServer) Registration(context.Context, *RegistrationRequest) (*RegistrationResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Registration not implemented")
|
|
}
|
|
func (UnimplementedAuthDBServer) Confirmation(context.Context, *ConfirmationRequest) (*ConfirmationResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Confirmation not implemented")
|
|
}
|
|
func (UnimplementedAuthDBServer) mustEmbedUnimplementedAuthDBServer() {}
|
|
|
|
// UnsafeAuthDBServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to AuthDBServer will
|
|
// result in compilation errors.
|
|
type UnsafeAuthDBServer interface {
|
|
mustEmbedUnimplementedAuthDBServer()
|
|
}
|
|
|
|
func RegisterAuthDBServer(s grpc.ServiceRegistrar, srv AuthDBServer) {
|
|
s.RegisterService(&AuthDB_ServiceDesc, srv)
|
|
}
|
|
|
|
func _AuthDB_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(LoginRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthDBServer).Login(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/auth.AuthDB/Login",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthDBServer).Login(ctx, req.(*LoginRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AuthDB_Registration_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.(AuthDBServer).Registration(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/auth.AuthDB/Registration",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthDBServer).Registration(ctx, req.(*RegistrationRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AuthDB_Confirmation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ConfirmationRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthDBServer).Confirmation(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/auth.AuthDB/Confirmation",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthDBServer).Confirmation(ctx, req.(*ConfirmationRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// AuthDB_ServiceDesc is the grpc.ServiceDesc for AuthDB service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var AuthDB_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "auth.AuthDB",
|
|
HandlerType: (*AuthDBServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Login",
|
|
Handler: _AuthDB_Login_Handler,
|
|
},
|
|
{
|
|
MethodName: "Registration",
|
|
Handler: _AuthDB_Registration_Handler,
|
|
},
|
|
{
|
|
MethodName: "Confirmation",
|
|
Handler: _AuthDB_Confirmation_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "auth.proto",
|
|
}
|
|
|