controller

package
v1.2.24 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2022 License: Apache-2.0 Imports: 50 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPluginsPageJS added in v1.2.15

func GetPluginsPageJS(data PluginsPageJSData) template.JS

Types

type Config

type Config struct {
	Config     *c.Config
	Services   service.List
	Connection db.Connection
	Generators table.GeneratorList
}

type Handler added in v1.2.5

type Handler struct {
	// contains filtered or unexported fields
}

func New added in v1.2.5

func New(cfg ...Config) *Handler

func (*Handler) AddNavButton added in v1.2.8

func (h *Handler) AddNavButton(btns *types.Buttons)

func (*Handler) AddOperation added in v1.2.14

func (h *Handler) AddOperation(nodes ...context.Node)

func (*Handler) ApiCreate added in v1.2.8

func (h *Handler) ApiCreate(ctx *context.Context)

func (*Handler) ApiCreateForm added in v1.2.8

func (h *Handler) ApiCreateForm(ctx *context.Context)

func (*Handler) ApiDetail added in v1.2.8

func (h *Handler) ApiDetail(ctx *context.Context)

func (*Handler) ApiList added in v1.2.8

func (h *Handler) ApiList(ctx *context.Context)

func (*Handler) ApiUpdate added in v1.2.8

func (h *Handler) ApiUpdate(ctx *context.Context)

func (*Handler) ApiUpdateForm added in v1.2.8

func (h *Handler) ApiUpdateForm(ctx *context.Context)

func (*Handler) Assets added in v1.2.5

func (h *Handler) Assets(ctx *context.Context)

Assets return front-end assets according the request path.

func (*Handler) Auth added in v1.2.5

func (h *Handler) Auth(ctx *context.Context)

Auth check the input password and username for authentication.

func (*Handler) CheckDatabase added in v1.2.5

func (h *Handler) CheckDatabase(ctx *context.Context)

CheckDatabase check the database connection.

func (*Handler) Delete added in v1.2.5

func (h *Handler) Delete(ctx *context.Context)

Delete delete the row from database.

func (*Handler) DeleteMenu added in v1.2.5

func (h *Handler) DeleteMenu(ctx *context.Context)

DeleteMenu delete the menu of given id.

func (*Handler) EditForm added in v1.2.5

func (h *Handler) EditForm(ctx *context.Context)

func (*Handler) EditMenu added in v1.2.5

func (h *Handler) EditMenu(ctx *context.Context)

EditMenu edit the menu of given id.

func (*Handler) Execute added in v1.2.7

func (h *Handler) Execute(ctx *context.Context, user models.UserModel, panel types.Panel, plugName string,
	options ...template.ExecuteOptions) *bytes.Buffer

func (*Handler) ExecuteWithBtns added in v1.2.15

func (h *Handler) ExecuteWithBtns(ctx *context.Context, user models.UserModel, panel types.Panel, plugName string, btns types.Buttons,
	options ...template.ExecuteOptions) *bytes.Buffer

func (*Handler) Export added in v1.2.5

func (h *Handler) Export(ctx *context.Context)

Export export table rows as excel object.

func (*Handler) GlobalDeferHandler added in v1.2.5

func (h *Handler) GlobalDeferHandler(ctx *context.Context)

GlobalDeferHandler is a global error handler of admin plugin.

func (*Handler) HTML added in v1.2.7

func (h *Handler) HTML(ctx *context.Context, user models.UserModel, panel types.Panel,
	options ...template.ExecuteOptions)

func (*Handler) HTMLPlug added in v1.2.15

func (h *Handler) HTMLPlug(ctx *context.Context, user models.UserModel, panel types.Panel, plugName string,
	options ...template.ExecuteOptions)

func (*Handler) Logout added in v1.2.5

func (h *Handler) Logout(ctx *context.Context)

Logout delete the cookie.

func (*Handler) MenuOrder added in v1.2.5

func (h *Handler) MenuOrder(ctx *context.Context)

MenuOrder change the order of menu items.

func (*Handler) NewForm added in v1.2.5

func (h *Handler) NewForm(ctx *context.Context)

NewForm insert a table row into database.

func (*Handler) NewMenu added in v1.2.5

func (h *Handler) NewMenu(ctx *context.Context)

NewMenu create a new menu item.

func (*Handler) Operation added in v1.2.7

func (h *Handler) Operation(ctx *context.Context)

func (*Handler) OperationHandler added in v1.2.7

func (h *Handler) OperationHandler(path string, ctx *context.Context) bool

func (*Handler) PluginDetail added in v1.2.15

func (h *Handler) PluginDetail(ctx *context.Context)

func (*Handler) PluginDownload added in v1.2.15

func (h *Handler) PluginDownload(ctx *context.Context)

func (*Handler) PluginStore added in v1.2.15

func (h *Handler) PluginStore(ctx *context.Context)

func (*Handler) Plugins added in v1.2.15

func (h *Handler) Plugins(ctx *context.Context)

func (*Handler) RecordOperationLog added in v1.2.5

func (h *Handler) RecordOperationLog(ctx *context.Context)

RecordOperationLog record all operation logs, store into database.

func (*Handler) ServerLogin added in v1.2.15

func (h *Handler) ServerLogin(ctx *context.Context)

func (*Handler) SetCaptcha added in v1.2.5

func (h *Handler) SetCaptcha(captcha map[string]string)

func (*Handler) SetRoutes added in v1.2.5

func (h *Handler) SetRoutes(r context.RouterMap)

func (*Handler) ShowDetail added in v1.2.5

func (h *Handler) ShowDetail(ctx *context.Context)

func (*Handler) ShowEditMenu added in v1.2.5

func (h *Handler) ShowEditMenu(ctx *context.Context)

ShowEditMenu show edit menu page.

func (*Handler) ShowForm added in v1.2.5

func (h *Handler) ShowForm(ctx *context.Context)

ShowForm show form page.

func (*Handler) ShowInfo added in v1.2.5

func (h *Handler) ShowInfo(ctx *context.Context)

ShowInfo show info page.

func (*Handler) ShowInstall added in v1.2.5

func (h *Handler) ShowInstall(ctx *context.Context)

ShowInstall show install page.

func (*Handler) ShowLogin added in v1.2.5

func (h *Handler) ShowLogin(ctx *context.Context)

ShowLogin show the login page.

func (*Handler) ShowMenu added in v1.2.5

func (h *Handler) ShowMenu(ctx *context.Context)

ShowMenu show menu info page.

func (*Handler) ShowNewForm added in v1.2.5

func (h *Handler) ShowNewForm(ctx *context.Context)

ShowNewForm show a new form page.

func (*Handler) ShowNewMenu added in v1.2.5

func (h *Handler) ShowNewMenu(ctx *context.Context)

ShowNewMenu show new menu page.

func (*Handler) SystemInfo added in v1.2.9

func (h *Handler) SystemInfo(ctx *context.Context)

func (*Handler) Update added in v1.2.5

func (h *Handler) Update(ctx *context.Context)

Update update the table row of given id.

func (*Handler) UpdateCfg added in v1.2.7

func (h *Handler) UpdateCfg(cfg Config)

type PluginBoxParam added in v1.2.15

type PluginBoxParam struct {
	Info           plugins.Info
	Install        bool
	Upgrade        bool
	Skip           bool
	DownloadReboot bool
	Name           string
	IndexURL       string
}

func GetPluginBoxParamFromPlug added in v1.2.15

func GetPluginBoxParamFromPlug(plug plugins.Plugin) PluginBoxParam

type PluginsPageJSData added in v1.2.15

type PluginsPageJSData struct {
	Prefix string
}

Jump to

Keyboard shortcuts

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