Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrWorkerProfileRequired = eris.New("worker profile is required for assignment eligibility check")
Functions ¶
This section is empty.
Types ¶
type ValidationContext ¶
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
func NewValidator ¶
func NewValidator(p ValidatorParams) *Validator
func (*Validator) CheckAssignmentEligibility ¶
type ValidatorParams ¶
type ValidatorParams struct { fx.In Repo repositories.WorkerRepository HazmatExpRepo repositories.HazmatExpirationRepository ProfileValidator *WorkerProfileValidator PTOValidator *WorkerPTOValidator }
type WorkerPTOValidator ¶
type WorkerPTOValidator struct {
// contains filtered or unexported fields
}
func NewWorkerPTOValidator ¶
func NewWorkerPTOValidator(p WorkerPTOValidatorParams) *WorkerPTOValidator
func (*WorkerPTOValidator) Validate ¶
func (v *WorkerPTOValidator) Validate(ctx context.Context, valCtx *validator.ValidationContext, wrk *worker.Worker, pto *worker.WorkerPTO, multiErr *errors.MultiError, index int)
ValidatePTO validates a worker's PTO and returns a MultiError if there are any validation errors This is a wrapper for the individual PTO checks
type WorkerPTOValidatorParams ¶
type WorkerPTOValidatorParams struct { fx.In Repo repositories.WorkerRepository }
type WorkerProfileValidator ¶
type WorkerProfileValidator struct {
// contains filtered or unexported fields
}
func NewWorkerProfileValidator ¶
func NewWorkerProfileValidator(p WorkerProfileValidatorParams) *WorkerProfileValidator
func (*WorkerProfileValidator) Validate ¶
func (v *WorkerProfileValidator) Validate(ctx context.Context, valCtx *validator.ValidationContext, wp *worker.WorkerProfile, multiErr *errors.MultiError)
type WorkerProfileValidatorParams ¶
type WorkerProfileValidatorParams struct { fx.In CompValidator *compliancevalidator.Validator }
Click to show internal directories.
Click to hide internal directories.