manifest

package
v2.26.2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package manifest and its subpackages contains all information regarding the in-memory definitions of manifests, as well as the persistence layer, loading, and writing. To load use the [loader] package, to write use the [writer] package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account added in v2.9.2

type Account struct {
	// Name is the account-name that is used to resolve user-defined lookup names.
	Name string

	// AccountUUID is the Dynatrace-account UUID
	AccountUUID uuid.UUID

	// ApiUrl is the target URL of this account.
	// It is used when the default account management url is not the target account management url.
	ApiUrl *URLDefinition

	// OAuth holds the OAuth credentials used to access the account API.
	OAuth OAuth
}

Account holds all necessary information to access the account API

type Auth

type Auth struct {
	AccessToken   *AuthSecret
	OAuth         *OAuth
	PlatformToken *AuthSecret
}

func (Auth) HasPlatformCredentials added in v2.24.0

func (a Auth) HasPlatformCredentials() bool

type AuthSecret

type AuthSecret struct {
	// Name is the name of the environment-variable of the token.
	// It is used in download to store the name of the OAuth token in the new created manifest.
	Name string

	// Value holds the actual token value for the given [AuthSecret.Name].
	Value secret.MaskedString
}

AuthSecret contains a resolved secret value. It is used for the access token, ClientID, and ClientSecret.

type EnvironmentDefinition

type EnvironmentDefinition struct {
	Name  string
	Group string
	URL   URLDefinition
	Auth  Auth
}

EnvironmentDefinition holds all information about a Dynatrace environment

func (EnvironmentDefinition) HasPlatformCredentials added in v2.24.0

func (e EnvironmentDefinition) HasPlatformCredentials() bool

type EnvironmentDefinitionsByName added in v2.24.0

type EnvironmentDefinitionsByName map[string]EnvironmentDefinition

EnvironmentDefinitionsByName is a map of environment-name -> EnvironmentDefinition

func (EnvironmentDefinitionsByName) Names added in v2.24.0

Names returns the slice of environment names

type Environments

type Environments struct {
	// SelectedEnvironments is the subset of environments from the manifest selected for use.
	SelectedEnvironments EnvironmentDefinitionsByName

	// AllEnvironmentNames is the set of all environment names defined in the manifest.
	AllEnvironmentNames map[string]struct{}

	// AllGroupNames is the set of all group names defined in the manifest.
	AllGroupNames map[string]struct{}
}

type Manifest

type Manifest struct {
	// Projects defined in the manifest, split by project-name
	Projects ProjectDefinitionByProjectID

	// Environments defined in the manifest.
	Environments Environments

	// Accounts holds all accounts defined in the manifest. Key is the user-defined account name.
	Accounts map[string]Account
}

Manifest is the central component. It holds all information that is needed to deploy projects.

type OAuth

type OAuth struct {
	ClientID      AuthSecret
	ClientSecret  AuthSecret
	TokenEndpoint *URLDefinition
}

func (OAuth) GetTokenEndpointValue

func (o OAuth) GetTokenEndpointValue() string

GetTokenEndpointValue returns the defined token endpoint or the default token endpoint if none is defined

type ProjectDefinition

type ProjectDefinition struct {
	Name  string
	Group string
	Path  string
}

func (ProjectDefinition) String

func (p ProjectDefinition) String() string

type ProjectDefinitionByProjectID

type ProjectDefinitionByProjectID map[string]ProjectDefinition

type URLDefinition

type URLDefinition struct {
	// Type defines whether the [URLDefinition.Value] is loaded from an env var, or directly.
	Type URLType

	// Name is the name of the environment-variable of the token. It only has a value if [URLDefinition.Type] is "[EnvironmentURLType]"
	Name string

	// Value is the resolved value of the URL.
	// It is resolved during manifest reading.
	Value string
}

URLDefinition holds the value and origin of an environment-url.

type URLType

type URLType int

URLType describes from where the url is loaded. Possible values are EnvironmentURLType and ValueURLType. ValueURLType is the default value.

const (
	// ValueURLType describes that the url has been loaded directly as a value
	ValueURLType URLType = iota

	// EnvironmentURLType describes that the url has been loaded from an environment variable
	EnvironmentURLType
)

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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