Versions in this module Expand all Collapse all v0 v0.2.0 Feb 28, 2026 v0.1.3 Feb 27, 2026 v0.1.2 Feb 24, 2026 v0.1.1 Feb 24, 2026 v0.1.0 Feb 24, 2026 Changes in this version + func NewMenuModule(logger logging.Logger, deps *core.Dependencies) core.Module + func SetupMenuRoutes(r chi.Router, h *MenuHandler, jwtMiddleware func(http.Handler) http.Handler) + type BatchCreateMenusInput struct + Menus []BatchMenuInputMCP + type BatchMenuInput struct + Affix bool + Component string + Hidden bool + Icon string + Meta map[string]any + Name string + Params []string + ParentID *uuid.UUID + Path string + Redirect string + Sort int + TempID string + TempParentID string + type BatchMenuInputMCP struct + Affix bool + Component string + Hidden bool + Icon string + Meta map[string]any + Name string + Params []string + ParentID string + Path string + Redirect string + Sort int + TempID string + TempParentID string + type BatchMenusResult struct + Count int + Menus []MenuOutput + type CreateMenuInput struct + Affix bool + Component string + Hidden bool + Icon string + Meta map[string]any + Name string + Params []string + ParentID string + Path string + Redirect string + Sort int + type CreateMenuRequest struct + Affix bool + Component string + Hidden bool + Icon string + Meta map[string]any + Name string + Params []string + ParentID *uuid.UUID + Path string + Redirect string + Sort int + type DeleteMenuInput struct + ID string + type GetMenuTreeInput struct + type MCPServer struct + func NewMCPServer(service *MenuService, logger logging.Logger) (*MCPServer, error) + func (s *MCPServer) GetServer() *mcp.Server + func (s *MCPServer) RegisterOn(server *mcp.Server) error + func (s *MCPServer) Run(ctx context.Context) error + type MenuHandler struct + func NewMenuHandler(menuService *MenuService, logger logging.Logger) *MenuHandler + func (h *MenuHandler) CreateMenu(w http.ResponseWriter, r *http.Request) + func (h *MenuHandler) DeleteMenu(w http.ResponseWriter, r *http.Request) + func (h *MenuHandler) GetMenuTree(w http.ResponseWriter, r *http.Request) + func (h *MenuHandler) UpdateMenu(w http.ResponseWriter, r *http.Request) + type MenuModule struct + func (m *MenuModule) Name() string + func (m *MenuModule) RegisterPrivateRoutes(r chi.Router) + func (m *MenuModule) RegisterPublicRoutes(r chi.Router) + type MenuNode struct + Children []*MenuNode + type MenuOutput struct + Affix bool + Component string + CreatedAt time.Time + Hidden bool + ID uuid.UUID + Icon string + Meta map[string]any + Name string + Params []string + ParentID uuid.UUID + Path string + Redirect string + Sort int + UpdatedAt time.Time + type MenuService struct + func NewMenuService(client *ent.Client, logger logging.Logger) *MenuService + func (s *MenuService) BatchCreateMenus(ctx context.Context, inputs []BatchMenuInput) ([]*ent.Menu, error) + func (s *MenuService) CreateMenu(ctx context.Context, input *ent.Menu) (*ent.Menu, error) + func (s *MenuService) DeleteMenu(ctx context.Context, id uuid.UUID) error + func (s *MenuService) GetAllMenus(ctx context.Context) ([]*ent.Menu, error) + func (s *MenuService) GetMenuByID(ctx context.Context, id uuid.UUID) (*ent.Menu, error) + func (s *MenuService) GetMenuTree(ctx context.Context, roleCodes []string, isSuperAdmin bool) ([]*MenuNode, error) + func (s *MenuService) UpdateMenu(ctx context.Context, id uuid.UUID, input *ent.Menu) (*ent.Menu, error) + type MenuTreeOutput struct + Children []MenuTreeOutput + type MenuTreeResult struct + RootCount int + TotalCount int + type UpdateMenuRequest struct + Affix bool + Component string + Hidden bool + Icon string + Meta map[string]any + Name string + Params []string + ParentID *uuid.UUID + Path string + Redirect string + Sort int