validate inputs

This commit is contained in:
Michael McGuinness
2024-12-23 16:49:53 +00:00
parent a54a70047b
commit 1a5fab87c6
223 changed files with 36539 additions and 643 deletions
+7 -3
View File
@@ -5,17 +5,21 @@ import (
"gotemplate/api/grpc/spec"
"gotemplate/internal/query"
"github.com/go-playground/validator/v10"
"google.golang.org/protobuf/types/known/emptypb"
)
type QueryController struct {
spec.UnimplementedQueryServiceServer
query query.Service
query query.Service
validator *validator.Validate
}
func NewQueryController(querySvc query.Service) *QueryController {
func NewQueryController(querySvc query.Service, validator *validator.Validate) *QueryController {
return &QueryController{
query: querySvc,
query: querySvc,
validator: validator,
}
}