util

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RATE_LIMIT_LIMIT_HEADER_KEY     = "X-Rate-Limit-Limit"
	RATE_LIMIT_REMAINING_HEADER_KEY = "X-Rate-Limit-Remaining"
	RATE_LIMIT_RESET_HEADER_KEY     = "X-Rate-Limit-Reset"
)

Variables

This section is empty.

Functions

func HeaderValues added in v0.4.2

func HeaderValues(key string, h http.Header) []string

func QueryString added in v0.5.0

func QueryString(paramsMap map[string]string, includes map[string]struct{}) string

func QueryValue

func QueryValue(params []string) string

Types

type Parameters

type Parameters interface {
	SetAccessToken(token string)
	AccessToken() string
	ResolveEndpoint(endpointBase string) string
	Body() (io.Reader, error)
	ParameterMap() map[string]string
}

type RateLimitInformation added in v0.4.2

type RateLimitInformation struct {
	Limit     int
	Remaining int
	ResetAt   *time.Time
}

func GetRateLimitInformation added in v0.4.2

func GetRateLimitInformation(res *http.Response) (*RateLimitInformation, error)

type Response

type Response interface {
	HasPartialError() bool
}

Jump to

Keyboard shortcuts

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