Documentation ¶
Index ¶
- Constants
- type JID
- func (j *JID) Domain() string
- func (j *JID) IsBare() bool
- func (j *JID) IsFull() bool
- func (j *JID) IsFullWithServer() bool
- func (j *JID) IsFullWithUser() bool
- func (j *JID) IsServer() bool
- func (j *JID) Matches(j2 *JID, options MatchingOptions) bool
- func (j *JID) Node() string
- func (j *JID) Resource() string
- func (j *JID) String() string
- func (j *JID) ToBareJID() *JID
- type MatchingOptions
Constants ¶
const ( // MatchesNode indicates that left and right operand has same node value. MatchesNode = MatchingOptions(1) // MatchesDomain indicates that left and right operand has same domain value. MatchesDomain = MatchingOptions(2) // MatchesResource indicates that left and right operand has same resource value. MatchesResource = MatchingOptions(4) // MatchesBare indicates that left and right operand has same node and domain value. MatchesBare = MatchesNode | MatchesDomain )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JID ¶
type JID struct {
// contains filtered or unexported fields
}
JID represents an XMPP address (JID). A JID is made up of a node (generally a username), a domain, and a resource. The node and resource are optional; domain is required.
func New ¶
New constructs a JID given a user, domain, and resource. This construction allows the caller to specify if stringprep should be applied or not.
func NewWithString ¶
NewWithString constructs a JID from it's string representation. This construction allows the caller to specify if stringprep should be applied or not.
func (*JID) IsFullWithServer ¶
IsFullWithServer returns true if instance is a full server JID.
func (*JID) IsFullWithUser ¶
IsFullWithUser returns true if instance is a full client JID.
func (*JID) Matches ¶
func (j *JID) Matches(j2 *JID, options MatchingOptions) bool
Matches returns true if two JID's are equivalent.
func (*JID) Node ¶
Node returns the node, or empty string if this JID does not contain node information.
func (*JID) Resource ¶
Resource returns the resource, or empty string if this JID does not contain resource information.