datastores

package
v0.0.0-...-cd80d89 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package datastores provides information and interaction with the datastore API resource in the Rackspace Database service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

List will list all available datastore types that instances can use.

func ListVersions

func ListVersions(client *gophercloud.ServiceClient, datastoreID string) pagination.Pager

ListVersions will list all of the available versions for a specified datastore type.

Types

type CreateOpts

type CreateOpts struct {
	// Name is a human-readable name of the datastore versions.
	Name string `json:"name,omitempty" required:"true"`

	// DatastoreName The name of a datastore.
	DatastoreName string `json:"datastore_name,omitempty" required:"true"`

	// DatastoreManager The type of datastore.
	DatastoreManager string `json:"datastore_manager,omitempty" required:"true"`

	// Image The ID of an image.
	//Either image or image_tags needs to be specified when creating datastore version.
	Image string `json:"image,omitempty"`

	// ImageTags Either image or image_tags needs to be specified when creating datastore version.
	// If the image ID is not provided, the image can be retrieved by the image tags. The tags are used for filtering as a whole rather than separately. Using image tags is more flexible than ID especially when a new guest image is uploaded to Glance, Trove can pick up the latest image automatically for creating instances.
	// When updating, only specifying image_tags could remove image from the datastore version.
	ImageTags []string `json:"image_tags,omitempty"`

	// The UUID of the project who owns the Subnet. Only administrative users
	// can specify a project UUID other than their own.
	ProjectID string `json:"project_id,omitempty"`

	// Active Whether the database version is enabled.
	Active bool `json:"active,omitempty" required:"true"`

	// Default When true this datastore version is created as the default in the datastore. If not specified, for creating, default is false, for updating, it’s ignored.
	Default bool `json:"default,omitempty"`

	// Version The version number for the database. In container based trove instance deployment, the version number is the same as the container image tag, e.g. for MySQL, a valid version number is 5.7.30
	Version string `json:"version,omitempty"`
}

CreateOpts represents the attributes used when creating a new subnet.

func (CreateOpts) ToDataStoreVersionCreateMap

func (opts CreateOpts) ToDataStoreVersionCreateMap() (map[string]interface{}, error)

ToDataStoreVersionCreateMap builds a request body from CreateOpts.

type CreateOptsBuilder

type CreateOptsBuilder interface {
	ToDataStoreVersionCreateMap() (map[string]interface{}, error)
}

CreateOptsBuilder allows extensions to add additional parameters to the List request.

type CreateResult

type CreateResult struct {
	// contains filtered or unexported fields
}

CreateResult represents the result of a create operation. Call its Extract method to interpret it as a Subnet.

func Create

Create Admin only API. Register a datastore version, the datastore is created automatically if it doesn’t exist. It’s allowed to create datastore versions with the same name but different version numbers, or vice versa.

type Datastore

type Datastore struct {
	DefaultVersion string `json:"default_version"`
	ID             string
	Links          []gophercloud.Link
	Name           string
	Versions       []Version
}

Datastore represents a Datastore API resource.

func ExtractDatastores

func ExtractDatastores(r pagination.Page) ([]Datastore, error)

ExtractDatastores retrieves a slice of datastore structs from a paginated collection.

type DatastorePage

type DatastorePage struct {
	pagination.SinglePageBase
}

DatastorePage represents a page of datastore resources.

func (DatastorePage) IsEmpty

func (r DatastorePage) IsEmpty() (bool, error)

IsEmpty indicates whether a Datastore collection is empty.

type DatastorePartial

type DatastorePartial struct {
	Version   string
	Type      string
	VersionID string `json:"version_id"`
}

DatastorePartial is a meta structure which is used in various API responses. It is a lightweight and truncated version of a full Datastore resource, offering details of the Version, Type and VersionID only.

type DeleteResult

type DeleteResult struct {
	gophercloud.ErrResult
}

DeleteResult represents the result of a delete operation. Call its ExtractErr method to determine if the request succeeded or failed.

func Delete

func Delete(c *gophercloud.ServiceClient, id string) (r DeleteResult)

Delete accepts a unique ID and deletes the subnet associated with it.

type GetResult

type GetResult struct {
	gophercloud.Result
}

GetResult represents the result of a Get operation.

func Get

func Get(client *gophercloud.ServiceClient, datastoreID string) (r GetResult)

Get will retrieve the details of a specified datastore type.

func (GetResult) Extract

func (r GetResult) Extract() (*Datastore, error)

Extract retrieves a single Datastore struct from an operation result.

type GetVersionResult

type GetVersionResult struct {
	gophercloud.Result
}

GetVersionResult represents the result of getting a version.

func GetVersion

func GetVersion(client *gophercloud.ServiceClient, datastoreID, versionID string) (r GetVersionResult)

GetVersion will retrieve the details of a specified datastore version.

func (GetVersionResult) Extract

func (r GetVersionResult) Extract() (*Version, error)

Extract retrieves a single Version struct from an operation result.

type Version

type Version struct {
	ID    string
	Links []gophercloud.Link
	Name  string
}

Version represents a version API resource. Multiple versions belong to a Datastore.

func ExtractVersions

func ExtractVersions(r pagination.Page) ([]Version, error)

ExtractVersions retrieves a slice of versions from a paginated collection.

type VersionPage

type VersionPage struct {
	pagination.SinglePageBase
}

VersionPage represents a page of version resources.

func (VersionPage) IsEmpty

func (r VersionPage) IsEmpty() (bool, error)

IsEmpty indicates whether a collection of version resources is empty.

Directories

Path Synopsis
db_datastores_v1
db_datastores_v1

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL