Documentation ¶
Index ¶
- func CreateOutputFile() (string, func())
- func GetAbsolutePath() string
- func ToOutputFile(output string, obj interface{})
- type PluginEngine
- func (e *PluginEngine) FetchStrips(name string)
- func (e *PluginEngine) ListRegisteredPlugins() []PluginInfo
- func (e *PluginEngine) ListStrips(name string) ([]*comics.ComicStrip, error)
- func (e *PluginEngine) LoadPlugins() []*PluginInfo
- func (e *PluginEngine) RefreshPluginList() map[string]*PluginInfo
- type PluginInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOutputFile ¶
func CreateOutputFile() (string, func())
CreateOutputFile creates the output file and returns a function to clean up tem folder
func GetAbsolutePath ¶
func GetAbsolutePath() string
GetAbsolutePath returns binary absolute path (to be used from plugins to return self location)
func ToOutputFile ¶
func ToOutputFile(output string, obj interface{})
ToOutputFile writes object to file in a JSON format Created to be used from plugins to write its output to be read from main app
Types ¶
type PluginEngine ¶
type PluginEngine struct {
// contains filtered or unexported fields
}
PluginEngine handles plugins
func NewPluginEngine ¶
func NewPluginEngine() *PluginEngine
NewPluginEngine creates a new PluginEngine
func (*PluginEngine) FetchStrips ¶
func (e *PluginEngine) FetchStrips(name string)
FetchStrips fetches
func (*PluginEngine) ListRegisteredPlugins ¶
func (e *PluginEngine) ListRegisteredPlugins() []PluginInfo
ListRegisteredPlugins list all registered plugins
func (*PluginEngine) ListStrips ¶
func (e *PluginEngine) ListStrips(name string) ([]*comics.ComicStrip, error)
ListStrips list all strip info from database
func (*PluginEngine) LoadPlugins ¶
func (e *PluginEngine) LoadPlugins() []*PluginInfo
LoadPlugins lists plugins in plugin folder
func (*PluginEngine) RefreshPluginList ¶
func (e *PluginEngine) RefreshPluginList() map[string]*PluginInfo
RefreshPluginList refreshes plugin database
type PluginInfo ¶
type PluginInfo struct { Name string `storm:"id" json:"name"` Path string `storm:"unique" json:"path"` Description string `json:"description"` }
PluginInfo store plugin data
func (*PluginInfo) FetchStrips ¶
func (p *PluginInfo) FetchStrips() []*comics.ComicStrip
FetchStrips calls plugin fetch command
func (*PluginInfo) FetchWebcomics ¶
func (p *PluginInfo) FetchWebcomics() *comics.Webcomic
FetchWebcomics calls plugin fetch command