Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ Skip: nil, Header: kid.HeaderRequestId, Generator: nanoid.New, }
Functions ¶
Types ¶
type Config ¶
type Config struct { // Skip the middleware when this func return true. // // Optional. Default: nil Skip func(*kid.Ctx) bool // Header name that specify the id. // // Optional. Default: "X-Request-ID" Header string // Generator generates a new id. // // Optional. Default: nanoid Generator func() (string, error) }
Click to show internal directories.
Click to hide internal directories.