Documentation ¶
Index ¶
- Variables
- func CreateRequiresOAuth(response Response) bool
- func IsSkipRepairSchemaID(schemaID string) bool
- func IsSuccess(resp *http.Response) bool
- func RequestInfo(request *http.Request) rest.RequestInfo
- func Service[T settings.Settings](credentials *settings.Credentials, schemaID string, schemaVersion string, ...) settings.CRUDService[T]
- func UpdateRequiresOAuth(response Response) bool
- type Client
- func (c Client) Create(ctx context.Context, scope string, data []byte) (Response, error)
- func (c Client) Delete(ctx context.Context, id string) (Response, error)
- func (c Client) Get(ctx context.Context, id string) (Response, error)
- func (c Client) List(ctx context.Context) (Response, error)
- func (c Client) Update(ctx context.Context, id string, data []byte) (Response, error)
- type Config
- type Matcher
- type Option
- type Response
- type ServiceOptions
- type SettingsObject
- type SettingsObjectCreate
- type SettingsObjectCreateResponse
- type SettingsObjectList
- type SettingsObjectListItem
- type SettingsObjectResponse
- type SettingsObjectUpdate
Constants ¶
This section is empty.
Variables ¶
View Source
var DISABLE_ORDERING_SUPPORT = os.Getenv("DYNATRACE_DISABLE_ORDERING_SUPPORT") == "true"
View Source
var NO_REPAIR_INPUT = os.Getenv("DT_NO_REPAIR_INPUT") == "true"
Functions ¶
func CreateRequiresOAuth ¶ added in v1.46.0
func IsSkipRepairSchemaID ¶ added in v1.58.0
func IsSuccess ¶ added in v1.54.0
IsSuccess returns true if the response indicates a successful HTTP status code. A status code between 200 and 299 (inclusive) is considered a success.
func RequestInfo ¶ added in v1.54.0
func RequestInfo(request *http.Request) rest.RequestInfo
func Service ¶
func Service[T settings.Settings](credentials *settings.Credentials, schemaID string, schemaVersion string, options ...*ServiceOptions[T]) settings.CRUDService[T]
func UpdateRequiresOAuth ¶ added in v1.46.0
Types ¶
type Client ¶ added in v1.43.0
type Client struct {
// contains filtered or unexported fields
}
type Option ¶ added in v1.43.0
type Option func(*Client)
Option represents a functional Option for the Client.
type ServiceOptions ¶
type ServiceOptions[T settings.Settings] struct { LegacyID func(id string) string Name func(id string, v T) (string, error) HijackOnCreate func(err error, service settings.RService[T], v T) (*api.Stub, error) CreateRetry func(v T, err error) T UpdateRetry func(v T, err error) T Duplicates func(service settings.RService[T], v T) (*api.Stub, error) }
type SettingsObject ¶
type SettingsObject struct { SchemaVersion string `json:"schemaVersion"` SchemaID string `json:"schemaId"` Scope string `json:"scope"` Value json.RawMessage `json:"value"` }
type SettingsObjectCreate ¶
type SettingsObjectCreateResponse ¶
type SettingsObjectCreateResponse struct {
ObjectID string `json:"objectId"`
}
type SettingsObjectList ¶
type SettingsObjectList struct { Items []*SettingsObjectListItem `json:"items"` NextPageKey *string `json:"nextPageKey,omitempty"` }
type SettingsObjectListItem ¶
type SettingsObjectListItem struct { ObjectID string `json:"objectId"` Scope string `json:"scope"` SchemaVersion string `json:"schemaVersion"` Value json.RawMessage `json:"value"` }
type SettingsObjectResponse ¶ added in v1.43.0
type SettingsObjectResponse struct { Code int `json:"code"` Error struct { Code int `json:"code"` Message string `json:"message"` ConstraintViolations *[]struct { Message *string `json:"message,omitempty"` } `json:"constraintViolations,omitempty"` } `json:"error"` }
func (SettingsObjectResponse) RequiresOAuth ¶ added in v1.43.0
func (sor SettingsObjectResponse) RequiresOAuth() bool
type SettingsObjectUpdate ¶
Click to show internal directories.
Click to hide internal directories.