Documentation ¶
Index ¶
- func HTMLName(name string) render.Option
- func HTMLTemplate(t *template.Template) render.Option
- func JSONPCallback(callback string) render.Option
- func StringFormat(format string) render.Option
- type AsciiJSON
- type Data
- type HTML
- type IndentedJSON
- type JSON
- type JsonpJSON
- type MsgPack
- type ProtoBuf
- type PureJSON
- type SecureJSON
- type SimpleRender
- type SimpleRenderKind
- type String
- type TOML
- type XML
- type YAML
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTMLTemplate ¶
HTMLTemplate specify html tempalte
func JSONPCallback ¶
func StringFormat ¶
Types ¶
type AsciiJSON ¶
type AsciiJSON = SimpleRender[gin.AsciiJSON]
type IndentedJSON ¶
type IndentedJSON = SimpleRender[gin.IndentedJSON]
type JSON ¶
type JSON = SimpleRender[gin.JSON]
type JsonpJSON ¶
type JsonpJSON struct{}
JsonpJSON contains the given interface object its callback.
type MsgPack ¶
type MsgPack = SimpleRender[gin.MsgPack]
type ProtoBuf ¶
type ProtoBuf = SimpleRender[gin.ProtoBuf]
type PureJSON ¶
type PureJSON = SimpleRender[gin.PureJSON]
type SecureJSON ¶
type SecureJSON struct {
Prefix string
}
func (SecureJSON) Render ¶
func (r SecureJSON) Render(w http.ResponseWriter, rp any, opts ...render.Option) error
type SimpleRender ¶
type SimpleRender[T SimpleRenderKind] struct{}
func (SimpleRender[T]) Render ¶
func (sr SimpleRender[T]) Render(w http.ResponseWriter, rp any, opts ...render.Option) error
type SimpleRenderKind ¶
type SimpleRenderKind interface { ~struct { Data any } Render(http.ResponseWriter) error }
type TOML ¶
type TOML = SimpleRender[gin.TOML]
type XML ¶
type XML = SimpleRender[gin.XML]
type YAML ¶
type YAML = SimpleRender[gin.YAML]
Click to show internal directories.
Click to hide internal directories.