// Package abstract... // // Description : 长连接命令的约束 // // Author : go_developer@163.com<白茶清欢> // // Date : 2021-03-27 6:34 下午 package abstract import ( "git.zhangdeman.cn/zhangdeman/websocket/config" "git.zhangdeman.cn/zhangdeman/websocket/context" ) // ICommand 指令 // // Author : go_developer@163.com<白茶清欢> // // Date : 6:35 下午 2021/3/27 type ICommand interface { // GetCommand 注册的客户端指令 // // Author : go_developer@163.com<白茶清欢> // // Date : 7:21 下午 2021/3/27 GetCommand() string // GetConfigOption 获取指令的配置 // // Author : go_developer@163.com<白茶清欢> // // Date : 2:49 下午 2021/4/17 GetConfigOption() []config.SetCommandConfig // Execute 执行指令的逻辑 // // Author : go_developer@163.com<白茶清欢> // // Date : 7:21 下午 2021/3/27 Execute(ctx *context.WSContext, data []byte) (interface{}, error) }