public IWorkspaceUpdateValidator(ITerraformService terraformService) { RuleFor(x => x.TerraformVersion) .Must(x => terraformService.IsValidVersion(x)) .WithMessage("The specified version is not available. Please contact a system administrator to request it be added to the system.") .When(x => !string.IsNullOrEmpty(x.TerraformVersion)); }
public Handler( IAuthorizationService authorizationService, IIdentityResolver identityResolver, ITerraformService terraformService, TerraformOptions terraformOptions) { _authorizationService = authorizationService; _user = identityResolver.GetClaimsPrincipal(); _terraformService = terraformService; _terraformOptions = terraformOptions; }
public Handler( CasterContext db, IMapper mapper, IAuthorizationService authorizationService, IIdentityResolver identityResolver, TerraformOptions terraformOptions, ITerraformService terraformService, ILockService lockService, ILogger <BaseOperationHandler> logger) : base(db, mapper, authorizationService, identityResolver, terraformOptions, terraformService, lockService, logger) { }
public Handler( CasterContext db, IMapper mapper, IAuthorizationService authorizationService, IIdentityResolver identityResolver, ITerraformService terraformService) { _db = db; _mapper = mapper; _authorizationService = authorizationService; _user = identityResolver.GetClaimsPrincipal(); _terraformService = terraformService; }
public ApplyAddedHandler( CasterContext db, DbContextOptions <CasterContext> dbOptions, ILogger <ApplyAddedHandler> logger, ITerraformService terraformService, TerraformOptions options, IMediator mediator, IOutputService outputService) { _db = db; _dbOptions = dbOptions; _logger = logger; _terraformService = terraformService; _options = options; _mediator = mediator; _outputService = outputService; }
public IWorkspaceUpdateValidator(ITerraformService terraformService) { RuleFor(x => x.Name) .MinimumLength(1) .MaximumLength(90) .Must(x => x.All(c => char.IsLetterOrDigit(c) || c == '-' || c == '_' || c == '.')) .WithMessage($"Workspace names need to be 90 characters or less and can only include letters, numbers, -, _, and .") .When(x => x.Name != null); RuleFor(x => x.Name) .NotNull() .When(x => !(x is PartialEdit.Command)); RuleFor(x => x.TerraformVersion) .Must(x => terraformService.IsValidVersion(x)) .WithMessage("The specified version is not available. Please contact a system administrator to request it be added to the system.") .When(x => !string.IsNullOrEmpty(x.TerraformVersion)); }
public BaseOperationHandler( CasterContext db, IMapper mapper, IAuthorizationService authorizationService, IIdentityResolver identityResolver, TerraformOptions terraformOptions, ITerraformService terraformService, ILockService lockService, ILogger <BaseOperationHandler> logger) { _db = db; _mapper = mapper; _authorizationService = authorizationService; _user = identityResolver.GetClaimsPrincipal(); _terraformOptions = terraformOptions; _terraformService = terraformService; _lockService = lockService; _logger = logger; }