mirror of
https://github.com/hexolan/stocklet.git
synced 2026-03-26 19:51:17 +00:00
chore(deps): bump protovalidate to v1.0.0
bump version v0.4.1 (`e097f827e65240ac9fd4b1158849a8fc`) to v1.0.0 (`52f32327d4b045a79293a6ad4e7e1236`) refactor: endpoint from `github.com/bufbuild/protovalidate-go` to `buf.build/go/protovalidate` chore(deps): bump other dependencies
This commit is contained in:
@@ -18,7 +18,7 @@ package auth
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/bufbuild/protovalidate-go"
|
||||
"buf.build/go/protovalidate"
|
||||
"github.com/rs/zerolog/log"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
|
||||
@@ -68,7 +68,7 @@ func NewAuthService(cfg *ServiceConfig, store StorageController) *AuthService {
|
||||
svc := &AuthService{
|
||||
cfg: cfg,
|
||||
store: store,
|
||||
pbVal: pbVal,
|
||||
pbVal: &pbVal,
|
||||
}
|
||||
|
||||
return svc
|
||||
@@ -84,7 +84,7 @@ func (svc AuthService) ServiceInfo(ctx context.Context, req *commonpb.ServiceInf
|
||||
|
||||
func (svc AuthService) LoginPassword(ctx context.Context, req *pb.LoginPasswordRequest) (*pb.LoginPasswordResponse, error) {
|
||||
// Validate the request args
|
||||
if err := svc.pbVal.Validate(req); err != nil {
|
||||
if err := (*svc.pbVal).Validate(req); err != nil {
|
||||
// provide validation err context to user
|
||||
return nil, errors.NewServiceError(errors.ErrCodeInvalidArgument, "invalid request: "+err.Error())
|
||||
}
|
||||
@@ -121,7 +121,7 @@ func (svc AuthService) SetPassword(ctx context.Context, req *pb.SetPasswordReque
|
||||
}
|
||||
|
||||
// Validate the request args
|
||||
if err := svc.pbVal.Validate(req); err != nil {
|
||||
if err := (*svc.pbVal).Validate(req); err != nil {
|
||||
// provide validation err context to user
|
||||
return nil, errors.NewServiceError(errors.ErrCodeInvalidArgument, "invalid request: "+err.Error())
|
||||
}
|
||||
@@ -137,7 +137,7 @@ func (svc AuthService) SetPassword(ctx context.Context, req *pb.SetPasswordReque
|
||||
|
||||
func (svc AuthService) ProcessUserDeletedEvent(ctx context.Context, req *eventpb.UserDeletedEvent) (*emptypb.Empty, error) {
|
||||
// Validate the request args
|
||||
if err := svc.pbVal.Validate(req); err != nil {
|
||||
if err := (*svc.pbVal).Validate(req); err != nil {
|
||||
// provide validation err context to user
|
||||
return nil, errors.NewServiceError(errors.ErrCodeInvalidArgument, "invalid request: "+err.Error())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user