Documentation ¶
Index ¶
- type Channel
- type Controller
- func (p Controller) ChannelJoin(sessionUUID string, conn net.Conn, op ws.OpCode, write Write, message *Message) (*rediscli.ChannelPubSub, IError)
- func (p Controller) ChannelLeave(sessionUUID string, writer Write, message *Message) IError
- func (p Controller) ChannelMessage(sessionUUID string, conn net.Conn, op ws.OpCode, writer Write, ...) IError
- func (p Controller) Error(code uint32, err error, sessionUID string, payload interface{}) *Message
- func (p Controller) Ready(sessionUUID string) *Message
- func (p Controller) SignIn(sessionUUID string, conn net.Conn, op ws.OpCode, write Write, message *Message) IError
- func (p Controller) SignOut(sessionUUID string, conn net.Conn, op ws.OpCode, write Write, message *Message) IError
- func (p Controller) SignUp(sessionUUID string, conn net.Conn, op ws.OpCode, write Write, message *Message) IError
- func (p Controller) SysChannelJoin(user *rediscli.User, recipientsUUID []string) *Message
- func (p Controller) SysChannelLeave(user *rediscli.User, recipientsUUID []string) *Message
- func (p Controller) SysSignIn(user *rediscli.User) *Message
- func (p *Controller) Users(sessionUUID string, conn net.Conn, op ws.OpCode, write Write) IError
- type DataAuthorized
- type DataChannelJoin
- type DataChannelLeave
- type DataChannelMessage
- type DataError
- type DataReady
- type DataSignIn
- type DataSignOut
- type DataSignUp
- type DataSys
- type DataType
- type DataUnAuthorized
- type DataUsers
- type Error
- type IError
- type Message
- type Write
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(r *rediscli.Redis) *Controller
func (Controller) ChannelJoin ¶
func (Controller) ChannelLeave ¶
func (p Controller) ChannelLeave(sessionUUID string, writer Write, message *Message) IError
func (Controller) ChannelMessage ¶
func (Controller) Error ¶
func (p Controller) Error(code uint32, err error, sessionUID string, payload interface{}) *Message
func (Controller) Ready ¶
func (p Controller) Ready(sessionUUID string) *Message
func (Controller) SysChannelJoin ¶
func (p Controller) SysChannelJoin(user *rediscli.User, recipientsUUID []string) *Message
func (Controller) SysChannelLeave ¶
func (p Controller) SysChannelLeave(user *rediscli.User, recipientsUUID []string) *Message
type DataAuthorized ¶
type DataChannelJoin ¶
type DataChannelLeave ¶
type DataChannelMessage ¶
type DataChannelMessage struct { UUID string `json:"UUID"` Sender *rediscli.User `json:"Sender,omitempty"` SenderUUID string `json:"SenderUUID"` Recipient *rediscli.User `json:"Recipient,omitempty"` RecipientUUID string `json:"RecipientUUID"` Message string `json:"Message"` CreatedAt time.Time `json:"CreatedAt"` }
type DataSignIn ¶
type DataSignOut ¶
type DataSignOut struct {
UUID string `json:"uuid"`
}
type DataSignUp ¶
type DataSys ¶
type DataSys struct { Type DataType `json:"type"` Message string `json:"message,omitempty"` SignIn *DataSignIn `json:"signIn,omitempty"` ChannelJoin *DataChannelJoin `json:"channelJoin,omitempty"` ChannelLeave *DataChannelLeave `json:"channelLeave,omitempty"` }
type DataType ¶
type DataType string
const ( DataTypeSys DataType = "sys" DataTypeReady DataType = "ready" DataTypeError DataType = "error" DataTypeUsers DataType = "users" DataTypeSignIn DataType = "signIn" DataTypeSignUp DataType = "signUp" DataTypeSignOut DataType = "signOut" DataTypeAuthorized DataType = "authorized" DataTypeUnAuthorized DataType = "unauthorized" DataTypeChannelJoin DataType = "channelJoin" DataTypeChannelMessage DataType = "channelMessage" DataTypeChannelMessages DataType = "channelMessages" DataTypeChannelLeave DataType = "channelLeave" )
type DataUnAuthorized ¶
type Message ¶
type Message struct { SUUID string `json:"SUUID,omitempty"` Type DataType `json:"type"` UserUUID string `json:"userUUID,omitempty"` User *rediscli.User `json:"user,omitempty"` UserAccessKey string `json:"userAccessKey,omitempty"` Sys *DataSys `json:"sys,omitempty"` Ready *DataReady `json:"ready,omitempty"` Error *DataError `json:"error,omitempty"` Users *DataUsers `json:"users,omitempty"` SignIn *DataSignIn `json:"signIn,omitempty"` SignUp *DataSignUp `json:"signUp,omitempty"` SignOut *DataSignOut `json:"signOut,omitempty"` Authorized *DataAuthorized `json:"authorized,omitempty"` ChannelJoin *DataChannelJoin `json:"channelJoin,omitempty"` ChannelMessage *DataChannelMessage `json:"channelMessage,omitempty"` ChannelLeave *DataChannelLeave `json:"channelLeave,omitempty"` // contains filtered or unexported fields }
func SysMessage ¶
Click to show internal directories.
Click to hide internal directories.