Documentation
¶
Index ¶
Constants ¶
View Source
const ( ActionHello = "hello" ActionHeartbeat = "heartbeat" ActionNotifyUnknownAction = "notify.unknown.action" ActionChatMessage = "message.chat" ActionChatMessageResend = "message.chat.resend" ActionGroupMessage = "message.group" ActionMessageFailed = "message.failed.send" ActionNotifyNeedAuth = "notify.auth" ActionNotifyKickOut = "notify.kickout" ActionNotifyNewContact = "notify.contact" ActionNotifyGroup = "notify.group" ActionNotifyAccountLogin = "notify.login" ActionNotifyAccountLogout = "notify.logout" ActionNotifyError = "notify.error" ActionAckRequest = "ack.request" ActionAckGroupMsg = "ack.group.msg" ActionAckMessage = "ack.message" ActionAckNotify = "ack.notify" ActionApiAuth = "api.auth" ActionApiFailed = "api.failed" ActionApiSuccess = "api.success" ActionClientCustom = "message.cli" NotifyKickOut = "notify.kickout" AckOffline = "ack.offline" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BotX ¶
type BotX struct {
Id string
// contains filtered or unexported fields
}
func (*BotX) HandleChatMessage ¶
func (b *BotX) HandleChatMessage(h func(m *messages.GlideMessage, cm *messages.ChatMessage))
type MessageHandler ¶
type MessageHandler func(g gate.Gateway, m *messages.GlideMessage)
MessageHandler used to handle the message that robot received.
type MessageInterceptor ¶
type MessageInterceptor interface {
// contains filtered or unexported methods
}
type ProxyRobot ¶
type ProxyRobot struct {
}
func (*ProxyRobot) EnqueueMessage ¶
func (p *ProxyRobot) EnqueueMessage(message *messages.GlideMessage) error
func (*ProxyRobot) Exit ¶
func (p *ProxyRobot) Exit()
func (*ProxyRobot) GetInfo ¶
func (p *ProxyRobot) GetInfo() gate.Info
func (*ProxyRobot) IsRunning ¶
func (p *ProxyRobot) IsRunning() bool
func (*ProxyRobot) Run ¶
func (p *ProxyRobot) Run()
func (*ProxyRobot) SetID ¶
func (p *ProxyRobot) SetID(id gate.ID)
type Robot ¶
type Robot struct {
Rec chan *messages.GlideMessage
// contains filtered or unexported fields
}
type RobotConnection ¶
type RobotConnection struct {
// contains filtered or unexported fields
}
RobotConnection .
func NewRobotConnection ¶
func NewRobotConnection(g gate.Gateway, handler MessageHandler, opts *Options) (*RobotConnection, error)
func (*RobotConnection) EnqueueMessage ¶
func (r *RobotConnection) EnqueueMessage(m *messages.GlideMessage) error
func (*RobotConnection) Exit ¶
func (r *RobotConnection) Exit()
func (*RobotConnection) GetInfo ¶
func (r *RobotConnection) GetInfo() gate.Info
func (*RobotConnection) IsRunning ¶
func (r *RobotConnection) IsRunning() bool
func (*RobotConnection) Run ¶
func (r *RobotConnection) Run()
func (*RobotConnection) SetID ¶
func (r *RobotConnection) SetID(id gate.ID)
type RobotOptions ¶
type RobotOptions struct {
}
Click to show internal directories.
Click to hide internal directories.