actions

package
v0.1.1-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2017 License: MIT Imports: 3 Imported by: 3

Documentation

Overview

Package actions details boutique.Actions that are used by modifiers to modify the store.

Index

Constants

View Source
const (
	// ActSendMessage indicates we want to send a message via the store.
	ActSendMessage boutique.ActionType = iota
	// ActDeleteMessages indicates we want to delete messages from the store.
	ActDeleteMessages
	// ActAddUser indicates the Action wants to add a user to the store.
	ActAddUser
	// ActRemoveUser indicates the Action wants to remove a user from the store.
	ActRemoveUser
)

Variables

This section is empty.

Functions

func AddUser

func AddUser(u string) boutique.Action

AddUser adds a user to the store, indicating a new user is in the room.

func DeleteMessages

func DeleteMessages(lastMsgID int) boutique.Action

DeleteMessages deletes messages in our .Messages slice from the front until we reach lastMsgID (inclusive).

func RemoveUser

func RemoveUser(u string) boutique.Action

RemoveUser removes a user from the store, indicating a user has left the room.

func SendMessage

func SendMessage(user string, s string) boutique.Action

SendMessage sends a message via the store.

Types

This section is empty.

Jump to

Keyboard shortcuts

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