event

package
v0.0.0-...-b00af6b Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Users      map[int64]*user.User = make(map[int64]*user.User)
	NewLines                        = regexp.MustCompile(`\n+`)
	MultiSpace                      = regexp.MustCompile(`[ ]{2,}`)
	Queue      *list.List           = list.New()
)

Functions

func BootQueue

func BootQueue(db *database.Database) error

func CheckEventUsers

func CheckEventUsers(db *database.Database, token string) error

func ClearQueue

func ClearQueue()

func ProcessQueue

func ProcessQueue(result chan []map[string]string)

Types

type Event

type Event struct {
	*database.Database
	User      *user.User
	ID        int64
	Channel   string
	Timestamp float64
	Schedule  int64
	Etext     string
	Etype     string
	Emessage  string
	Next      int64
	// contains filtered or unexported fields
}

func Create

func Create(payload string, db *database.Database, token string) (*Event, error)

func (*Event) Message

func (e *Event) Message() string

func (*Event) MessageBody

func (e *Event) MessageBody() string

func (*Event) Processed

func (e *Event) Processed() map[string]string

func (*Event) UserTag

func (e *Event) UserTag() string

type EventInit

type EventInit struct {
	*database.Database

	Channel   string
	Timestamp float64
	Schedule  int64
	Etext     string
	Etype     string
	User      string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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