Documentation ¶
Index ¶
Constants ¶
View Source
const Header = "wl-status"
Variables ¶
View Source
var ( OK = &T{ Code: http.StatusOK, Desc: "OK", } NoContent = &T{ Code: http.StatusNoContent, Desc: "no content", } ErrNotFound = &T{ Code: http.StatusNotFound, Desc: "resource not found", } ErrRequest = &T{ Code: http.StatusBadRequest, Desc: "bad request", } ErrMethod = &T{ Code: http.StatusMethodNotAllowed, Desc: "HTTP method not allowed", } ErrInternal = &T{ Code: http.StatusInternalServerError, Desc: "internal server error", } ErrUnpaid = &T{ Code: http.StatusPaymentRequired, Desc: "action requires payment", } ErrForbidden = &T{ Code: http.StatusForbidden, Desc: "action not allowed", } ErrConflict = &T{ Code: http.StatusConflict, Desc: "action conflicts with existing resource", } ErrGateway = &T{ Code: http.StatusBadGateway, Desc: "gateway is unreachable or down", } ErrChallenge = &T{ Code: http.StatusAccepted, Desc: "repeat request with response to challenge in headers", } ErrUpgrade = &T{ Code: http.StatusAccepted, Desc: "please upgrade your relay to the given version as soon as possible", } ErrNotImplemented = &T{ Code: http.StatusNotImplemented, Desc: "feature not implemented yet", } )
View Source
var ( ErrInsufficientBalance = ErrForbidden.Wrap(CauseInsufficientBalance) ErrExpiredPof = ErrRequest.Wrap(CauseExpiredPof) ErrSneakyPof = ErrRequest.Wrap(CauseSneakyPof) ErrInvalidSig = ErrRequest.Wrap(CauseInvalidSig) ErrMissingParam = ErrRequest.Wrap(CauseMissingParam) ErrNoText = ErrRequest.Wrap(CauseNoText) ErrUnknownFormat = ErrRequest.Wrap(CauseUnknownFormat) ErrVersionMismatch = ErrRequest.Wrap(CauseVersionMismatch) ErrRequestExpired = ErrRequest.Wrap(CauseRequestExpired) ErrSTRejected = ErrRequest.Wrap(CauseSTRejected) ErrWithdrawalPending = ErrConflict.Wrap(CauseWithdrawalPending) ErrWithdrawalInvalid = ErrRequest.Wrap(CauseWithdrawalInvalid) ErrSettlementNotOpen = ErrRequest.Wrap(CauseSettlementNotOpen) ErrSettlementClosed = ErrRequest.Wrap(CauseSettlementClosed) ErrContractPubkeyMismatch = ErrRequest.Wrap(CauseContractPubkeyMismatch) ErrPaymentSystemUnreachable = ErrGateway.Wrap(CausePaymentSystemUnreachable) ErrBadEnrollmentKey = ErrRequest.Wrap(CauseBadEnrollmentKey) )
Functions ¶
func IsCircuitError ¶
Types ¶
type Cause ¶
type Cause string
const ( CauseInsufficientBalance Cause = "insufficient balance to complete request" CauseExpiredPof Cause = "expired proof of funding" CauseSneakyPof Cause = "this pof has been seen/used already" CauseInvalidSig Cause = "invalid signature" CauseMissingParam Cause = "missing parameter in URL" CauseNoText Cause = "format=text is not supported for this field" CauseUnknownFormat Cause = "unknown format" CauseVersionMismatch Cause = "major version mismatch" CauseRequestExpired Cause = "request expired" CauseSTRejected Cause = "sharetoken submission rejected" CauseWithdrawalPending Cause = "a withdrawal is already pending" CauseWithdrawalInvalid Cause = "withdrawal amount is invalid (<= 0)" CauseSettlementNotOpen Cause = "settlement window not yet open" CauseSettlementClosed Cause = "settlement window already closed" CauseContractPubkeyMismatch Cause = "contract public key mismatch" CausePaymentSystemUnreachable Cause = "payment system is unreachable or down, please try again later" CauseBadEnrollmentKey Cause = "enrollment key is incorrect" )
Click to show internal directories.
Click to hide internal directories.