gin

package
v0.0.0-...-7558d7e Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ApplicationJson = "application/json"
View Source
const ApplicationUrlencoded = "application/x-www-form-urlencoded"
View Source
const ContentType = "Content-Type"
View Source
const EXT = "Ext"
View Source
const GETPARAMS = "GetParams"
View Source
const HEART = "heart"
View Source
const ORDER = "Order"
View Source
const OTHER = "other"
View Source
const POSTPARAMS = "PostParams"
View Source
const RESULT = "Result"
View Source
const STATUS = "Status"
View Source
const TAG = "TAG"

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	*gin.Context
	// contains filtered or unexported fields
}

func NewContext

func NewContext(c *gin.Context) *Context

func (*Context) JSON

func (c *Context) JSON(code int, obj interface{})

func (*Context) JSON2

func (c *Context) JSON2(code int, obj interface{})

func (*Context) String

func (c *Context) String(code int, format string)

String writes the given string into the response body.

type H

type H map[string]interface{}

type HandlerFunc

type HandlerFunc func(*Context)

type Method

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

type WebSocketServices

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

func InitSocketService

func InitSocketService() *WebSocketServices

func (*WebSocketServices) AddGETService

func (w *WebSocketServices) AddGETService(key string, call HandlerFunc)

func (*WebSocketServices) AddPOSTService

func (w *WebSocketServices) AddPOSTService(key string, call HandlerFunc)

func (*WebSocketServices) EchoHandler

func (w *WebSocketServices) EchoHandler(ws *websocket.Conn)

{ "GetParams":"op=getTicket", "PostParams":{ "time":123456 } }

func (*WebSocketServices) SetMainRouter

func (w *WebSocketServices) SetMainRouter(mainRouter string)

Jump to

Keyboard shortcuts

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