diff --git a/TestClient.go b/TestClient.go index 8cad762..98e8d66 100644 --- a/TestClient.go +++ b/TestClient.go @@ -33,7 +33,7 @@ func main() { retryMaxElapsedTimeMinutes := 2 // validate inputs - errorsInInputs := utils.ValidateInputs(clientId, clientSecret, apiUrl, clientTimeOutInSeconds, &separator, verifyCa, zapLogger, certificate, certificateKey) + errorsInInputs := utils.ValidateInputs(clientId, clientSecret, apiUrl, clientTimeOutInSeconds, &separator, verifyCa, zapLogger, certificate, certificateKey, &retryMaxElapsedTimeMinutes) if errorsInInputs != nil { return diff --git a/api/utils/validator.go b/api/utils/validator.go index c942689..69f3875 100644 --- a/api/utils/validator.go +++ b/api/utils/validator.go @@ -24,10 +24,12 @@ type UserInputValidaton struct { var validate *validator.Validate // ValidateInputs is responsible for validating end-user inputs. -func ValidateInputs(clientId string, clientSecret string, apiUrl string, clientTimeOutinSeconds int, separator *string, verifyCa bool, logger logging.Logger, certificate string, certificate_key string) error { +func ValidateInputs(clientId string, clientSecret string, apiUrl string, clientTimeOutinSeconds int, separator *string, verifyCa bool, logger logging.Logger, certificate string, certificate_key string, retryMaxElapsedTimeMinutes *int) error { if clientTimeOutinSeconds == 0 { clientTimeOutinSeconds = 30 + *retryMaxElapsedTimeMinutes = 2 + } validate = validator.New(validator.WithRequiredStructEnabled())