Documentation ¶
Index ¶
- Constants
- func WithBaseURL(url string) func(*client)
- func WithContext(ctx context.Context) func(*client)
- func WithOauthScopes(scopes []string) func(*client)
- func WithTokenURL(url string) func(*client)
- type Client
- type ConstraintViolations
- type CreateResponse
- type DetailsError
- type EnvironmentSetting
- type EnvironmentSettingValue
- type EnvironmentSettingsResponse
- type GetResponse
- type Instance
- type ListResponse
- type Metadata
- type ModificationInfo
- type OauthClientStatus
- type Option
- type Request
- type ServerError
- type SettingsApiError
- type SettingsApiResponse
Constants ¶
View Source
const ( KubernetesConnectionSchemaID = "app:dynatrace.kubernetes.connector:connection" KubernetesConnectionScope = "environment" )
Variables ¶
This section is empty.
Functions ¶
func WithBaseURL ¶
func WithBaseURL(url string) func(*client)
func WithContext ¶
WithContext can set context for client NB: via context you can override default http client to add Proxy or CA certificates
func WithOauthScopes ¶
func WithOauthScopes(scopes []string) func(*client)
func WithTokenURL ¶
func WithTokenURL(url string) func(*client)
Types ¶
type Client ¶
type Client interface { // GetEdgeConnect return details of single edge connect GetEdgeConnect(edgeConnectId string) (GetResponse, error) // CreateEdgeConnect creates edge connect CreateEdgeConnect(request *Request) (CreateResponse, error) // UpdateEdgeConnect updates edge connect UpdateEdgeConnect(edgeConnectId string, request *Request) error // DeleteEdgeConnect deletes edge connect DeleteEdgeConnect(edgeConnectId string) error // GetEdgeConnects returns list of edge connects GetEdgeConnects(name string) (ListResponse, error) // GetConnectionSettings returns all connection setting objects GetConnectionSettings() ([]EnvironmentSetting, error) // CreateConnectionSetting creates a connection setting object CreateConnectionSetting(es EnvironmentSetting) error // UpdateConnectionSetting updates a connection setting object UpdateConnectionSetting(es EnvironmentSetting) error // DeleteConnectionSetting deletes a connection setting object DeleteConnectionSetting(objectId string) error }
Client is the interface for the Dynatrace EdgeConnect REST API client.
type ConstraintViolations ¶
type ConstraintViolations struct { Message string `json:"message"` Path string `json:"path,omitempty"` ParameterLocation string `json:"parameterLocation,omitempty"` }
ConstraintViolations represents constraint violation errors
type CreateResponse ¶
type CreateResponse struct { ModificationInfo ModificationInfo `json:"modificationInfo"` Metadata Metadata `json:"metadata"` ID string `json:"id,omitempty"` Name string `json:"name"` OauthClientId string `json:"oauthClientId"` OauthClientSecret string `json:"oauthClientSecret"` OauthClientResource string `json:"oauthClientResource"` HostPatterns []string `json:"hostPatterns"` HostMappings []edgeconnect.HostMapping `json:"hostMappings"` ManagedByDynatraceOperator bool `json:"managedByDynatraceOperator,omitempty"` }
type DetailsError ¶
type DetailsError struct { ConstraintViolations []ConstraintViolations `json:"constraintViolations"` MissingScopes []string `json:"missingScopes,omitempty"` }
DetailsError represents details of errors
type EnvironmentSetting ¶ added in v1.3.0
type EnvironmentSetting struct { ObjectId *string `json:"objectId"` SchemaId string `json:"schemaId"` Scope string `json:"scope"` Value EnvironmentSettingValue `json:"value"` }
type EnvironmentSettingValue ¶ added in v1.3.0
type EnvironmentSettingsResponse ¶ added in v1.3.0
type EnvironmentSettingsResponse struct { Items []EnvironmentSetting `json:"items"` TotalCount int `json:"totalCount"` PageSize int `json:"pageSize"` }
type GetResponse ¶
type GetResponse struct { ModificationInfo ModificationInfo `json:"modificationInfo"` Metadata Metadata `json:"metadata"` ID string `json:"id,omitempty"` Name string `json:"name"` OauthClientId string `json:"oauthClientId"` HostPatterns []string `json:"hostPatterns"` ManagedByDynatraceOperator bool `json:"managedByDynatraceOperator,omitempty"` }
type ListResponse ¶
type ListResponse struct { EdgeConnects []GetResponse `json:"edgeConnects"` TotalCount int `json:"totalCount"` }
type ModificationInfo ¶
type OauthClientStatus ¶
type OauthClientStatus int
type Option ¶
type Option func(client *client)
Option can be passed to NewClient and customizes the created client instance.
type Request ¶
type Request struct { Name string `json:"name"` OauthClientId string `json:"oauthClientId,omitempty"` HostPatterns []string `json:"hostPatterns"` HostMappings []edgeconnect.HostMapping `json:"hostMappings"` ManagedByDynatraceOperator bool `json:"managedByDynatraceOperator,omitempty"` }
func NewRequest ¶
func NewRequest(name string, hostPatterns []string, hostMappings []edgeconnect.HostMapping, oauthClientId string) *Request
type ServerError ¶
type ServerError struct { Message string `json:"message,omitempty"` Details DetailsError `json:"details"` Code int `json:"code,omitempty"` }
ServerError represents an error returned from the server (e.g. authentication failure).
func (ServerError) Error ¶
func (e ServerError) Error() string
Error formats the server error code and message.
type SettingsApiError ¶ added in v1.3.0
type SettingsApiError struct { Message string `json:"message,omitempty"` ConstraintViolations []ConstraintViolations `json:"constraintViolations"` Code int `json:"code,omitempty"` }
Settings API error field
func (SettingsApiError) Error ¶ added in v1.3.0
func (e SettingsApiError) Error() string
type SettingsApiResponse ¶ added in v1.3.0
type SettingsApiResponse struct { Error SettingsApiError `json:"error"` Code int `json:"code"` }
Settings API response
Click to show internal directories.
Click to hide internal directories.