cache_models.go 819 B

123456789101112131415161718192021222324252627282930313233
  1. package models
  2. type Cache struct {
  3. FileInfo FileMetaInfo
  4. Connect map[string]ConnectInfo
  5. System map[string]SystemMetaInfo
  6. }
  7. // 文件存储信息
  8. type FileMetaInfo struct {
  9. BaseFileName string
  10. }
  11. // 连接信息
  12. type ConnectInfo struct {
  13. // Id string `json:"id" toml:"id"`
  14. Ssh SshInfo `json:"ssh_info" toml:"db"`
  15. Db DbInfo `json:"db_info" toml:"ssh"`
  16. }
  17. type SshInfo struct {
  18. Username string `json:"username" toml:"ssh_username"`
  19. Password string `json:"password" toml:"ssh_password"`
  20. Host string `json:"host" toml:"ssh_ip"`
  21. Port string `json:"port" toml:"ssh_port"`
  22. }
  23. type DbInfo struct {
  24. User string `json:"user" toml:"db_user"`
  25. Password string `json:"password" toml:"db_password"`
  26. Database string `json:"database" toml:"db_database"`
  27. Port string `json:"port" toml:"db_port"`
  28. }