Documentation ¶
Overview ¶
Package app is mostly needed to get rid of the import cycle that would take place if this code resides in the 'base' package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleUpdate ¶
HandleUpdate is the main router function for processing of tgbotapi.Update.
func NewAppEnv ¶
func NewAppEnv(params *Params) *base.ApplicationEnv
NewAppEnv is a constructor for base.ApplicationEnv. They reside in different packages to eliminate an import cycle.
Types ¶
type Params ¶
type Params struct { Ctx context.Context MessageHandlers []base.MessageHandler InlineHandlers []base.InlineHandler CallbackHandlers []base.CallbackHandler Settings settings.OptionsFetcher LangPool *loc.Pool API *base.BotAPI StateStorage wizard.StateStorage DB *pgxpool.Pool }
Params is a huge container will all possible resources of the application. It should be used in the main function, app and server packages only!
Click to show internal directories.
Click to hide internal directories.