~rogpeppe/goose/state-of-the-world

« back to all changes in this revision

Viewing changes to client/client.go

  • Committer: Ian Booth
  • Date: 2012-11-21 08:46:00 UTC
  • Revision ID: ian.booth@canonical.com-20121121084600-lvg630d6drwziis7
gofmt fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
)
31
31
 
32
32
type OpenStackClient struct {
33
 
 
34
33
        client *goosehttp.GooseHTTPClient
35
34
 
36
35
        creds *identity.Credentials
37
 
        auth identity.Authenticator
 
36
        auth  identity.Authenticator
38
37
 
39
38
        //TODO - store service urls by region.
40
39
        ServiceURLs map[string]string
47
46
        client := OpenStackClient{creds: creds}
48
47
        client.creds.URL = client.creds.URL + OS_API_TOKENS
49
48
        switch auth_method {
50
 
        default: panic(fmt.Errorf("Invalid identity authorisation method: %d", auth_method))
 
49
        default:
 
50
                panic(fmt.Errorf("Invalid identity authorisation method: %d", auth_method))
51
51
        case identity.AUTH_LEGACY:
52
52
                client.auth = &identity.Legacy{}
53
53
        case identity.AUTH_USERPASS: