Documentation ¶
Index ¶
- func CanonicalAddr(host string, port int) (addr string)
- func CanonicalHost(host string) (string, error)
- func GenerateResponseErrorString(summary string, err error, detailed bool) string
- func GetAuthKey(token string, timestamp int64) (key string)
- func OkResponse() *http.Response
- func ParseBasicAuth(auth string) (username, password string, ok bool)
- func ParseRangeNumbers(rangeStr string) (numbers []int64, err error)
- func ProxyUnauthorizedResponse() *http.Response
- func RandID() (id string, err error)
- func RandIDWithLen(idLen int) (id string, err error)
- func RandomSleep(duration time.Duration, minRatio, maxRatio float64) time.Duration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanonicalAddr ¶
func CanonicalHost ¶
canonicalHost strips port from host if present and returns the canonicalized host name.
func GetAuthKey ¶
func OkResponse ¶
func ParseBasicAuth ¶
func ParseRangeNumbers ¶
func RandIDWithLen ¶
RandIDWithLen return a rand string with idLen length.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.