Documentation
¶
Overview ¶
Package identityhttp adapts administrator HTTP requests to the identity usecase.
Index ¶
- func Register(group *echo.Group, handler *Handler)
- type Handler
- func (h *Handler) CreateAdmin(c *echo.Context) error
- func (h *Handler) DeleteAdmin(c *echo.Context) error
- func (h *Handler) ListAdmins(c *echo.Context) error
- func (h *Handler) ListRoleAdmins(c *echo.Context) error
- func (h *Handler) SetRoleAdmins(c *echo.Context) error
- func (h *Handler) UpdateAdmin(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 administrator HTTP requests to the identity usecase.
func New ¶
func New(uc *usecase.Usecase, operation OperationRecorder) *Handler
New creates an identity HTTP handler.
func (*Handler) CreateAdmin ¶
CreateAdmin creates an administrator.
func (*Handler) DeleteAdmin ¶
DeleteAdmin deletes an administrator.
func (*Handler) ListAdmins ¶
ListAdmins returns administrators.
func (*Handler) ListRoleAdmins ¶
ListRoleAdmins returns administrator ids assigned to a role.
func (*Handler) SetRoleAdmins ¶
SetRoleAdmins replaces administrator assignments for a role.
type OperationRecorder ¶
type OperationRecorder interface {
RecordOperation(context.Context, auditusecase.OperationInput) (auditusecase.OperationLog, error)
}
OperationRecorder records administrator mutations for audit.
Click to show internal directories.
Click to hide internal directories.