blob: ee02baf52cd06ca5590850c1aa9fc4e78fb5a27d [file] [log] [blame]
Samuel A. Falvo II2e2b8772013-07-04 15:40:15 -07001package gophercloud
2
3// AccessProvider instances encapsulate a Keystone authentication interface.
4type 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 IIbc0d54a2013-07-08 14:45:21 -070011
12 // TODO(sfalvo): get Token() to automatically renew the authentication token if it's near expiry.
13
14 // AuthToken provides a copy of the current authentication token for the user's credentials.
15 AuthToken() string
Samuel A. Falvo II2e2b8772013-07-04 15:40:15 -070016}
17
Samuel A. Falvo II1dd740a2013-07-08 15:48:40 -070018// CloudServersProvider instances encapsulate a Cloud Servers API, should one exist in the service catalog
Samuel A. Falvo II2e2b8772013-07-04 15:40:15 -070019// for your provider.
Samuel A. Falvo II1dd740a2013-07-08 15:48:40 -070020type CloudServersProvider interface {
Samuel A. Falvo II0a6e45a2013-07-11 17:00:41 -070021 // Servers
22
Samuel A. Falvo II2e2b8772013-07-04 15:40:15 -070023 ListServers() ([]Server, error)
Samuel A. Falvo II02f5e832013-07-10 13:52:27 -070024 ServerById(id string) (*Server, error)
Samuel A. Falvo II0a6e45a2013-07-11 17:00:41 -070025
26 // Images
27
28 ListImages() ([]Image, error)
Samuel A. Falvo II2e2b8772013-07-04 15:40:15 -070029}
Samuel A. Falvo II0a6e45a2013-07-11 17:00:41 -070030