Documentation
¶
Overview ¶
Package requests is a domain-neutral private fixture module used by the wowapi module-contract test suite (blueprint 08 §2, 11 §4). A "request" has a title and a lifecycle status — no housing-society or product-domain terms.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
SLAHours int `json:"sla_hours"`
}
Config is the module's typed configuration namespace (modules.requests.*).
type CreateRequest ¶
type CreateRequest struct {
Title string `json:"title" validate:"required"`
}
CreateRequest is the wire DTO decoded from POST /requests.
type Handlers ¶
type Handlers struct {
// contains filtered or unexported fields
}
Handlers holds injected collaborators for every route in this module.
Route-level authorization (the RouteMeta permission) is now enforced by the framework's httpx.SecureHandler gate BEFORE a handler runs (AuthN → bind tenant/actor → AuthZ(permission)), so these handlers already run only for an authorized actor. The stored evaluator is for FINE-GRAINED, resource-scoped checks a handler makes against a concrete target (e.g. "read THIS request"); this neutral fixture module has none, so it is unused here.
func (*Handlers) Create ¶
func (h *Handlers) Create(w http.ResponseWriter, r *http.Request)
Create handles POST /requests.
func (*Handlers) Healthz ¶
func (h *Handlers) Healthz(w http.ResponseWriter, r *http.Request)
Healthz handles GET /requests/healthz (public, no auth required).
type Lookup ¶
Lookup is the inter-module port other modules consume via mc.Port("requests.Lookup"). Exercises the ProvidePort/Port wiring path.
type Module ¶
type Module struct{}
Module is the "requests" domain-neutral fixture module. It satisfies module.Module and serves as the canonical neutral example for the wowapi module-contract suite (blueprint 08 §2, 11 §4).