예제 #1
0
파일: client.go 프로젝트: pdube/go-cloudca
//Create a CcaClient with a custom URL
func NewCcaClientWithURL(apiURL string, apiKey string) *CcaClient {
	apiClient := api.NewApiClient(apiURL, apiKey)
	ccaClient := CcaClient{
		apiURL:    apiURL,
		apiKey:    apiKey,
		apiClient: apiClient,
		Tasks:     services.NewTaskService(apiClient),
	}
	return &ccaClient
}
예제 #2
0
func NewCcaClientWithApiClient(apiClient api.ApiClient) *CcaClient {
	ccaClient := CcaClient{
		apiClient:          apiClient,
		Tasks:              services.NewTaskService(apiClient),
		Environments:       configuration.NewEnvironmentService(apiClient),
		Users:              configuration.NewUserService(apiClient),
		ServiceConnections: configuration.NewServiceConnectionService(apiClient),
		Organizations:      configuration.NewOrganizationService(apiClient),
	}
	return &ccaClient
}