Versions in this module Expand all Collapse all v1 v1.9.1 Jul 28, 2023 Changes in this version + var TOMLContentType = []string + func WriteJSON(w http.ResponseWriter, obj any) error + func WriteMsgPack(w http.ResponseWriter, obj any) error + func WriteString(w http.ResponseWriter, format string, data []any) (err error) + type AsciiJSON struct + Data any + func (r AsciiJSON) Render(w http.ResponseWriter) (err error) + func (r AsciiJSON) WriteContentType(w http.ResponseWriter) + type Data struct + ContentType string + Data []byte + func (r Data) Render(w http.ResponseWriter) (err error) + func (r Data) WriteContentType(w http.ResponseWriter) + type Delims struct + Left string + Right string + type HTML struct + Data any + Name string + Template *template.Template + func (r HTML) Render(w http.ResponseWriter) error + func (r HTML) WriteContentType(w http.ResponseWriter) + type HTMLDebug struct + Delims Delims + Files []string + FuncMap template.FuncMap + Glob string + func (r HTMLDebug) Instance(name string, data any) Render + type HTMLProduction struct + Delims Delims + Template *template.Template + func (r HTMLProduction) Instance(name string, data any) Render + type HTMLRender interface + Instance func(string, any) Render + type IndentedJSON struct + Data any + func (r IndentedJSON) Render(w http.ResponseWriter) error + func (r IndentedJSON) WriteContentType(w http.ResponseWriter) + type JSON struct + Data any + func (r JSON) Render(w http.ResponseWriter) error + func (r JSON) WriteContentType(w http.ResponseWriter) + type JsonpJSON struct + Callback string + Data any + func (r JsonpJSON) Render(w http.ResponseWriter) (err error) + func (r JsonpJSON) WriteContentType(w http.ResponseWriter) + type MsgPack struct + Data any + func (r MsgPack) Render(w http.ResponseWriter) error + func (r MsgPack) WriteContentType(w http.ResponseWriter) + type ProtoBuf struct + Data any + func (r ProtoBuf) Render(w http.ResponseWriter) error + func (r ProtoBuf) WriteContentType(w http.ResponseWriter) + type PureJSON struct + Data any + func (r PureJSON) Render(w http.ResponseWriter) error + func (r PureJSON) WriteContentType(w http.ResponseWriter) + type Reader struct + ContentLength int64 + ContentType string + Headers map[string]string + Reader io.Reader + func (r Reader) Render(w http.ResponseWriter) (err error) + func (r Reader) WriteContentType(w http.ResponseWriter) + type Redirect struct + Code int + Location string + Request *http.Request + func (r Redirect) Render(w http.ResponseWriter) error + func (r Redirect) WriteContentType(http.ResponseWriter) + type Render interface + Render func(http.ResponseWriter) error + WriteContentType func(w http.ResponseWriter) + type SecureJSON struct + Data any + Prefix string + func (r SecureJSON) Render(w http.ResponseWriter) error + func (r SecureJSON) WriteContentType(w http.ResponseWriter) + type String struct + Data []any + Format string + func (r String) Render(w http.ResponseWriter) error + func (r String) WriteContentType(w http.ResponseWriter) + type TOML struct + Data any + func (r TOML) Render(w http.ResponseWriter) error + func (r TOML) WriteContentType(w http.ResponseWriter) + type XML struct + Data any + func (r XML) Render(w http.ResponseWriter) error + func (r XML) WriteContentType(w http.ResponseWriter) + type YAML struct + Data any + func (r YAML) Render(w http.ResponseWriter) error + func (r YAML) WriteContentType(w http.ResponseWriter)