neko/pkg/types/plugins.go

23 lines
344 B
Go
Raw Normal View History

2022-04-16 07:28:00 +12:00
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
}