Documentation
¶
Index ¶
- type AppPlugSys
- func (self *AppPlugSys) AcceptPlugin(plugwrap *PluginWrap) error
- func (self *AppPlugSys) ApplicationInfoTable() []*AppPlugSysApplicationDisplayItem
- func (self *AppPlugSys) DisplayApplication(plugin_name string, name string) error
- func (self *AppPlugSys) GetPluginByName(name string) (ret *PluginWrap, err error)
- func (self *AppPlugSys) PluginInfoTable() map[string]*AppPlugSysPluginDisplayItem
- func (self *AppPlugSys) RemovePlugin(name string) error
- type AppPlugSysApplicationDisplayItem
- type AppPlugSysIface
- func (self *AppPlugSysIface) GetPlugin(name string) (*Plugin, error)
- func (self *AppPlugSysIface) GetPluginApplication(plugname string, name string) (*PluginApplication, error)
- func (self *AppPlugSysIface) GetPluginApplicationController(plugname string, name string) (interface{}, error)
- func (self *AppPlugSysIface) GetPluginController(name string) (interface{}, error)
- type AppPlugSysPluginDisplayItem
- type AppViewI
- type BasicPluginInfo
- type DBPluginInfo
- type Plugin
- type PluginApplication
- type PluginSearcherI
- type PluginSearcherSearchResultItem
- type PluginWrap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppPlugSys ¶
type AppPlugSys struct {
// contains filtered or unexported fields
}
func NewAppPlugSys ¶
func NewAppPlugSys( db *gorm.DB, getPluginDB func(*DBPluginInfo) (*gorm.DB, bool, bool, error), plugin_searcher PluginSearcherI, ) (*AppPlugSys, error)
func (*AppPlugSys) AcceptPlugin ¶
func (self *AppPlugSys) AcceptPlugin(plugwrap *PluginWrap) error
func (*AppPlugSys) ApplicationInfoTable ¶
func (self *AppPlugSys) ApplicationInfoTable() []*AppPlugSysApplicationDisplayItem
func (*AppPlugSys) DisplayApplication ¶
func (self *AppPlugSys) DisplayApplication(plugin_name string, name string) error
func (*AppPlugSys) GetPluginByName ¶
func (self *AppPlugSys) GetPluginByName(name string) (ret *PluginWrap, err error)
func (*AppPlugSys) PluginInfoTable ¶
func (self *AppPlugSys) PluginInfoTable() map[string]*AppPlugSysPluginDisplayItem
func (*AppPlugSys) RemovePlugin ¶
func (self *AppPlugSys) RemovePlugin(name string) error
type AppPlugSysIface ¶
type AppPlugSysIface struct {
// contains filtered or unexported fields
}
func NewAppPlugSysIface ¶
func NewAppPlugSysIface(plugin_wrap *PluginWrap) (*AppPlugSysIface, error)
func (*AppPlugSysIface) GetPlugin ¶
func (self *AppPlugSysIface) GetPlugin(name string) (*Plugin, error)
func (*AppPlugSysIface) GetPluginApplication ¶
func (self *AppPlugSysIface) GetPluginApplication(plugname string, name string) (*PluginApplication, error)
func (*AppPlugSysIface) GetPluginApplicationController ¶
func (self *AppPlugSysIface) GetPluginApplicationController(plugname string, name string) (interface{}, error)
func (*AppPlugSysIface) GetPluginController ¶
func (self *AppPlugSysIface) GetPluginController(name string) (interface{}, error)
type BasicPluginInfo ¶
type DBPluginInfo ¶
type DBPluginInfo struct {
Name string `gorm:"primary_key"`
BuiltIn bool
Sha512 string
Enabled bool
LastDBReKey time.Time
Key string
}
func (DBPluginInfo) TableName ¶
func (DBPluginInfo) TableName() string
type Plugin ¶
type Plugin struct {
Name string
Title string
Description string
Icon []byte
Requires []string // unique names of required plugins
Init func(iface *AppPlugSysIface, db *gorm.DB) error
Destroy func() error
Worker *worker.Worker // set this to nil, if plugin does not support this
GetController func() interface{}
Display func() error // set this to nil, if plugin does not support this
Applications map[string]*PluginApplication
}
type PluginApplication ¶
type PluginSearcherI ¶
type PluginSearcherI interface {
FindAll() ([]*PluginSearcherSearchResultItem, error)
FindBuiltIn(name string) (*PluginSearcherSearchResultItem, error)
FindBySha512(sha512 string) (*PluginSearcherSearchResultItem, error)
}
type PluginSearcherSearchResultItem ¶
type PluginSearcherSearchResultItem struct {
BasicPluginInfo
Path string
Plugin *Plugin
}
type PluginWrap ¶
type PluginWrap struct {
BasicPluginInfo
Enabled bool
LastBDReKey time.Time
Plugin *Plugin
// contains filtered or unexported fields
}
func NewPluginWrapFromSearchItem ¶
func NewPluginWrapFromSearchItem( psri *PluginSearcherSearchResultItem, sys *AppPlugSys, ) (*PluginWrap, error)
Click to show internal directories.
Click to hide internal directories.