databases

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List(client *gophercloud.ServiceClient, id string, dbmsType string) pagination.Pager

List performs request to list databases

Types

type BatchCreateOpts

type BatchCreateOpts struct {
	Databases []CreateOpts `json:"databases"`
}

BatchCreateOpts is used to send request to create databases

func (*BatchCreateOpts) Map

func (opts *BatchCreateOpts) Map() (map[string]interface{}, error)

Map converts opts to a map (for a request body)

type CreateOpts

type CreateOpts struct {
	Name    string `json:"name" required:"true"`
	CharSet string `json:"character_set,omitempty"`
	Collate string `json:"collate,omitempty"`
}

CreateOpts represents parameters of creation of database

type CreateOptsBuilder

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

type CreateResult

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

CreateResult represents result of database create

func Create

func Create(client *gophercloud.ServiceClient, id string, opts CreateOptsBuilder, dbmsType string) (r CreateResult)

Create performs request to create database

type Database

type Database struct {
	// Specifies the name of the MySQL database.
	Name string

	// Set of symbols and encodings. The default character set is utf8.
	CharSet string

	// Set of rules for comparing characters in a character set. The default
	// value for collate is utf8_general_ci.
	Collate string
}

Database represents a Database API resource.

func ExtractDatabases

func ExtractDatabases(page pagination.Page) ([]Database, error)

ExtractDatabases will convert a generic pagination struct into a more relevant slice of DB structs.

type DeleteResult

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

DeleteResult represents result of database delete

func Delete

func Delete(client *gophercloud.ServiceClient, id string, dbName string, dbmsType string, force bool) (r DeleteResult)

Delete performs request to delete database

type Page

type Page struct {
	pagination.LinkedPageBase
}

Custom type implementation of DB Page

func (Page) IsEmpty

func (page Page) IsEmpty() (bool, error)

IsEmpty checks to see whether the collection is empty.

func (Page) NextPageURL

func (page Page) NextPageURL() (string, error)

NextPageURL will retrieve the next page URL.

Jump to

Keyboard shortcuts

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