Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { // Reason is the stanza error reason type. Reason Reason // SentElement is the original XMPP element that originated the stanza error. SentElement stravaganza.Element // Lang is the error text lang code. // If none assigned 'en' would be considered by default. Lang string // Text is the error descriptive text. Text string // ApplicationElement defines the application specific condition element. ApplicationElement stravaganza.Element }
Error represents a stanza "error" element.
func E ¶
func E(reason Reason, sentElement stravaganza.Element) *Error
E builds an error value from its arguments.
func (*Error) Element ¶
func (se *Error) Element() stravaganza.Element
Element returns se XMPP generic element.
type Reason ¶
type Reason uint8
Reason is the stanza error reason.
const ( // BadRequest error is returned when the sender has sent XML that is malformed or that cannot be processed. BadRequest Reason = iota // Conflict error is returned when access cannot be granted because an existing resource or session exists with // the same name or address. Conflict // FeatureNotImplemented is returned when the feature requested is not implemented by the server and therefore // cannot be processed. FeatureNotImplemented // Forbidden is returned when the requesting entity does not possess the required permissions to perform the action. Forbidden // Gone is returned when the recipient or server can no longer be contacted at this address. Gone // InternalServerError is returned when the server could not process the stanza because of a misconfiguration // or an otherwise-undefined internal server error. InternalServerError // ItemNotFound is returned when the addressed JID or item requested cannot be found. ItemNotFound // JIDMalformed is returned when the sending entity has provided or communicated an XMPP address or aspect thereof // that does not adhere to the syntax defined in https://xmpp.org/rfcs/rfc3920.html#addressing. JIDMalformed // NotAcceptable is returned when the sending entity has provided or communicated an XMPP address or aspect thereof // that does not adhere to the syntax defined in https://xmpp.org/rfcs/rfc3920.html#addressing. NotAcceptable // NotAllowed is returned when the recipient or server does not allow any entity to perform the action. NotAllowed // NotAuthorized is returned when the sender must provide proper credentials before being allowed to perform // the action, or has provided improper credentials. NotAuthorized // PaymentRequired is returned when the requesting entity is not authorized to access the requested service // because payment is required. PaymentRequired RecipientUnavailable // Redirect is redirecting requests for this information to another entity, usually temporarily. Redirect // RegistrationRequired is redirecting requests for this information to another entity, usually temporarily. RegistrationRequired // RemoteServerNotFound is returned when a remote server or service specified as part or all of the JID // of the intended recipient does not exist. RemoteServerNotFound // RemoteServerTimeout is returned when a remote server or service specified as part or all of the JID of // the intended recipient could not be contacted within a reasonable amount of time. RemoteServerTimeout // ResourceConstraint is returned when the server or recipient lacks the system resources necessary // to service the request. ResourceConstraint // the requested service. ServiceUnavailable // SubscriptionRequired is returned when the requesting entity is not authorized to access // the requested service because a subscription is required. SubscriptionRequired // UndefinedCondition is returned when the error condition is not one of those defined by the other conditions in // this list. UndefinedCondition // UnexpectedCondition is returned when the recipient or server understood the request but was not expecting it // at this time. UnexpectedCondition // UnexpectedRequest is returned by the stream when the recipient or server understood the request but was not // expecting it at this time. UnexpectedRequest )
Click to show internal directories.
Click to hide internal directories.