events

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: 5 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DelayedMessageSent added in v0.3.7

type DelayedMessageSent struct {
	Peer   jid.Any
	Tracer int
}

DelayedMessageSent represents the event that a delayed message is sent

type Event

type Event struct {
	Type EventType
}

Event represents a Session event

type EventType

type EventType int

EventType represents the type of Session event

const (
	Disconnected EventType = iota
	Connecting
	Connected
	ConnectionLost

	RosterReceived
	Ping
	PongReceived
)

Session event types

type FileTransfer added in v0.3.9

type FileTransfer struct {
	Peer jid.WithResource

	Mime             string
	DateLastModified string
	Name             string
	Size             int64
	Description      string
	IsDirectory      bool
	Encrypted        bool

	Answer  chan<- *string // one time use
	Control *sdata.FileTransferControl
}

FileTransfer represents an event associated with file transfers

type MUC

type MUC interface {
	// contains filtered or unexported methods
}

MUC is a marker interface that is used to differentiate MUC "events"

type MUCDelayedMessageReceived

type MUCDelayedMessageReceived struct {
	MUCMessageReceived
}

MUCDelayedMessageReceived contains information about the received delayed message

type MUCDiscussionHistoryReceived

type MUCDiscussionHistoryReceived struct {
	History *data.DiscussionHistory
}

MUCDiscussionHistoryReceived contains information about full discussion history

type MUCError

type MUCError struct {
	ErrorType MUCErrorType
	Room      jid.Bare
	Nickname  string
}

MUCError contains information about a MUC-related error event

type MUCErrorType

type MUCErrorType EventType

MUCErrorType represents the type of MUC error event

const (
	// MUCNoError is a special type that can be used as a "no error"
	// flag inside the logic of the MUC implementation
	MUCNoError MUCErrorType = iota

	MUCNotAuthorized
	MUCForbidden
	MUCItemNotFound
	MUCNotAllowed
	MUCNotAcceptable
	MUCRegistrationRequired
	MUCConflict
	MUCServiceUnavailable

	MUCMessageForbidden
	MUCMessageNotAcceptable
)

MUC error event types

type MUCLiveMessageReceived

type MUCLiveMessageReceived struct {
	MUCMessageReceived
}

MUCLiveMessageReceived contains information about the received live message

type MUCLoggingDisabled

type MUCLoggingDisabled struct{}

MUCLoggingDisabled signifies that logging has been turned off from the room

type MUCLoggingEnabled

type MUCLoggingEnabled struct{}

MUCLoggingEnabled signifies that logging has been turned on from the room

type MUCMessageReceived

type MUCMessageReceived struct {
	Nickname  string
	Message   string
	Timestamp time.Time
}

MUCMessageReceived represents a received groupchat message

type MUCOccupant

type MUCOccupant struct {
	Nickname      string
	RealJid       jid.Full
	Status        string
	StatusMessage string
}

MUCOccupant contains basic information about any room's occupant

type MUCOccupantAffiliationRoleUpdated

type MUCOccupantAffiliationRoleUpdated struct {
	AffiliationRoleUpdate data.AffiliationRoleUpdate
}

MUCOccupantAffiliationRoleUpdated signifies that an occupant affiliation and role was updated

type MUCOccupantAffiliationUpdated

type MUCOccupantAffiliationUpdated struct {
	AffiliationUpdate data.AffiliationUpdate
}

MUCOccupantAffiliationUpdated signifies that an occupant affiliation was updated

type MUCOccupantJoined

type MUCOccupantJoined struct {
	MUCOccupantUpdated
	Status string
}

MUCOccupantJoined contains information about the occupant that has joined to room

type MUCOccupantKicked

type MUCOccupantKicked struct {
	MUCOccupant
	Actor  data.Actor
	Reason string
}

MUCOccupantKicked contains information about the occupant kicked

type MUCOccupantLeft

type MUCOccupantLeft struct {
	MUCOccupant
	Affiliation data.Affiliation
	Role        data.Role
}

MUCOccupantLeft contains information about the occupant that has left the room

type MUCOccupantRemoved

type MUCOccupantRemoved struct {
	MUCOccupant
}

MUCOccupantRemoved contains information related to member removedcontains information related to self occupant which has been removed

type MUCOccupantRoleUpdated

type MUCOccupantRoleUpdated struct {
	RoleUpdate data.RoleUpdate
}

MUCOccupantRoleUpdated signifies that an occupant role was updated

type MUCOccupantUpdated

type MUCOccupantUpdated struct {
	MUCOccupant
	Affiliation data.Affiliation
	Role        data.Role
}

MUCOccupantUpdated contains information about the updated occupant in a room

type MUCRoom

type MUCRoom struct {
	Room jid.Bare
}

MUCRoom contains information about the room id

type MUCRoomAnonymityChanged

type MUCRoomAnonymityChanged struct {
	AnonymityLevel string
}

MUCRoomAnonymityChanged contains information regarding to if the the room is semi or non anonymous

type MUCRoomConfigChanged

type MUCRoomConfigChanged struct {
	Changes   []data.RoomConfigType
	DiscoInfo data.RoomDiscoInfo
}

MUCRoomConfigChanged signifies that room configuration changed

type MUCRoomConfigTimeout

type MUCRoomConfigTimeout struct{}

MUCRoomConfigTimeout indicates that the room listing request has timeout

type MUCRoomCreated

type MUCRoomCreated struct {
	MUCRoom
}

MUCRoomCreated contains event information about the created room

type MUCRoomDestroyed

type MUCRoomDestroyed struct {
	Reason          string
	AlternativeRoom jid.Bare
	Password        string
}

MUCRoomDestroyed contains event information about the destroyed room

type MUCRoomDiscoInfoReceived

type MUCRoomDiscoInfoReceived struct {
	DiscoInfo data.RoomDiscoInfo
}

MUCRoomDiscoInfoReceived contains information of the received room disco info

type MUCRoomRenamed

type MUCRoomRenamed struct {
	NewNickname string
}

MUCRoomRenamed contains event information about the renamed room's nickname

type MUCSelfOccupantAffiliationRoleUpdated

type MUCSelfOccupantAffiliationRoleUpdated struct {
	MUCOccupantAffiliationRoleUpdated
}

MUCSelfOccupantAffiliationRoleUpdated signifies that the self-occupant affiliation and role was updated

type MUCSelfOccupantAffiliationUpdated

type MUCSelfOccupantAffiliationUpdated struct {
	MUCOccupantAffiliationUpdated
}

MUCSelfOccupantAffiliationUpdated signifies that the self-occupant affiliation was updated

type MUCSelfOccupantJoined

type MUCSelfOccupantJoined struct {
	MUCOccupantJoined
}

MUCSelfOccupantJoined contains information about the occupant that has joined to room

type MUCSelfOccupantKicked

type MUCSelfOccupantKicked struct {
	MUCOccupantKicked
}

MUCSelfOccupantKicked contains information about the self-occupant kicked

type MUCSelfOccupantRemoved

type MUCSelfOccupantRemoved struct{}

MUCSelfOccupantRemoved contains information related to self occupant which has been removed

type MUCSelfOccupantRoleUpdated

type MUCSelfOccupantRoleUpdated struct {
	MUCOccupantRoleUpdated
}

MUCSelfOccupantRoleUpdated signifies that the self-occupant role was updated

type MUCSubjectReceived

type MUCSubjectReceived struct {
	Subject string
}

MUCSubjectReceived contains the room subject received

type MUCSubjectUpdated

type MUCSubjectUpdated struct {
	Nickname string
	Subject  string
}

MUCSubjectUpdated contains the room subject will be updated

type Message

type Message struct {
	From      jid.Any
	When      time.Time
	Body      []byte
	Encrypted bool
}

Message represents a message event

type Notification

type Notification struct {
	Peer         jid.Any
	Notification string
}

Notification represents a notification event

type Peer

type Peer struct {
	Type PeerType
	// This can be either with or without Resource depending on the peer type
	From jid.Any
}

Peer represents an event associated to a peer

type PeerType

type PeerType int

PeerType represents the type of Peer event

const (
	IQReceived PeerType = iota

	OTREnded
	OTRNewKeys
	OTRRenewedKeys

	SubscriptionRequest
	Subscribed
	Unsubscribe
)

Peer types

type Presence

type Presence struct {
	*data.ClientPresence
	Gone bool
}

Presence represents a presence event

type SMP added in v0.3.9

type SMP struct {
	Type     SMPType
	From     jid.WithResource
	Resource string
	Body     string
}

SMP is an event related to SMP

type SMPType added in v0.3.9

type SMPType int

SMPType denotes the type of an SMP event

const (
	SecretNeeded SMPType = iota
	Success
	Failure
)

SMP types

Jump to

Keyboard shortcuts

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