datastore.go 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. package datastore
  2. import (
  3. "time"
  4. porterv1 "github.com/porter-dev/api-contracts/generated/go/porter/v1"
  5. "github.com/porter-dev/porter/api/server/handlers/environment_groups"
  6. )
  7. // Datastore describes an outbound datastores response entry
  8. type Datastore struct {
  9. // Name is the name of the datastore
  10. Name string `json:"name"`
  11. // Type is the type of the datastore
  12. Type string `json:"type"`
  13. // Engine is the engine of the datastore
  14. Engine string `json:"engine,omitempty"`
  15. // Env is the env group for the datastore
  16. Env environment_groups.EnvironmentGroupListItem `json:"env,omitempty"`
  17. // Metadata is a list of metadata objects for the datastore - TODO: remove this field, it is unnecessary
  18. Metadata []*porterv1.DatastoreMetadata `json:"metadata,omitempty"`
  19. // Status is the status of the datastore
  20. Status string `json:"status"`
  21. // CreatedAtUTC is the time the datastore was created in UTC
  22. CreatedAtUTC time.Time `json:"created_at"`
  23. // CloudProvider is the cloud provider associated with the datastore
  24. CloudProvider string `json:"cloud_provider"`
  25. // CloudProviderCredentialIdentifier is the cloud provider credential identifier associated with the datastore
  26. CloudProviderCredentialIdentifier string `json:"cloud_provider_credential_identifier"`
  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. }