Documentation ¶
Overview ¶
Package problems 提供对 Problem 相关内容的管理
Index ¶
Constants ¶
View Source
const ( ProblemAboutBlank = "about:blank" ProblemBadRequest = "400" ProblemPaymentRequired = "402" ProblemForbidden = "403" ProblemNotFound = "404" ProblemMethodNotAllowed = "405" ProblemNotAcceptable = "406" ProblemProxyAuthRequired = "407" ProblemRequestTimeout = "408" ProblemConflict = "409" ProblemGone = "410" ProblemLengthRequired = "411" ProblemPreconditionFailed = "412" ProblemRequestEntityTooLarge = "413" ProblemRequestURITooLong = "414" ProblemUnsupportedMediaType = "415" ProblemRequestedRangeNotSatisfiable = "416" ProblemExpectationFailed = "417" ProblemTeapot = "418" ProblemMisdirectedRequest = "421" ProblemUnprocessableEntity = "422" ProblemLocked = "423" ProblemFailedDependency = "424" ProblemTooEarly = "425" ProblemUpgradeRequired = "426" ProblemPreconditionRequired = "428" ProblemTooManyRequests = "429" ProblemRequestHeaderFieldsTooLarge = "431" ProblemInternalServerError = "500" ProblemNotImplemented = "501" ProblemBadGateway = "502" ProblemGatewayTimeout = "504" ProblemHTTPVersionNotSupported = "505" ProblemVariantAlsoNegotiates = "506" ProblemInsufficientStorage = "507" ProblemLoopDetected = "508" ProblemNotExtended = "510" ProblemNetworkAuthenticationRequired = "511" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Problem ¶ added in v0.81.0
type Problem struct { Type string // 带 prefix Status int Title localeutil.LocaleStringer Detail localeutil.LocaleStringer // contains filtered or unexported fields }
type Problems ¶
type Problems struct {
// contains filtered or unexported fields
}
func (*Problems) Add ¶
func (ps *Problems) Add(id string, status int, title, detail localeutil.LocaleStringer)
func (*Problems) Visit ¶ added in v0.70.0
func (ps *Problems) Visit(visit func(prefix, id string, status int, title, detail localeutil.LocaleStringer))
Click to show internal directories.
Click to hide internal directories.