func MakeAPIKeyKeystoneClient(url string, username string, apiKey string) *KeystoneClient { return &KeystoneClient{ client: gorax.MakeRestClient(url), username: username, apiKey: apiKey, } }
func MakePasswordKeystoneClient(url string, username string, password string) *KeystoneClient { return &KeystoneClient{ client: gorax.MakeRestClient(url), username: username, password: password, } }
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 }
// 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 }