增加基础的接口约束
This commit is contained in:
30
abstract/ICommand.go
Normal file
30
abstract/ICommand.go
Normal file
@ -0,0 +1,30 @@
|
||||
// Package abstract...
|
||||
//
|
||||
// Description : 长连接命令的约束
|
||||
//
|
||||
// Author : go_developer@163.com<张德满>
|
||||
//
|
||||
// Date : 2021-03-27 6:34 下午
|
||||
package abstract
|
||||
|
||||
import "github.com/go-developer/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
|
||||
// Execute 执行指令的逻辑
|
||||
//
|
||||
// Author : go_developer@163.com<张德满>
|
||||
//
|
||||
// Date : 7:21 下午 2021/3/27
|
||||
Execute(ctx *context.WSContext) error
|
||||
}
|
Reference in New Issue
Block a user