plugins

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

View Source
const (
	PluginsDir    = "./plugins"
	CmdSymbolName = "Plugins"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module interface {
	Init(context.Context) error
}

Module a plugin that can be initialized

type Plugin

type Plugin interface {
	Name() string
	Usage() string
	Section() string
	ShortDesc() string
	LongDesc() string
	Migrate() []interface{}
	Resources() []interface{}
	Application() application.MicroAppInterface
	FuncMapMaker(view *render.Render) *render.Render
}

type Plugins

type Plugins interface {
	Module
	Registry() map[string]Plugin
}

Plugins a plugin that contains one or more command

type QorPlugin

type QorPlugin struct {
	Ctx      context.Context
	Commands map[string]Plugin
	Closed   chan struct{}
}

func New

func New() *QorPlugin

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳