gate

package
v0.0.0-...-833a7b1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package gate is a generated protocol buffer package.

It is generated from these files:

gate.proto

It has these top-level messages:

AllResponse

Index

Constants

This section is empty.

Variables

View Source
var Module = func() module.Module {
	newGate := new(Gate)
	return newGate
}
View Source
var RPC_PARAM_SESSION_TYPE = "SESSION"

Functions

This section is empty.

Types

type AllResponse

type AllResponse struct {
	// 结果
	Result []byte `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// 错误结果 如果为nil表示请求正确
	Msg string `protobuf:"bytes,2,opt,name=msg" json:"msg,omitempty"`
	// 错误代码 0 means right
	State int32 `protobuf:"varint,3,opt,name=state" json:"state,omitempty"`
}

func (*AllResponse) Descriptor

func (*AllResponse) Descriptor() ([]byte, []int)

func (*AllResponse) GetMsg

func (m *AllResponse) GetMsg() string

func (*AllResponse) GetResult

func (m *AllResponse) GetResult() []byte

func (*AllResponse) GetState

func (m *AllResponse) GetState() int32

func (*AllResponse) ProtoMessage

func (*AllResponse) ProtoMessage()

func (*AllResponse) Reset

func (m *AllResponse) Reset()

func (*AllResponse) String

func (m *AllResponse) String() string

type Gate

type Gate struct {
	basemodule.BaseModule
	// contains filtered or unexported fields
}

func (*Gate) GetExecuting

func (m *Gate) GetExecuting() int64

func (*Gate) GetType

func (m *Gate) GetType() string

func (*Gate) KickOut

func (m *Gate) KickOut(userId string)

func (*Gate) OnConnect

func (m *Gate) OnConnect(sess *sessions.Session)

func (*Gate) OnDestroy

func (m *Gate) OnDestroy()

func (*Gate) OnDisConnect

func (m *Gate) OnDisConnect(sess *sessions.Session)

func (*Gate) OnInit

func (m *Gate) OnInit(app module.App, settings *conf.ModuleSettings)

func (*Gate) OnNewMessage

func (m *Gate) OnNewMessage(msg *message.PublishMessage, sess *sessions.Session) bool

func (*Gate) PushMessage

func (m *Gate) PushMessage(userId string, item *base.PushItem)

func (*Gate) PushMessagef

func (m *Gate) PushMessagef(userId string, item *base.PushItem)

func (*Gate) Run

func (m *Gate) Run(closeSig chan bool)

func (*Gate) SetOnConnectCallBack

func (m *Gate) SetOnConnectCallBack(callback module.ConnectEventCallBack)

func (*Gate) SetOnDisConnectCallBack

func (m *Gate) SetOnDisConnectCallBack(callback module.ConnectEventCallBack)

func (*Gate) Version

func (m *Gate) Version() string

func (*Gate) WriteMsg

func (m *Gate) WriteMsg(topic []byte, body []byte, packetId uint16, sess *sessions.Session) error

type MsgFormat

type MsgFormat struct {
	Module string      `json:"module"`
	Func   string      `json:"func"`
	Params interface{} `json:"params"`
}

Jump to

Keyboard shortcuts

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