api.go 638 B

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