GetDisplay implements plugin.Displayer.
(location *url.URL)
| 96 | |
| 97 | // GetDisplay implements plugin.Displayer. |
| 98 | func (c *EchoPlugin) GetDisplay(location *url.URL) string { |
| 99 | loc := &url.URL{ |
| 100 | Path: c.basePath, |
| 101 | } |
| 102 | if location != nil { |
| 103 | loc.Scheme = location.Scheme |
| 104 | loc.Host = location.Host |
| 105 | } |
| 106 | loc = loc.ResolveReference(&url.URL{ |
| 107 | Path: "echo", |
| 108 | }) |
| 109 | return "Echo plugin running at: " + loc.String() |
| 110 | } |
| 111 | |
| 112 | // NewGotifyPluginInstance creates a plugin instance for a user context. |
| 113 | func NewGotifyPluginInstance(ctx plugin.UserContext) plugin.Plugin { |