notify

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatDB

type ChatDB struct {
	db.ChatDB
	// contains filtered or unexported fields
}

ChatDB is wrapper above ChatDB

func NewChatDB

func NewChatDB(db db.ChatDB, logged db.LoggedDB, ch chan<- events.Event) *ChatDB

NewChatDB ...

func (*ChatDB) Add

func (d *ChatDB) Add(chatname string) error

Add ...

func (*ChatDB) AddUser

func (d *ChatDB) AddUser(chatname, username string) error

AddUser ...

func (*ChatDB) Remove

func (d *ChatDB) Remove(chatname string) error

Remove ...

func (*ChatDB) RemoveUser

func (d *ChatDB) RemoveUser(chatname, username string) error

RemoveUser ...

func (*ChatDB) StartListeningToEvents

func (d *ChatDB) StartListeningToEvents(ch <-chan events.Event)

StartListeningToEvents starts to listen to events from input channel. Don't call it twice!

type LoggedDB

type LoggedDB struct {
	db.LoggedDB
	// contains filtered or unexported fields
}

LoggedDB ...

func NewLoggedDB

func NewLoggedDB(db db.LoggedDB, ch chan<- events.Event) *LoggedDB

NewLoggedDB ...

func (*LoggedDB) Login

func (d *LoggedDB) Login(username string) (*models.LoggedUser, error)

Login ...

func (*LoggedDB) Logout

func (d *LoggedDB) Logout(username string) error

Logout ...

type MessageDB

type MessageDB struct {
	db.MessageDB
	// contains filtered or unexported fields
}

MessageDB ...

func NewMessageDB

func NewMessageDB(db db.MessageDB, ch chan<- events.Event) *MessageDB

NewMessageDB ...

func (*MessageDB) Post

func (d *MessageDB) Post(msg *models.Message) error

Post ...

Jump to

Keyboard shortcuts

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