protocol

package
v0.0.0-...-be98215 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(data []byte) (string, interface{})

func Encode

func Encode(code int, result interface{}) []byte

result can ptr or value

Types

type HeartBeat

type HeartBeat struct {
}

to common, websocket and tcp use the same

type Login

type Login struct {
	Openid string `json:"openid"`
}

type Request

type Request struct {
	Service string          `json:"service"`
	Data    json.RawMessage `json:"data"`
}

request head

type Response

type Response struct {
	Code    int         `json:"code"` // 0 correct
	Service string      `json:"service"`
	Result  interface{} `json:"result"`
}

response head

Jump to

Keyboard shortcuts

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