Documentation ¶
Index ¶
- type App
- type ResponseWriter
- func (rw *ResponseWriter) Content() *bytes.Buffer
- func (rw *ResponseWriter) Header() http.Header
- func (rw *ResponseWriter) SetStatus(status int)
- func (rw *ResponseWriter) Status() int
- func (rw *ResponseWriter) Write(content []byte) (int, error)
- func (rw *ResponseWriter) WriteHeader(status int)
- func (rw *ResponseWriter) WriteResponse(w http.ResponseWriter) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResponseWriter ¶ added in v1.0.1
type ResponseWriter struct {
// contains filtered or unexported fields
}
ResponseWriter implements http.ResponseWriter by storing content in memory
func CreateWriter ¶ added in v1.0.1
func CreateWriter() *ResponseWriter
CreateWriter create ResponseWriter
func (*ResponseWriter) Content ¶ added in v1.0.1
func (rw *ResponseWriter) Content() *bytes.Buffer
Content return current contant buffer
func (*ResponseWriter) Header ¶ added in v1.0.1
func (rw *ResponseWriter) Header() http.Header
func (*ResponseWriter) SetStatus ¶ added in v1.0.1
func (rw *ResponseWriter) SetStatus(status int)
SetStatus set current writer status
func (*ResponseWriter) Status ¶ added in v1.0.1
func (rw *ResponseWriter) Status() int
Status return current writer status
func (*ResponseWriter) Write ¶ added in v1.0.1
func (rw *ResponseWriter) Write(content []byte) (int, error)
func (*ResponseWriter) WriteHeader ¶ added in v1.0.1
func (rw *ResponseWriter) WriteHeader(status int)
WriteHeader cf. https://golang.org/pkg/net/http/#ResponseWriter
func (*ResponseWriter) WriteResponse ¶ added in v1.0.1
func (rw *ResponseWriter) WriteResponse(w http.ResponseWriter) (int, error)
WriteResponse write memory content to real http ResponseWriter
Click to show internal directories.
Click to hide internal directories.