Documentation ¶
Index ¶
Constants ¶
View Source
const ( Location string = "Location" ContentType string = "Content-Type" ContentEncoding string = "Content-Encoding" CacheControl string = "Cache-Control" ETag string = "ETag" Authorization string = "Authorization" AccessControlAllowOrigin string = "Access-Control-Allow-Origin" AcceptEncoding string = "Accept-Encoding" XForwardProtocol string = "X-Forwarded-Proto" XForwardHost string = "X-Forwarded-Host" XForwardUri string = "X-Forwarded-Uri" )
View Source
const ( AuthBasic string = "Basic" AuthBearer string = "Bearer" )
View Source
const (
ContentTypeJSON string = "application/json"
)
Variables ¶
This section is empty.
Functions ¶
func SendJsonWithStatus ¶
Types ¶
type CompressionMethod ¶ added in v0.7.8
type CompressionMethod string
const (
CompressionMethodGZip CompressionMethod = "gzip"
)
type RequestData ¶ added in v0.7.6
type RequestData struct {
// contains filtered or unexported fields
}
func NewRequestData ¶ added in v0.7.6
func NewRequestData(r *http.Request) *RequestData
func (*RequestData) AcceptCompressed ¶ added in v0.7.8
func (r *RequestData) AcceptCompressed() (*CompressionMethod, bool)
func (*RequestData) IssuerString ¶ added in v0.7.6
func (r *RequestData) IssuerString() string
func (*RequestData) Valid ¶ added in v0.7.8
func (r *RequestData) Valid() bool
type ResponseWriter ¶ added in v0.7.8
type ResponseWriter struct {
// contains filtered or unexported fields
}
func NewResponseWriter ¶ added in v0.7.8
func NewResponseWriter(w http.ResponseWriter, requestData *RequestData) *ResponseWriter
func (*ResponseWriter) SetEncodingHeader ¶ added in v0.7.8
func (rw *ResponseWriter) SetEncodingHeader()
Click to show internal directories.
Click to hide internal directories.