Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BurstLimiterMock ¶ added in v0.7.0
type BurstLimiterMock struct {
rate.Limiter
OnBurst func() uint64
OnTakeN func(n uint64) rate.Token
}
func (BurstLimiterMock) Burst ¶ added in v0.7.0
func (m BurstLimiterMock) Burst() uint64
type CookiesJar ¶ added in v0.4.0
type CookiesJar struct {
OnSetCookies func(u *url.URL, cookies []*http.Cookie)
OnCookies func(u *url.URL) []*http.Cookie
}
func (*CookiesJar) Cookies ¶ added in v0.4.0
func (j *CookiesJar) Cookies(u *url.URL) []*http.Cookie
func (*CookiesJar) SetCookies ¶ added in v0.4.0
func (j *CookiesJar) SetCookies(u *url.URL, cookies []*http.Cookie)
type LimiterMock ¶ added in v0.7.0
func (LimiterMock) Limit ¶ added in v0.7.0
func (m LimiterMock) Limit() uint64
func (LimiterMock) Take ¶ added in v0.7.0
func (m LimiterMock) Take() rate.Token
func (LimiterMock) Tokens ¶ added in v0.7.0
func (m LimiterMock) Tokens() uint64
type LimiterStoreMock ¶ added in v0.7.0
type ResponseWriter ¶ added in v0.4.0
type ResponseWriter struct {
OnHeader func() http.Header
OnWrite func([]byte) (int, error)
OnWriteHeader func(int)
OnResponse func(int, interface{}) error
}
func (*ResponseWriter) Header ¶ added in v0.4.0
func (w *ResponseWriter) Header() http.Header
func (*ResponseWriter) Response ¶ added in v0.4.0
func (w *ResponseWriter) Response(code int, data interface{}) error
func (*ResponseWriter) Write ¶ added in v0.4.0
func (w *ResponseWriter) Write(b []byte) (int, error)
func (*ResponseWriter) WriteHeader ¶ added in v0.4.0
func (w *ResponseWriter) WriteHeader(statusCode int)
type RoundTripper ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.