homeserver.py 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # -*- coding: utf-8 -*-
  2. # Copyright 2014-2016 OpenMarket Ltd
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. from .tls import TlsConfig
  16. from .server import ServerConfig
  17. from .logger import LoggingConfig
  18. from .database import DatabaseConfig
  19. from .ratelimiting import RatelimitConfig
  20. from .repository import ContentRepositoryConfig
  21. from .captcha import CaptchaConfig
  22. from .voip import VoipConfig
  23. from .registration import RegistrationConfig
  24. from .metrics import MetricsConfig
  25. from .api import ApiConfig
  26. from .appservice import AppServiceConfig
  27. from .key import KeyConfig
  28. from .saml2 import SAML2Config
  29. from .cas import CasConfig
  30. from .password import PasswordConfig
  31. from .jwt import JWTConfig
  32. from .ldap import LDAPConfig
  33. class HomeServerConfig(TlsConfig, ServerConfig, DatabaseConfig, LoggingConfig,
  34. RatelimitConfig, ContentRepositoryConfig, CaptchaConfig,
  35. VoipConfig, RegistrationConfig, MetricsConfig, ApiConfig,
  36. AppServiceConfig, KeyConfig, SAML2Config, CasConfig,
  37. JWTConfig, LDAPConfig, PasswordConfig,):
  38. pass
  39. if __name__ == '__main__':
  40. import sys
  41. sys.stdout.write(
  42. HomeServerConfig().generate_config(sys.argv[1], sys.argv[2])[0]
  43. )