Documentation ¶
Index ¶
- Constants
- func NewProductionLogger() (*zap.Logger, error)
- func WithShutdownTimeout(d time.Duration) func(*Server)
- type ReadCounter
- type Request
- func (r *Request) AddHeaders(headers map[string]string) *Request
- func (r *Request) AddQueryParams(params map[string]string) *Request
- func (r *Request) Delete() (*http.Response, error)
- func (r *Request) Do(method string) (*http.Response, error)
- func (r *Request) Get() (*http.Response, error)
- func (r *Request) Post() (*http.Response, error)
- func (r *Request) Put() (*http.Response, error)
- func (r *Request) SetBasicAuth(user, pass string) *Request
- func (r *Request) SetBody(rc io.ReadCloser) *Request
- func (r *Request) SetClient(client *http.Client) *Request
- func (r *Request) SetContext(ctx context.Context) *Request
- func (r *Request) SetJSON(x interface{}) *Request
- func (r *Request) SetURL(url string) *Request
- func (r *Request) SetURLf(format string, args ...interface{}) *Request
- type Server
- type WriteCounter
Constants ¶
View Source
const (
DefaultRequestTimeout = 15 * time.Second
)
View Source
const (
DefaultServerShutdownTimeout = 15 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
func NewProductionLogger ¶
func WithShutdownTimeout ¶
Types ¶
type ReadCounter ¶
func NewReadCounter ¶
func NewReadCounter(r io.Reader) *ReadCounter
func (*ReadCounter) Total ¶
func (rc *ReadCounter) Total() int64
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
func (*Request) AddQueryParams ¶
func (*Request) SetBasicAuth ¶
type Server ¶
func (*Server) ListenAndServeContext ¶
type WriteCounter ¶
func NewWriteCounter ¶
func NewWriteCounter(w io.Writer) *WriteCounter
func (*WriteCounter) Total ¶
func (wc *WriteCounter) Total() int64
Click to show internal directories.
Click to hide internal directories.