Documentation ¶
Index ¶
- type ResponseContext
- func (r *ResponseContext) AddResponseHeader(key, value string) *ResponseContext
- func (r *ResponseContext) Build() (string, map[string]string, int)
- func (r *ResponseContext) ResponseContent() string
- func (r *ResponseContext) SetResponseContent(content string) *ResponseContext
- func (r *ResponseContext) SetStatusCode(code int) *ResponseContext
- func (r *ResponseContext) StatusCode() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResponseContext ¶
type ResponseContext struct {
// contains filtered or unexported fields
}
ResponseContext is a mutex-protected medium between our ResponseWriter and controller go-routines.
func (*ResponseContext) AddResponseHeader ¶
func (r *ResponseContext) AddResponseHeader(key, value string) *ResponseContext
AddResponseHeader adds a new value to the *http.ResponseWriters headers.
func (*ResponseContext) Build ¶
func (r *ResponseContext) Build() (string, map[string]string, int)
Build returns the built content, headers, and status code.
func (*ResponseContext) ResponseContent ¶
func (r *ResponseContext) ResponseContent() string
ResponseContent retrieves ResponseContext.content.
func (*ResponseContext) SetResponseContent ¶
func (r *ResponseContext) SetResponseContent(content string) *ResponseContext
SetResponseContent overwrites the ResponseContext.content value.
func (*ResponseContext) SetStatusCode ¶
func (r *ResponseContext) SetStatusCode(code int) *ResponseContext
SetStatusCode overwrites the ResponseContext.statusCode.
func (*ResponseContext) StatusCode ¶
func (r *ResponseContext) StatusCode() int
StatusCode retrieves ResponseContext.statusCode.
Click to show internal directories.
Click to hide internal directories.