gin

package
v0.0.0-...-1f46192 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTMLName

func HTMLName(name string) render.Option

HTMLName specify html template name

func HTMLTemplate

func HTMLTemplate(t *template.Template) render.Option

HTMLTemplate specify html tempalte

func JSONPCallback

func JSONPCallback(callback string) render.Option

func StringFormat

func StringFormat(format string) render.Option

Types

type AsciiJSON

type AsciiJSON = SimpleRender[gin.AsciiJSON]

type Data

type Data struct{}

func (Data) Render

func (r Data) Render(w http.ResponseWriter, rp any, opts ...render.Option) error

type HTML

type HTML struct{}

func (HTML) Render

func (r HTML) Render(w http.ResponseWriter, rp any, opts ...render.Option) error

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.

func (JsonpJSON) Render

func (r JsonpJSON) Render(w http.ResponseWriter, rp any, opts ...render.Option) error

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 String

type String struct{}

func (String) Render

func (r String) Render(w http.ResponseWriter, rp any, opts ...render.Option) error

type TOML

type TOML = SimpleRender[gin.TOML]

type XML

type XML = SimpleRender[gin.XML]

type YAML

type YAML = SimpleRender[gin.YAML]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL