Documentation
¶
Index ¶
- Variables
- func PanelEnabled() bool
- type Handlers
- func (h *Handlers) AssignPermissionRole(c *fiber.Ctx) error
- func (h *Handlers) AssignPermissionUser(c *fiber.Ctx) error
- func (h *Handlers) AssignRole(c *fiber.Ctx) error
- func (h *Handlers) CreateBlog(c *fiber.Ctx) error
- func (h *Handlers) CreatePermission(c *fiber.Ctx) error
- func (h *Handlers) CreateRole(c *fiber.Ctx) error
- func (h *Handlers) CreateUser(c *fiber.Ctx) error
- func (h *Handlers) DeleteBlog(c *fiber.Ctx) error
- func (h *Handlers) DeletePermission(c *fiber.Ctx) error
- func (h *Handlers) DeleteRole(c *fiber.Ctx) error
- func (h *Handlers) DeleteUser(c *fiber.Ctx) error
- func (h *Handlers) GetBlog(c *fiber.Ctx) error
- func (h *Handlers) GetUser(c *fiber.Ctx) error
- func (h *Handlers) ListBlogs(c *fiber.Ctx) error
- func (h *Handlers) ListPermissions(c *fiber.Ctx) error
- func (h *Handlers) ListRoles(c *fiber.Ctx) error
- func (h *Handlers) ListUsers(c *fiber.Ctx) error
- func (h *Handlers) Meta(c *fiber.Ctx) error
- func (h *Handlers) RevokePermissionRole(c *fiber.Ctx) error
- func (h *Handlers) RevokePermissionUser(c *fiber.Ctx) error
- func (h *Handlers) RevokeRole(c *fiber.Ctx) error
- func (h *Handlers) RolePermissions(c *fiber.Ctx) error
- func (h *Handlers) UpdateBlog(c *fiber.Ctx) error
- func (h *Handlers) UpdateUser(c *fiber.Ctx) error
- func (h *Handlers) UserDirectPermissions(c *fiber.Ctx) error
- func (h *Handlers) UserRoles(c *fiber.Ctx) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ResourceNames = []string{"users", "blogs"}
ResourceNames lists admin CRUD resources matching database/models.
Functions ¶
func PanelEnabled ¶
func PanelEnabled() bool
PanelEnabled returns true when ENABLE_ADMIN_PANEL is truthy or .admin-panel-enabled exists.
Types ¶
type Handlers ¶
type Handlers struct {
// contains filtered or unexported fields
}
Handlers serves /admin/api JSON (JWT + admin access already applied by route group).
func NewHandlers ¶
func NewHandlers(acl *repositories.ACLRepository, users *repositories.UserRepository, blogs *repositories.BlogRepository) *Handlers
NewHandlers builds admin API handlers.
func (*Handlers) UserDirectPermissions ¶
Click to show internal directories.
Click to hide internal directories.