datastore.go 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. package datastore
  2. import (
  3. "time"
  4. )
  5. // Datastore describes an outbound datastores response entry
  6. type Datastore struct {
  7. // Name is the name of the datastore
  8. Name string `json:"name"`
  9. // Type is the type of the datastore
  10. Type string `json:"type"`
  11. // Engine is the engine of the datastore
  12. Engine string `json:"engine,omitempty"`
  13. // Status is the status of the datastore
  14. Status string `json:"status"`
  15. // CreatedAtUTC is the time the datastore was created in UTC
  16. CreatedAtUTC time.Time `json:"created_at"`
  17. // CloudProvider is the cloud provider associated with the datastore
  18. CloudProvider string `json:"cloud_provider"`
  19. // CloudProviderCredentialIdentifier is the cloud provider credential identifier associated with the datastore
  20. CloudProviderCredentialIdentifier string `json:"cloud_provider_credential_identifier"`
  21. // Credential is the credential used for connecting to the datastore
  22. Credential Credential `json:"credential"`
  23. // ConnectedClusterIds is a list of connected cluster ids
  24. ConnectedClusterIds []uint `json:"connected_cluster_ids,omitempty"`
  25. // OnManagementCluster is a flag indicating whether the datastore is on the management cluster
  26. OnManagementCluster bool `json:"on_management_cluster"`
  27. }
  28. // Credential has all information about connecting to a datastore
  29. type Credential struct {
  30. Host string `json:"host"`
  31. Port int `json:"port"`
  32. Username string `json:"username"`
  33. Password string `json:"password"`
  34. DatabaseName string `json:"database_name"`
  35. }