bot

package
v1.0.179 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CriarStruct

func CriarStruct(nome string, mapaDeTipos map[string]BotClass) (interface{}, error)

func RegistrarBot

func RegistrarBot(key string, clazz any, tempo_minuto int)

Types

type BotClass

type BotClass struct {
	Classe reflect.Type
	Tempo  int
}

type CoreBot

type CoreBot struct {
	Bot   *config.Bot
	Certs []*config.Cert
	Dbs   []*config.Database
}

func NewCoreBot

func NewCoreBot(certs []*config.Cert, dbs []*config.Database, bot *config.Bot) *CoreBot

func (*CoreBot) Executar

func (c *CoreBot) Executar(ctx context.Context) error

func (*CoreBot) LogCritical

func (bot *CoreBot) LogCritical(v ...interface{})

func (*CoreBot) LogDebug

func (bot *CoreBot) LogDebug(v ...interface{})

func (*CoreBot) LogError

func (bot *CoreBot) LogError(v ...interface{})

func (*CoreBot) LogFatal

func (bot *CoreBot) LogFatal(v ...interface{})

func (*CoreBot) LogInfo

func (bot *CoreBot) LogInfo(v ...interface{})

func (*CoreBot) LogWarning

func (bot *CoreBot) LogWarning(v ...interface{})

type IControllerBot

type IControllerBot interface {
	Executar()
}

type RegisterBotClasses

type RegisterBotClasses map[string]BotClass

type RegistraBotController

type RegistraBotController struct {
	RegisteredClasses RegisterBotClasses
}

func GetRegistraBotInstance

func GetRegistraBotInstance() *RegistraBotController

func (*RegistraBotController) FindBotClassByKeyAndNewAsObject

func (r *RegistraBotController) FindBotClassByKeyAndNewAsObject(key string) (IControllerBot, error)

func (*RegistraBotController) PrintRegisterClass

func (r *RegistraBotController) PrintRegisterClass()

func (*RegistraBotController) RegisterClass

func (r *RegistraBotController) RegisterClass(key string, clazz any, tempo_minuto int)

Jump to

Keyboard shortcuts

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