handlers

package
v0.0.0-...-454afca Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2018 License: Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Auth = AuthHandler()
)

Functions

func AuthHandler

func AuthHandler() air.Gas

func CloseSocket

func CloseSocket()

func Error

func Error(res *air.Response, code int, message string) error

func Success

func Success(res *air.Response, data interface{}) error

Types

type Map

type Map map[string]interface{}

type Message

type Message struct {
	From    string `json:"from"`
	Type    string `json:"type"`
	Content string `json:"content"`
	Time    string `json:"time"`
}

func (*Message) Marshal

func (m *Message) Marshal() ([]byte, error)

type SocketManager

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

func (*SocketManager) Close

func (sm *SocketManager) Close()

func (*SocketManager) SendMsg

func (sm *SocketManager) SendMsg(msg *Message)

Jump to

Keyboard shortcuts

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