Samuel A. Falvo II | 2e2b877 | 2013-07-04 15:40:15 -0700 | [diff] [blame] | 1 | package gophercloud |
| 2 | |
| 3 | // AccessProvider instances encapsulate a Keystone authentication interface. |
| 4 | type AccessProvider interface { |
| 5 | // FirstEndpointUrlByCriteria searches through the service catalog for the first |
| 6 | // matching entry endpoint fulfilling the provided criteria. If nothing found, |
| 7 | // return "". Otherwise, return either the public or internal URL for the |
| 8 | // endpoint, depending on both its existence and the setting of the ApiCriteria.UrlChoice |
| 9 | // field. |
| 10 | FirstEndpointUrlByCriteria(ApiCriteria) string |
Samuel A. Falvo II | bc0d54a | 2013-07-08 14:45:21 -0700 | [diff] [blame] | 11 | |
Samuel A. Falvo II | bc0d54a | 2013-07-08 14:45:21 -0700 | [diff] [blame] | 12 | // AuthToken provides a copy of the current authentication token for the user's credentials. |
Samuel A. Falvo II | 659e14b | 2013-07-16 12:04:54 -0700 | [diff] [blame] | 13 | // Note that AuthToken() will not automatically refresh an expired token. |
Samuel A. Falvo II | bc0d54a | 2013-07-08 14:45:21 -0700 | [diff] [blame] | 14 | AuthToken() string |
Samuel A. Falvo II | 659e14b | 2013-07-16 12:04:54 -0700 | [diff] [blame] | 15 | |
| 16 | // Revoke allows you to terminate any program's access to the OpenStack API by token ID. |
| 17 | Revoke(string) error |
Samuel A. Falvo II | 2e2b877 | 2013-07-04 15:40:15 -0700 | [diff] [blame] | 18 | } |
| 19 | |
Samuel A. Falvo II | 1dd740a | 2013-07-08 15:48:40 -0700 | [diff] [blame] | 20 | // CloudServersProvider instances encapsulate a Cloud Servers API, should one exist in the service catalog |
Samuel A. Falvo II | 2e2b877 | 2013-07-04 15:40:15 -0700 | [diff] [blame] | 21 | // for your provider. |
Samuel A. Falvo II | 1dd740a | 2013-07-08 15:48:40 -0700 | [diff] [blame] | 22 | type CloudServersProvider interface { |
Samuel A. Falvo II | 0a6e45a | 2013-07-11 17:00:41 -0700 | [diff] [blame] | 23 | // Servers |
| 24 | |
Samuel A. Falvo II | 2e2b877 | 2013-07-04 15:40:15 -0700 | [diff] [blame] | 25 | ListServers() ([]Server, error) |
Samuel A. Falvo II | 02f5e83 | 2013-07-10 13:52:27 -0700 | [diff] [blame] | 26 | ServerById(id string) (*Server, error) |
Samuel A. Falvo II | e91ff6d | 2013-07-11 15:46:10 -0700 | [diff] [blame] | 27 | CreateServer(ns NewServer) (*NewServer, error) |
Samuel A. Falvo II | 286e4de | 2013-07-12 11:33:31 -0700 | [diff] [blame] | 28 | DeleteServerById(id string) error |
Samuel A. Falvo II | 0a6e45a | 2013-07-11 17:00:41 -0700 | [diff] [blame] | 29 | |
| 30 | // Images |
| 31 | |
| 32 | ListImages() ([]Image, error) |
Samuel A. Falvo II | bc3f10f | 2013-07-11 17:13:24 -0700 | [diff] [blame] | 33 | |
| 34 | // Flavors |
| 35 | |
| 36 | ListFlavors() ([]Flavor, error) |
Samuel A. Falvo II | 2e2b877 | 2013-07-04 15:40:15 -0700 | [diff] [blame] | 37 | } |
Samuel A. Falvo II | 0a6e45a | 2013-07-11 17:00:41 -0700 | [diff] [blame] | 38 | |