コード例 #1
0
ファイル: client.go プロジェクト: jyidiego/gorax
func MakeAPIKeyKeystoneClient(url string, username string, apiKey string) *KeystoneClient {
	return &KeystoneClient{
		client:   gorax.MakeRestClient(url),
		username: username,
		apiKey:   apiKey,
	}
}
コード例 #2
0
ファイル: client.go プロジェクト: jyidiego/gorax
func MakePasswordKeystoneClient(url string, username string, password string) *KeystoneClient {
	return &KeystoneClient{
		client:   gorax.MakeRestClient(url),
		username: username,
		password: password,
	}
}
コード例 #3
0
ファイル: client.go プロジェクト: racker/gorax
func MakeAPIKeyMonitoringClient(url string, authurl string, username string, apiKey string) *MonitoringClient {
	m := &MonitoringClient{
		client: gorax.MakeRestClient(url),
	}
	m.client.RequestMiddlewares = []gorax.RequestMiddleware{
		identity.MakeKeystoneAPIKeyMiddleware(authurl, username, apiKey),
	}
	return m
}
コード例 #4
0
ファイル: client.go プロジェクト: racker/gorax
// MakePasswordMonitoringClient creates an object representing the monitoring client, with username/password authentication.
func MakePasswordMonitoringClient(url string, authurl string, username string, password string) *MonitoringClient {
	m := &MonitoringClient{
		client: gorax.MakeRestClient(url),
	}
	m.client.RequestMiddlewares = []gorax.RequestMiddleware{
		identity.MakeKeystonePasswordMiddleware(authurl, username, password),
	}
	return m
}