Documentation
¶
Index ¶
- Constants
- func GetDynatraceClassicURL(client *http.Client, environmentURL string) (string, error)
- func GetDynatraceVersion(client *http.Client, environmentURL string) (version.Version, error)
- func NewOAuthClient(ctx context.Context, oauthConfig OauthCredentials) *http.Client
- func NewTokenAuthClient(token string) *http.Client
- type ApiVersionObject
- type OauthCredentials
- type RespError
- type TokenAuthTransport
Constants ¶
View Source
const ClassicEnvironmentDomainPath = "/platform/metadata/v1/classic-environment-domain"
View Source
const DeprecatedClassicEnvDomainPath = "/platform/core/v1/environment-api-info"
Variables ¶
This section is empty.
Functions ¶
func GetDynatraceClassicURL ¶
GetDynatraceClassicURL tries to fetch the URL of the classic environment using the API of a platform enabled environment
func GetDynatraceVersion ¶
GetDynatraceVersion returns the version of an environment
func NewOAuthClient ¶
func NewOAuthClient(ctx context.Context, oauthConfig OauthCredentials) *http.Client
NewOAuthClient creates a new HTTP client that supports OAuth2 client credentials based authorization
func NewTokenAuthClient ¶
NewTokenAuthClient creates a new HTTP client that supports token based authorization
Types ¶
type ApiVersionObject ¶
type ApiVersionObject struct {
Version string `json:"version"`
}
type OauthCredentials ¶
type OauthCredentials struct { ClientID string ClientSecret string TokenURL string Scopes []string }
OauthCredentials holds information for authenticating to Dynatrace using Oauth2.0 client credential flow
type RespError ¶
func (RespError) ConcurrentError ¶
type TokenAuthTransport ¶
type TokenAuthTransport struct { http.RoundTripper // contains filtered or unexported fields }
TokenAuthTransport should be used to enable a client to use dynatrace token authorization
func NewTokenAuthTransport ¶
func NewTokenAuthTransport(baseTransport http.RoundTripper, token string) *TokenAuthTransport
NewTokenAuthTransport creates a new http transport to be used for token authorization
Click to show internal directories.
Click to hide internal directories.