v1

package
v0.0.0-...-83afde1 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUser

func AddUser(conn *websocket.Conn, data map[string]string)

AddUser register a user

func DeleteUser

func DeleteUser(conn *websocket.Conn, data map[string]string)

DeleteUser will delete a user

func FindUser

func FindUser(conn *websocket.Conn, data map[string]string)

func SendBroadcast

func SendBroadcast(client *e.Client, data map[string]string)

func SendMessage

func SendMessage(client *e.Client, data map[string]string)

func WriteMessage

func WriteMessage(c *e.Client)

Types

type AddUserForm

type AddUserForm struct {
	Email     string
	FirstName string
	LastName  string
}

AddUserForm is a form of register

type Message

type Message struct {
	ID        string `json:"id"`
	Sender    string `json:"sender"`
	Recipient string `json:"recipient"`
	Content   string `json:"content"`
	CreatedAt string `json:"created_at"`
}

Message is the struct of message

type User

type User struct {
	UserID       string `json:"id"`
	Username     string `json:"username"`
	Email        string `json:"email"`
	Password     string `json:"password"`
	FirstName    string `json:"firstName"`
	LastName     string `json:"lastName"`
	ProfileImage string `json:"profileImage"`
	Key          string `json:"key"`
	IsLogin      bool   `json:"isLogin"`
}

Jump to

Keyboard shortcuts

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