ExGram.Middleware behaviour (ex_gram v0.56.0)

View Source

Helper to make it easier to create middlewares

Summary

Types

opts()

@type opts() ::
  binary()
  | tuple()
  | atom()
  | integer()
  | float()
  | [opts()]
  | %{required(opts()) => opts()}

Callbacks

call(t, opts)

@callback call(ExGram.Cnt.t(), opts()) :: ExGram.Cnt.t()

init(opts)

(optional)
@callback init(opts()) :: opts()

Functions

add_extra(cnt, values)

add_extra(cnt, key, value)

halt(cnt)