Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var StandardApiPropertyNameOfGetAllResponse = "values"
Functions ¶
func GetV2ID ¶
GetV2ID returns the ID of APIs in v2 - replacing deprecated APIs with their new version and dropping the -v2 marker from APIs introducing the breaking change of handling non-unique-names. This is used in v1 -> v2 conversion
func RemoveDisabled ¶ added in v2.10.1
RemoveDisabled filter every endpoint for which all of required featureflags.FeatureFlag aren't set
Types ¶
type API ¶
type API struct {
ID string
//URLPath defines default path
URLPath string
PropertyNameOfGetAllResponse string
// SingleConfiguration are those APIs that configure an environment global setting.
// Such settings require additional handling and can't be deleted.
SingleConfiguration bool
// NonUniqueName name APIs are those APIs that don't work with an environment wide unique ID.
// For such APIs, the name attribute can't be used as a ID (Monaco default behavior), hence
// such APIs require additional handling.
NonUniqueName bool
DeprecatedBy string
// SkipDownload indicates whether an API should be downloaded or not.
//
// Some APIs are not re-uploadable by design, either as they require hidden credentials,
// or if they require a special format, e.g. a zip file.
//
// Those configs include all configs handling credentials, as well as the extension-API.
SkipDownload bool
// TweakResponseFunc can be optionally registered to add custom code that changes the
// payload of the downloaded api content (e.g. to exclude unwanted/unnecessary fields)
TweakResponseFunc func(map[string]any)
// IsSubPathApi indicates whenever an API is a sub-path API.
SubPathAPI bool
// Parent is the parent API ID which is requred to download all possible values for sub-path apis.
// e.g. key-user-actions that are bound to applications
Parent string
// RequireAllFF lists all feature flags that needs to be enabled in order to utilize this API
RequireAllFF []featureflags.FeatureFlag
}
API structure present definition of config endpoints
func (API) IsStandardAPI ¶
type APIs ¶
APIs is a collection of API
func NewAPIs ¶
func NewAPIs() APIs
NewAPIs returns collection of predefined API to work with Dynatrace
func NewV1APIs ¶
func NewV1APIs() APIs
NewV1APIs returns collection of predefined API to work with Dynatrace Deprecated: Please use NewAPIs. This one is legacy and is used only to convert old to new stype of
func (APIs) GetApiNameLookup ¶
type Filter ¶
Filter return true iff specific api needs to be filtered/ removed from list
func RetainByName ¶
RetainByName creates a Filter that leaves the API in the map if API.ID is part of the provided list. If the provided list is empty, a no-op filter is returned.