示例#1
0
文件: ssd.go 项目: 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
}
示例#2
0
文件: cm15.go 项目: 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))
}
示例#3
0
文件: ss.go 项目: 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}
}
示例#4
0
文件: ssm.go 项目: 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
}