goSadTgBot

module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT

README

goSadTgBot — SadBot's Framework for development of Telegram bots

CI Build

This framework is based on:

Packages

  • base contains base types like container for request environment or object for sending requests.
  • app provides an additional container for the application environment and method for processing the updates.
  • server allows you to use a WebHook.
  • metrics allows you to publish the /metrics endpoint for Prometheus.
  • storage creates a database connection and runs the migrations located in the db/migrations directory.
  • settings consists of an interface that must provide user settings to the bot.
  • wizard provides facilities to create forms with fields of different types.
  • logconst is just a set of constants for use in log.WithField(logconst.*, ...).

Examples of usage

Directories

Path Synopsis
Package app is mostly needed to get rid of the import cycle that would take place if this code resides in the 'base' package.
Package app is mostly needed to get rid of the import cycle that would take place if this code resides in the 'base' package.
Package base defines basic types and a wrapper around the original [tgbotapi.BotAPI] struct.
Package base defines basic types and a wrapper around the original [tgbotapi.BotAPI] struct.
Package logconst consists of constant values representing the fields in log messages.
Package logconst consists of constant values representing the fields in log messages.
Package metrics provides metrics for Prometheus.
Package metrics provides metrics for Prometheus.
Package server provides functions to set a webhook and start a server to process incoming requests.
Package server provides functions to set a webhook and start a server to process incoming requests.
Package settings consists of an interface that must provide user settings to the bot.
Package settings consists of an interface that must provide user settings to the bot.
Package storage creates a database connection and runs the migrations located in the `db/migrations` directory.
Package storage creates a database connection and runs the migrations located in the `db/migrations` directory.
Package wizard provides support for field based forms defined by client code.
Package wizard provides support for field based forms defined by client code.

Jump to

Keyboard shortcuts

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