Introduce sample plugin code.
parent
51852d9f87
commit
0a5818132c
|
@ -0,0 +1,7 @@
|
||||||
|
package plugins
|
||||||
|
|
||||||
|
type PluginDescriptor struct {
|
||||||
|
Name string
|
||||||
|
Version string
|
||||||
|
Description string
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import "git.icedream.tech/icedream/uplink/app"
|
||||||
|
|
||||||
|
type pluginInstance struct {
|
||||||
|
server *app.Server
|
||||||
|
}
|
||||||
|
|
||||||
|
func (instance *pluginInstance) SetServer(server *app.Server) {
|
||||||
|
instance.server = server
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"git.icedream.tech/icedream/uplink/plugins"
|
||||||
|
)
|
||||||
|
|
||||||
|
var Descriptor = plugins.PluginDescriptor{
|
||||||
|
Name: "Icecast Input",
|
||||||
|
Description: "Allows for Icecast clients to stream to the server.",
|
||||||
|
}
|
||||||
|
|
||||||
|
func Run() *pluginInstance {
|
||||||
|
return &pluginInstance{}
|
||||||
|
}
|
Loading…
Reference in New Issue