archive

package
v0.0.0-...-2b3799d Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2017 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const ArchiveTable = `` /* 214-byte string literal not displayed */

ArchiveTable stores events for posterity. The brokers currently supported do not provide a surrogate event id and instead rely on the timestamp/user/room for identity.

View Source
const ReactionTable = `` /* 224-byte string literal not displayed */

Variables

This section is empty.

Functions

func Register

func Register()

Types

type ArchiveEntry

type ArchiveEntry struct {
	ID        string    `json:"id"`
	Timestamp time.Time `json:"timestamp"`
	User      string    `json:"user"`
	Room      string    `json:"room"`
	Broker    string    `json:"broker"`
	Body      string    `json:"body"`
	Reactions []string  `json:"reactions"`
}

ArchiveEntry is a single event observed by the archive plugin.

func FetchArchive

func FetchArchive(limit int) ([]*ArchiveEntry, error)

FetchArchive selects messages from the archive table up to the provided number of messages limit.

Jump to

Keyboard shortcuts

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