Skip to content

Commit

Permalink
✨feature: Pass all locals to ctx.Render (#1693)
Browse files Browse the repository at this point in the history
🔥 Add Global ViewLayout (#1384)
  • Loading branch information
ReneWerner87 committed Feb 3, 2022
1 parent 319ae22 commit 20a3fe8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions api/fiber.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ app := fiber.New(fiber.Config{
| BodyLimit | `int` | Sets the maximum allowed size for a request body, if the size exceeds the configured limit, it sends `413 - Request Entity Too Large` response. | `4 * 1024 * 1024` |
| Concurrency | `int` | Maximum number of concurrent connections. | `256 * 1024` |
| Views | `Views` | Views is the interface that wraps the Render function. See our **Template Middleware** for supported engines. | `nil` |
| ViewsLayout | `string` | Views Layout is the global layout for all template render until override on Render function. See our **Template Middleware** for supported engines. | `""` |
| PassLocalsToViews | `bool` | PassLocalsToViews Enables passing of the locals set on a fiber.Ctx to the template engine. See our **Template Middleware** for supported engines. | `false` |
| ReadTimeout | `time.Duration` | The amount of time allowed to read the full request, including the body. The default timeout is unlimited. | `nil` |
| WriteTimeout | `time.Duration` | The maximum duration before timing out writes of the response. The default timeout is unlimited. | `nil` |
| IdleTimeout | `time.Duration` | The maximum amount of time to wait for the next request when keep-alive is enabled. If IdleTimeout is zero, the value of ReadTimeout is used. | `nil` |
Expand Down
8 changes: 4 additions & 4 deletions api/middleware/cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ type Config struct {
// }
KeyGenerator func(*fiber.Ctx) string

// allows you to generate custom Expiration Key By Key, default is Expiration (Optional)
//
// Default: nil
ExpirationGenerator func(*fiber.Ctx, *Config) time.Duration
// allows you to generate custom Expiration Key By Key, default is Expiration (Optional)
//
// Default: nil
ExpirationGenerator func(*fiber.Ctx, *Config) time.Duration

// Store is used to store the state of the middleware
//
Expand Down

0 comments on commit 20a3fe8

Please sign in to comment.