Jamie Hannaford | 3c1796b | 2015-02-12 14:21:33 +0100 | [diff] [blame] | 1 | package users |
| 2 | |
| 3 | import ( |
| 4 | "github.com/rackspace/gophercloud" |
| 5 | os "github.com/rackspace/gophercloud/openstack/db/v1/users" |
| 6 | "github.com/rackspace/gophercloud/pagination" |
| 7 | ) |
| 8 | |
Jamie Hannaford | b0d267b | 2015-02-19 11:59:53 +0100 | [diff] [blame^] | 9 | // Create will create a new database user for the specified database instance. |
Jamie Hannaford | 3c1796b | 2015-02-12 14:21:33 +0100 | [diff] [blame] | 10 | func Create(client *gophercloud.ServiceClient, instanceID string, opts os.CreateOptsBuilder) os.CreateResult { |
| 11 | return os.Create(client, instanceID, opts) |
| 12 | } |
| 13 | |
Jamie Hannaford | b0d267b | 2015-02-19 11:59:53 +0100 | [diff] [blame^] | 14 | // List will list all available users for a specified database instance. |
Jamie Hannaford | 3c1796b | 2015-02-12 14:21:33 +0100 | [diff] [blame] | 15 | func List(client *gophercloud.ServiceClient, instanceID string) pagination.Pager { |
| 16 | return os.List(client, instanceID) |
| 17 | } |
| 18 | |
Jamie Hannaford | b0d267b | 2015-02-19 11:59:53 +0100 | [diff] [blame^] | 19 | // Delete will permanently remove a user from a specified database instance. |
Jamie Hannaford | 3c1796b | 2015-02-12 14:21:33 +0100 | [diff] [blame] | 20 | func Delete(client *gophercloud.ServiceClient, instanceID, userName string) os.DeleteResult { |
| 21 | return os.Delete(client, instanceID, userName) |
| 22 | } |