Esempio n. 1
0
File: ssd.go Progetto: lopaka/rsc
// New returns a Self-Service catalog API client.
// It makes a test API request and returns an error if authentication fails.
func New(h string, a rsapi.Authenticator) *API {
	api := rsapi.New(h, a)
	api.Metadata = GenMetadata
	ssAPI := API{API: api}
	return &ssAPI
}
Esempio n. 2
0
File: cm15.go Progetto: lopaka/rsc
// New returns a API 1.5 client.
// It makes a test request to API 1.5 and returns an error if authentication fails.
// host may be blank in which case client attempts to resolve it using auth.
func New(host string, auth rsapi.Authenticator) *API {
	return fromAPI(rsapi.New(host, auth))
}
Esempio n. 3
0
File: ss.go Progetto: dylanmei/rsc
// New returns a Self-Service API client.
func New(h string, a rsapi.Authenticator) *Api {
	api := rsapi.New(h, a)
	setupMetadata()
	api.Metadata = GenMetadata
	return &Api{Api: api}
}
Esempio n. 4
0
File: ssm.go Progetto: dylanmei/rsc
// New returns a Self-Service catalog API client.
// It makes a test API request and returns an error if authentication fails.
func New(h string, a rsapi.Authenticator) *Api {
	api := rsapi.New(h, a)
	api.Metadata = GenMetadata
	ssApi := Api{Api: api}
	return &ssApi
}