blob: 0bb4c8ccbeddc5dbc47b79765909b9b6daad8e68 [file] [log] [blame]
Jamie Hannaford3c1796b2015-02-12 14:21:33 +01001package users
2
3import (
4 "github.com/rackspace/gophercloud"
5 os "github.com/rackspace/gophercloud/openstack/db/v1/users"
6 "github.com/rackspace/gophercloud/pagination"
7)
8
Jamie Hannafordb0d267b2015-02-19 11:59:53 +01009// Create will create a new database user for the specified database instance.
Jamie Hannaford3c1796b2015-02-12 14:21:33 +010010func Create(client *gophercloud.ServiceClient, instanceID string, opts os.CreateOptsBuilder) os.CreateResult {
11 return os.Create(client, instanceID, opts)
12}
13
Jamie Hannafordb0d267b2015-02-19 11:59:53 +010014// List will list all available users for a specified database instance.
Jamie Hannaford3c1796b2015-02-12 14:21:33 +010015func List(client *gophercloud.ServiceClient, instanceID string) pagination.Pager {
16 return os.List(client, instanceID)
17}
18
Jamie Hannafordb0d267b2015-02-19 11:59:53 +010019// Delete will permanently remove a user from a specified database instance.
Jamie Hannaford3c1796b2015-02-12 14:21:33 +010020func Delete(client *gophercloud.ServiceClient, instanceID, userName string) os.DeleteResult {
21 return os.Delete(client, instanceID, userName)
22}