Documentation ¶
Index ¶
- 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 GetResponse
- type Instance
- type ListResponse
- type Metadata
- type ModificationInfo
- type OauthClientStatus
- type Option
- type Request
- type ServerError
Constants ¶
This section is empty.
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(name string, hostPatterns []string, oauthClientId string) (CreateResponse, error) // UpdateEdgeConnect updates edge connect UpdateEdgeConnect(edgeConnectId, name string, hostPatterns []string, oauthClientId string) error // DeleteEdgeConnect deletes edge connect DeleteEdgeConnect(edgeConnectId string) error // GetEdgeConnects returns list of edge connects GetEdgeConnects(name string) (ListResponse, 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"` 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 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 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.
Click to show internal directories.
Click to hide internal directories.