uplink/plugins/interfaces.go

29 lines
551 B
Go
Raw Normal View History

2018-04-10 15:08:40 +00:00
package plugins
import (
2018-04-11 15:55:15 +00:00
"git.icedream.tech/icedream/uplink/app/authentication"
"git.icedream.tech/icedream/uplink/app/channels"
2018-04-10 15:08:40 +00:00
"git.icedream.tech/icedream/uplink/app/servers/http"
)
type PluginRunner func() PluginInstance
type PluginInstance interface {
2018-04-11 15:55:15 +00:00
Init()
}
type AuthenticatorPlugin interface {
PluginInstance
SetAuthenticator(authentication.Authenticator)
2018-04-10 15:08:40 +00:00
}
type ServerPlugin interface {
PluginInstance
SetServer(*httpserver.Server)
}
type ChannelPlugin interface {
PluginInstance
2018-04-11 15:55:15 +00:00
SetChannelManager(*channels.ChannelManager)
2018-04-10 15:08:40 +00:00
}