Documentation
¶
Overview ¶
Package httpapi implements the API conventions from docs/api-conventions.md: resource IDs, cursor pagination envelope, and problem-details error codes. All /privacy/v1 and /iam/v1 handlers must use these helpers.
Index ¶
Constants ¶
const ( DefaultLimit = 20 MaxLimit = 100 // MaxCatalogLimit is the page limit of lists that hold configuration // rather than data about people — roles, permissions, API keys — which a // console loads whole to fill a picker. Lists of users, requests and // events keep MaxLimit, so one call exposes at most that many records. MaxCatalogLimit = 1000 )
const ( CodeValidationFailed = "validation_failed" CodeUnauthenticated = "unauthenticated" CodePermissionDenied = "permission_denied" CodeNotFound = "not_found" CodeConflict = "conflict" CodeIdempotencyConflict = "idempotency_conflict" CodeLegalHoldActive = "legal_hold_active" CodePolicyViolation = "policy_violation" CodeRateLimited = "rate_limited" // CodeReauthenticationNeeded: the action needs a sign-in more recent than // the one the token carries. CodeReauthenticationNeeded = "reauthentication_needed" // CodeInsufficientAAL: the user has MFA and the action needs a session that // verified the second factor (aal2). CodeInsufficientAAL = "insufficient_aal" CodeInternal = "internal" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ListParams ¶
type ListParams struct {
Limit int
Cursor string
Sort string // "field" | "-field", comma-separated
// Max caps Limit; zero means MaxLimit.
Max int
}
ListParams is the canonical list input. Cursor is opaque to clients.
func (ListParams) Norm ¶
func (p ListParams) Norm() ListParams