session

package
v0.4.0-el2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2021 License: GPL-3.0 Imports: 29 Imported by: 5

Documentation

Index

Constants

View Source
const (
	// MUCStatusJIDPublic inform user that any occupant is
	// allowed to see the user's full JID
	MUCStatusJIDPublic = 100
	// MUCStatusAffiliationChanged inform user that his or
	// her affiliation changed while not in the room
	MUCStatusAffiliationChanged = 101
	// MUCStatusUnavailableShown inform occupants that room
	// now shows unavailable members
	MUCStatusUnavailableShown = 102
	// MUCStatusUnavailableNotShown inform occupants that room
	// now does not show unavailable members
	MUCStatusUnavailableNotShown = 103
	// MUCStatusConfigChanged inform occupants that a
	// non-privacy-related room configuration change has occurred
	MUCStatusConfigChanged = 104
	// MUCStatusSelfPresence inform user that presence refers
	// to one of its own room occupants
	MUCStatusSelfPresence = 110
	// MUCStatusRoomLoggingEnabled inform occupants that room
	// logging is now enabled
	MUCStatusRoomLoggingEnabled = 170
	// MUCStatusRoomLoggingDisabled inform occupants that room
	// logging is now disabled
	MUCStatusRoomLoggingDisabled = 171
	// MUCStatusRoomNonAnonymous inform occupants that the room
	// is now non-anonymous
	MUCStatusRoomNonAnonymous = 172
	// MUCStatusRoomSemiAnonymous inform occupants that the room
	// is now semi-anonymous
	MUCStatusRoomSemiAnonymous = 173
	// MUCStatusRoomFullyAnonymous inform occupants that the room
	// is now fully-anonymous
	MUCStatusRoomFullyAnonymous = 174
	// MUCStatusRoomCreated inform user that a new room has
	// been created
	MUCStatusRoomCreated = 201
	// MUCStatusNicknameAssigned inform user that the service has
	// assigned or modified the occupant's roomnick
	MUCStatusNicknameAssigned = 210
	// MUCStatusBanned inform user that he or she has been banned
	// from the room
	MUCStatusBanned = 301
	// MUCStatusNewNickname inform all occupants of new room nickname
	MUCStatusNewNickname = 303
	// MUCStatusBecauseKickedFrom inform user that he or she has been
	// kicked from the room
	MUCStatusBecauseKickedFrom = 307
	// MUCStatusRemovedBecauseAffiliationChanged inform user that
	// he or she is being removed from the room because of an
	// affiliation change
	MUCStatusRemovedBecauseAffiliationChanged = 321
	// MUCStatusRemovedBecauseNotMember inform user that he or she
	// is being removed from the room because the room has been
	// changed to members-only and the user is not a member
	MUCStatusRemovedBecauseNotMember = 322
	// MUCStatusRemovedBecauseShutdown inform user that he or she
	// is being removed from the room because of a system shutdown
	MUCStatusRemovedBecauseShutdown = 332
)
View Source
const (
	DISCONNECTED connStatus = iota
	CONNECTING
	CONNECTED
)

These constants represent the different connection states

Variables

View Source
var (
	// ErrInvalidReserveRoomRequest is an invalid room reservation request error
	ErrInvalidReserveRoomRequest = errors.New("invalid reserve room request")

	// ErrInvalidInformationQueryRequest is an invalid information query request error
	ErrInvalidInformationQueryRequest = errors.New("invalid information query request")

	// ErrUnexpectedResponse is an unexpected response from the server error
	ErrUnexpectedResponse = errors.New("received an unexpected response from the server")

	// ErrInformationQueryResponse contains an error received in the information query response
	ErrInformationQueryResponse = errors.New("received an error from the server")
)
View Source
var (
	// ErrRoomConfigSubmit represents an early error that happened during room configuration submit
	ErrRoomConfigSubmit = errors.New("invalid room configuration submit request")
	// ErrRoomConfigSubmitResponse represents an invalid response for a room configuration request
	ErrRoomConfigSubmitResponse = errors.New("invalid response for room configuration request")
	// ErrRoomConfigCancel represents an early error that happened during a room configuration cancel request
	ErrRoomConfigCancel = errors.New("invalid room configuration cancel request")
	// ErrRoomConfigCancelResponse represents an invalid response for a room configuration cancel request
	ErrRoomConfigCancelResponse = errors.New("invalid response for room configuration cancel request")
)
View Source
var (
	// ErrDestroyRoomInvalidIQResponse represents an invalid IQ response error
	ErrDestroyRoomInvalidIQResponse = errors.New("invalid destroy room IQ response")
	// ErrDestroyRoomForbidden represents a forbidden destroy room error
	ErrDestroyRoomForbidden = errors.New("destroy room forbidden")
	// ErrDestroyRoomDoesntExist represents an unknown destroy room error
	ErrDestroyRoomDoesntExist = errors.New("room doesn't exist")
	// ErrDestroyRoomUnknown represents an unknown destroy room error
	ErrDestroyRoomUnknown = errors.New("destroy room unknown error")
	// ErrDestroyRoomNoResult represents a no result received IQ error
	ErrDestroyRoomNoResult = errors.New("destroy room no result error")
)
View Source
var (
	// ErrUpdateOccupantRequest represents an early error that happened during occupant update request
	ErrUpdateOccupantRequest = errors.New("invalid occupant update request")
	// ErrUpdateOccupantResponse represents an invalid response for an occupant update request
	ErrUpdateOccupantResponse = errors.New("invalid response for room configuration request")
	// ErrRemoveOwnerAffiliation represents error occurred when an owner attempts remove the owner affiliation to an unique owner in the room
	ErrRemoveOwnerAffiliation = errors.New("can't remove the owner affiliation to the unique owner in the room")
)
View Source
var ErrMUCJoinRoomInvalidNickname = errors.New("invalid nickname provided")

ErrMUCJoinRoomInvalidNickname represents an invalid nickname error

View Source
var (
	// ErrNotAllowedKickOccupant represents error occurred when an occupant tries kick out to other with a higher affiliation
	ErrNotAllowedKickOccupant = errors.New("can't kick out an occupant with higher affiliation than the self-occupant")
)

Functions

func CreateXMPPLogger added in v0.3.9

func CreateXMPPLogger(rawLog string) (*bytes.Buffer, io.Writer)

CreateXMPPLogger creates a XMPP log.

func Factory

Factory creates a new session from the given config

Types

This section is empty.

Directories

Path Synopsis
muc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL