invoker

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package invoker contains RPC invoker helpers and middlewares.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Debug

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

Debug is pretty-print debugging invoker middleware.

func NewDebug

func NewDebug(next tg.Invoker) *Debug

NewDebug creates new Debug middleware.

func (*Debug) Invoke added in v0.9.0

func (d *Debug) Invoke(ctx context.Context, input bin.Encoder, output bin.Decoder) error

Invoke implements tg.Invoker.

func (*Debug) WithOutput

func (d *Debug) WithOutput(out io.Writer) *Debug

WithOutput sets output writer.

type UpdateHook added in v0.7.0

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 added in v0.9.0

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