users

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: MPL-2.0 Imports: 6 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 get list of database users

Types

type BatchCreateOpts

type BatchCreateOpts struct {
	Users []CreateOpts `json:"users"`
}

BatchCreateOpts is used to send request to create database users

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"`
	Password  string                 `json:"password" required:"true"`
	Databases []databases.CreateOpts `json:"databases,omitempty"`
	Host      string                 `json:"host,omitempty"`
}

CreateOpts represents parameters of creation of database user

type CreateResult

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

CreateResult represents result of database user create

func Create

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

Create performs request to create database user

type DeleteDatabaseResult

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

DeleteDatabaseResult represents result of database user delete

func DeleteDatabase

func DeleteDatabase(client *gophercloud.ServiceClient, id string, userName string, dbName string, dbmsType string) (r DeleteDatabaseResult)

DeleteDatabase performs request to delete database user

type DeleteResult

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

DeleteResult represents result of database user delete

func Delete

func Delete(client *gophercloud.ServiceClient, id string, userName string, dbmsType string) (r DeleteResult)

Delete performs request to delete database user

type OptsBuilder

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

type Page

type Page struct {
	pagination.LinkedPageBase
}

Custom type implementation of gophercloud/users.UserPage

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.

type UpdateDatabasesOpts

type UpdateDatabasesOpts struct {
	Databases []map[string]string `json:"databases"`
}

UpdateDatabasesOpts represents parameters of request to update users databases

func (*UpdateDatabasesOpts) Map

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

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

type UpdateDatabasesResult

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

UpdateDatabasesResult represents result of database user database update

func UpdateDatabases

func UpdateDatabases(client *gophercloud.ServiceClient, id string, name string, opts OptsBuilder, dbmsType string) (r UpdateDatabasesResult)

UpdateDatabases performs request to update database user databases

type UpdateOpts

type UpdateOpts struct {
	User struct {
		Name     string `json:"name,omitempty"`
		Password string `json:"password,omitempty"`
		Host     string `json:"host,omitempty"`
	} `json:"user"`
}

UpdateOpts represents parameters of update of database user

func (*UpdateOpts) Map

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

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

type UpdateResult

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

UpdateResult represents result of database user update

func Update

func Update(client *gophercloud.ServiceClient, id string, name string, opts OptsBuilder, dbmsType string) (r UpdateResult)

Update performs request to update database user

type User

type User struct {
	// The user name
	Name string

	// The user password
	Password string

	// The databases associated with this user
	Databases []databases.Database
}

User represents a database user

func ExtractUsers

func ExtractUsers(r pagination.Page) ([]User, error)

ExtractUsers will convert a generic pagination struct into a more relevant slice of User structs.

Jump to

Keyboard shortcuts

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