accesshttp

package
v0.0.0-...-1f1dc5f Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package accesshttp adapts role and menu HTTP requests to the access usecase.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(group *echo.Group, handler *Handler)

Register mounts role and menu routes on group.

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

func (h *Handler) BatchDeleteAPIs(c *echo.Context) error

BatchDeleteAPIs removes API routes by id.

func (*Handler) CopyRole

func (h *Handler) CopyRole(c *echo.Context) error

CopyRole copies a role with its grants.

func (*Handler) CreateAPI

func (h *Handler) CreateAPI(c *echo.Context) error

CreateAPI creates an API route.

func (*Handler) CreateMenu

func (h *Handler) CreateMenu(c *echo.Context) error

CreateMenu creates a menu.

func (*Handler) CreateRole

func (h *Handler) CreateRole(c *echo.Context) error

CreateRole creates a role.

func (*Handler) DeleteAPI

func (h *Handler) DeleteAPI(c *echo.Context) error

DeleteAPI deletes an API route.

func (*Handler) DeleteMenu

func (h *Handler) DeleteMenu(c *echo.Context) error

DeleteMenu deletes a menu.

func (*Handler) DeleteRole

func (h *Handler) DeleteRole(c *echo.Context) error

DeleteRole deletes a role.

func (*Handler) ListAPIGroups

func (h *Handler) ListAPIGroups(c *echo.Context) error

ListAPIGroups returns API group names.

func (*Handler) ListAPIs

func (h *Handler) ListAPIs(c *echo.Context) error

ListAPIs returns API routes.

func (*Handler) ListMenus

func (h *Handler) ListMenus(c *echo.Context) error

ListMenus returns menus.

func (*Handler) ListPermissions

func (h *Handler) ListPermissions(c *echo.Context) error

ListPermissions returns grant metadata.

func (*Handler) ListRoles

func (h *Handler) ListRoles(c *echo.Context) error

ListRoles returns roles.

func (*Handler) ReadAPI

func (h *Handler) ReadAPI(c *echo.Context) error

ReadAPI returns one API route.

func (*Handler) ReadAPIRoles

func (h *Handler) ReadAPIRoles(c *echo.Context) error

ReadAPIRoles returns role ids assigned to an API route.

func (*Handler) ReadMenu

func (h *Handler) ReadMenu(c *echo.Context) error

ReadMenu returns one menu.

func (*Handler) ReadMenuRoles

func (h *Handler) ReadMenuRoles(c *echo.Context) error

ReadMenuRoles returns role ids assigned to a menu.

func (*Handler) SetAPIRoles

func (h *Handler) SetAPIRoles(c *echo.Context) error

SetAPIRoles replaces role assignments for an API route.

func (*Handler) SetMenuRoles

func (h *Handler) SetMenuRoles(c *echo.Context) error

SetMenuRoles replaces role assignments for a menu.

func (*Handler) UpdateAPI

func (h *Handler) UpdateAPI(c *echo.Context) error

UpdateAPI updates an API route.

func (*Handler) UpdateMenu

func (h *Handler) UpdateMenu(c *echo.Context) error

UpdateMenu updates a menu.

func (*Handler) UpdateRole

func (h *Handler) UpdateRole(c *echo.Context) error

UpdateRole updates a role.

type OperationRecorder

type OperationRecorder interface {
	RecordOperation(context.Context, auditusecase.OperationInput) (auditusecase.OperationLog, error)
}

OperationRecorder records access mutations for audit.

Jump to

Keyboard shortcuts

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