Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssociationHandler ¶
type AssociationHandler struct {
// contains filtered or unexported fields
}
func NewAssociationHandler ¶
func NewAssociationHandler(associator approle.Associator) *AssociationHandler
func (*AssociationHandler) AttachRegistry ¶
func (h *AssociationHandler) AttachRegistry(c *fiber.Ctx) error
AttachRegistry godoc @Summary Attach a registry to a role @Description Associates a registry with a role (idempotent). @Tags roles @Produce json @Security BearerAuth @Param gateway_id path string true "Gateway id" format(uuid) @Param role_id path string true "Role id" format(uuid) @Param registry_id path string true "Registry id" format(uuid) @Success 204 "No Content" @Failure 400 {object} helpers.ErrorBody @Failure 401 {object} helpers.ErrorBody @Failure 404 {object} helpers.ErrorBody @Router /v1/gateways/{gateway_id}/roles/{role_id}/registries/{registry_id} [post]
func (*AssociationHandler) DetachRegistry ¶
func (h *AssociationHandler) DetachRegistry(c *fiber.Ctx) error
DetachRegistry godoc @Summary Detach a registry from a role @Description Removes the association between a registry and a role (idempotent). @Tags roles @Produce json @Security BearerAuth @Param gateway_id path string true "Gateway id" format(uuid) @Param role_id path string true "Role id" format(uuid) @Param registry_id path string true "Registry id" format(uuid) @Success 204 "No Content" @Failure 400 {object} helpers.ErrorBody @Failure 401 {object} helpers.ErrorBody @Failure 404 {object} helpers.ErrorBody @Failure 409 {object} helpers.ErrorBody @Router /v1/gateways/{gateway_id}/roles/{role_id}/registries/{registry_id} [delete]
type CreateRoleHandler ¶
type CreateRoleHandler struct {
// contains filtered or unexported fields
}
func NewCreateRoleHandler ¶
func NewCreateRoleHandler(creator approle.Creator) *CreateRoleHandler
func (*CreateRoleHandler) Handle ¶
func (h *CreateRoleHandler) Handle(c *fiber.Ctx) error
Handle godoc @Summary Create a role @Description Creates a new role in a gateway. model_policies cannot be set on create; bind registries first, then update the role. @Tags roles @Accept json @Produce json @Security BearerAuth @Param gateway_id path string true "Gateway id" format(uuid) @Param body body request.CreateRoleRequest true "Role to create" @Success 201 {object} response.RoleResponse @Failure 400 {object} helpers.ErrorBody @Failure 401 {object} helpers.ErrorBody @Failure 404 {object} helpers.ErrorBody @Failure 409 {object} helpers.ErrorBody @Router /v1/gateways/{gateway_id}/roles [post]
type DeleteRoleHandler ¶
type DeleteRoleHandler struct {
// contains filtered or unexported fields
}
func NewDeleteRoleHandler ¶
func NewDeleteRoleHandler(deleter approle.Deleter) *DeleteRoleHandler
func (*DeleteRoleHandler) Handle ¶
func (h *DeleteRoleHandler) Handle(c *fiber.Ctx) error
Handle godoc @Summary Delete a role @Description Deletes a role from a gateway. @Tags roles @Produce json @Security BearerAuth @Param gateway_id path string true "Gateway id" format(uuid) @Param id path string true "Role id" format(uuid) @Success 204 "No Content" @Failure 400 {object} helpers.ErrorBody @Failure 401 {object} helpers.ErrorBody @Failure 404 {object} helpers.ErrorBody @Failure 409 {object} helpers.ErrorBody @Router /v1/gateways/{gateway_id}/roles/{id} [delete]
type GetRoleHandler ¶
type GetRoleHandler struct {
// contains filtered or unexported fields
}
func NewGetRoleHandler ¶
func NewGetRoleHandler(finder approle.Finder) *GetRoleHandler
func (*GetRoleHandler) Handle ¶
func (h *GetRoleHandler) Handle(c *fiber.Ctx) error
Handle godoc @Summary Get a role @Description Returns a role by id within a gateway. @Tags roles @Produce json @Security BearerAuth @Param gateway_id path string true "Gateway id" format(uuid) @Param id path string true "Role id" format(uuid) @Success 200 {object} response.RoleResponse @Failure 400 {object} helpers.ErrorBody @Failure 401 {object} helpers.ErrorBody @Failure 404 {object} helpers.ErrorBody @Router /v1/gateways/{gateway_id}/roles/{id} [get]
type ListRoleHandler ¶
type ListRoleHandler struct {
// contains filtered or unexported fields
}
func NewListRoleHandler ¶
func NewListRoleHandler(finder approle.Finder) *ListRoleHandler
func (*ListRoleHandler) Handle ¶
func (h *ListRoleHandler) Handle(c *fiber.Ctx) error
Handle godoc @Summary List roles @Description Returns a paginated list of roles in a gateway. @Tags roles @Produce json @Security BearerAuth @Param gateway_id path string true "Gateway id" format(uuid) @Param name query string false "Filter by name (substring match)" @Param page query int false "Page number (1-based)" @Param size query int false "Page size" @Success 200 {object} response.ListRoleResponse @Failure 400 {object} helpers.ErrorBody @Failure 401 {object} helpers.ErrorBody @Router /v1/gateways/{gateway_id}/roles [get]
type UpdateRoleHandler ¶
type UpdateRoleHandler struct {
// contains filtered or unexported fields
}
func NewUpdateRoleHandler ¶
func NewUpdateRoleHandler(updater approle.Updater) *UpdateRoleHandler
func (*UpdateRoleHandler) Handle ¶
func (h *UpdateRoleHandler) Handle(c *fiber.Ctx) error
Handle godoc @Summary Update a role @Description Updates a role. model_policies may only reference registries already attached to the role. @Tags roles @Accept json @Produce json @Security BearerAuth @Param gateway_id path string true "Gateway id" format(uuid) @Param id path string true "Role id" format(uuid) @Param body body request.UpdateRoleRequest true "Role fields to update" @Success 200 {object} response.RoleResponse @Failure 400 {object} helpers.ErrorBody @Failure 401 {object} helpers.ErrorBody @Failure 404 {object} helpers.ErrorBody @Failure 409 {object} helpers.ErrorBody @Router /v1/gateways/{gateway_id}/roles/{id} [put]