delete

package
v2.9.0-dev.507a93b0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllAutomations

func AllAutomations(ctx context.Context, c automationClient) []error

AllAutomations collects and deletes automations resources using the given automation client.

Parameters:

  • ctx (context.Context): The context in which the function operates.
  • c (automationClient): An implementation of the automationClient interface for performing automation-related operations.

Returns:

  • []error: A slice of errors encountered during the collection and deletion of automations.

func AllBuckets

func AllBuckets(ctx context.Context, c bucketClient) []error

AllBuckets collects and deletes objects of type "bucket" using the provided bucketClient.

Parameters:

  • ctx (context.Context): The context for the operation.
  • c (bucketClient): The bucketClient used for listing and deleting objects.

Returns:

  • []error: A slice of errors encountered during the operation. It may contain listing errors, deletion errors, or API errors.

func AllConfigs

func AllConfigs(ctx context.Context, client dtclient.ConfigClient, apis api.APIs) (errors []error)

AllConfigs collects and deletes classic API configuration objects using the provided ConfigClient.

Parameters:

  • ctx (context.Context): The context in which the function operates.
  • client (dtclient.ConfigClient): An implementation of the ConfigClient interface for managing configuration objects.
  • apis (api.APIs): A list of APIs for which configuration values need to be collected and deleted.

Returns:

  • []error: A slice of errors encountered during the collection and deletion of configuration values.

func AllSettingsObjects

func AllSettingsObjects(ctx context.Context, c dtclient.SettingsClient) []error

AllSettingsObjects collects and deletes settings objects using the provided SettingsClient.

Parameters:

  • ctx (context.Context): The context in which the function operates.
  • c (dtclient.SettingsClient): An implementation of the SettingsClient interface for managing settings objects.

Returns:

  • []error: A slice of errors encountered during the collection and deletion of settings objects.

func Configs

func Configs(ctx context.Context, clients ClientSet, apis api.APIs, automationResources map[string]config.AutomationResource, entriesToDelete DeleteEntries) []error

Configs removes all given entriesToDelete from the Dynatrace environment the given client connects to

Types

type ClientSet

type ClientSet struct {
	Classic    dtclient.Client
	Settings   dtclient.Client
	Automation automationClient
	Buckets    bucketClient
}

type DeleteEntries added in v2.8.1

type DeleteEntries = map[configurationType][]DeletePointer

DeleteEntries is a map of configuration type to slice of delete pointers

func LoadEntriesToDelete

func LoadEntriesToDelete(fs afero.Fs, deleteFile string) (DeleteEntries, []error)

type DeleteEntryParserError

type DeleteEntryParserError struct {
	Value  string `json:"value"`
	Index  int    `json:"index"`
	Reason string `json:"reason"`
}

func (DeleteEntryParserError) Error

func (e DeleteEntryParserError) Error() string

type DeletePointer

type DeletePointer struct {
	Project string
	Type    string

	//Identifier will either be the Name of a classic Config API object, or a configID for newer types like Settings
	Identifier string
}

DeletePointer contains all data needed to identify an object to be deleted from a Dynatrace environment. DeletePointer is similar but not fully equivalent to config.Coordinate as it may contain an Identifier that is either a Name or a ConfigID - only in case of a ConfigID is it actually equivalent to a Coordinate

func (DeletePointer) String added in v2.7.1

func (d DeletePointer) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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