core

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const CHATS_TABLE = `` /* 247-byte string literal not displayed */
View Source
const DELETE_ALL_CHATS = `DELETE FROM whatsmeow_chats WHERE our_jid = $1`
View Source
const INSERT_CHATS = `INSERT INTO whatsmeow_chats (our_jid, chat_jid, messages) VALUES ($1, $2, $3)`
View Source
const SELECT_ALL_CHATS = `SELECT messages FROM whatsmeow_chats WHERE our_jid = $1`
View Source
const SELECT_CHATS_BY_JID = `SELECT messages FROM whatsmeow_chats WHERE our_jid = $1 AND chat_jid = $2`
View Source
const UPDATE_MESSAGES_IN_CHAT = `UPDATE whatsmeow_chats SET messages = $1 WHERE our_jid = $1 AND chat_jid = $2`
View Source
const UPSERT_CHATS = `` /* 152-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

func NewGoRoxyBase

func NewGoRoxyBase(options *options.Options) (*App, error)

func (*App) AddNewCategory

func (app *App) AddNewCategory(category string)

func (*App) AddNewCommand

func (app *App) AddNewCommand(command command.Command)

func (*App) AddNewMiddleware

func (app *App) AddNewMiddleware(middleware command.MiddlewareFunc)

func (*App) Shutdown

func (app *App) Shutdown()

type Muxer

type Muxer struct {
	Options              *options.Options
	Log                  waLog.Logger
	MessageTimeout       time.Duration
	Categories           *skipmap.StringMap[string]
	GlobalMiddlewares    *skipmap.StringMap[command.MiddlewareFunc]
	Middlewares          *skipmap.StringMap[command.MiddlewareFunc]
	Commands             *skipmap.StringMap[*command.Command]
	CommandResponseCache *skipmap.StringMap[*waProto.Message]
	QuestionState        *skipmap.StringMap[*command.QuestionState]
	GroupCache           *skipmap.StringMap[[]*waTypes.GroupInfo]

	QuestionChan    chan *command.QuestionState
	Locals          *skipmap.StringMap[string]
	SuggestionModel *fuzzy.Model
	// contains filtered or unexported fields
}

func NewMuxer

func NewMuxer(ctx *skipmap.StringMap[types.RoxyContext], log waLog.Logger, options *options.Options) *Muxer

func (*Muxer) AddCommand

func (muxer *Muxer) AddCommand(cmd *command.Command)

func (*Muxer) AddGlobalMiddleware

func (muxer *Muxer) AddGlobalMiddleware(middleware command.MiddlewareFunc)

func (*Muxer) AddMiddleware

func (muxer *Muxer) AddMiddleware(middleware command.MiddlewareFunc)

func (*Muxer) Clean

func (muxer *Muxer) Clean()

func (*Muxer) RunCommand

func (muxer *Muxer) RunCommand(c *whatsmeow.Client, evt *events.Message)

Jump to

Keyboard shortcuts

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