classic

package
v0.0.0-rc.000-test-cos... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package downloader is responsible for downloading configurations from Dynatrace.

The process looks like this:

result = array[api, templates]

for each api in apis:
	to_download = array[api, list]
	if api.isSingletonApi:
		to_download += (api, mock_download_value(api)) # Since we don't need a list-call, we can simply add this value to the array.
	else
		list <- dynatrace.ListAll(api) # List query for all configs of api
		list <- filter(list) # Remove unwanted values we already know we don't want to download
		to_download += (api, list)
	fi

	templates = array[]
	for each value in 'to_download':
		config <- dynatrace.Get(value)
		if skip(config) next # skip configs like presets

		template <- extract_and_sanitize(config)

		templates += template
	end_for

	results += (api, templates)
end_for

return result

```

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithAPIContentFilters

func WithAPIContentFilters(apiFilters map[string]contentFilter) func(*Downloader)

WithAPIContentFilters sets the api content filters for the Downloader - these will be used in addition to base API filtering

func WithAPIs

func WithAPIs(apis api.APIs) func(*Downloader)

Types

type Downloader

type Downloader struct {
	// contains filtered or unexported fields
}

Downloader is responsible for downloading classic Dynatrace APIs

func NewDownloader

func NewDownloader(client dtclient.Client, opts ...func(*Downloader)) *Downloader

NewDownloader creates a new Downloader

func (*Downloader) Download

func (d *Downloader) Download(projectName string, specificAPIs ...config.ClassicApiType) (project.ConfigsPerType, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL