controller

package
v1.2.12 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: Apache-2.0 Imports: 45 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

type Handler

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

func New

func New(cfg ...Config) *Handler

func (*Handler) AddNavButton

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

func (*Handler) ApiCreate

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

func (*Handler) ApiCreateForm

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

func (*Handler) ApiDetail

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

func (*Handler) ApiList

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

func (*Handler) ApiUpdate

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

func (*Handler) ApiUpdateForm

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

func (*Handler) Assets

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

Assets return front-end assets according the request path.

func (*Handler) Auth

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

Auth check the input password and username for authentication.

func (*Handler) CheckDatabase

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

CheckDatabase check the database connection.

func (*Handler) Delete

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

Delete delete the row from database.

func (*Handler) DeleteMenu

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

DeleteMenu delete the menu of given id.

func (*Handler) EditForm

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

func (*Handler) EditMenu

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

EditMenu edit the menu of given id.

func (*Handler) Execute

func (h *Handler) Execute(ctx *context.Context, user models.UserModel, panel types.Panel, animation ...bool) *bytes.Buffer

func (*Handler) Export

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

Export export table rows as excel object.

func (*Handler) GlobalDeferHandler

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

GlobalDeferHandler is a global error handler of admin plugin.

func (*Handler) HTML

func (h *Handler) HTML(ctx *context.Context, user models.UserModel, panel types.Panel, animation ...bool)

func (*Handler) Logout

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

Logout delete the cookie.

func (*Handler) MenuOrder

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

MenuOrder change the order of menu items.

func (*Handler) NewForm

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

NewForm insert a table row into database.

func (*Handler) NewMenu

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

NewMenu create a new menu item.

func (*Handler) Operation

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

func (*Handler) OperationHandler

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

func (*Handler) RecordOperationLog

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

RecordOperationLog record all operation logs, store into database.

func (*Handler) SetCaptcha

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

func (*Handler) SetRoutes

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

func (*Handler) ShowDetail

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

func (*Handler) ShowEditMenu

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

ShowEditMenu show edit menu page.

func (*Handler) ShowForm

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

ShowForm show form page.

func (*Handler) ShowInfo

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

ShowInfo show info page.

func (*Handler) ShowInstall

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

ShowInstall show install page.

func (*Handler) ShowLogin

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

ShowLogin show the login page.

func (*Handler) ShowMenu

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

ShowMenu show menu info page.

func (*Handler) ShowNewForm

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

ShowNewForm show a new form page.

func (*Handler) ShowNewMenu

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

ShowNewMenu show new menu page.

func (*Handler) SystemInfo

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

func (*Handler) Update

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

Update update the table row of given id.

func (*Handler) UpdateCfg

func (h *Handler) UpdateCfg(cfg Config)

Jump to

Keyboard shortcuts

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