Documentation
¶
Overview ¶
Package config re-exports the dtctl session layer from github.com/Dynatrace/dtctl/sdk/session, where the implementation moved: the config model, load/save, credential stores, and token resolution are the shared contract consumed by dtctl and dtctl-* plugins; this package remains so the root module's import surface is stable. New code (and external consumers) should import sdk/session directly.
Index ¶
- Constants
- func BuiltinProfileNames() []string
- func CacheDir() string
- func CheckKeyring() error
- func ConfigDir() string
- func DataDir() string
- func DefaultConfigPath() string
- func EnsureKeyringCollection(ctx context.Context) error
- func FileTokenStorageConsentPath() string
- func FindLocalConfig() string
- func GetTokenWithFallback(cfg *Config, tokenRef string) (string, error)
- func IsFileTokenStorage() bool
- func IsKeyringAbsent(err error) bool
- func IsKeyringAvailable() bool
- func IsOAuthStorageAvailable() bool
- func KeyringBackend() string
- func MigrateTokensToKeyring(cfg *Config) (int, error)
- func OAuthStorageBackend() string
- func PersistFileTokenStorage() error
- func StateDir() string
- func ValidateAliasName(name string) error
- type AliasEntry
- type AliasFile
- type Config
- type Context
- type ContextOptions
- type Hooks
- type NamedContext
- type NamedToken
- type OAuthFileStore
- type Preferences
- type Profile
- type QueryLimits
- type SafetyLevel
- type SpillConfig
- type StabilityLevel
- type TokenStore
Constants ¶
const ( SafetyLevelReadOnly = session.SafetyLevelReadOnly SafetyLevelReadWriteMine = session.SafetyLevelReadWriteMine SafetyLevelReadWriteAll = session.SafetyLevelReadWriteAll SafetyLevelDangerouslyUnrestricted = session.SafetyLevelDangerouslyUnrestricted DefaultSafetyLevel = session.DefaultSafetyLevel )
Safety levels — the shared semantics of a context's safety-level field.
const ( CurrentAPIVersion = session.CurrentAPIVersion LocalConfigName = session.LocalConfigName )
Schema and file-discovery constants.
const ( KeyringService = session.KeyringService EnvDisableKeyring = session.EnvDisableKeyring EnvTokenStorage = session.EnvTokenStorage ErrMsgCollectionUnlock = session.ErrMsgCollectionUnlock )
Credential-store constants.
const ( ProfileEnvVar = session.ProfileEnvVar ProfileFull = session.ProfileFull )
const ( StabilityDevelopment = session.StabilityDevelopment StabilityExperimental = session.StabilityExperimental StabilityStable = session.StabilityStable DefaultStabilityLevel = session.DefaultStabilityLevel DefaultMinStability = session.DefaultMinStability MinStabilityEnvVar = session.MinStabilityEnvVar DevelopmentEnvVar = session.DevelopmentEnvVar NoDeprecatedEnvVar = session.NoDeprecatedEnvVar DevelopmentAll = session.DevelopmentAll )
Stability tiers (what dtctl promises about a command's shape over time) — the ordered axis and its config/environment resolution live with the Config type in sdk/session; declaration and *enforcement* stay in pkg/stability and cmd/.
const EnvConfig = session.EnvConfig
Explicit-config environment variable — see sdk/session.EnvConfig.
Variables ¶
This section is empty.
Functions ¶
func BuiltinProfileNames ¶
func BuiltinProfileNames() []string
func CheckKeyring ¶
func CheckKeyring() error
func EnsureKeyringCollection ¶
func FileTokenStorageConsentPath ¶
func FileTokenStorageConsentPath() string
func IsFileTokenStorage ¶
func IsFileTokenStorage() bool
func IsKeyringAbsent ¶
func IsKeyringAvailable ¶
func IsKeyringAvailable() bool
func IsOAuthStorageAvailable ¶
func IsOAuthStorageAvailable() bool
func KeyringBackend ¶
func KeyringBackend() string
func MigrateTokensToKeyring ¶
func OAuthStorageBackend ¶
func OAuthStorageBackend() string
func PersistFileTokenStorage ¶
func PersistFileTokenStorage() error
func ValidateAliasName ¶
Alias name validation (alias data lives in the shared schema; alias execution stays in cmd/).
Types ¶
type Config ¶
Config model — see sdk/session.
func LoadWithoutExpansion ¶
type OAuthFileStore ¶
type OAuthFileStore = session.OAuthFileStore
Credential stores.
func NewOAuthFileStore ¶
func NewOAuthFileStore() *OAuthFileStore
func NewOAuthFileStoreWithDir ¶
func NewOAuthFileStoreWithDir(dir string) *OAuthFileStore
type Profile ¶
Command profiles (default-deny allowlists of commands) — the schema and resolution live with the Config type in sdk/session; profile *enforcement* stays in cmd/.
type SafetyLevel ¶
type SafetyLevel = session.SafetyLevel
Config model — see sdk/session.
func ValidSafetyLevels ¶
func ValidSafetyLevels() []SafetyLevel
ValidSafetyLevels returns all valid safety level values.
type StabilityLevel ¶
type StabilityLevel = session.StabilityLevel
Config model — see sdk/session.
func ParseStabilityLevel ¶
func ParseStabilityLevel(s string) (StabilityLevel, error)
ParseStabilityLevel validates and normalizes a user-written stability level.
func ValidStabilityLevels ¶
func ValidStabilityLevels() []StabilityLevel
ValidStabilityLevels returns the stability levels in ascending order of promise.
type TokenStore ¶
type TokenStore = session.TokenStore
Credential stores.
func NewTokenStore ¶
func NewTokenStore() *TokenStore