Documentation
¶
Overview ¶
🚀 Fiber is an Express inspired web framework written in Go with 💖 📌 API Documentation: https://fiber.wiki 📝 Github Repository: https://github.com/gofiber/fiber
Index ¶
- Constants
- Variables
- func DefaultIdGenerator() []byte
- func Environment(env string) fiber.Handler
- func GetEnvironmentContext(ctx context.Context) (string, error)
- func IsDevelopment(ctx context.Context) bool
- func IsProduction(ctx context.Context) bool
- func IsStaging(ctx context.Context) bool
- func IsTesting(ctx context.Context) bool
- func Reload(config ...Config) fiber.Handler
- func SetEnvironmentContext(c *fiber.Ctx, env string) error
- func WithHotReload(app *fiber.App, config ...Config)
- type Config
Constants ¶
View Source
const ( // Noop is a no-op function. Noop = "noop" // Environment environment Development = "development" // Testing environment Testing = "testing" // Staging environment Staging = "staging" // Production environment Production = "production" )
Variables ¶
View Source
var ConfigDefault = Config{ IdGenerator: DefaultIdGenerator, }
ConfigDefault is the default config.
View Source
var FS embed.FS
Functions ¶
func Environment ¶
Environment is a middleware that sets the environment context.
func GetEnvironmentContext ¶
GetEnvironmentContext gets the environment context.
func IsDevelopment ¶
IsDevelopment returns true if the environment is development.
func IsProduction ¶
IsProduction returns true if the environment is production.
func SetEnvironmentContext ¶
SetEnvironmentContext sets the environment context.
func WithHotReload ¶
WithHotReload is a middleware that enables a live reload of a site.
Types ¶
Click to show internal directories.
Click to hide internal directories.