plugins

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHandler

func GetHandler(url, method string, app *context.App) context.Handlers

GetHandler is a help method for Plugin GetHandler.

Types

type Plugin

type Plugin interface {
	GetRequest() []context.Path
	GetHandler(url, method string) context.Handlers
	InitPlugin(services service.List)
}

Plugin as one of the key components of goAdmin has three methods. GetRequest return all the path registered in the plugin. GetHandler according the url and method return the corresponding handler. InitPlugin init the plugin which do something like init the database and set the config and register the routes. The Plugin must implement the three methods.

func LoadFromPlugin added in v1.1.4

func LoadFromPlugin(mod string) Plugin

Jump to

Keyboard shortcuts

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