mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
replace modules with go plugins.
This commit is contained in:
22
pkg/types/plugins.go
Normal file
22
pkg/types/plugins.go
Normal file
@ -0,0 +1,22 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
type Plugin interface {
|
||||
Config() PluginConfig
|
||||
Start(PluginManagers)
|
||||
Shutdown() error
|
||||
}
|
||||
|
||||
type PluginConfig interface {
|
||||
Init(cmd *cobra.Command) error
|
||||
Set()
|
||||
}
|
||||
|
||||
type PluginManagers struct {
|
||||
SessionManager SessionManager
|
||||
WebSocketManager WebSocketManager
|
||||
ApiManager ApiManager
|
||||
}
|
Reference in New Issue
Block a user