Documentation ¶
Index ¶
- func Activate(name string)
- func Deactivate(name string)
- func GetPlugins() map[string]PluginInterface
- func Handler(name string, h GoInk.Handler, inter bool)
- func Handlers() (map[string]map[string]GoInk.Handler, map[string]pluginRoute)
- func Init()
- func Route(name string, method string, pattern string, handler GoInk.Handler)
- func Update(app *GoInk.App)
- type EmailPlugin
- func (p *EmailPlugin) Activate()
- func (p *EmailPlugin) Deactivate()
- func (p *EmailPlugin) Desc() string
- func (p *EmailPlugin) Form() string
- func (p *EmailPlugin) HasSetting() bool
- func (p *EmailPlugin) IsActive() bool
- func (p *EmailPlugin) Key() string
- func (p *EmailPlugin) Name() string
- func (p *EmailPlugin) SetSetting(settings map[string]string)
- func (p *EmailPlugin) ToStorage() map[string]interface{}
- func (p *EmailPlugin) Version() string
- type HelloPlugin
- func (p *HelloPlugin) Activate()
- func (p *HelloPlugin) Deactivate()
- func (p *HelloPlugin) Desc() string
- func (p *HelloPlugin) Form() string
- func (p *HelloPlugin) HasSetting() bool
- func (p *HelloPlugin) IsActive() bool
- func (p *HelloPlugin) Key() string
- func (p *HelloPlugin) Name() string
- func (p *HelloPlugin) SetSetting(settings map[string]string)
- func (p *HelloPlugin) ToStorage() map[string]interface{}
- func (p *HelloPlugin) Version() string
- type PluginInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deactivate ¶
func Deactivate(name string)
func GetPlugins ¶
func GetPlugins() map[string]PluginInterface
Types ¶
type EmailPlugin ¶
type EmailPlugin struct {
// contains filtered or unexported fields
}
Email plugin instance, contains activation status, handler status, settings and templates.
func (*EmailPlugin) Activate ¶
func (p *EmailPlugin) Activate()
Activate activates email plugin. It will change activate status to on. If the handlers are not registered, it will add handlers to router table.
func (*EmailPlugin) Deactivate ¶
func (p *EmailPlugin) Deactivate()
Deactivate closes this email plugin.
func (*EmailPlugin) Desc ¶
func (p *EmailPlugin) Desc() string
Desc returns email plugin descripition.
func (*EmailPlugin) Form ¶
func (p *EmailPlugin) Form() string
Form returns the form template string for email plugin.
func (*EmailPlugin) HasSetting ¶
func (p *EmailPlugin) HasSetting() bool
HasSetting returns bool of setting form existing.
func (*EmailPlugin) IsActive ¶
func (p *EmailPlugin) IsActive() bool
IsActive returns plugin activation status.
func (*EmailPlugin) SetSetting ¶
func (p *EmailPlugin) SetSetting(settings map[string]string)
SetSettings saves plugin settings to json.
func (*EmailPlugin) ToStorage ¶
func (p *EmailPlugin) ToStorage() map[string]interface{}
ToStorage creates plugin storage map for plugin list json.
func (*EmailPlugin) Version ¶
func (p *EmailPlugin) Version() string
Version returns plugin version string.
type HelloPlugin ¶
type HelloPlugin struct {
// contains filtered or unexported fields
}
func (*HelloPlugin) Activate ¶
func (p *HelloPlugin) Activate()
func (*HelloPlugin) Deactivate ¶
func (p *HelloPlugin) Deactivate()
func (*HelloPlugin) Desc ¶
func (p *HelloPlugin) Desc() string
func (*HelloPlugin) Form ¶
func (p *HelloPlugin) Form() string
func (*HelloPlugin) HasSetting ¶
func (p *HelloPlugin) HasSetting() bool
func (*HelloPlugin) IsActive ¶
func (p *HelloPlugin) IsActive() bool
func (*HelloPlugin) Key ¶
func (p *HelloPlugin) Key() string
func (*HelloPlugin) Name ¶
func (p *HelloPlugin) Name() string
func (*HelloPlugin) SetSetting ¶
func (p *HelloPlugin) SetSetting(settings map[string]string)
func (*HelloPlugin) ToStorage ¶
func (p *HelloPlugin) ToStorage() map[string]interface{}
func (*HelloPlugin) Version ¶
func (p *HelloPlugin) Version() string
type PluginInterface ¶
type PluginInterface interface { Name() string Key() string Desc() string Version() string Activate() Deactivate() IsActive() bool HasSetting() bool Form() string SetSetting(settings map[string]string) ToStorage() map[string]interface{} }
func GetPluginByKey ¶
func GetPluginByKey(key string) PluginInterface
Click to show internal directories.
Click to hide internal directories.