config.go 644 B

12345678910111213141516171819202122232425262728
  1. package system_model
  2. type Config struct {
  3. Mysql *Mysql `yaml:"mysql"`
  4. Redis *Redis `yaml:"redis"`
  5. Server *Server `yaml:"server"`
  6. }
  7. type Mysql struct {
  8. Host string `yaml:"host"`
  9. Port int32 `yaml:"port"`
  10. User string `yaml:"user"`
  11. Password string `yaml:"password"`
  12. Database string `yaml:"database"`
  13. }
  14. type Redis struct {
  15. Host string `yaml:"host"`
  16. Port int32 `yaml:"port"`
  17. Auth string `yaml:"auth"`
  18. Database int32 `yaml:"database"`
  19. }
  20. type Session struct {
  21. TTL int32 `yaml:"ttl"`
  22. }
  23. type Server struct {
  24. Host string `yaml:"host"`
  25. Port int32 `yaml:"port"`
  26. Session *Session `yaml:"session"`
  27. }