gin

package
v0.0.0-...-6603c43 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Giraffe

type Giraffe struct {
	// contains filtered or unexported fields
}

Giraffe is a thin wrapper around giraffe.Giraffe, so we cann add get around the non-local type no func adding thingie

func Debug

func Debug() *Giraffe

Debug creates a new Giraffe for debugging

func Default

func Default() *Giraffe

Default creates a new Giraffe with sensible defaults

func New

func New(config giraffe.Config) *Giraffe

New creates a new Giraffe but you have to bring your own config

func (*Giraffe) Instance

func (g *Giraffe) Instance(name string, data interface{}) render.Render

Instance fulfills the gin.render.HTMLRender interface type. Giraffe isn't specifically for gin, but we want to fullfil the interface

type Render

type Render struct {
	Giraffe *giraffe.Giraffe
	Name    string
	Data    interface{}
}

Render is a helper struct that implements the gin.render.Render interface

func (Render) Render

func (r Render) Render(w http.ResponseWriter) error

Render fulfills the gin.render.Render interface type

func (Render) WriteContentType

func (r Render) WriteContentType(w http.ResponseWriter)

WriteContentType fulfills the gin.render.Render interface type

Jump to

Keyboard shortcuts

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