datastore.go 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. // B64Proto is the base64 encoded datastore proto. Note that this is only populated for datastores created with the new cloud contract flow
  28. B64Proto string `json:"b64_proto"`
  29. }
  30. // Credential has all information about connecting to a datastore
  31. type Credential struct {
  32. Host string `json:"host"`
  33. Port int `json:"port"`
  34. Username string `json:"username"`
  35. Password string `json:"password"`
  36. DatabaseName string `json:"database_name"`
  37. }