Documentation ¶
Index ¶
- Constants
- func AddNextPageQueryParams(u *url.URL, nextPage string) *url.URL
- func ApplyMinMaxDefaults(sleepDuration time.Duration) time.Duration
- func DeleteConfig(client *http.Client, url string, id string) error
- func GenerateSleepDuration(multiplier int) (duration time.Duration)
- func ParseTimeStamp(unixTimestampAsString string) (parsedTimestamp int64, err error)
- type Pagination
- type Response
- func Get(client *http.Client, url string) (response Response, err error)
- func Post(client *http.Client, url string, data []byte) (Response, error)
- func PostMultiPartFile(client *http.Client, url string, data *bytes.Buffer, contentType string) (Response, error)
- func Put(client *http.Client, url string, data []byte) (Response, error)
Constants ¶
View Source
const MaxWaitDuration = 1 * time.Minute
View Source
const MinWaitDuration = 1 * time.Second
View Source
const PARAM_NEXT_PAGE_KEY = "nextPageKey"
View Source
const RESPONSE_HEADER_RATE_LIMIT = "X-RateLimit-Limit"
View Source
const RESPONSE_HEADER_RATE_LIMIT_RESET = "X-RateLimit-Reset"
Variables ¶
This section is empty.
Functions ¶
func AddNextPageQueryParams ¶
AddNextPageQueryParams handles both Dynatrace v1 and v2 pagination logic. For api/v2 URLs the given next page key will be the only query parameter of the modified URL For any other ULRs the given next page key will be added to existing query parameters
func DeleteConfig ¶
the name delete() would collide with the built-in function
func GenerateSleepDuration ¶
func ParseTimeStamp ¶
ParseTimeStamp parses and sanity-checks a unix timestamp as string and returns it as int64
Types ¶
type Pagination ¶
type Response ¶
type Response struct { StatusCode int Body []byte Headers map[string][]string Pagination Pagination }
func PostMultiPartFile ¶
func (Response) Is4xxError ¶
func (Response) Is5xxError ¶
func (Response) SleepDuration ¶
Click to show internal directories.
Click to hide internal directories.