Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NewHTTPClient ¶
func NewServiceClient ¶
func NewServiceClient(options *ServiceClientOptions) (*gophercloud.ServiceClient, error)
Types ¶
type CatalogService ¶
type CatalogService struct {
// contains filtered or unexported fields
}
func NewCatalogService ¶
func NewCatalogService(serviceClient *gophercloud.ServiceClient) (*CatalogService, error)
func (*CatalogService) GetCatalog ¶
func (cs *CatalogService) GetCatalog() (*tokens.ServiceCatalog, error)
GetCatalog - returns endpoints catalog from Keystone or cache.
func (*CatalogService) GetEndpoint ¶
func (cs *CatalogService) GetEndpoint(serviceType, regionName string) (tokens.Endpoint, error)
GetEndpoint - returns endpoint url from Keystone catalog for ServiceType in RegionName. ServiceType is type of service (for example: compute, storage, quota-manager), not their names (nova, cinder).
func (*CatalogService) GetEndpoints ¶
func (cs *CatalogService) GetEndpoints(serviceType string) ([]tokens.Endpoint, error)
GetEndpoints - returns endpoints from Keystone catalog for ServiceType from all regions.
type RequestOptions ¶
type RequestOptions struct { JSONBody interface{} OkCodes []int }
type RequestService ¶
type RequestService struct {
// contains filtered or unexported fields
}
func NewRequestService ¶
func NewRequestService(serviceClient *gophercloud.ServiceClient) *RequestService
func (*RequestService) Do ¶
func (s *RequestService) Do(method, url string, options *RequestOptions) (*ResponseResult, error)
type ResponseResult ¶
type ResponseResult struct { *http.Response // Err contains error that can be provided to a caller. Err error }
ResponseResult represents a result of a HTTP request. It embedded standard http.Response and adds a custom error description.
func (*ResponseResult) ExtractResult ¶
func (result *ResponseResult) ExtractResult(to interface{}) error
ExtractResult allows to provide an object into which ResponseResult body will be extracted.
type ServiceClientOptions ¶
type ServiceClientOptions struct { // The name of the domain in which the token will be issued. DomainName string // Credentials to auth with. Username string Password string // Optional field for setting project scope. ProjectID string // Optional field. The name of the domain where the user resides (Identity v3). UserDomainName string // Field for setting Identity endpoint. AuthURL string // Field for setting location for endpoints like ResellAPI or Keystone. AuthRegion string // Optional field. HTTPClient *http.Client // Optional field. UserAgent string }
Click to show internal directories.
Click to hide internal directories.