hook

package
v0.80.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: MIT Imports: 5 Imported by: 12

Documentation

Overview

Package hook contains telegram update hook middleware.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UpdateHook

type UpdateHook func(ctx context.Context, u tg.UpdatesClass) error

UpdateHook middleware is called on each tg.UpdatesClass method result.

Function is called before invoker return. Returned error will be wrapped and returned as InvokeRaw result.

func (UpdateHook) Handle

func (h UpdateHook) Handle(next tg.Invoker) telegram.InvokeFunc

Handle implements telegram.Middleware.

Jump to

Keyboard shortcuts

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