util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 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

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

func QueryString

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

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

func GetRateLimitInformation

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