config.go 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. SecretFile string `yaml:"secretfile"`
  13. Logging Logging `yaml:"logging"`
  14. Backup Backup `yaml:"backup"`
  15. HealthCheck HealthCheck `yaml:"healthcheck"`
  16. MongoDB MongoDB `yaml: "mongodb"`
  17. }
  18. type Backup struct {
  19. Path string `yaml:"path"`
  20. Period string `yaml:"period"`
  21. }
  22. type Logging struct {
  23. Gelfurl string `yaml:"gelf-url"`
  24. Gelfport int `yaml:"gelf-port"`
  25. }
  26. type HealthCheck struct {
  27. Period int `yaml:"period"`
  28. }
  29. type MongoDB struct {
  30. Host string `yaml:"host"`
  31. Port int `yaml:"port"`
  32. Username string `yaml:"username"`
  33. Password string `yaml:"password"`
  34. AuthDB string `yaml:"authdb"`
  35. Database string `yaml:"database"`
  36. }