protected async Task <string> SelfTest(AppSettings appSettings, IUserRepository userRepository, IJsonDataRepository jsonDataRepository, ITokensRepository tokensRepository, IServiceTokenRepository serviceTokensRepository, IKeyValuesRepository keyValuesRepository, ILockRepository lockRepository, IAccessDataRepository accessDataRepository, ILog log)
        {
            _userRepository          = userRepository;
            _log                     = log;
            _appSettings             = appSettings;
            _jsonDataRepository      = jsonDataRepository;
            _tokensRepository        = tokensRepository;
            _serviceTokensRepository = serviceTokensRepository;
            _keyValuesRepository     = keyValuesRepository;
            _lockRepository          = lockRepository;
            _accessDataRepository    = accessDataRepository;

            var sb = new StringBuilder();

            AddCaption(sb, "Self testing for the system.");
            AddHeader(sb, "Check Settings");

            if (TestSettings(sb))
            {
                AddHeader(sb, "Check DataBase connections");
                if (await TestDataBases(sb))
                {
                    AddSuccess(sb, "Self Testing successfully completed");
                }
            }

            return(sb.ToString());
        }
 public NetworksController(
     ILogFactory logFactory,
     INetworkRepository networkRepository,
     IKeyValuesRepository keyValuesRepository,
     IUserActionHistoryRepository userActionHistoryRepository
     ) : base(userActionHistoryRepository, logFactory)
 {
     _networkRepository   = networkRepository;
     _keyValuesRepository = keyValuesRepository;
 }
 public ApiOverrideController(
     ILogFactory logFactory,
     IUserActionHistoryRepository userActionHistoryRepository,
     IKeyValuesRepository keyValuesRepository,
     IRepositoryDataRepository repositoryDataRepository,
     IKeyValueHistoryRepository keyValueHistoryRepository)
     : base(userActionHistoryRepository, logFactory)
 {
     _keyValuesRepository       = keyValuesRepository;
     _keyValueHistoryRepository = keyValueHistoryRepository;
     _repositoryDataRepository  = repositoryDataRepository;
 }
 public OverrideController(
     ILogFactory logFactory,
     INetworkRepository networkRepository,
     IKeyValuesRepository keyValuesRepository,
     IKeyValueHistoryRepository keyValueHistoryRepository,
     IUserActionHistoryRepository userActionHistoryRepository) : base(userActionHistoryRepository)
 {
     _log = logFactory.CreateLog(this);
     _networkRepository         = networkRepository;
     _keyValuesRepository       = keyValuesRepository;
     _keyValueHistoryRepository = keyValueHistoryRepository;
 }
 public CheckListController(ILogFactory logFactory, IUserRepository userRepository, AppSettings appSettings,
                            IJsonDataRepository jsonDataRepository, ITokensRepository tokensRepository, IServiceTokenRepository serviceTokensRepository,
                            IKeyValuesRepository keyValuesRepository, ILockRepository lockRepository, IAccessDataRepository accessDataRepository,
                            IUserActionHistoryRepository userActionHistoryRepository) : base(userActionHistoryRepository)
 {
     _log                     = logFactory.CreateLog(this);
     _userRepository          = userRepository;
     _appSettings             = appSettings;
     _jsonDataRepository      = jsonDataRepository;
     _tokensRepository        = tokensRepository;
     _serviceTokensRepository = serviceTokensRepository;
     _keyValuesRepository     = keyValuesRepository;
     _lockRepository          = lockRepository;
     _accessDataRepository    = accessDataRepository;
 }
 public ApiRepositoryController(ILogFactory logFactory, IUserActionHistoryRepository userActionHistoryRepository,
                                IRepositoriesRepository repositoriesRepository, IRepositoryDataRepository repositoryDataRepository, IKeyValuesRepository keyValuesRepository,
                                IKeyValueHistoryRepository keyValueHistoryRepository, IRepositoriesUpdateHistoryRepository repositoriesUpdateHistoryRepository,
                                IConnectionUrlHistoryRepository connectionUrlHistoryRepository, INetworkRepository networkRepository, IServiceTokenRepository serviceTokensRepository,
                                AppSettings appSettings, IRepositoriesService repositoriesService) : base(userActionHistoryRepository)
 {
     _appSettings                         = appSettings;
     _log                                 = logFactory.CreateLog(this);
     _repositoriesRepository              = repositoriesRepository;
     _repositoryDataRepository            = repositoryDataRepository;
     _keyValuesRepository                 = keyValuesRepository;
     _keyValueHistoryRepository           = keyValueHistoryRepository;
     _repositoriesUpdateHistoryRepository = repositoriesUpdateHistoryRepository;
     _connectionUrlHistoryRepository      = connectionUrlHistoryRepository;
     _networkRepository                   = networkRepository;
     _serviceTokensRepository             = serviceTokensRepository;
     _repositoriesService                 = repositoriesService;
 }
Beispiel #7
0
 public SelfTestService(
     AppSettings appSettings,
     IUserRepository userRepository,
     IJsonDataRepository jsonDataRepository,
     ITokensRepository tokensRepository,
     IServiceTokenRepository serviceTokensRepository,
     IKeyValuesRepository keyValuesRepository,
     ILockRepository lockRepository,
     IAccessDataRepository accessDataRepository)
 {
     _userRepository          = userRepository;
     _appSettings             = appSettings;
     _jsonDataRepository      = jsonDataRepository;
     _tokensRepository        = tokensRepository;
     _serviceTokensRepository = serviceTokensRepository;
     _keyValuesRepository     = keyValuesRepository;
     _lockRepository          = lockRepository;
     _accessDataRepository    = accessDataRepository;
 }
 public RepositoriesService(
     IKeyValuesRepository keyValuesRepository,
     IKeyValueHistoryRepository keyValueHistoryRepository,
     IRepositoriesRepository repositoriesRepository,
     IRepositoryDataRepository repositoryDataRepository,
     IRepositoriesUpdateHistoryRepository repositoriesUpdateHistoryRepository,
     ISecretKeyValuesRepository secretKeyValuesRepository,
     AppSettings appSettings,
     ILogFactory logFactory)
 {
     _keyValuesRepository                 = keyValuesRepository;
     _keyValueHistoryRepository           = keyValueHistoryRepository;
     _repositoriesRepository              = repositoriesRepository;
     _repositoryDataRepository            = repositoryDataRepository;
     _repositoriesUpdateHistoryRepository = repositoriesUpdateHistoryRepository;
     _secretKeyValuesRepository           = secretKeyValuesRepository;
     _appSettings = appSettings;
     _log         = logFactory.CreateLog(this);
 }
Beispiel #9
0
        public AccountController(
            ILogFactory logFactory,
            AppSettings appSettings,
            IUserRepository userRepository,
            IRoleRepository roleRepository,
            IUserSignInHistoryRepository userHistoryRepository,
            IUserActionHistoryRepository userActionHistoryRepository,
            IKeyValuesRepository keyValuesRepository
            ) : base(userActionHistoryRepository)
        {
            _log                   = logFactory.CreateLog(this);
            _appSettings           = appSettings;
            _userRepository        = userRepository;
            _roleRepository        = roleRepository;
            _userHistoryRepository = userHistoryRepository;
            _keyValuesRepository   = keyValuesRepository;

            ApiClientId          = _appSettings.ApiClientId;
            AvailableEmailsRegex = _appSettings.AvailableEmailsRegex;
        }
Beispiel #10
0
 public ApiRepositoryController(
     ILogFactory logFactory,
     IUserActionHistoryRepository userActionHistoryRepository,
     IRepositoriesRepository repositoriesRepository,
     IRepositoryDataRepository repositoryDataRepository,
     IKeyValuesRepository keyValuesRepository,
     IConnectionUrlHistoryRepository connectionUrlHistoryRepository,
     INetworkRepository networkRepository,
     IServiceTokenRepository serviceTokensRepository,
     IRepositoriesService repositoriesService)
     : base(userActionHistoryRepository, logFactory)
 {
     _repositoriesRepository         = repositoriesRepository;
     _repositoryDataRepository       = repositoryDataRepository;
     _keyValuesRepository            = keyValuesRepository;
     _connectionUrlHistoryRepository = connectionUrlHistoryRepository;
     _networkRepository       = networkRepository;
     _serviceTokensRepository = serviceTokensRepository;
     _repositoriesService     = repositoriesService;
 }
        public AccountController(
            ILogFactory logFactory,
            AppSettings appSettings,
            IUserRepository userRepository,
            IRoleRepository roleRepository,
            IUserSignInHistoryRepository userHistoryRepository,
            IUserActionHistoryRepository userActionHistoryRepository,
            IKeyValuesRepository keyValuesRepository,
            IUsersService usersService)
            : base(userActionHistoryRepository, logFactory)
        {
            _userRepository        = userRepository;
            _roleRepository        = roleRepository;
            _userHistoryRepository = userHistoryRepository;
            _keyValuesRepository   = keyValuesRepository;
            _usersService          = usersService;

            _googleApiClientId       = appSettings.GoogleApiClientId;
            _availableEmailsRegex    = appSettings.AvailableEmailsRegex;
            _defaultUserPasswordHash = appSettings.DefaultPassword.GetHash();
        }
Beispiel #12
0
 public RepositoriesService(
     IKeyValuesRepository keyValuesRepository,
     IKeyValueHistoryRepository keyValueHistoryRepository,
     IRepositoriesRepository repositoriesRepository,
     IRepositoryDataRepository repositoryDataRepository,
     IRepositoriesUpdateHistoryRepository repositoriesUpdateHistoryRepository,
     ISecretKeyValuesRepository secretKeyValuesRepository,
     IGitService gitService,
     bool useSecrets,
     ILogFactory logFactory)
 {
     _keyValuesRepository                 = keyValuesRepository;
     _keyValueHistoryRepository           = keyValueHistoryRepository;
     _repositoriesRepository              = repositoriesRepository;
     _repositoryDataRepository            = repositoryDataRepository;
     _repositoriesUpdateHistoryRepository = repositoriesUpdateHistoryRepository;
     _secretKeyValuesRepository           = secretKeyValuesRepository;
     _gitService = gitService;
     _useSecrets = useSecrets;
     _log        = logFactory.CreateLog(this);
 }
Beispiel #13
0
 public ApiSettingsController(ILogFactory logFactory, IKeyValuesRepository keyValuesRepository)
 {
     _log = logFactory.CreateLog(this);
     _keyValuesRepository = keyValuesRepository;
 }