events

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2016 License: GPL-3.0 Imports: 3 Imported by: 0

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 {
	Session access.Session
	Peer    string
	Tracer  int
}

DelayedMessageSent represents the event that a delayed message is sent

type Event

type Event struct {
	Type    EventType
	Session access.Session
}

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 Log

type Log struct {
	Level   LogLevel
	Message string
}

Log contains information one specific log event

type LogLevel

type LogLevel int

LogLevel is the current log level

const (
	Info LogLevel = iota
	Warn
	Alert
)

The different available log levels

type Message

type Message struct {
	Session   access.Session
	From      string
	Resource  string
	When      time.Time
	Body      []byte
	Encrypted bool
}

Message represents a message event

type Notification

type Notification struct {
	Session      access.Session
	Peer         string
	Notification string
}

Notification represents a notification event

type Peer

type Peer struct {
	Session access.Session
	Type    PeerType
	From    string
}

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 {
	Session access.Session
	*data.ClientPresence
	Gone bool
}

Presence represents a presence event

Jump to

Keyboard shortcuts

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