Skip to content

Commit

Permalink
feature: Plugin registration func
Browse files Browse the repository at this point in the history
  • Loading branch information
NecrossIT committed Jun 9, 2023
1 parent b8da885 commit a0a8dc1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plugin.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package Hosting_System_Plugin_Library

import "log"

type HostingPlugin struct {
Name string
Listeners []HostingListener
Expand All @@ -13,6 +15,11 @@ type HostingPluginLoader struct {
Plugins map[string]HostingPlugin
}

func RegisterPlugin(plugin HostingPlugin) HostingPlugin {
log.Println("Registering plugin: " + plugin.Name)
return plugin
}

type HostingPluginInterface interface {
GetName() string
GetVersion() string
Expand Down

0 comments on commit a0a8dc1

Please sign in to comment.