vps.go 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. package models
  2. // OVHVPS represents the structure of a VPS from OVH API
  3. type OVHVPS struct {
  4. Cluster string `json:"cluster"`
  5. DisplayName string `json:"displayName"`
  6. IAM struct {
  7. DisplayName string `json:"displayName"`
  8. ID string `json:"id"`
  9. Tags map[string]string `json:"tags"`
  10. URN string `json:"urn"`
  11. } `json:"iam"`
  12. Keymap string `json:"keymap"`
  13. MemoryLimit int `json:"memoryLimit"`
  14. Model VPSModel `json:"model"`
  15. MonitoringIpBlocks []string `json:"monitoringIpBlocks"`
  16. Name string `json:"name"`
  17. NetbootMode string `json:"netbootMode"`
  18. OfferType string `json:"offerType"`
  19. SLAMonitoring bool `json:"slaMonitoring"`
  20. State string `json:"state"`
  21. VCore int `json:"vcore"`
  22. Zone string `json:"zone"`
  23. ZoneType string `json:"zoneType"`
  24. }
  25. // VPSModel represents the model details of an OVH VPS
  26. type VPSModel struct {
  27. AvailableOptions []string `json:"availableOptions"`
  28. Datacenter []string `json:"datacenter"`
  29. Disk int `json:"disk"`
  30. MaximumAdditionnalIp int `json:"maximumAdditionnalIp"`
  31. Memory int `json:"memory"`
  32. Name string `json:"name"`
  33. Offer string `json:"offer"`
  34. VCore int `json:"vcore"`
  35. Version string `json:"version"`
  36. }