Versions in this module Expand all Collapse all v0 v0.0.0 Dec 20, 2023 Changes in this version + const NoLayout + const NoWritten + const StatusCodeWritten + var ErrPushNotSupported = errors.New("push feature is not supported by this ResponseWriter") + var LimitRequestBodySize = func(maxRequestBodySizeBytes int64) Handler + var Recorder = func(ctx Context) + var RequestTransactionScope = TransactionScopeFunc(func(maybeErr TransactionErrResult, ctx Context) bool { ... }) + var SetCookieKVExpiration = time.Duration(120) * time.Minute + var StaticCacheDuration = 20 * time.Second + var TransientTransactionScope = TransactionScopeFunc(func(maybeErr TransactionErrResult, ctx Context) bool { ... }) + func DecodeQuery(path string) string + func DecodeURL(uri string) string + func Next(ctx Context) + func WriteJSON(writer io.Writer, v interface{}, options JSON) (int, error) + func WriteJSONP(writer io.Writer, v interface{}, options JSONP) (int, error) + func WriteMarkdown(writer io.Writer, markdownB []byte, options Markdown) (int, error) + func WriteXML(writer io.Writer, v interface{}, options XML) (int, error) + type Application interface + ConfigurationReadOnly func() ConfigurationReadOnly + FireErrorCode func(ctx Context) + Log func(format string, a ...interface{}) + ServeHTTP func(w http.ResponseWriter, r *http.Request) + ServeHTTPC func(ctx Context) + SessionManager func() (sessions.Sessions, error) + View func(writer io.Writer, filename string, layout string, bindingData interface{}) error + type BodyDecoder interface + Decode func(data []byte) error + type ConfigurationReadOnly interface + GetCharset func() string + GetDisableAutoFireStatusCode func() bool + GetDisableBodyConsumptionOnUnmarshal func() bool + GetDisablePathCorrection func() bool + GetEnablePathEscape func() bool + GetFireMethodNotAllowed func() bool + GetOther func() map[string]interface{} + GetTimeFormat func() string + GetTranslateFunctionContextKey func() string + GetTranslateLanguageContextKey func() string + GetVHost func() string + GetViewDataContextKey func() string + GetViewLayoutContextKey func() string + type Context interface + AddHandler func(...Handler) + Application func() Application + BeginRequest func(http.ResponseWriter, *http.Request) + BeginTransaction func(pipe func(t *Transaction)) + Binary func(data []byte) (int, error) + ClientSupportsGzip func() bool + ContentType func(cType string) + Deadline func() (deadline time.Time, ok bool) + Do func(Handlers) + Done func() <-chan struct{} + EndRequest func() + Err func() error + Exec func(method string, path string) + FormFile func(key string) (multipart.File, *multipart.FileHeader, error) + FormValue func(name string) string + FormValues func() map[string][]string + GetContentType func() string + GetCookie func(name string) string + GetHeader func(name string) string + GetStatusCode func() int + Gzip func(enable bool) + GzipResponseWriter func() *GzipResponseWriter + HTML func(htmlContents string) (int, error) + HandlerIndex func(n int) (currentIndex int) + HandlerName func() string + Handlers func() Handlers + Header func(name string, value string) + Host func() string + IsAjax func() bool + IsRecording func() (*ResponseRecorder, bool) + IsStopped func() bool + JSON func(v interface{}, options ...JSON) (int, error) + JSONP func(v interface{}, options ...JSONP) (int, error) + Markdown func(markdownB []byte, options ...Markdown) (int, error) + MaxAge func() int64 + Method func() string + Next func() + NextHandler func() Handler + NotFound func() + Params func() *RequestParams + Path func() string + PostValue func(name string) string + ReadForm func(formObject interface{}) error + ReadJSON func(jsonObject interface{}) error + ReadXML func(xmlObject interface{}) error + Record func() + Recorder func() *ResponseRecorder + Redirect func(urlToRedirect string, statusHeader ...int) + RemoteAddr func() string + RemoveCookie func(name string) + Request func() *http.Request + RequestPath func(escape bool) string + ResetResponseWriter func(ResponseWriter) + ResponseWriter func() ResponseWriter + SendFile func(filename string, destinationName string) error + ServeContent func(content io.ReadSeeker, filename string, modtime time.Time, ...) error + ServeFile func(filename string, gzipCompression bool) error + Session func() sessions.Session + SessionDestroy func() + SetCookie func(cookie *http.Cookie) + SetCookieKV func(name, value string) + SetHandlers func(Handlers) + SetMaxRequestBodySize func(limitOverBytes int64) + Skip func() + SkipTransactions func() + StatusCode func(statusCode int) + StopExecution func() + StreamWriter func(writer func(w io.Writer) bool) + Subdomain func() (subdomain string) + Text func(text string) (int, error) + TransactionsSkipped func() bool + Translate func(format string, args ...interface{}) string + TryWriteGzip func(b []byte) (int, error) + URLParam func(name string) string + URLParamInt func(name string) (int, error) + URLParamInt64 func(name string) (int64, error) + URLParams func() map[string]string + UnmarshalBody func(v interface{}, unmarshaler Unmarshaler) error + Value func(key interface{}) interface{} + Values func() *memstore.Store + View func(filename string) error + ViewData func(key string, value interface{}) + ViewLayout func(layoutTmplFile string) + VisitAllCookies func(visitor func(name string, value string)) + Write func(body []byte) (int, error) + WriteGzip func(b []byte) (int, error) + WriteString func(body string) (int, error) + WriteWithExpiration func(bodyContent []byte, cType string, modtime time.Time) error + Writef func(format string, args ...interface{}) (int, error) + XML func(v interface{}, options ...XML) (int, error) + func NewContext(framework Application) Context + type GzipResponseWriter struct + func AcquireGzipResponseWriter() *GzipResponseWriter + func (w *GzipResponseWriter) BeginGzipResponse(underline ResponseWriter) + func (w *GzipResponseWriter) Disable() + func (w *GzipResponseWriter) EndResponse() + func (w *GzipResponseWriter) FlushResponse() + func (w *GzipResponseWriter) ResetBody() + func (w *GzipResponseWriter) Write(contents []byte) (int, error) + type Handler func(Context) + type Handlers []Handler + type JSON struct + Indent string + Prefix string + StreamingJSON bool + UnescapeHTML bool + type JSONP struct + Callback string + Indent string + type Map map[string]interface + type Markdown struct + Sanitize bool + type Pool struct + func New(newFunc func() Context) *Pool + func (c *Pool) Acquire(w http.ResponseWriter, r *http.Request) Context + func (c *Pool) Attach(newFunc func() Context) + func (c *Pool) Release(ctx Context) + type RequestParams struct + func (r *RequestParams) Set(key, value string) + func (r *RequestParams) Visit(visitor func(key string, value string)) + func (r RequestParams) Get(key string) string + func (r RequestParams) GetDecoded(key string) string + func (r RequestParams) GetInt(key string) (int, error) + func (r RequestParams) GetInt64(key string) (int64, error) + func (r RequestParams) GetIntUnslashed(key string) (int, error) + func (r RequestParams) Len() int + type ResponseRecorder struct + func AcquireResponseRecorder() *ResponseRecorder + func (w *ResponseRecorder) BeginRecord(underline ResponseWriter) + func (w *ResponseRecorder) Body() []byte + func (w *ResponseRecorder) ClearHeaders() + func (w *ResponseRecorder) Clone() ResponseWriter + func (w *ResponseRecorder) EndResponse() + func (w *ResponseRecorder) Flush() + func (w *ResponseRecorder) FlushResponse() + func (w *ResponseRecorder) Push(target string, opts *http.PushOptions) error + func (w *ResponseRecorder) Reset() + func (w *ResponseRecorder) ResetBody() + func (w *ResponseRecorder) ResetHeaders() + func (w *ResponseRecorder) SetBody(b []byte) + func (w *ResponseRecorder) SetBodyString(s string) + func (w *ResponseRecorder) Write(contents []byte) (int, error) + func (w *ResponseRecorder) WriteString(s string) (n int, err error) + func (w *ResponseRecorder) WriteTo(res ResponseWriter) + func (w *ResponseRecorder) Writef(format string, a ...interface{}) (n int, err error) + type ResponseWriter interface + BeginResponse func(http.ResponseWriter) + Clone func() ResponseWriter + EndResponse func() + FlushResponse func() + GetBeforeFlush func() func() + SetBeforeFlush func(cb func()) + StatusCode func() int + WriteString func(s string) (n int, err error) + WriteTo func(ResponseWriter) + Writef func(format string, a ...interface{}) (n int, err error) + Written func() int + func AcquireResponseWriter() ResponseWriter + type Transaction struct + func (t *Transaction) Complete(err error) + func (t *Transaction) Context() Context + func (t *Transaction) SetScope(scope TransactionScope) + type TransactionErrResult struct + ContentType string + Reason string + StatusCode int + func NewTransactionErrResult() TransactionErrResult + func (err TransactionErrResult) Error() string + func (err TransactionErrResult) IsFailure() bool + type TransactionScope interface + EndTransaction func(maybeErr TransactionErrResult, ctx Context) bool + type TransactionScopeFunc func(maybeErr TransactionErrResult, ctx Context) bool + func (tsf TransactionScopeFunc) EndTransaction(maybeErr TransactionErrResult, ctx Context) bool + type Unmarshaler interface + Unmarshal func(data []byte, v interface{}) error + type UnmarshalerFunc func(data []byte, v interface{}) error + func (u UnmarshalerFunc) Unmarshal(data []byte, v interface{}) error + type XML struct + Indent string + Prefix string