plugins

package
v0.0.0-...-21c450d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL