Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(app *astraengine.App, modules ...Module)
Types ¶
type AttachTestCommand ¶ added in v1.0.2
type AttachTestCommand struct{}
func NewAttachTestCommand ¶ added in v1.0.2
func NewAttachTestCommand() *AttachTestCommand
func (*AttachTestCommand) Name ¶ added in v1.0.2
func (c *AttachTestCommand) Name() string
func (*AttachTestCommand) Register ¶ added in v1.0.2
func (c *AttachTestCommand) Register(app *astraengine.App)
type BotcmdModule ¶
type BotcmdModule struct {
// contains filtered or unexported fields
}
func NewBotcmdModule ¶
func NewBotcmdModule() *BotcmdModule
func (*BotcmdModule) Name ¶
func (m *BotcmdModule) Name() string
func (*BotcmdModule) Register ¶
func (m *BotcmdModule) Register(app *astraengine.App)
type CallbackModule ¶
type CallbackModule interface {
Pattern() string
HandleCallback(ctx CommandContext) error
}
CallbackModule is a convenience interface for callback routes.
type CommandContext ¶
type CommandModule ¶
type CommandModule interface {
Command() string
HandleCommand(ctx CommandContext) error
}
CommandModule is a convenience interface for slash-like commands.
type EchoMessage ¶
type EchoMessage struct{}
func NewEchoMessage ¶
func NewEchoMessage() *EchoMessage
func (*EchoMessage) Name ¶
func (c *EchoMessage) Name() string
func (*EchoMessage) Register ¶
func (c *EchoMessage) Register(app *astraengine.App)
type FeedbackFSM ¶
type FeedbackFSM struct {
// contains filtered or unexported fields
}
func NewFeedbackFSM ¶
func NewFeedbackFSM(fsm *state.FSM) *FeedbackFSM
func (*FeedbackFSM) Name ¶
func (m *FeedbackFSM) Name() string
func (*FeedbackFSM) Register ¶
func (m *FeedbackFSM) Register(app *astraengine.App)
type MenuCallback ¶
type MenuCallback struct{}
func NewMenuCallback ¶
func NewMenuCallback() *MenuCallback
func (*MenuCallback) Name ¶
func (c *MenuCallback) Name() string
func (*MenuCallback) Register ¶
func (c *MenuCallback) Register(app *astraengine.App)
type MessageModule ¶
type MessageModule interface {
HandleMessage(ctx CommandContext) error
}
MessageModule is a convenience interface for message handlers.
type Module ¶
type Module interface {
Name() string
Register(app *astraengine.App)
}
Module is a pluggable route unit. Users can implement it in separate files and include/exclude modules in main.go depending on project needs.
func DefaultModules ¶
DefaultModules returns a user-editable default set.
type RegisterFSM ¶
type RegisterFSM struct {
// contains filtered or unexported fields
}
func NewRegisterFSM ¶
func NewRegisterFSM(fsm *state.FSM) *RegisterFSM
func (*RegisterFSM) Name ¶
func (m *RegisterFSM) Name() string
func (*RegisterFSM) Register ¶
func (m *RegisterFSM) Register(app *astraengine.App)
type StartCommand ¶
type StartCommand struct{}
func NewStartCommand ¶
func NewStartCommand() *StartCommand
func (*StartCommand) Name ¶
func (c *StartCommand) Name() string
func (*StartCommand) Register ¶
func (c *StartCommand) Register(app *astraengine.App)