models

package
v0.0.0-...-1c696ee Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2018 License: Apache-2.0 Imports: 1 Imported by: 7

Documentation

Index

Constants

View Source
const (
	EVENT_JOIN = iota
	EVENT_LEAVE
	EVENT_MESSAGE
)

Variables

This section is empty.

Functions

func NewArchive

func NewArchive(event Event)

NewArchive saves new event to archive list.

Types

type Event

type Event struct {
	Type      EventType // JOIN, LEAVE, MESSAGE
	User      string
	Timestamp int // Unix timestamp (secs)
	Content   string
}

func GetEvents

func GetEvents(lastReceived int) []Event

GetEvents returns all events after lastReceived.

type EventType

type EventType int

Jump to

Keyboard shortcuts

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