handlers

package
v0.0.0-...-cf730da Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewResponse

func NewResponse() *response

Types

type ChannelContext

type ChannelContext interface {
	Param(string) string
	SSEvent(name string, message interface{})
	Stream(func(w io.Writer) bool)
}

type Context

type Context interface {
	GetString(name string) (string, bool)
	ShouldGetString(name string) (string, errors.Error)
	Param(key string) string
	GetQuery(string) (string, bool)
	SetCookie(cookie *http.Cookie)
	DeleteCookie(name string)
	BindJSON(data interface{}) errors.Error
	Cookie(string) (string, error)
	Next()
	Abort()
	Set(name string, value interface{})
}

type JsonResponse

type JsonResponse interface {
	WriteJSON(c *gin.Context)
	SetError(err errors.Error)
	SetMessage(msg string)
	SetStatus(status int)
	SetData(data interface{})
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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