Documentation ¶
Index ¶
- func InfoCreateModule(ctx context.Context, name string)
- func InfoCreateUnit(ctx context.Context, name string)
- func NewAppSection(ctx context.Context, opts mrperms.AppSectionOptions, access accessControl) *mrperms.AppSection
- func PrepareController(c mrserver.HttpController, operations ...PrepareHandlerFunc) mrserver.HttpController
- func PrepareEachController(list []mrserver.HttpController, operations ...PrepareHandlerFunc) []mrserver.HttpController
- type ApplyEachControllerFunc
- type ControllerHandlers
- type PrepareHandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InfoCreateModule ¶
InfoCreateModule - comment func.
func InfoCreateUnit ¶
InfoCreateUnit - comment func.
func NewAppSection ¶
func NewAppSection(ctx context.Context, opts mrperms.AppSectionOptions, access accessControl) *mrperms.AppSection
NewAppSection - создаёт объект mrperms.AppSection с указанными настройками.
func PrepareController ¶ added in v0.16.0
func PrepareController(c mrserver.HttpController, operations ...PrepareHandlerFunc) mrserver.HttpController
PrepareController - comment func.
func PrepareEachController ¶ added in v0.16.0
func PrepareEachController(list []mrserver.HttpController, operations ...PrepareHandlerFunc) []mrserver.HttpController
PrepareEachController - comment func.
Types ¶
type ApplyEachControllerFunc ¶ added in v0.16.0
type ApplyEachControllerFunc func(list []mrserver.HttpController, err error) error
ApplyEachControllerFunc - вспомогательная функция для подготовки списка контроллеров.
type ControllerHandlers ¶
type ControllerHandlers []mrserver.HttpHandler
ControllerHandlers - обработчики контроллера.
func (ControllerHandlers) Handlers ¶
func (c ControllerHandlers) Handlers() []mrserver.HttpHandler
Handlers - comment method.
type PrepareHandlerFunc ¶ added in v0.16.0
type PrepareHandlerFunc func(handler *mrserver.HttpHandler)
PrepareHandlerFunc - функция для подготовки обработчика (URL, разрешения).
func WithMiddlewareCheckAccess ¶
func WithMiddlewareCheckAccess(ctx context.Context, section *mrperms.AppSection, access accessControl) PrepareHandlerFunc
WithMiddlewareCheckAccess - comment func.
func WithPermission ¶
func WithPermission(permission string) PrepareHandlerFunc
WithPermission - comment func.
Click to show internal directories.
Click to hide internal directories.