Documentation
¶
Overview ¶
Package apprhttp serves the Approvals queue on the portal (#2437, #2494): a person's own requests, every request for an administrator, filing one and deciding one, through the service manage_approval uses and under its rules. Every write is audited as a manage_approval call from the portal.
Index ¶
Constants ¶
View Source
const Prefix = "/api/v1/portal/approvals"
Prefix opens every route.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Service *approval.Service
// Actor is who made a request, nil for none.
Actor func(r *http.Request) *approval.Actor
Audit middleware.AuditLogger
// Recent reads a call request's requester's recent calls of its
// operation (#2437); nil answers none.
Recent func(ctx context.Context, r *approval.Request) ([]RecentCall, error)
}
Config is what the routes use.
type RecentCall ¶ added in v1.161.0
type RecentCall struct {
At time.Time `json:"at"`
Items int `json:"items" example:"5"`
Outcome string `json:"outcome" example:"held"`
}
RecentCall is one of a requester's calls of a held call's operation in the last day: when, how many items, and what came of it, never its arguments.
type RecentCallList ¶ added in v1.161.0
type RecentCallList struct {
Data []RecentCall `json:"data"`
}
RecentCallList is the requester's recent calls, newest first.
Click to show internal directories.
Click to hide internal directories.