Versions in this module Expand all Collapse all v0 v0.3.2 Sep 3, 2018 Changes in this version + const AvailableType + const ChatType + const DefaultMode + const ErrorType + const GetType + const GroupChatType + const HeadlineType + const NormalType + const ProbeType + const ResultType + const SetType + const SocketStream + const SubscribeType + const SubscribedType + const UnavailableType + const UnsubscribeType + const UnsubscribedType + const WebSocketStream + var ErrBadRequest = newStanzaError(400, modifyErrorType, badRequestErrorReason) + var ErrConflict = newStanzaError(409, cancelErrorType, conflictErrorReason) + var ErrFeatureNotImplemented = newStanzaError(501, cancelErrorType, featureNotImplementedErrorReason) + var ErrForbidden = newStanzaError(403, authErrorType, forbiddenErrorReason) + var ErrGone = newStanzaError(302, modifyErrorType, goneErrorReason) + var ErrInternalServerError = newStanzaError(500, waitErrorType, internalServerErrorErrorReason) + var ErrItemNotFound = newStanzaError(404, cancelErrorType, itemNotFoundErrorReason) + var ErrJidMalformed = newStanzaError(400, modifyErrorType, jidMalformedErrorReason) + var ErrNotAcceptable = newStanzaError(406, modifyErrorType, notAcceptableErrorReason) + var ErrNotAllowed = newStanzaError(405, cancelErrorType, notAllowedErrorReason) + var ErrNotAuthorized = newStanzaError(405, authErrorType, notAuthroizedErrorReason) + var ErrPaymentRequired = newStanzaError(402, authErrorType, paymentRequiredErrorReason) + var ErrRecipientUnavailable = newStanzaError(404, waitErrorType, recipientUnavailableErrorReason) + var ErrRedirect = newStanzaError(302, modifyErrorType, redirectErrorReason) + var ErrRegistrationRequired = newStanzaError(407, authErrorType, registrationRequiredErrorReason) + var ErrRemoteServerNotFound = newStanzaError(404, cancelErrorType, remoteServerNotFoundErrorReason) + var ErrRemoteServerTimeout = newStanzaError(504, waitErrorType, remoteServerTimeoutErrorReason) + var ErrResourceConstraint = newStanzaError(500, waitErrorType, resourceConstraintErrorReason) + var ErrServiceUnavailable = newStanzaError(503, cancelErrorType, serviceUnavailableErrorReason) + var ErrStreamClosedByPeer = errors.New("xml: stream closed by peer") + var ErrSubscriptionRequired = newStanzaError(407, authErrorType, subscriptionRequiredErrorReason) + var ErrTooLargeStanza = errors.New("xml: too large stanza") + var ErrUndefinedCondition = newStanzaError(500, waitErrorType, undefinedConditionErrorReason) + var ErrUnexpectedCondition = newStanzaError(400, waitErrorType, unexpectedConditionErrorReason) + type Attribute struct + Label string + Value string + type AttributeSet interface + Count func() int + Get func(string) string + type Element struct + func NewElementFromElement(elem XElement) *Element + func NewElementName(name string) *Element + func NewElementNamespace(name, namespace string) *Element + func (e *Element) AppendElement(element XElement) + func (e *Element) AppendElements(elements []XElement) + func (e *Element) Attributes() AttributeSet + func (e *Element) ClearElements() + func (e *Element) Delay(from string, text string) + func (e *Element) Elements() ElementSet + func (e *Element) Error() XElement + func (e *Element) From() string + func (e *Element) FromGob(dec *gob.Decoder) + func (e *Element) ID() string + func (e *Element) IsError() bool + func (e *Element) IsStanza() bool + func (e *Element) Language() string + func (e *Element) Name() string + func (e *Element) Namespace() string + func (e *Element) RemoveAttribute(label string) + func (e *Element) RemoveElements(name string) + func (e *Element) RemoveElementsNamespace(name, namespace string) + func (e *Element) SetAttribute(label, value string) + func (e *Element) SetFrom(from string) + func (e *Element) SetID(identifier string) + func (e *Element) SetLanguage(language string) + func (e *Element) SetName(name string) + func (e *Element) SetNamespace(namespace string) + func (e *Element) SetText(text string) + func (e *Element) SetTo(to string) + func (e *Element) SetType(tp string) + func (e *Element) SetVersion(version string) + func (e *Element) String() string + func (e *Element) Text() string + func (e *Element) To() string + func (e *Element) ToGob(enc *gob.Encoder) + func (e *Element) ToXML(w io.Writer, includeClosing bool) + func (e *Element) Type() string + func (e *Element) Version() string + type ElementSet interface + All func() []XElement + Child func(name string) XElement + ChildNamespace func(name, namespace string) XElement + Children func(name string) []XElement + ChildrenNamespace func(name, namespace string) []XElement + Count func() int + type IQ struct + func NewIQFromElement(e XElement, from *jid.JID, to *jid.JID) (*IQ, error) + func NewIQType(identifier string, iqType string) *IQ + func (iq *IQ) IsGet() bool + func (iq *IQ) IsResult() bool + func (iq *IQ) IsSet() bool + func (iq *IQ) ResultIQ() *IQ + func (stanza *IQ) BadRequestError() Stanza + func (stanza *IQ) ConflictError() Stanza + func (stanza *IQ) FeatureNotImplementedError() Stanza + func (stanza *IQ) ForbiddenError() Stanza + func (stanza *IQ) FromJID() *jid.JID + func (stanza *IQ) GoneError() Stanza + func (stanza *IQ) InternalServerError() Stanza + func (stanza *IQ) ItemNotFoundError() Stanza + func (stanza *IQ) JidMalformedError() Stanza + func (stanza *IQ) NotAcceptableError() Stanza + func (stanza *IQ) NotAllowedError() Stanza + func (stanza *IQ) NotAuthorizedError() Stanza + func (stanza *IQ) PaymentRequiredError() Stanza + func (stanza *IQ) RecipientUnavailableError() Stanza + func (stanza *IQ) RedirectError() Stanza + func (stanza *IQ) RegistrationRequiredError() Stanza + func (stanza *IQ) RemoteServerNotFoundError() Stanza + func (stanza *IQ) RemoteServerTimeoutError() Stanza + func (stanza *IQ) ResourceConstraintError() Stanza + func (stanza *IQ) ServiceUnavailableError() Stanza + func (stanza *IQ) SetFromJID(j *jid.JID) + func (stanza *IQ) SetToJID(j *jid.JID) + func (stanza *IQ) SubscriptionRequiredError() Stanza + func (stanza *IQ) ToJID() *jid.JID + func (stanza *IQ) UndefinedConditionError() Stanza + func (stanza *IQ) UnexpectedConditionError() Stanza + type Message struct + func NewMessageFromElement(e XElement, from *jid.JID, to *jid.JID) (*Message, error) + func NewMessageType(identifier string, messageType string) *Message + func (m *Message) IsChat() bool + func (m *Message) IsGroupChat() bool + func (m *Message) IsHeadline() bool + func (m *Message) IsMessageWithBody() bool + func (m *Message) IsNormal() bool + func (stanza *Message) BadRequestError() Stanza + func (stanza *Message) ConflictError() Stanza + func (stanza *Message) FeatureNotImplementedError() Stanza + func (stanza *Message) ForbiddenError() Stanza + func (stanza *Message) FromJID() *jid.JID + func (stanza *Message) GoneError() Stanza + func (stanza *Message) InternalServerError() Stanza + func (stanza *Message) ItemNotFoundError() Stanza + func (stanza *Message) JidMalformedError() Stanza + func (stanza *Message) NotAcceptableError() Stanza + func (stanza *Message) NotAllowedError() Stanza + func (stanza *Message) NotAuthorizedError() Stanza + func (stanza *Message) PaymentRequiredError() Stanza + func (stanza *Message) RecipientUnavailableError() Stanza + func (stanza *Message) RedirectError() Stanza + func (stanza *Message) RegistrationRequiredError() Stanza + func (stanza *Message) RemoteServerNotFoundError() Stanza + func (stanza *Message) RemoteServerTimeoutError() Stanza + func (stanza *Message) ResourceConstraintError() Stanza + func (stanza *Message) ServiceUnavailableError() Stanza + func (stanza *Message) SetFromJID(j *jid.JID) + func (stanza *Message) SetToJID(j *jid.JID) + func (stanza *Message) SubscriptionRequiredError() Stanza + func (stanza *Message) ToJID() *jid.JID + func (stanza *Message) UndefinedConditionError() Stanza + func (stanza *Message) UnexpectedConditionError() Stanza + type Parser struct + func NewParser(reader io.Reader, mode ParsingMode, maxStanzaSize int) *Parser + func (p *Parser) ParseElement() (XElement, error) + type ParsingMode int + type Presence struct + func NewPresence(from *jid.JID, to *jid.JID, presenceType string) *Presence + func NewPresenceFromElement(e XElement, from *jid.JID, to *jid.JID) (*Presence, error) + func (p *Presence) IsAvailable() bool + func (p *Presence) IsProbe() bool + func (p *Presence) IsSubscribe() bool + func (p *Presence) IsSubscribed() bool + func (p *Presence) IsUnavailable() bool + func (p *Presence) IsUnsubscribe() bool + func (p *Presence) IsUnsubscribed() bool + func (p *Presence) Priority() int8 + func (p *Presence) ShowState() ShowState + func (p *Presence) Status() string + func (stanza *Presence) BadRequestError() Stanza + func (stanza *Presence) ConflictError() Stanza + func (stanza *Presence) FeatureNotImplementedError() Stanza + func (stanza *Presence) ForbiddenError() Stanza + func (stanza *Presence) FromJID() *jid.JID + func (stanza *Presence) GoneError() Stanza + func (stanza *Presence) InternalServerError() Stanza + func (stanza *Presence) ItemNotFoundError() Stanza + func (stanza *Presence) JidMalformedError() Stanza + func (stanza *Presence) NotAcceptableError() Stanza + func (stanza *Presence) NotAllowedError() Stanza + func (stanza *Presence) NotAuthorizedError() Stanza + func (stanza *Presence) PaymentRequiredError() Stanza + func (stanza *Presence) RecipientUnavailableError() Stanza + func (stanza *Presence) RedirectError() Stanza + func (stanza *Presence) RegistrationRequiredError() Stanza + func (stanza *Presence) RemoteServerNotFoundError() Stanza + func (stanza *Presence) RemoteServerTimeoutError() Stanza + func (stanza *Presence) ResourceConstraintError() Stanza + func (stanza *Presence) ServiceUnavailableError() Stanza + func (stanza *Presence) SetFromJID(j *jid.JID) + func (stanza *Presence) SetToJID(j *jid.JID) + func (stanza *Presence) SubscriptionRequiredError() Stanza + func (stanza *Presence) ToJID() *jid.JID + func (stanza *Presence) UndefinedConditionError() Stanza + func (stanza *Presence) UnexpectedConditionError() Stanza + type ShowState int + const AvailableShowState + const AwayShowState + const ChatShowState + const DoNotDisturbShowState + const ExtendedAwaysShowState + type Stanza interface + FromJID func() *jid.JID + ToJID func() *jid.JID + func NewErrorStanzaFromStanza(stanza Stanza, stanzaErr *StanzaError, errorElements []XElement) Stanza + type StanzaError struct + func (se *StanzaError) Element() *Element + func (se *StanzaError) Error() string + type XElement interface + Attributes func() AttributeSet + Elements func() ElementSet + Error func() XElement + From func() string + ID func() string + IsError func() bool + IsStanza func() bool + Language func() string + Name func() string + Namespace func() string + Text func() string + To func() string + ToGob func(enc *gob.Encoder) + ToXML func(w io.Writer, includeClosing bool) + Type func() string + Version func() string