chat

package
v0.8.18 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: Apache-2.0, BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PluginName contains the human-readable name of the plugin.
	PluginName = "Chat"
)

Variables

View Source
var (
	// Plugin is the "plugin" instance of the chat application.
	Plugin *node.Plugin
)

Functions

func SendChatMessage

func SendChatMessage(c echo.Context) error

SendChatMessage sends a chat message.

Types

type Request

type Request struct {
	From    string `json:"from"`
	To      string `json:"to"`
	Message string `json:"message"`
}

Request defines the chat message to send.

type Response

type Response struct {
	MessageID string `json:"messageID,omitempty"`
	Error     string `json:"error,omitempty"`
}

Response contains the ID of the message sent.

Jump to

Keyboard shortcuts

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