admin_plugin

package module
v0.0.0-...-d2f0f43 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2020 License: MIT Imports: 12 Imported by: 14

README

admin

Default Admin Plugin for https://github.com/ecletus framework

Documentation

Index

Constants

View Source
const DEFAULT_ADMIN = "default"

Variables

View Source
var (
	E_ADMIN                = PKG + ".admin"
	E_ADMIN_DONE           = E_ADMIN + ".done"
	E_ADMIN_FUNC_MAP       = E_ADMIN + ".funcMap"
	E_ADMIN_ROUTE          = E_ADMIN + ".route"
	E_ADMIN_INIT_RESOURCES = E_ADMIN + ".initResources"
)

Functions

func EAdmin

func EAdmin(adminKey string) string

func EDone

func EDone(adminKey string) string

func EFuncMap

func EFuncMap(adminKey string) string

func EInitResources

func EInitResources(adminName string) string

func ERoute

func ERoute(adminName string) string

func Events

func Events(args ...interface{}) (d *events)

Types

type AdminEvent

type AdminEvent struct {
	plug.PluginEventInterface
	Admin       *admin.Admin
	AdminName   string
	PluginEvent plug.PluginEventInterface
}

type AdminFuncMapEvent

type AdminFuncMapEvent struct {
	*AdminEvent
}

func (*AdminFuncMapEvent) Register

func (afm *AdminFuncMapEvent) Register(name string, value interface{})

type AdminGetter

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

func (*AdminGetter) GetInitialized

func (this *AdminGetter) GetInitialized(name string) (Admin *admin.Admin)

func (*AdminGetter) Initialize

func (this *AdminGetter) Initialize()

type AdminNames

type AdminNames struct {
	NamesFunc func() []string
	Names     []string
}

func (*AdminNames) EachOrDefault

func (dn *AdminNames) EachOrDefault(cb func(adminName string))

func (*AdminNames) EachOrDefaultE

func (dn *AdminNames) EachOrDefaultE(cb func(adminName string) error) (err error)

func (*AdminNames) GetNames

func (a *AdminNames) GetNames() []string

type AdminRouterEvent

type AdminRouterEvent struct {
	*AdminEvent
	// contains filtered or unexported fields
}

func (*AdminRouterEvent) Router

func (are *AdminRouterEvent) Router() xroute.Router

type Admins

type Admins struct {
	ByName map[string]*admin.Admin
}

func (*Admins) Each

func (adms *Admins) Each(cb func(adminName string, Admin *admin.Admin) (err error)) (err error)

func (*Admins) GetDefault

func (a *Admins) GetDefault() *admin.Admin

func (*Admins) Names

func (a *Admins) Names() (n []string)

func (*Admins) On

func (a *Admins) On(ef func(name string) string, dis plug.EventDispatcherInterface, cb interface{}) (err error)

func (*Admins) OnAdmin

func (a *Admins) OnAdmin(dis plug.EventDispatcherInterface, cb func(e *AdminEvent)) (err error)

func (*Admins) OnAdminE

func (a *Admins) OnAdminE(dis plug.EventDispatcherInterface, cb func(e *AdminEvent) error) (err error)

func (*Admins) OnFuncMap

func (a *Admins) OnFuncMap(dis plug.EventDispatcherInterface, cb func(e *AdminFuncMapEvent)) (err error)

func (*Admins) OnFuncMapE

func (a *Admins) OnFuncMapE(dis plug.EventDispatcherInterface, cb func(e *AdminFuncMapEvent) error) (err error)

func (*Admins) OnInitResources

func (a *Admins) OnInitResources(dis plug.EventDispatcherInterface, cb func(e *AdminEvent)) (err error)

func (*Admins) OnInitResourcesE

func (a *Admins) OnInitResourcesE(dis plug.EventDispatcherInterface, cb func(e *AdminEvent) error) (err error)

func (*Admins) OnRoute

func (a *Admins) OnRoute(dis plug.EventDispatcherInterface, cb func(e *AdminRouterEvent)) (err error)

func (*Admins) OnRouteE

func (a *Admins) OnRouteE(dis plug.EventDispatcherInterface, cb func(e *AdminRouterEvent) error) (err error)

func (*Admins) Set

func (a *Admins) Set(name string, Admin *admin.Admin)

func (*Admins) SetDefault

func (a *Admins) SetDefault(Admin *admin.Admin)

func (*Admins) Trigger

func (admins *Admins) Trigger(d plug.PluginEventDispatcherInterface) error

type Config

type Config = admin.Config

type FragmentConfig

type FragmentConfig = admin.FragmentConfig

type Plugin

type Plugin struct {
	plug.EventDispatcher
	db.DBNames

	AdminsKey, AdminGetterKey string
	SystemDBDialectKey        string
	// contains filtered or unexported fields
}

func (*Plugin) AssetsRootPath

func (p *Plugin) AssetsRootPath() (pth string)

func (*Plugin) Init

func (p *Plugin) Init(options *plug.Options)

func (*Plugin) NameSpace

func (p *Plugin) NameSpace() string

func (*Plugin) OnRegister

func (p *Plugin) OnRegister(options *plug.Options)

func (*Plugin) ProvideOptions

func (p *Plugin) ProvideOptions() []string

func (*Plugin) ProvidesOptions

func (p *Plugin) ProvidesOptions(options *plug.Options)

func (*Plugin) RequireOptions

func (p *Plugin) RequireOptions() []string

type SubConfig

type SubConfig = admin.SubConfig

Jump to

Keyboard shortcuts

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