config.go 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. package config
  2. // Config our service configuration
  3. type Config struct {
  4. //port of the http server
  5. Port int `yaml:"port"`
  6. //port of the https server
  7. Sslport int `yaml:"sslport"`
  8. //this is the url how to connect to this service from outside
  9. ServiceURL string `yaml:"serviceURL"`
  10. //this is the url where to register this service
  11. RegistryURL string `yaml:"registryURL"`
  12. //this is the url where to register this service
  13. SystemID string `yaml:"systemID"`
  14. BackendPath string `yaml:"backendpath"`
  15. SecretFile string `yaml:"secretfile"`
  16. WebRoot string `yaml:"webRoot"`
  17. AllowAnonymousBackend bool `yaml:"allowAnonymousBackend"`
  18. Logging Logging `yaml:"logging"`
  19. HealthCheck HealthCheck `yaml:"healthcheck"`
  20. BackgroundTasks BackgroundTasks `yaml:"backgroundtasks"`
  21. MongoDB MongoDB `yaml: "mongodb"`
  22. }
  23. //Logging configuration for the logging system (At the moment only for the gelf logger)
  24. type Logging struct {
  25. Gelfurl string `yaml:"gelf-url"`
  26. Gelfport int `yaml:"gelf-port"`
  27. }
  28. //HealthCheck configuration for the healthcheck system
  29. type HealthCheck struct {
  30. Period int `yaml:"period"`
  31. }
  32. //BackgroundTasks configuration for the background tasks system
  33. type BackgroundTasks struct {
  34. Period int `yaml:"period"`
  35. DeleteOrphanedFiles bool `yaml:"deleteOrphanedFiles"`
  36. }
  37. //MongoDB configuration for the mongodb stoirage
  38. type MongoDB struct {
  39. Host string `yaml:"host"`
  40. Port int `yaml:"port"`
  41. Username string `yaml:"username"`
  42. Password string `yaml:"password"`
  43. AuthDB string `yaml:"authdb"`
  44. Database string `yaml:"database"`
  45. }