Documentation ¶
Overview ¶
Package request provides clients for requesting data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ContextLogger ¶
type ContextLogger interface { Debugf(ctx context.Context, format string, args ...interface{}) Infof(ctx context.Context, format string, args ...interface{}) Warningf(ctx context.Context, format string, args ...interface{}) Errorf(ctx context.Context, format string, args ...interface{}) }
ContextLogger interface used in this package with request context.
type ErrTemporary ¶
type ErrTemporary struct {
// contains filtered or unexported fields
}
ErrTemporary means there was a temporary error
func NewErrTemporary ¶
func NewErrTemporary(msg string) ErrTemporary
NewErrTemporary creates temporary error.
func (ErrTemporary) Error ¶
func (e ErrTemporary) Error() string
type ErrTimeout ¶
type ErrTimeout struct {
// contains filtered or unexported fields
}
ErrTimeout is a timeout error.
type Logger ¶
type Logger interface { Debugf(format string, args ...interface{}) Infof(format string, args ...interface{}) Warningf(format string, args ...interface{}) Errorf(format string, args ...interface{}) Fatalf(format string, args ...interface{}) }
Logger interface used in this package.
type MockRequestor ¶
type MockRequestor struct {
// contains filtered or unexported fields
}
MockRequestor ...
func NewMockRequestor ¶
func NewMockRequestor() *MockRequestor
NewMockRequestor with mocked responses.
func (*MockRequestor) RequestURLString ¶
RequestURLString ...
func (*MockRequestor) Response ¶
func (r *MockRequestor) Response(url string) ([]byte, error)
Response returns mocked response.
func (*MockRequestor) SetError ¶
func (r *MockRequestor) SetError(url string, err error)
SetError ...
func (*MockRequestor) SetResponse ¶
func (r *MockRequestor) SetResponse(url string, b []byte)
SetResponse ...
Click to show internal directories.
Click to hide internal directories.