cache_models.go 686 B

123456789101112131415161718192021222324252627
  1. package models
  2. type Cache struct {
  3. ConnectInfo
  4. SystemMetaInfo
  5. }
  6. // 定义结构体
  7. type ConnectInfo struct {
  8. Id string `json:"id" toml:"id"`
  9. Ssh SshInfo `json:"ssh_info" toml:"server"`
  10. Db DbInfo `json:"db_info" toml:"db"`
  11. }
  12. type SshInfo struct {
  13. Username string `json:"username" toml:"ssh_username"`
  14. Password string `json:"password" toml:"ssh_password"`
  15. Host string `json:"host" toml:"ssh_ip"`
  16. Port string `json:"port" toml:"ssh_port"`
  17. }
  18. type DbInfo struct {
  19. User string `json:"user" toml:"db_user"`
  20. Password string `json:"password" toml:"db_password"`
  21. Database string `json:"database" toml:"db_database"`
  22. Port string `json:"port" toml:"db_port"`
  23. }