Documentation
¶
Overview ¶
Package accesshttp adapts role and menu HTTP requests to the access usecase.
Index ¶
- func Register(group *echo.Group, handler *Handler)
- type Handler
- func (h *Handler) BatchDeleteAPIs(c *echo.Context) error
- func (h *Handler) CopyRole(c *echo.Context) error
- func (h *Handler) CreateAPI(c *echo.Context) error
- func (h *Handler) CreateMenu(c *echo.Context) error
- func (h *Handler) CreateRole(c *echo.Context) error
- func (h *Handler) DeleteAPI(c *echo.Context) error
- func (h *Handler) DeleteMenu(c *echo.Context) error
- func (h *Handler) DeleteRole(c *echo.Context) error
- func (h *Handler) ListAPIGroups(c *echo.Context) error
- func (h *Handler) ListAPIs(c *echo.Context) error
- func (h *Handler) ListMenus(c *echo.Context) error
- func (h *Handler) ListPermissions(c *echo.Context) error
- func (h *Handler) ListRoles(c *echo.Context) error
- func (h *Handler) ReadAPI(c *echo.Context) error
- func (h *Handler) ReadAPIRoles(c *echo.Context) error
- func (h *Handler) ReadMenu(c *echo.Context) error
- func (h *Handler) ReadMenuRoles(c *echo.Context) error
- func (h *Handler) SetAPIRoles(c *echo.Context) error
- func (h *Handler) SetMenuRoles(c *echo.Context) error
- func (h *Handler) UpdateAPI(c *echo.Context) error
- func (h *Handler) UpdateMenu(c *echo.Context) error
- func (h *Handler) UpdateRole(c *echo.Context) error
- type OperationRecorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler adapts role and menu HTTP requests to the access usecase.
func New ¶
func New(uc *usecase.Usecase, operation OperationRecorder) *Handler
New creates an access HTTP handler.
func (*Handler) BatchDeleteAPIs ¶
BatchDeleteAPIs removes API routes by id.
func (*Handler) CreateMenu ¶
CreateMenu creates a menu.
func (*Handler) CreateRole ¶
CreateRole creates a role.
func (*Handler) DeleteMenu ¶
DeleteMenu deletes a menu.
func (*Handler) DeleteRole ¶
DeleteRole deletes a role.
func (*Handler) ListAPIGroups ¶
ListAPIGroups returns API group names.
func (*Handler) ListPermissions ¶
ListPermissions returns grant metadata.
func (*Handler) ReadAPIRoles ¶
ReadAPIRoles returns role ids assigned to an API route.
func (*Handler) ReadMenuRoles ¶
ReadMenuRoles returns role ids assigned to a menu.
func (*Handler) SetAPIRoles ¶
SetAPIRoles replaces role assignments for an API route.
func (*Handler) SetMenuRoles ¶
SetMenuRoles replaces role assignments for a menu.
func (*Handler) UpdateMenu ¶
UpdateMenu updates a menu.
type OperationRecorder ¶
type OperationRecorder interface {
RecordOperation(context.Context, auditusecase.OperationInput) (auditusecase.OperationLog, error)
}
OperationRecorder records access mutations for audit.