go-admin: github.com/GoAdminGroup/go-admin/plugins Index | Files | Directories

package plugins

import "github.com/GoAdminGroup/go-admin/plugins"

Index

Package Files

plugins.go

func GetHandler Uses

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

GetHandler is a help method for Plugin GetHandler.

type Plugin Uses

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 Uses

func LoadFromPlugin(mod string) Plugin

Directories

PathSynopsis
admin
admin/controller
admin/models
admin/modules
admin/modules/captcha
admin/modules/constant
admin/modules/form
admin/modules/guard
admin/modules/paginator
admin/modules/parameter
admin/modules/response
admin/modules/table
example
example/go_plugin

Package plugins imports 5 packages (graph) and is imported by 27 packages. Updated 2020-01-23. Refresh now. Tools for package owners.