Benchmark_Middleware_BasicAuth_Upper() — fiber Function Reference
Architecture documentation for the Benchmark_Middleware_BasicAuth_Upper() function in basicauth_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD b0b39b20_3656_cc00_b245_99a514e3ed98["Benchmark_Middleware_BasicAuth_Upper()"] c1fa52c0_acd4_56de_8c46_542417f3c9b8["basicauth_test.go"] b0b39b20_3656_cc00_b245_99a514e3ed98 -->|defined in| c1fa52c0_acd4_56de_8c46_542417f3c9b8 bfd8a9b6_0e17_60de_7e62_37b7a2f1750e["sha256Hash()"] b0b39b20_3656_cc00_b245_99a514e3ed98 -->|calls| bfd8a9b6_0e17_60de_7e62_37b7a2f1750e style b0b39b20_3656_cc00_b245_99a514e3ed98 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
middleware/basicauth/basicauth_test.go lines 467–495
func Benchmark_Middleware_BasicAuth_Upper(b *testing.B) {
app := fiber.New()
hashedJohn := sha256Hash("doe")
app.Use(New(Config{
Users: map[string]string{
"john": hashedJohn,
},
}))
app.Get("/", func(c fiber.Ctx) error {
return c.SendStatus(fiber.StatusTeapot)
})
h := app.Handler()
fctx := &fasthttp.RequestCtx{}
fctx.Request.Header.SetMethod(fiber.MethodGet)
fctx.Request.SetRequestURI("/")
fctx.Request.Header.Set(fiber.HeaderAuthorization, "Basic am9objpkb2U=") // john:doe
b.ReportAllocs()
for b.Loop() {
h(fctx)
}
require.Equal(b, fiber.StatusTeapot, fctx.Response.Header.StatusCode())
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does Benchmark_Middleware_BasicAuth_Upper() do?
Benchmark_Middleware_BasicAuth_Upper() is a function in the fiber codebase, defined in middleware/basicauth/basicauth_test.go.
Where is Benchmark_Middleware_BasicAuth_Upper() defined?
Benchmark_Middleware_BasicAuth_Upper() is defined in middleware/basicauth/basicauth_test.go at line 467.
What does Benchmark_Middleware_BasicAuth_Upper() call?
Benchmark_Middleware_BasicAuth_Upper() calls 1 function(s): sha256Hash.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free