-
Notifications
You must be signed in to change notification settings - Fork 7
/
main.go
32 lines (27 loc) · 794 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package main
import (
plugin "github.com/gotify/plugin-api"
)
const gitHubURL = "https://www.github.com/eternal-flame-AD/gotify-broadcast"
// GetGotifyPluginInfo returns gotify plugin info.
func GetGotifyPluginInfo() plugin.Info {
return plugin.Info{
ModulePath: "github.com/eternal-flame-AD/gotify-broadcast",
Name: "Gotify Broadcaster",
Description: "A plugin which brings broadcasts to gotify.",
Author: "eternal-flame-AD",
Website: gitHubURL,
}
}
func main() {
panic("this should be built as plugin")
}
// NewGotifyPluginInstance creates a plugin instance for a user context.
func NewGotifyPluginInstance(ctx plugin.UserContext) plugin.Plugin {
usersList.AddUser(ctx)
p := &Plugin{
UserCtx: ctx,
}
msgExchanger.OnMessage(p.recvMessage)
return p
}