Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dump ¶
func Dump(maxReqRespSize int) gin.HandlerFunc
Types ¶
type DumpRequest ¶
type DumpRequest struct { Method string URL *url.URL Proto string Header http.Header Body io.ReadCloser }
func GetRequest ¶
func GetRequest(c *gin.Context) (*DumpRequest, error)
type DumpResponse ¶
type DumpResponse struct { StatusCode int Header http.Header Body io.ReadCloser }
func GetResponse ¶
func GetResponse(c *gin.Context) (*DumpResponse, error)
type LimitedBuffer ¶
type LimitedBuffer struct {
// contains filtered or unexported fields
}
LimitedBuffer is a wrapper of bytes.Buffer which limits its size. The buffer will store no more than the specified size, and discards the rest. This is useful for preventing gindump from storing large request/response body in memory. LimitedBuffer implements Writer and Reader interface.
func NewLimitedBuffer ¶
func NewLimitedBuffer(size int) *LimitedBuffer
Create a new LimitedBuffer with a limited size in bytes.
func (*LimitedBuffer) Bytes ¶
func (lb *LimitedBuffer) Bytes() []byte
Bytes returns the bytes of the underlying buffer.
Click to show internal directories.
Click to hide internal directories.