httpcache

package
v1.35.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CACHE_FOLDER = os.Getenv("DYNATRACE_MIGRATION_CACHE_FOLDER")
View Source
var REGEX_APPLICATIONS_MOBILE_GET, _ = regexp.Compile(`\/api\/config\/v1\/applications\/mobile\/([^\/]*)$`)
View Source
var REGEX_APPLICATIONS_MOBILE_KEY_USER_ACTIONS_LIST, _ = regexp.Compile(`\/api\/config\/v1\/applications\/mobile\/.*\/keyUserActions$`)
View Source
var REGEX_APPLICATIONS_MOBILE_KEY_USER_ACTION_AND_SESSION_PROPERTIES_LIST, _ = regexp.Compile(`\/api\/config\/v1\/applications\/mobile\/.*\/userActionAndSessionProperties$`)
View Source
var REGEX_APPLICATIONS_MOBILE_LIST, _ = regexp.Compile(`\/api\/config\/v1\/applications\/mobile$`)
View Source
var REGEX_APPLICATIONS_WEB_GET, _ = regexp.Compile(`\/api\/config\/v1\/applications\/web\/([^\/]*)$`)
View Source
var REGEX_APPLICATIONS_WEB_KEY_USER_ACTIONS_LIST, _ = regexp.Compile(`\/api\/config\/v1\/applications\/web\/.*\/keyUserActions$`)
View Source
var REGEX_APPLICATIONS_WEB_KEY_USER_ACTION_AND_SESSION_PROPERTIES_LIST, _ = regexp.Compile(`\/api\/config\/v1\/applications\/web\/.*\/userActionAndSessionProperties$`)
View Source
var REGEX_APPLICATIONS_WEB_LIST, _ = regexp.Compile(`\/api\/config\/v1\/applications\/web$`)
View Source
var REGEX_BROWSER_MONITOR_LIST, _ = regexp.Compile(`\/api\/v1\/synthetic\/monitors\?type=BROWSER$`)
View Source
var REGEX_CALCULATED_METRICS_SERVICE_GET, _ = regexp.Compile(`\/api\/config\/v1\/calculatedMetrics\/service\/([^\/]*)$`)
View Source
var REGEX_CALCULATED_METRICS_SERVICE_LIST, _ = regexp.Compile(`\/api\/config\/v1\/calculatedMetrics\/service$`)
View Source
var REGEX_CONDITIONAL_NAMING_HOST_GET, _ = regexp.Compile(`\/api\/config\/v1\/conditionalNaming\/host\/([^\/]*)$`)
View Source
var REGEX_CONDITIONAL_NAMING_HOST_LIST, _ = regexp.Compile(`\/api\/config\/v1\/conditionalNaming\/host$`)
View Source
var REGEX_CREDENTIALS_LIST, _ = regexp.Compile(`\/api\/config\/v1\/credentials$`)
View Source
var REGEX_CUSTOM_SERVICE_DOTNET_GET, _ = regexp.Compile(`\/api\/config\/v1\/service\/customServices\/dotNet\/([^\/]*)$`)
View Source
var REGEX_CUSTOM_SERVICE_DOTNET_LIST, _ = regexp.Compile(`\/api\/config\/v1\/service\/customServices\/dotNet$`)
View Source
var REGEX_CUSTOM_SERVICE_GOLANG_GET, _ = regexp.Compile(`\/api\/config\/v1\/service\/customServices\/go\/([^\/]*)$`)
View Source
var REGEX_CUSTOM_SERVICE_GOLANG_LIST, _ = regexp.Compile(`\/api\/config\/v1\/service\/customServices\/go$`)
View Source
var REGEX_CUSTOM_SERVICE_JAVA_GET, _ = regexp.Compile(`\/api\/config\/v1\/service\/customServices\/java\/([^\/]*)$`)
View Source
var REGEX_CUSTOM_SERVICE_JAVA_LIST, _ = regexp.Compile(`\/api\/config\/v1\/service\/customServices\/java$`)
View Source
var REGEX_CUSTOM_SERVICE_NODEJS_GET, _ = regexp.Compile(`\/api\/config\/v1\/service\/customServices\/nodeJS\/([^\/]*)$`)
View Source
var REGEX_CUSTOM_SERVICE_NODEJS_LIST, _ = regexp.Compile(`\/api\/config\/v1\/service\/customServices\/nodeJS$`)
View Source
var REGEX_CUSTOM_SERVICE_PHP_GET, _ = regexp.Compile(`\/api\/config\/v1\/service\/customServices\/php\/([^\/]*)$`)
View Source
var REGEX_CUSTOM_SERVICE_PHP_LIST, _ = regexp.Compile(`\/api\/config\/v1\/service\/customServices\/php$`)
View Source
var REGEX_HTTP_MONITOR_LIST, _ = regexp.Compile(`\/api\/v1\/synthetic\/monitors\?type=HTTP$`)
View Source
var REGEX_MONITOR_GET, _ = regexp.Compile(`\/api\/v1\/synthetic\/monitors\/([^\/]*)$`)
View Source
var REGEX_PRIVATE_SYNTHETIC_LOCATIONS_GET, _ = regexp.Compile(`\/api\/v1\/synthetic\/locations\/([^\/]*)$`)
View Source
var REGEX_PRIVATE_SYNTHETIC_LOCATIONS_LIST, _ = regexp.Compile(`\/api\/v1\/synthetic\/locations\?type=PRIVATE$`)
View Source
var REGEX_REQUEST_ATTRIBUTES_GET, _ = regexp.Compile(`\/api\/config\/v1\/service\/requestAttributes\/([^\/]*)$`)
View Source
var REGEX_REQUEST_ATTRIBUTES_LIST, _ = regexp.Compile(`\/api\/config\/v1\/service\/requestAttributes$`)
View Source
var REGEX_REQUEST_NAMING_GET, _ = regexp.Compile(`\/api\/config\/v1\/service\/requestNaming\/([^\/]*)$`)
View Source
var REGEX_REQUEST_NAMING_LIST, _ = regexp.Compile(`\/api\/config\/v1\/service\/requestNaming$`)
View Source
var REGEX_REQUEST_SLO_GET, _ = regexp.Compile(`\/api\/v2\/slo\/([^\/]*)$`)
View Source
var REGEX_REQUEST_SLO_LIST, _ = regexp.Compile(`\/api\/v2\/slo\?pageSize`)
View Source
var REGEX_SETTINGS_20_GET, _ = regexp.Compile(`\/api\/v2\/settings\/objects\/(.*)`)
View Source
var REGEX_SETTINGS_20_LIST, _ = regexp.Compile(`\/api\/v2\/settings\/objects\?schemaIds=([^\&]*)&`)
View Source
var STRICT_CACHE = os.Getenv("DYNATRACE_MIGRATION_CACHE_STRICT") == "true"

Functions

func Client

func Client(c rest.Client, schemaID string) rest.Client

func DefaultClient

func DefaultClient(envURL string, apiToken string, schemaID string) rest.Client

func EmptyList

func EmptyList(schemaID string) rest.Request

func Get

func Get(schemaID string, id string, serviceSchemaID string) rest.Request

func List

func List(schemaID string) rest.Request

func Request

func Request(f Finisher) rest.Request

Types

type Finisher

type Finisher interface {
	Finish(v any) error
}

type GetSLORequest

type GetSLORequest struct {
	SchemaID        string
	ServiceSchemaID string
	ID              string
}

func (*GetSLORequest) Expect

func (me *GetSLORequest) Expect(codes ...int) rest.Request

func (*GetSLORequest) Finish

func (me *GetSLORequest) Finish(vs ...any) error

func (*GetSLORequest) OnResponse

func (me *GetSLORequest) OnResponse(func(resp *http.Response)) rest.Request

func (*GetSLORequest) Payload

func (me *GetSLORequest) Payload(any) rest.Request

func (*GetSLORequest) Raw

func (me *GetSLORequest) Raw() ([]byte, error)

type GetSettings20Request

type GetSettings20Request struct {
	SchemaID string
	ID       string
}

func (*GetSettings20Request) Expect

func (me *GetSettings20Request) Expect(codes ...int) rest.Request

func (*GetSettings20Request) Finish

func (me *GetSettings20Request) Finish(vs ...any) error

func (*GetSettings20Request) OnResponse

func (me *GetSettings20Request) OnResponse(func(resp *http.Response)) rest.Request

func (*GetSettings20Request) Payload

func (me *GetSettings20Request) Payload(any) rest.Request

func (*GetSettings20Request) Raw

func (me *GetSettings20Request) Raw() ([]byte, error)

type GetV1

type GetV1 struct {
	SchemaID        string
	ServiceSchemaID string
	ID              string
}

func (*GetV1) Finish

func (me *GetV1) Finish(v any) error

type ListMonitorsV1 added in v1.30.2

type ListMonitorsV1 struct {
	Prefix string
}

func (*ListMonitorsV1) Finish added in v1.30.2

func (me *ListMonitorsV1) Finish(v any) error

type ListPrivateSyntheticLocationsV1 added in v1.30.2

type ListPrivateSyntheticLocationsV1 struct{}

func (*ListPrivateSyntheticLocationsV1) Finish added in v1.30.2

type ListSLORequest

type ListSLORequest struct {
	SchemaID string
}

func (*ListSLORequest) Expect

func (me *ListSLORequest) Expect(codes ...int) rest.Request

func (*ListSLORequest) Finish

func (me *ListSLORequest) Finish(vs ...any) error

func (*ListSLORequest) OnResponse

func (me *ListSLORequest) OnResponse(func(resp *http.Response)) rest.Request

func (*ListSLORequest) Payload

func (me *ListSLORequest) Payload(any) rest.Request

func (*ListSLORequest) Raw

func (me *ListSLORequest) Raw() ([]byte, error)

type ListSettings20Request

type ListSettings20Request struct {
	SchemaID string
}

func (*ListSettings20Request) Expect

func (me *ListSettings20Request) Expect(codes ...int) rest.Request

func (*ListSettings20Request) Finish

func (me *ListSettings20Request) Finish(vs ...any) error

func (*ListSettings20Request) OnResponse

func (me *ListSettings20Request) OnResponse(func(resp *http.Response)) rest.Request

func (*ListSettings20Request) Payload

func (me *ListSettings20Request) Payload(any) rest.Request

func (*ListSettings20Request) Raw

func (me *ListSettings20Request) Raw() ([]byte, error)

type ListV1

type ListV1 struct {
	SchemaID string
}

func (*ListV1) Finish

func (me *ListV1) Finish(v any) error

type NonSupportedV1

type NonSupportedV1 struct {
	SchemaID string
}

func (*NonSupportedV1) Finish

func (me *NonSupportedV1) Finish(v any) error

type SettingsObject

type SettingsObject struct {
	SchemaVersion string          `json:"schemaVersion"`
	SchemaID      string          `json:"schemaId"`
	Scope         string          `json:"scope"`
	Value         json.RawMessage `json:"value"`
}

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL