Introduce sample plugin code.

burst
Icedream 2018-04-10 16:34:41 +02:00
parent 51852d9f87
commit 0a5818132c
Signed by: icedream
GPG Key ID: C1D30A06E6490C14
3 changed files with 32 additions and 0 deletions

7
plugins/descriptor.go Normal file
View File

@ -0,0 +1,7 @@
package plugins
type PluginDescriptor struct {
Name string
Version string
Description string
}

View File

@ -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
}

View File

@ -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{}
}