Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteErrorToConn ¶
Types ¶
type Context ¶
type Context interface { SetEncryptionKey(key []byte) GetEncryptionKey() []byte TurnEncryptionOn() error TurnEncryptionOff() error RemoteAddr() net.Addr Get(key string) interface{} Set(key string, value interface{}) Bind(i interface{}) error Hero() *Hero Conn() net.Conn JSON(string, interface{}) error WriteMsg(action string, body interface{}) error ReadMsg(i interface{}) error Action() string }
type HandlerFunc ¶
type Hero ¶
type Hero struct { Address string EncrypterFunc EncrypterFunc DecrypterFunc DecrypterFunc // contains filtered or unexported fields }
func (*Hero) Action ¶
func (h *Hero) Action(name string, handler HandlerFunc)
func (*Hero) AddMiddleware ¶
func (h *Hero) AddMiddleware(handler HandlerFunc)
Click to show internal directories.
Click to hide internal directories.