package internal

import (
	api "git.vdhsn.com/barretthousen/barretthousen/src/auth/api/grpc"
	"git.vdhsn.com/barretthousen/barretthousen/src/auth/internal/domain"
	"google.golang.org/grpc"
)

func NewAuthServer(d *domain.Domain) func(grpcServer grpc.ServiceRegistrar, endpoint string) {
	return func(grpcServer grpc.ServiceRegistrar, endpoint string) {
		api.RegisterAuthServer(grpcServer, &authHandler{domain: d})
	}
}

type authHandler struct {
	api.UnimplementedAuthServer
	domain *domain.Domain
}
