예제 #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
}