helper

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DEV = "DEV"

Variables

This section is empty.

Functions

func GetFirstElementOf

func GetFirstElementOf(parent string, children ...string) (key string)

func Retry

func Retry(f Retryable, interval time.Duration, attempts int) (int, error)

Retry is a wrapper to retry functions.

func RetryUntilTimeout

func RetryUntilTimeout(f Retryable, interval time.Duration, timeout time.Duration) (int, error)

Retry is a wrapper to retry functions.

func SetPrimitiveValue

func SetPrimitiveValue(input, model interface{}, key string)

Types

type RequestURL

type RequestURL string

func ConstructRequestURL

func ConstructRequestURL(paths ...string) (url RequestURL)

ConstructRequestURL constructs a request URL based on paths.

func (RequestURL) AppendQueryParams

func (ru RequestURL) AppendQueryParams(queryParameters url.Values) (url RequestURL)

AppendQueryParams appends query parameters to a request URL.

func (RequestURL) String

func (ru RequestURL) String() (urlString string)

String converts a request URL to a string.

type Retryable

type Retryable func() (bool, error)

Retryable is a simple function which can be retried, returns (retry[yes/no], error).

Jump to

Keyboard shortcuts

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