Пример #1
0
//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
}