jakiro_websocket

package
v0.0.0-...-5afe843 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2015 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WebSocketContext

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

func NewWebSocketContext

func NewWebSocketContext(request WebSocketRequest, ws *websocket.Conn) *WebSocketContext

func (*WebSocketContext) Body

func (ctx *WebSocketContext) Body() []byte

func (*WebSocketContext) Error

func (ctx *WebSocketContext) Error(code int, err error)

func (*WebSocketContext) JSON

func (ctx *WebSocketContext) JSON(code int, object interface{})

func (*WebSocketContext) Params

func (ctx *WebSocketContext) Params() map[string]string

func (*WebSocketContext) Write

func (ctx *WebSocketContext) Write(code int, response []byte)

type WebSocketErrorResponse

type WebSocketErrorResponse struct {
	Status int                   `json:"status"`
	Errors []jakiro.ContextError `json:"errors"`
}

type WebSocketRequest

type WebSocketRequest struct {
	Params map[string]string `json:"params"`
	Body   []byte            `json:"body"`
}

type WebSocketResponse

type WebSocketResponse struct {
	Status int    `json:"status"`
	Body   []byte `json:"body"`
}

Jump to

Keyboard shortcuts

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