Versions in this module Expand all Collapse all v1 v1.0.7 Oct 29, 2015 Changes in this version + const STACK_TIME_FMT type AuthOptions + TokenID string v1.0.6 Sep 13, 2015 v1.0.5 Aug 24, 2015 v1.0.4 Jul 29, 2015 v1.0.3 Jul 20, 2015 v1.0.2 Jul 14, 2015 v1.0.1 Jun 30, 2015 v1.0.0 Jun 18, 2015 v0 v0.6.2 Jun 17, 2015 v0.6.1 Jun 15, 2015 v0.5.4 Jun 4, 2015 v0.5.3 May 28, 2015 v0.5.2 May 19, 2015 Changes in this version + const DefaultUserAgent + const RFC3339Milli + var ErrEndpointNotFound = errors.New("No suitable endpoint could be found in the service catalog.") + var ErrServiceNotFound = errors.New("No suitable service could be found in the service catalog.") + func BuildHeaders(opts interface{}) (map[string]string, error) + func BuildQueryString(opts interface{}) (*url.URL, error) + func DecodeHeader(from, to interface{}) error + func ExtractNextURL(links []Link) (string, error) + func IDSliceToQueryString(name string, ids []int) string + func IntToPointer(i int) *int + func IntWithinRange(val, min, max int) bool + func MaybeInt(original int) *int + func MaybeString(original string) *string + func NormalizeURL(url string) string + func WaitFor(timeout int, predicate func() (bool, error)) error type AuthOptions + APIKey string + DomainID string + DomainName string + IdentityEndpoint string + TenantID string + UserID string + type AuthResults interface + ExpiresAt func() (time.Time, error) + TokenID func() (string, error) + type Availability string + const AvailabilityAdmin + const AvailabilityInternal + const AvailabilityPublic + type EnabledState *bool + var Disabled EnabledState = &iFalse + var Enabled EnabledState = &iTrue + type EndpointLocator func(EndpointOpts) (string, error) + type EndpointOpts struct + Availability Availability + Name string + Region string + Type string + func (eo *EndpointOpts) ApplyDefaults(t string) + type ErrResult struct + func (r ErrResult) ExtractErr() error + type HeaderResult struct + func (hr HeaderResult) ExtractHeader() (http.Header, error) + type ProviderClient struct + EndpointLocator EndpointLocator + HTTPClient http.Client + IdentityBase string + IdentityEndpoint string + ReauthFunc func() error + TokenID string + UserAgent UserAgent + func (client *ProviderClient) AuthenticatedHeaders() map[string]string + func (client *ProviderClient) Delete(url string, opts *RequestOpts) (*http.Response, error) + func (client *ProviderClient) Get(url string, JSONResponse *interface{}, opts *RequestOpts) (*http.Response, error) + func (client *ProviderClient) Post(url string, JSONBody interface{}, JSONResponse *interface{}, opts *RequestOpts) (*http.Response, error) + func (client *ProviderClient) Put(url string, JSONBody interface{}, JSONResponse *interface{}, opts *RequestOpts) (*http.Response, error) + func (client *ProviderClient) Request(method, url string, options RequestOpts) (*http.Response, error) + type RequestOpts struct + JSONBody interface{} + JSONResponse interface{} + MoreHeaders map[string]string + OkCodes []int + RawBody io.Reader + type Result struct + Body interface{} + Err error + Header http.Header + func (r Result) PrettyPrintJSON() string + type ServiceClient struct + Endpoint string + ResourceBase string + func (client *ServiceClient) ResourceBaseURL() string + func (client *ServiceClient) ServiceURL(parts ...string) string + type UnexpectedResponseCodeError struct + Actual int + Body []byte + Expected []int + Method string + URL string + func (err *UnexpectedResponseCodeError) Error() string + type UserAgent struct + func (ua *UserAgent) Join() string + func (ua *UserAgent) Prepend(s ...string) v0.0.1 Nov 5, 2014 Changes in this version + const InternalURL + const PublicURL + var ErrConfiguration = fmt.Errorf("Missing or incomplete configuration") + var ErrCredentials = fmt.Errorf("Missing or incomplete credentials") + var ErrError = fmt.Errorf(...) + var ErrNotImplemented = fmt.Errorf("Not implemented") + var ErrProvider = fmt.Errorf("Missing or incorrect provider") + var OpenstackApi = map[string]interface + var RackspaceApi = map[string]interface + var WarnUnauthoritative = fmt.Errorf("Unauthoritative data") + func ActualResponseCode(e error) (int, error) + type Access struct + ServiceCatalog []CatalogEntry + Token Token + User User + func Authenticate(provider string, options AuthOptions) (*Access, error) + func (a *Access) AuthToken() string + func (a *Access) FirstEndpointUrlByCriteria(ac ApiCriteria) string + func (a *Access) Reauthenticate() error + func (a *Access) Revoke(tok string) error + func (a *Access) V2ServiceCatalog() []CatalogEntry + type AccessProvider interface + AuthToken func() string + FirstEndpointUrlByCriteria func(ApiCriteria) string + Reauthenticate func() error + Revoke func(string) error + type AddressSet struct + Private []VersionedAddress + Public []VersionedAddress + type ApiCriteria struct + IgnoreEnvVars bool + Name string + Region string + Type string + UrlChoice int + VersionId string + func PopulateApi(variant string) (ApiCriteria, error) + type ApiKeyCredentials struct + ApiKey string + Username string + type Auth struct + ApiKeyCredentials *ApiKeyCredentials + PasswordCredentials *PasswordCredentials + TenantId string + TenantName string + type AuthContainer struct + Auth Auth + type AuthError struct + StatusCode int + func (ae *AuthError) Error() string + type AuthOptions struct + AllowReauth bool + ApiKey string + Password string + TenantId string + TenantName string + Username string + type CatalogEntry struct + Endpoints []EntryEndpoint + Name string + Type string + type CloudServersProvider interface + AssociateFloatingIp func(serverId string, ip FloatingIp) error + ConfirmResize func(id string) error + CreateDefaultSGRule func(SGRule) (*SGRule, error) + CreateFloatingIp func(pool string) (FloatingIp, error) + CreateImage func(id string, ci CreateImage) (string, error) + CreateKeyPair func(nkp NewKeyPair) (KeyPair, error) + CreateSecurityGroup func(desired SecurityGroup) (*SecurityGroup, error) + CreateServer func(ns NewServer) (*NewServer, error) + DeleteFloatingIp func(ip FloatingIp) error + DeleteImageById func(id string) error + DeleteKeyPair func(name string) error + DeleteSecurityGroupById func(id int) error + DeleteServerById func(id string) error + GetSGRule func(string) (*SGRule, error) + ImageById func(id string) (*Image, error) + ListAddresses func(id string) (AddressSet, error) + ListAddressesByNetwork func(id, networkLabel string) (NetworkAddress, error) + ListDefaultSGRules func() ([]SGRule, error) + ListFlavors func() ([]Flavor, error) + ListFloatingIps func() ([]FloatingIp, error) + ListImages func() ([]Image, error) + ListKeyPairs func() ([]KeyPair, error) + ListSecurityGroups func() ([]SecurityGroup, error) + ListSecurityGroupsByServerId func(id string) ([]SecurityGroup, error) + ListServers func() ([]Server, error) + ListServersByFilter func(filter url.Values) ([]Server, error) + ListServersLinksOnly func() ([]Server, error) + RebootServer func(id string, hard bool) error + RebuildServer func(id string, ns NewServer) (*Server, error) + RescueServer func(id string) (string, error) + ResizeServer func(id, newName, newFlavor, newDiskConfig string) error + RevertResize func(id string) error + SecurityGroupById func(id int) (*SecurityGroup, error) + ServerById func(id string) (*Server, error) + SetAdminPassword func(id string, pw string) error + ShowKeyPair func(name string) (KeyPair, error) + UnrescueServer func(id string) error + UpdateServer func(id string, newValues NewServerSettings) (*Server, error) + func ServersApi(acc AccessProvider, criteria ApiCriteria) (CloudServersProvider, error) + type Context struct + func TestContext() *Context + func (c *Context) Authenticate(provider string, options AuthOptions) (*Access, error) + func (c *Context) ProviderByName(name string) (p Provider, err error) + func (c *Context) RegisterProvider(name string, p Provider) error + func (c *Context) ResponseWithReauth(ap AccessProvider, f func() (*perigee.Response, error)) (*perigee.Response, error) + func (c *Context) ServersApi(provider AccessProvider, criteria ApiCriteria) (CloudServersProvider, error) + func (c *Context) UseCustomClient(hc *http.Client) *Context + func (c *Context) WithProvider(name string, p Provider) *Context + func (c *Context) WithReauth(ap AccessProvider, f func() error) error + func (c *Context) WithReauthHandler(f ReauthHandlerFunc) *Context + type CreateImage struct + Metadata map[string]string + Name string + type EntryEndpoint struct + InternalURL string + PublicURL string + Region string + TenantId string + VersionId string + VersionInfo string + VersionList string + func FindFirstEndpointByCriteria(entries []CatalogEntry, ac ApiCriteria) EntryEndpoint + type FileConfig struct + Contents string + Path string + type Flavor struct + Disk int + Id string + Links []Link + Name string + OsFlvDisabled bool + Ram int + RxTxFactor float64 + Swap int + VCpus int + type FlavorLink struct + Id string + Links []Link + type FloatingIp struct + FixedIp string + Id int + InstanceId string + Ip string + Pool string + type Image struct + Created string + Id string + Links []Link + MinDisk int + MinRam int + Name string + OsDcfDiskConfig string + Progress int + Status string + Updated string + type ImageLink struct + Id string + Links []Link + type KeyPair struct + FingerPrint string + Name string + PrivateKey string + PublicKey string + UserID string + type Link struct + Href string + Rel string + Type string + type NetworkAddress map[string][]VersionedAddress + type NetworkConfig struct + Uuid string + type NewKeyPair struct + Name string + PublicKey string + type NewServer struct + AdminPass string + ConfigDrive bool + FlavorRef string + Id string + ImageRef string + KeyPairName string + Links []Link + Metadata map[string]string + Name string + Networks []NetworkConfig + OsDcfDiskConfig string + Personality []FileConfig + SecurityGroup []map[string]interface{} + UserData string + type NewServerSettings struct + AccessIPv4 string + AccessIPv6 string + Name string + type PasswordCredentials struct + Password string + Username string + type Provider struct + AuthEndpoint string + type RaxBandwidth struct + AuditPeriodEnd string + AuditPeriodStart string + BandwidthInbound int64 + BandwidthOutbound int64 + Interface string + type ReauthHandlerFunc func(AccessProvider) error + type ResizeRequest struct + DiskConfig string + FlavorRef string + Name string + type Role struct + Description string + Id string + Name string + type SGRule struct + FromPort int + Id int + IpProtocol string + IpRange map[string]interface{} + ToPort int + type SecurityGroup struct + Description string + Id int + Name string + Rules []SGRule + TenantId string + type Server struct + AccessIPv4 string + AccessIPv6 string + Addresses AddressSet + Created string + Flavor FlavorLink + HostId string + Id string + Image ImageLink + Links []Link + Metadata map[string]string + Name string + OsDcfDiskConfig string + OsExtStsPowerState int + OsExtStsTaskState string + OsExtStsVmState string + Progress int + RawAddresses map[string]interface{} + RaxBandwidth []RaxBandwidth + Status string + TenantId string + Updated string + UserId string + func (s *Server) AllAddressPools() (map[string][]VersionedAddress, error) + type ServiceCatalogerForIdentityV2 interface + V2ServiceCatalog func() []CatalogEntry + type Tenant struct + Id string + Name string + type Token struct + Expires string + Id string + Tenant Tenant + type User struct + Id string + Name string + Roles []Role + XRaxDefaultRegion string + type VersionedAddress struct + Addr string + Version int